@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body { 
    background-color: #121212; 
    color: white; 
    font-family: 'Poppins', sans-serif; 
    overflow-x: hidden; 
}

/* Efek Overlap */
.card-container { 
    position: relative; 
    width: 220px; 
    height: 260px; 
    margin-bottom: 20px; 
}

.bg-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75%; /* Kotak warna di belakang */
    border-radius: 25px;
    z-index: 1;
    transition: all 0.3s ease;
}

.product-img {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2; /* Gambar di depan */
    height: 95%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.card-container:hover .product-img { 
    transform: translateX(-50%) scale(1.05); 
}

.card-container:hover .bg-box {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Modal Bottom Sheet */
#cartSheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #FFF9C4; 
    color: black;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px 20px;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
}

#cartSheet.active { 
    bottom: 0; 
}

.overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 40;
}

.qty-btn {
    transition: all 0.2s ease;
}

.qty-btn:hover {
    transform: scale(1.1);
}

.quantity-controls input[type="number"] {
    -moz-appearance: textfield;
}

.qty-input {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    background-color: #f59e0b;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    color: black;
}

#cartItems .qty-input {
    width: 4rem;
    height: 2rem;
    text-align: center;
    background-color: #f59e0b;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    color: black;
    padding: 0;
}

.qty-input:focus {
    outline: 2px solid #d97706;
}

.quantity-controls input[type="number"]::-webkit-outer-spin-button,
.quantity-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#cartBadge {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    top: -10px;
    right: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

/* Popup Modal */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.popup-modal.active {
    display: flex;
}

.popup-content {
    position: relative;
    background-color: transparent;
    border-radius: 10px;
    padding: 0;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: popupFadeIn 0.3s;
}

.popup-image {
    width: 120%;
    height: auto;
    max-width: 500px;
    display: block;
    border-radius: 10px;
}

@keyframes popupFadeIn {
    from {opacity: 0; transform: scale(0.8);}
    to {opacity: 1; transform: scale(1);}
}