/* --- VARIABEL WARNA & DASAR --- */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-mid: #888888;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- REVISI: Tambahkan padding atas agar konten tidak tertutup navbar fixed --- */
body { 
    background-color: var(--white); 
    color: var(--black); 
    padding-top: 80px; /* Jarak aman untuk navbar */
}

/* --- TIPOGRAFI --- */
.font-playfair { font-family: 'Playfair Display', serif; }
.font-inter { font-family: 'Inter', sans-serif; }
.italic { font-style: italic; }

/* --- NAVIGASI (REVISI: Solid, Sticky, Teks Hitam, Z-Index Tinggi) --- */
.navbar {
    position: fixed; /* Menempel saat di-scroll */
    top: 0; left: 0; width: 100%;
    height: 80px; /* Tinggi navbar yang konsisten */
    background-color: var(--white); /* Latar belakang putih solid */
    padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; /* Pastikan selalu berada paling atas */
    color: var(--black); /* Teks berubah menjadi hitam */
    border-bottom: 1px solid var(--gray-border); /* Garis batas tipis di bawah navbar */
}
.navbar .icon { 
    width: 24px; height: 24px; 
    color: var(--black); /* Icon berubah menjadi hitam */
    cursor: pointer; 
}

/* --- HERO SECTION (REVISI: Penyesuaian Tinggi) --- */
.hero {
    position: relative;
    /* Mengurangi tinggi hero sesuai dengan tinggi navbar agar proporsional */
    height: calc(100vh - 80px); 
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-color: #111; 
    display: flex; justify-content: center; align-items: flex-end;
    padding-bottom: 10%;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.38); 
}
.hero-text {
    position: relative; z-index: 2;
    color: var(--white);
    font-size: 3rem; font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* --- KATALOG SECTION --- */
.catalog-section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.catalog-header { text-align: center; margin-bottom: 60px; }
.catalog-title { font-size: 3.5rem; font-weight: 400; margin-bottom: 10px; }
.catalog-subtitle { font-size: 0.9rem; font-weight: 500; letter-spacing: 2px; }

/* --- GRID PRODUK --- */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.product-card { 
    cursor: pointer; text-decoration: none; color: inherit; 
    display: block; 
}
.product-image-container {
    width: 100%; /* Kunci agar kontainer tidak melebihi lebar grid */
    aspect-ratio: 1 / 1; /* Rasio 1:1 (persegi) agar semua produk seragam */
    background-color: var(--gray-light);
    margin-bottom: 15px; 
    overflow: hidden; /* Secara tegas memotong gambar yang keluar batas */
    border: 1px solid var(--gray-border); 
    position: relative; /* Pondasi penting untuk child elemen di dalamnya */
}

.product-image-container img {
    width: 100%; /* Memaksa gambar mengisi penuh kontainer */
    height: 100%; /* Memaksa gambar mengisi penuh kontainer */
    object-fit: cover; /* Memastikan gambar terpotong rapi tanpa distorsi */
    object-position: center; /* Memastikan gambar selalu berada tepat di tengah */
    display: block; /* Menghilangkan celah putih default di bagian bawah gambar */
    transition: transform 0.4s ease; 
} 
.product-card:hover .product-image-container img {
    transform: scale(1.08); 
}
.product-name { font-size: 1.1rem; margin-bottom: 5px; }
.product-price { font-size: 1rem; color: var(--gray-mid); font-weight: 500; }

/* --- FOOTER --- */
footer {
    text-align: center; padding: 60px 20px; border-top: 1px solid var(--gray-border);
}
footer a { 
    color: var(--black); 
    text-decoration: none; 
    font-weight: 600; 
    display: inline-block; /* Diubah dari 'block' menjadi 'inline-block' agar tidak membentang 100% layar */
    margin-top: 10px;
    border: none; /* Memaksa agar tidak ada border aneh yang muncul */
    outline: none;
}
/* =========================================
   HALAMAN DETAIL PRODUK
   ========================================= */

.product-detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua kolom sejajar */
    gap: 60px;
}

/* --- BAGIAN KIRI (GALERI) --- */
.product-gallery { width: 100%; }

.main-image-viewport {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--gray-light);
    overflow: hidden; /* Menyembunyikan gambar yang sedang tidak aktif */
    position: relative;
    margin-bottom: 20px;
}

.main-image-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out; /* Animasi geser yang halus */
}

.main-image-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0; /* Mencegah gambar menyusut */
}

/* Thumbnail */
.thumbnail-list {
    display: flex; gap: 15px; overflow-x: auto;
}

