/* ==============================================================
   1. VARIABEL GLOBAL & RESET DASAR
   ============================================================== */
:root {
    --color-primary: #C95B65; 
    --color-secondary: #FDE8E9; 
    --color-text-main: #333333;
    --color-text-muted: #888888;
    --color-background: #F8F9FA;
    --color-white: #FFFFFF;
    --color-border: #EEEEEE;
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-logo: 'Playfair Display', serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text-main);
    line-height: 1.5;
    padding-bottom: 70px; /* Ruang untuk bottom nav mobile */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* ==============================================================
   2. LAYOUT HALAMAN GLOBAL & FOOTER
   ============================================================== */
.ghv-page-container { padding: 40px 15px; min-height: 400px; font-family: var(--font-main); }
.ghv-page-title { font-size: 1.5rem; margin-bottom: 20px; font-weight: 700; }
.site-footer { background: var(--color-white); padding: 20px 0; border-top: 1px solid var(--color-border); text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }
.site-footer p { margin: 0; }

body.ghv-page-loaded main#primary, body.ghv-page-loaded .site-footer { opacity: 1; }

/* ==============================================================
   3. HEADER: GLOBAL & LOGO
   ============================================================== */
.site-header { background-color: var(--color-white); border-bottom: 1px solid var(--color-border); width: 100%; transition: 0.3s; z-index: 9999; }
.site-header.is-sticky { position: sticky; top: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }

.ghv-logo-link { text-decoration: none; display: inline-block; }
.ghv-logo-text { font-family: var(--font-logo); font-size: var(--header-logo-size, 28px); color: var(--color-primary); font-weight: 700; line-height: 1; margin: 0; display: flex; flex-direction: column; align-items: center; }
.ghv-logo-subtext { font-family: var(--font-main); font-size: 0.55rem; letter-spacing: 3.5px; color: var(--color-primary); text-transform: uppercase; margin-top: 2px; font-weight: 600; }

.icon-link { color: var(--color-text-main); font-size: 1.3rem; position: relative; text-decoration: none; transition: 0.2s; margin-left: 15px;}
.icon-link:hover { color: var(--color-primary); }
.ghv-badge { position: absolute; top: -6px; right: -8px; background-color: var(--color-primary); color: #ffffff; font-size: 0.65rem; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: bold; border: 1.5px solid #fff;}

.ghv-search-form { position: relative; display: flex; align-items: center; width: 100%; margin: 0; }
.ghv-search-input { width: 100%; border: 1px solid var(--color-border); border-radius: 25px; background-color: var(--color-background); font-family: var(--font-main); font-size: 0.85rem; color: var(--color-text-main); outline: none; box-sizing: border-box; }

/* --- HEADER MOBILE --- */
.header-mobile { display: block; padding: 12px 20px; }
.hm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; width: 100%; }
.hm-left { width: 25%; display: flex; justify-content: flex-start; }
.hm-center { width: 50%; text-align: center; }
.hm-right { width: 25%; display: flex; justify-content: flex-end; align-items: center; }
.mobile-menu-toggle { background: none; border: none; font-size: 1.4rem; color: var(--color-text-main); padding: 0; cursor: pointer; }
.hm-search .ghv-search-input { padding: 12px 45px 12px 40px; }
.search-icon-left { position: absolute; left: 15px; color: var(--color-text-muted); font-size: 1rem; z-index: 2; }
.search-icon-right { position: absolute; right: 15px; color: var(--color-text-muted); font-size: 1rem; z-index: 2; }

