/* Custom styles untuk tampilan mobile */
body {
    background-color: #f0f2f5;
}

.mobile-container {
    max-width: 480px;
    margin: auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.owl-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.banner-carousel .item {
    height: auto !important;
    /* jangan fixed height */
}

.banner-carousel img {
    object-fit: contain !important;
    /* biar selalu utuh */
}

.owl-carousel .owl-item img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card-img {
    width: 100%;            /* ikut lebar container di mobile */
    max-width: 290px;       /* tidak lebih dari 290px */
    height: auto;           /* tinggi otomatis sesuai proporsi */
    max-height: 340px;      /* batasi tinggi maksimal */
    object-fit: contain;    /* gambar utuh, tidak terpotong */
    display: block;         /* rapih */
    margin: 0 auto;         /* center kalau parent lebih lebar */
    background-color: #f9f9f9; /* opsional: area kosong ada background */
    /* height: 150px;
    object-fit: cover; */
}

.popup-content {
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .popup-content {
        animation: fade-in 0.3s ease-out;
    }

    @keyframes fade-in {
        from {
            opacity: 0;
            transform: scale(0.95);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* Carousel produk (popup detail) */
.product-image-carousel .item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}
.product-image-carousel .item img {
    max-width: 100%;
    max-height: 80vh; /* biar full tinggi layar mobile */
    object-fit: contain;
}


/*Scrollbar Custom*/
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    /* gray-400 */
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0;
    /* gray-500 */
}


/* lazy loading gambar */
.skeleton {
    position: relative;
    background-color: #e2e5e7;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.2s infinite;
}

/* Gambar awalnya transparan */
.lazy-img {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* Saat sudah load, aktifkan fade-in */
.lazy-img.loaded {
    opacity: 1;
}


@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}