.thumb-item {
    width: 80px; height: 100px;
    cursor: pointer;
    border: 1px solid transparent;
    opacity: 0.6;
    transition: all 0.3s;
    position: relative;
}

.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.thumb-item:hover { opacity: 0.8; }

/* Status Thumbnail Aktif (Border + Centang) */
.thumb-item.active {
    opacity: 1;
    border: 2px solid var(--black);
}
.thumb-item.active::after {
    content: '✓';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white; font-weight: bold; font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
}


/* --- BAGIAN KANAN (INFO) --- */
.detail-name { font-size: 2rem; margin-bottom: 10px; }
.detail-price { font-size: 1.2rem; font-weight: 600; margin-bottom: 30px; }

.detail-size { font-size: 0.9rem; font-weight: 600; margin-bottom: 30px; }
.size-box {
    display: inline-block; margin-left: 10px;
    padding: 8px 20px;
    border: 1px solid var(--black);
    font-weight: 400;
}

/* Tombol */
.detail-actions { display: flex; flex-direction: column; gap: 15px; margin-bottom: 40px; }
.detail-actions button {
    width: 100%; padding: 15px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s;
}
.btn-outline { background-color: var(--white); color: var(--black); border: 1px solid var(--black); }
.btn-outline:hover { background-color: var(--gray-light); }
.btn-solid { background-color: var(--black); color: var(--white); border: 1px solid var(--black); }
.btn-solid:hover { background-color: #333; }

/* Separator & Teks Bawah */
.separator { border: none; border-top: 1px dashed var(--gray-border); margin-bottom: 30px; }
.info-section { margin-bottom: 25px; }
.info-section h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.info-section p { font-size: 0.85rem; line-height: 1.6; color: #444; }

/* --- RESPONSIVE UNTUK HP --- */
@media (max-width: 768px) {
    .product-detail-container { grid-template-columns: 1fr; gap: 30px; padding: 0 20px; }
}
/* =========================================
   HALAMAN CHECKOUT & MODAL
   ========================================= */

.bg-gray-light { background-color: #fafafa; }

.checkout-container {
    max-width: 1200px; margin: 40px auto; padding: 0 40px;
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px;
    align-items: start;
}

/* Form Styles */
.checkout-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 8px; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 15px; border: 1px solid var(--gray-border);
    border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--black);
}
.bg-disabled { background-color: #f0f0f0; color: #888; cursor: not-allowed; }

/* Selector Ekspedisi & Pembayaran */
.shipping-selector, .payment-selector {
    border: 1px solid var(--gray-border); border-radius: 6px;
    padding: 15px 20px; background-color: var(--white);
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
}
.shipping-selector:hover { border-color: var(--black); }
.payment-selector { flex-direction: column; align-items: flex-start; gap: 15px; cursor: default; }
.payment-radio { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; }

/* Ringkasan Pesanan (Kolom Kanan) */
.summary-card {
    background-color: var(--white); border: 1px solid var(--gray-border);
    border-radius: 8px; padding: 30px; position: sticky; top: 100px;
}
.summary-product { display: flex; gap: 15px; align-items: center; }
.summary-product img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.summary-product-info { flex: 1; }
.summary-product-name { font-size: 0.95rem; font-weight: 600; }
.summary-product-meta { font-size: 0.85rem; color: var(--gray-mid); margin-top: 4px; }

.summary-divider { border: none; border-top: 1px solid var(--gray-border); margin: 20px 0; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.95rem; margin-bottom: 10px; }
.summary-total { font-weight: 700; font-size: 1.1rem; margin-top: 10px; }

.secure-badge { text-align: center; font-size: 0.75rem; color: var(--gray-mid); margin: 20px 0; }
.btn-order-now {
    width: 100%; background-color: var(--black); color: var(--white);
    padding: 16px; border: none; border-radius: 6px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: background-color 0.3s;
}
.btn-order-now:hover { background-color: #333; }
.terms-text { text-align: center; font-size: 0.75rem; color: var(--gray-mid); margin-top: 15px; }

/* MODAL PENGIRIMAN */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); z-index: 2000;
    display: none; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background-color: var(--white); width: 90%; max-width: 500px;
    border-radius: 12px; overflow: hidden; padding: 25px;
}
.modal-header { display: flex; align-items: center; gap: 15px; margin-bottom: 5px; }
.close-modal { font-size: 1.2rem; font-weight: bold; cursor: pointer; }
.modal-subtitle { font-size: 0.85rem; color: var(--gray-mid); margin-bottom: 20px; padding-left: 25px;}

.shipping-option-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 15px 0; border-bottom: 1px solid var(--gray-border);
}
.shipping-option-left { display: flex; align-items: flex-start; gap: 15px; }
.shipping-option-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 5px;}
.shipping-option-eta { font-size: 0.8rem; color: var(--gray-mid); }
.shipping-option-price { font-weight: 600; font-size: 0.95rem; }