/* --- HEADER DESKTOP --- */
.header-desktop { display: none; }
.hd-top { padding: 15px 0; border-bottom: 1px solid #f9f9f9; }
.hd-top-container { display: flex; align-items: center; justify-content: space-between; }
.hd-logo { width: 20%; }
.hd-logo .ghv-logo-text { align-items: flex-start; }
.hd-search { width: 60%; display: flex; justify-content: center; }
.desktop-search-form { max-width: 650px; }
.desktop-search-form .ghv-search-input { padding: 12px 20px; border-radius: 8px 0 0 8px; border-right: none; }
.ghv-search-btn { background: var(--color-primary); color: #fff; border: none; border-radius: 0 8px 8px 0; padding: 0 25px; cursor: pointer; font-size: 1rem; transition: 0.2s; }
.ghv-search-btn:hover { opacity: 0.9; }
.hd-icons { width: 20%; display: flex; justify-content: flex-end; align-items: center; gap: 5px; }

.hd-bottom { background: #fff; }
.desktop-menu-list { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; gap: 30px; }
.desktop-menu-list li a { display: block; padding: 15px 0; font-size: 0.95rem; font-weight: 600; color: #333; text-decoration: none; position: relative; }
.desktop-menu-list li a:hover { color: var(--color-primary); }

/* ==============================================================
   4. DRAWER MENU MOBILE
   ============================================================== */
.ghv-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99998; display: none; opacity: 0; transition: opacity 0.3s ease; }
.ghv-menu-drawer { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: var(--color-white); z-index: 99999; box-shadow: 2px 0 10px rgba(0,0,0,0.1); transition: left 0.3s ease; display: flex; flex-direction: column; font-family: var(--font-main); }
.drawer-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); }
.drawer-title { font-weight: 700; color: var(--color-primary); font-size: 1.1rem; }
.drawer-close { background: none; border: none; font-size: 1.3rem; color: var(--color-text-main); cursor: pointer; }
.drawer-body { padding: 20px; overflow-y: auto; flex-grow: 1; }
.mobile-drawer-links { padding: 0; margin: 0; list-style: none; }
.mobile-drawer-links li { margin-bottom: 12px; }
.mobile-drawer-links li a { display: block; padding: 10px 0; font-size: 0.95rem; color: var(--color-text-main); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--color-border); }
.no-menu-msg { font-size: 0.8rem; color: var(--color-text-muted); }

