/* =========================================
   STYLE KHUSUS HALAMAN SHOP (ARCHIVE)
   ========================================= */

/* Hero Banner Dinamis dari Database */
.shop-header-section {
    width: 100%;
    
    /* 🔥 KUNCI 1: Tarik ke atas menyusup ke bawah Header Kaca 🔥 */
    margin-top: -85px !important; 
    
    /* 🔥 KUNCI 2: Tinggi disesuaikan (Tidak perlu 100vh agar pembeli cepat melihat produk) 🔥 */
    height: calc(60vh + 85px); 
    min-height: 350px;
    
    background-color: #111;
    background-size: cover;
    background-position: center 25%; /* Fokus gambar agak ke atas, mirip halaman depan */
    background-repeat: no-repeat;
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.shop-header-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.shop-header-content {
    position: relative;
    z-index: 2;
}

.shop-header-content h1 {
    font-size: 48px;
    color: #ffffff; /* Pastikan putih bersih */
    font-family: 'Playfair Display', serif;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.shop-header-content p {
    font-size: 15px;
    color: #dddddd;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   TOP CONTROL BAR (ALA SNS-B)
   ========================================= */
.shop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    
    /* 🔥 KUNCI 3: Menyesuaikan jarak tempel agar antre pas di bawah Header putih saat discroll 🔥 */
    top: 85px; 
    
    z-index: 80;
}

.shop-top-bar h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.shop-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

/* =========================================
   FILTER & SORT DRAWER (LACI SAMPING)
   ========================================= */

.filter-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-overlay.open {
    display: block;
    opacity: 1;
}

.filter-drawer {
    position: fixed;
    top: 0; right: 0; /* Diposisikan mepet kanan */
    width: 100%;
    max-width: 360px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    
    /* 🔥 PERBAIKAN: Geser keluar layar sebesar 105% (agar bayangannya ikut sembunyi) 🔥 */
    transform: translateX(105%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Animasi lebih mulus */
}

.filter-drawer.open {
    /* 🔥 PERBAIKAN: Kembalikan laci ke posisi normal saat dibuka 🔥 */
    transform: translateX(0);
}


.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.filter-header h2 {
    font-size: 20px;
    margin: 0;
}

.filter-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.filter-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kustomisasi Radio Button */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
}

.radio-group label:hover {
    color: #111;
}

.radio-group input[type="radio"] {
    appearance: none;
    background-color: #fff;
    margin: 0 10px 0 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: grid;
    place-content: center;
}

.radio-group input[type="radio"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: #111; /* Lingkaran hitam saat dipilih */
}

.radio-group input[type="radio"]:checked::before {
    transform: scale(1);
}

.radio-group input[type="radio"]:checked {
    border-color: #111;
}

.radio-group input[type="radio"]:checked + span {
    font-weight: 600;
    color: #111;
}

.filter-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fff;
}

/* =========================================
   PRODUCT SLIDESHOW
   ========================================= */

.slideshow-container {
    position: relative;
    overflow: hidden;
}

.slideshow-wrapper {
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    display: none;
}

.slideshow-slide.active {
    display: block;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   RESPONSIVITAS MOBILE (HP)
   ========================================= */
@media (max-width: 768px) {
    .shop-header-section {
        /* 🔥 KUNCI MOBILE: Tetap ditarik ke atas dan amankan dari URL Bar HP (svh) 🔥 */
        margin-top: -85px !important;
        height: calc(45svh + 85px) !important; 
        padding: 40px 20px;
    }
    
    .shop-header-content h1 {
        font-size: 32px;
    }

    .shop-top-bar {
        padding: 16px 20px;
        /* Di HP, header sedikit lebih tipis, kita sesuaikan jarak tempelnya */
        top: 70px; 
    }

    .shop-top-bar h2 {
        font-size: 16px;
    }

    .filter-drawer {
        max-width: 100%; /* Penuhi layar saat di HP */
    }
}

/* =========================================
   PERBAIKAN LOGO TEKS FUTURA (SEMUA HALAMAN)
   ========================================= */
.logo-sekunder-futura {
    font-family: 'Futura', 'Tw Cen MT', 'Century Gothic', sans-serif;
    font-size: 24px; 
    font-weight: 600;
    letter-spacing: 2px; 
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: color 0.4s ease; 
    
    /* 🔥 REVISI: Mematikan efek miring (italic) dari class induk 🔥 */
    font-style: normal !important; 
}

.logo-sekunder-futura span {
    font-weight: 400; 
    font-style: normal !important; 
}

/* --- LOGIKA WARNA BUNGELON --- */
.main-header .logo-sekunder-futura {
    color: #ffffff;
}
.main-header.scrolled .logo-sekunder-futura {
    color: #111111;
}

/* 🔥 REVISI: PENYESUAIAN UKURAN LOGO UNTUK HP (BERLAKU GLOBAL) 🔥 */
@media (max-width: 768px) {
    .logo-sekunder-futura {
        font-size: 14px !important; 
        line-height: 1.2 !important;
        display: flex !important;
        flex-direction: column !important; 
        align-items: center !important;
        letter-spacing: 3px !important;
        font-style: normal !important;
    }
    
    .logo-sekunder-futura span {
        font-size: 11px !important;
        letter-spacing: 4px !important;
        font-style: normal !important;
    }
}

/* =========================================
   UI KATALOG PRODUK (STYLE SNS-B)
   ========================================= */

/* Wadah Gambar & Slider */
.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
}

.product-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-slider-track img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge (Sold Out / Best Seller) */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    z-index: 10;
}
.badge-soldout { background: #FF0000; color: #FFF; }
.badge-custom { background: #000; color: #FFF; }

/* Tombol Panah Swipe Hover */
.swipe-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: #111;
    cursor: pointer;
    opacity: 0; /* Tersembunyi saat awal */
    transition: opacity 0.3s;
    z-index: 15;
    padding: 10px;
}
.swipe-arrow.left { left: 0; }
.swipe-arrow.right { right: 0; }
.product-card:hover .swipe-arrow { opacity: 1; }

/* Quick Cart Button (Bawah Kanan) */
.quick-cart-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    opacity: 0; /* Tersembunyi saat awal */
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 15;
}
.quick-cart-btn:hover {
    transform: translateY(0) scale(1.05);
    background: #111;
    color: #fff;
}
.product-card:hover .quick-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   UI MODAL PREVIEW BARU
   ========================================= */