.btn-confirm-modal {
    width: 100%; background-color: var(--black); color: var(--white);
    padding: 14px; border: none; border-radius: 6px; font-weight: 600;
    margin-top: 20px; cursor: pointer;
}

@media (max-width: 768px) {
    .checkout-container { grid-template-columns: 1fr; gap: 40px; padding: 0 20px; }
}
/* Autocomplete Lokasi Komerce */
.relative { position: relative; }
.autocomplete-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border: 1px solid var(--gray-border); border-radius: 4px; max-height: 250px; 
    overflow-y: auto; z-index: 1000; display: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.autocomplete-dropdown.active { display: block; }
.autocomplete-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.autocomplete-item:hover { background: #f9f9f9; font-weight: 600; }
/* --- HALAMAN PEMBAYARAN --- */
.payment-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.payment-header-section { margin-bottom: 30px; }
.order-id-row { display: flex; flex-direction: column; margin-bottom: 20px; }
.order-id-row .text-label { font-size: 0.85rem; color: #666; margin-bottom: 5px; }
.order-id { font-size: 1.5rem; font-weight: 600; margin: 0; }
.btn-icon-copy { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: 0.6; transition: 0.2s; }
.btn-icon-copy:hover { opacity: 1; }

.order-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.meta-row { display: flex; flex-direction: column; }
.meta-row .text-label { font-size: 0.85rem; color: #666; margin-bottom: 5px; }
.meta-row strong { font-size: 1rem; font-weight: 500; }
.status-unpaid { color: #d97706; }
.status-expired { color: #dc2626; }
.total-price { font-size: 1.1rem !important; }
.timer-wrapper { display: flex; flex-direction: column; }
.timer-wrapper strong { font-size: 1.1rem; color: #dc2626; }
.timer-wrapper small { font-size: 0.75rem; color: #666; margin-top: 2px; }

/* Instruksi Pembayaran */
.instruction-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 15px; }
.bank-details-box { display: flex; align-items: center; border: 1px solid var(--gray-border); padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.bank-logo { width: 60px; height: auto; margin-right: 15px; }
.account-number { font-size: 1.3rem; margin: 0 0 5px 0; }
.account-name { font-size: 0.85rem; color: #666; }

.qris-box { border: 1px solid var(--gray-border); padding: 20px; border-radius: 6px; text-align: center; margin-bottom: 15px; }
.qris-image { max-width: 250px; height: auto; border-radius: 8px; }

.info-alert { background-color: #f3f4f6; color: #4b5563; font-size: 0.85rem; padding: 12px; border-radius: 4px; margin-bottom: 20px; }
.accordion-instruction h4 { font-size: 1rem; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.accordion-instruction ol { padding-left: 20px; margin-bottom: 15px; }
.accordion-instruction li { font-size: 0.9rem; margin-bottom: 10px; color: #333; line-height: 1.5; }
.verification-note { font-size: 0.85rem; color: #666; background: #fffbeb; padding: 10px; border-left: 3px solid #f59e0b; }

/* Rincian */
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.text-gray-dark { color: #4b5563; line-height: 1.5; }
.font-medium { font-weight: 500; }
.detail-block .text-label { font-size: 0.85rem; color: #666; display: block; margin-bottom: 5px; }
.detail-block p { margin: 0; font-size: 0.95rem; }
.details-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--gray-border); padding-bottom: 15px; margin-bottom: 15px; }
.btn-text-link { background: none; border: none; color: #666; text-decoration: underline; cursor: pointer; font-size: 0.9rem; }

/* Aksi Bawah */
.payment-actions { display: flex; flex-direction: column; align-items: center; }
.btn-cancel-text { background: none; border: none; color: #999; text-decoration: underline; cursor: pointer; font-size: 0.9rem; }
.btn-cancel-text:hover { color: #dc2626; }
.btn-icon-copy.copied { color: #10b981; }
/* ==========================================
   MODAL / POP-UP UBAH INFO
   ========================================== */
.modal-overlay {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Efek latar belakang meredup */
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}

/* Pastikan class hidden benar-benar menyembunyikan modal */
.modal-overlay.hidden { display: none !important; }

.modal-content {
    background: #fff; 
    width: 90%; max-width: 450px;
    border-radius: 12px; /* Membuat sudut membulat */
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex; align-items: center; margin-bottom: 20px;
}

.close-modal {
    font-size: 1.5rem; cursor: pointer; margin-right: 15px; color: #333;
}
.close-modal:hover { color: #dc2626; }

.modal-header h3 { margin: 0; font-size: 1.2rem; font-weight: 600; }    

/* ==========================================
   TOAST NOTIFICATION (CUSTOM ALERT)
   ========================================== */
#toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

#toast-notification.toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
/* ==========================================
   HALAMAN KERANJANG BELANJA
   ========================================== */
.cart-page-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; }
.cart-page-title { font-size: 1.8rem; margin-bottom: 30px; font-weight: 600; border-bottom: 1px solid var(--gray-border); padding-bottom: 15px; }

.cart-layout { display: flex; gap: 40px; align-items: flex-start; }
.cart-items-section { flex: 1; }
.cart-summary-section { width: 350px; position: sticky; top: 20px; }

/* Item Keranjang */
.cart-item { display: flex; padding: 20px 0; border-bottom: 1px solid var(--gray-border); position: relative; }
.cart-item-img { width: 100px; height: 120px; object-fit: cover; border-radius: 4px; margin-right: 20px; }
.cart-item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-name { font-size: 1.1rem; font-weight: 500; margin-bottom: 5px; color: #111; }
.cart-item-meta { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
.cart-item-price { font-size: 1.1rem; font-weight: 600; }

.btn-remove-item { background: none; border: none; color: #999; cursor: pointer; text-decoration: underline; font-size: 0.85rem; padding: 0; align-self: flex-start; }
.btn-remove-item:hover { color: #dc2626; }

/* State Kosong */
.empty-cart-message { text-align: center; padding: 40px 0; color: #666; }

/* Rekomendasi Grid */
.recommendation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.rec-card { text-decoration: none; color: inherit; display: block; transition: opacity 0.2s; }
.rec-card:hover { opacity: 0.8; }
.rec-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #eee; margin-bottom: 10px; }
.rec-title { font-size: 0.9rem; font-weight: 500; margin: 0 0 5px 0; }
.rec-price { font-size: 0.9rem; color: #666; }

/* Responsif Mobile */
@media (max-width: 768px) {
    .cart-layout { flex-direction: column; }
    .cart-summary-section { width: 100%; position: static; }
    .cart-item-img { width: 80px; height: 100px; }
}
/* =========================================
   REVISI UI/UX (RESPONSIVE & GRID FIXES)
   ========================================= */

/* 1. MENCEGAH GAMBAR RAKSASA & MENGATUR POSISI TENGAH (FLEXBOX) */
/* Menggunakan Flexbox agar produk selalu ke tengah, mau 1, 2, atau 3. Jika 4, yang ke-4 akan turun ke tengah */
.product-grid, .product-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
    max-width: 1100px !important; /* Batas maksimal lebar area produk */
    margin: 0 auto !important;
}

.product-card {
    flex: 0 1 300px !important; /* Kunci ukuran kartu di angka ~300px agar tidak melar jadi raksasa */
    max-width: 300px !important;
    width: 100% !important;
}

/* 2. MEDIA QUERY KHUSUS TAMPILAN HP (Di Bawah 768px) */
@media (max-width: 768px) {
    
    /* Memperbaiki tulisan hero image agar ke tengah & tidak kepotong */
    .hero h1, .hero h2, .hero-content h1, .hero-content h2 {
        text-align: center !important;
        width: 100% !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
        font-size: 2rem !important; 
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* Pindahkan Sapaan Nama ke bawah Logo (Khusus HP) */
    /* Pindahkan Sapaan Nama ke bawah Logo (Khusus HP) */
    #nav-greeting {
        display: block !important;
        position: absolute !important;
        top: 42px !important;
        
        /* GANTI BAGIAN INI: Ubah dari 5% menjadi ukuran fix piksel */
        left: 20px !important; 
        
        transform: none !important;
        font-size: 0.75rem !important;
        font-family: 'Inter', sans-serif !important; 
        color: #555 !important;
    }

    /* Beri sedikit ruang ekstra di bagian bawah navbar HP agar nama tidak menabrak gambar di bawahnya */
    .navbar {
        padding-bottom: 22px !important;
    }
}