/* ==============================================================
   5. MOBILE BOTTOM NAVIGATION
   ============================================================== */
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--color-white); display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-top: 1px solid var(--color-border); z-index: 9999; font-family: var(--font-main); box-shadow: 0 -4px 20px rgba(0,0,0,0.03); }
.bnav-item { display: flex; align-items: center; justify-content: center; height: 45px; width: 45px; border-radius: 50px; text-decoration: none; color: var(--color-text-muted); position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); -webkit-tap-highlight-color: transparent; outline: none; }
.bnav-item.active { width: 120px; background-color: var(--color-primary); color: #fff; justify-content: flex-start; padding-left: 15px; }
.bnav-icon { font-size: 1.2rem; display: flex; align-items: center; justify-content: center; width: 24px; position: relative; z-index: 2; transition: transform 0.4s; }
.bnav-item:active .bnav-icon { transform: scale(0.85); }
.bnav-text { font-size: 0.85rem; font-weight: 700; opacity: 0; transform: translateX(-15px); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); white-space: nowrap; width: 0; margin-left: 0; }
.bnav-item.active .bnav-text { opacity: 1; transform: translateX(0); width: auto; margin-left: 8px; }
.bnav-cart-badge { position: absolute; top: -6px; right: -8px; background-color: var(--color-primary); color: #fff; font-size: 0.55rem; padding: 2px 5px; border-radius: 10px; font-weight: bold; border: 1.5px solid var(--color-white); transition: all 0.3s; line-height: 1;}
.bnav-item.active .bnav-cart-badge { background-color: #fff; color: var(--color-primary); border-color: var(--color-primary); }

/* ==============================================================
   6. BOTTOM SHEET UI & TOAST NOTIFICATION
   ============================================================== */
.ghv-bs-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 99998; opacity: 0; visibility: hidden; transition: 0.3s; }
.ghv-bs-overlay.show { opacity: 1; visibility: visible; }
.ghv-bottom-sheet { position: fixed; bottom: -100%; left: 0; width: 100%; max-width: 100%; max-height: 85vh; background: #FFF; z-index: 99999; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.15); transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; flex-direction: column; overflow: hidden;}
.ghv-bottom-sheet.show { bottom: 0; }
.ghv-bs-loading { padding: 40px 20px; text-align: center; display: none; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.ghv-bs-loading h3 { font-size: 1rem; margin:0 0 5px 0; }
.ghv-bs-loading p { font-size: 0.8rem; color: #666; margin:0; }
.ghv-spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.ghv-bs-content { overflow-y: auto; padding: 20px 20px 80px 20px; }
.ghv-bs-header { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; position: relative;}
.ghv-bs-img { width: 90px; height: 90px; object-fit: cover; border-radius: 12px; border: 1px solid #eee; }
.ghv-bs-close { position: absolute; top: 0; right: 0; background: #f5f5f5; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #555; cursor: pointer; }
.ghv-bs-header-info { padding-right: 25px; }
.ghv-bs-header-info h3 { font-size: 1.1rem; margin: 0 0 5px 0; line-height: 1.3; color:#333; }
.ghv-bs-header-info #bs-product-stock { font-size: 0.8rem; font-weight: 500; display:flex; align-items:center; gap:5px; color: #a0a0a0; }

#bs-product-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
#bs-product-price * { border-bottom: none !important; text-decoration: none !important; }
#bs-product-price del, #bs-product-price del span, #bs-product-price del bdi { color: #a0a0a0 !important; text-decoration: line-through !important; font-weight: 500; font-size: 0.9rem; }
#bs-product-price ins, #bs-product-price ins span, #bs-product-price ins bdi, #bs-product-price > span, #bs-product-price > bdi { color: var(--color-primary) !important; font-weight: 700; font-size: 1.1rem; }

.bs-attr-group { margin-bottom: 15px; }
.bs-attr-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: #333; display: block; }
.bs-attr-btn { border: 1px solid #EAEAEA; border-radius: 12px; padding: 8px 16px; background: #fff; color: #333; font-size: 0.85rem; margin: 0 8px 8px 0; cursor: pointer; transition: 0.2s; display: inline-block;}
.bs-attr-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.bs-attr-btn.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.bs-qty-wrapper { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.bs-attr-title { margin:0; }
.bs-qty-control { display: flex; align-items: center; border: 1px solid #EAEAEA; border-radius: 12px; height: 44px; overflow: hidden; }
.bs-qty-btn { width: 44px; height: 100%; display: flex; align-items: center; justify-content: center; background: #fff; border: none; font-size: 0.8rem; color: var(--color-primary); cursor: pointer; }
.bs-qty-input { width: 50px; text-align: center; border: none; font-weight: 600; font-size: 1rem; color: #333;}
.bs-btn-submit { width: 100%; background: var(--color-primary); color: #fff; height: 52px; border-radius: 14px; font-weight: 600; font-size: 1rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: 0.2s;}
.bs-btn-submit:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

.ghv-toast { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(20px); width: 90%; max-width: 420px; background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: 0 8px 30px rgba(0,0,0,0.08); z-index: 100000; opacity: 0; visibility: hidden; transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; align-items: center; gap: 12px; border-left: 4px solid #4CAF50;}
.ghv-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.ghv-toast-icon { background:#4CAF50; border-radius:50%; width:24px; height:24px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink: 0; font-size: 12px;}
.ghv-toast-content { flex-grow: 1; }
.ghv-toast-title { font-weight:700; font-size:0.85rem; color:#333; }
.ghv-toast-text { font-size:0.75rem; color:#666; margin-top:2px; }

/* ==============================================================
   7. MEDIA QUERIES (SWITCHER MOBILE & DESKTOP)
   ============================================================== */
@media (max-width: 991px) {
    .d-mobile-none { display: none !important; }
}

@media (min-width: 992px) {
    .header-mobile { display: none; }
    .header-desktop { display: block; }
    
    /* Mengembalikan Footer & Menghilangkan Bottom Nav di PC */
    .site-footer.d-mobile-none { display: block !important; }
    .mobile-bottom-nav, .mobile-bottom-nav.d-desktop-none { display: none !important; }
    body { padding-bottom: 0 !important; }
}

/* ==============================================================
   8. WOOCOMMERCE GRID RESCUE (MOBILE & DESKTOP)
   ============================================================== */

/* --- Hapus Elemen Bawaan WooCommerce (Global) --- */
.woocommerce ul.products::before, 
.woocommerce ul.products::after { 
    display: none !important; 
}

/* --- Style Dasar Kartu Produk (Global) --- */
ul.products li.product { 
    width: 100% !important; 
    margin: 0 !important; 
    padding: 0 !important; 
    border: 1px solid var(--color-border) !important; 
    border-radius: 12px !important; 
    overflow: hidden !important; 
    position: relative !important; 
    background: #fff !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
}

/* --- Tampilan Mobile (Max 991px) --- */
@media (max-width: 991px) {
    /* Paksa Grid 2 Kolom di Mobile */
    ul.products { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
        margin: 0 15px 30px 15px !important; 
        padding: 0 !important; 
        list-style: none !important; 
    }
    
    /* Sembunyikan tombol standar WooCommerce agar tidak berantakan */
    ul.products li.product .button:not(.ghv-custom-add-to-cart) { 
        display: none !important; 
    }
    
    /* Timer Flash Sale Mobile */
    #flash-timer { 
        display: flex; 
        align-items: center; 
        gap: 4px; 
    }
}

/* --- Tampilan Desktop (Min 992px) --- */
@media (min-width: 992px) {
    /* Paksa Grid 4 Kolom di Desktop */
    ul.products { 
        display: grid !important; 
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 25px !important; 
        margin: 0 0 40px 0 !important; 
        padding: 0 !important; 
        list-style: none !important; 
    }
    
    /* Kembalikan sidebar jika ada di halaman shop desktop */
    #secondary, .widget-area, #sidebar { 
        display: block !important; 
    }
}