.preview-box {
    width: 1000px;
    max-width: 95%;
    height: 85vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Kiri: Scrollable Images */
.preview-left {
    flex: 1.2;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}
.preview-left img {
    width: 100%;
    display: block;
    margin-bottom: 2px;
}

/* Kanan: Fixed Details */
.preview-right {
    flex: 1;
    padding: 50px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.preview-right .preview-name {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}
.preview-right .preview-price {
    font-size: 16px;
    color: #111;
    margin-bottom: 30px;
}

.section-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

/* Kotak Pilihan Size */
.size-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.size-box {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    min-width: 50px;
    text-align: center;
}
.size-box:hover { border-color: #111; }
.size-box.active { background: #111; color: #fff; border-color: #111; }
.size-box.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #e0e0e0;
}

/* Tombol Aksi Kuantitas & Add to Cart */
.action-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.qty-selector-modal {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.qty-selector-modal button {
    background: none;
    border: none;
    padding: 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.qty-selector-modal button:hover { background: #f5f5f5; }
.qty-selector-modal input {
    width: 30px;
    text-align: center;
    border: none;
    font-size: 14px;
    pointer-events: none;
}

.btn-add-modal {
    flex: 1;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-add-modal.added { background: #fff; color: #000; }

.btn-buy-modal {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}
.btn-buy-modal:hover { opacity: 0.8; }

/* Custom Scrollbar untuk Preview Left */
.preview-left::-webkit-scrollbar { width: 6px; }
.preview-left::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

@media (max-width: 768px) {
    .preview-box { flex-direction: column; }
    .preview-left { flex: none; height: 350px; scroll-snap-type: y mandatory; }
    .preview-left img { scroll-snap-align: start; }
    .preview-right { padding: 30px 20px; }
}