/* ==========================================================
   HEADER DESKTOP V3 (FINAL - TERHUBUNG DENGAN CUSTOMIZER)
   ========================================================== */

/* =====================
   ROOT (Menghapus warna pink statis, fokus ke warna netral)
===================== */
:root {
    --header-bg: #ffffff;
    --text: #222;
    --text-light: #777;
    --border: #ececec;
    --shadow: 0 10px 30px rgba(0,0,0,.06);
    --transition: .30s ease;
}

/* =====================
   CONTAINER
===================== */
.container {
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

/* ==========================================
   TOP BAR
========================================== */
.d-topbar {
    background: var(--color-primary); /* Mengikuti Customizer */
    color: #fff;
    height: 42px;
    font-size: 13px;
}
.d-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.d-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.d-topbar-left i {
    font-size: 15px;
}
.d-topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}
.d-topbar-right a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    text-decoration: none;
    opacity: .95;
    transition: .25s;
}
.d-topbar-right a:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.d-topbar-right i {
    font-size: 14px;
}

/* =====================
   MAIN HEADER
===================== */
.d-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1000;
}
.d-header.sticky {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    animation: headerDown .35s forwards;
    box-shadow: var(--shadow);
    border-bottom: none;
}
@keyframes headerDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.d-header-inner {
    height: 65px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px; 
}

/* =====================
   LOGO
===================== */
.d-logo {
    flex: 0 0 auto;
    min-width: 150px;
}
.d-logo a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.logo-title {
    font-size: 26px; 
    font-weight: 700;
    color: var(--color-primary); /* Mengikuti Customizer */
    line-height: 1;
    font-family: "Playfair Display", serif;
}
.logo-subtitle {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-light);
}
.custom-logo {
    max-height: 45px; 
    width: auto;
}

/* =====================
   SEARCH BAR TENGAH
===================== */
.d-search-bar-wrap {
    flex: 1;
    max-width: 380px; 
    margin: 0 15px;
}
.d-search-form-inline {
    display: flex;
    align-items: center;
    background: #f5f5f5; 
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 0 5px 0 20px;
    height: 42px;
    transition: var(--transition);
}
.d-search-form-inline:focus-within {
    background: #fff;
    border-color: var(--color-primary); /* Mengikuti Customizer */
    box-shadow: 0 0 0 3px var(--color-secondary); /* Efek cahaya mengikuti warna sekunder customizer */
}
.d-search-form-inline input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    width: 100%;
}
.d-search-form-inline button {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.d-search-form-inline button:hover {
    color: var(--color-primary); /* Mengikuti Customizer */
}

/* =====================
   NAVIGATION
===================== */
.d-nav {
    flex: 1.5;
    display: flex;
    justify-content: center;
}
.d-menu {
    display: flex;
    align-items: center;
    gap: 28px; 
    list-style: none;
    margin: 0;
    padding: 0;
}
.d-menu li {
    position: relative;
}
.d-menu > li > a {
    display: flex;
    align-items: center;
    height: 65px; 
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}
.d-menu > li > a:hover {
    color: var(--color-primary); /* Mengikuti Customizer */
}

.d-menu li.menu-item-has-children > a::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
    transition: var(--transition);
}
.d-menu li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.current-menu-item > a,
.current-menu-parent > a {
    color: var(--color-primary); /* Mengikuti Customizer */
}
.current-menu-item > a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 3px;
    background: var(--color-primary); /* Mengikuti Customizer */
    border-radius: 3px 3px 0 0;
}

/* =====================
   DROPDOWN
===================== */
.d-menu ul {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    top: 100%;
    min-width: 220px;
    background: #fff;
    list-style: none;
    padding: 12px 0;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.d-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.d-menu ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.d-menu ul li a:hover {
    background: var(--color-secondary); /* Mengikuti Customizer */
    color: var(--color-primary); /* Mengikuti Customizer */
    padding-left: 25px;
}

/* =====================
   ACTION BUTTON
===================== */
.d-actions {
    display: flex;
    align-items: center;
    gap: 8px; 
    flex: 0 0 auto;
    justify-content: flex-end;
}
.d-action-btn {
    position: relative;
    width: 40px; 
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent; 
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.d-action-btn:hover {
    background: var(--color-secondary); /* Mengikuti Customizer */
    color: var(--color-primary); /* Mengikuti Customizer */
    transform: translateY(-2px);
}
.d-action-btn i {
    font-size: 18px;
}

/* =====================
   BADGE (ANGKA KERANJANG)
===================== */
.d-count {
    position: absolute;
    right: 0px;
    top: 0px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary); /* Mengikuti Customizer */
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1200px) {
    .d-menu { gap: 15px; }
    .logo-title { font-size: 22px; }
    .d-search-bar-wrap { max-width: 250px; }
}

@media (max-width: 992px) {
    .d-header,
    .d-topbar {
        display: none !important;
    }
}

/* ==============================================================
   PERUBAHAN BOTTOM SHEET MENJADI POPUP TENGAH (KHUSUS DESKTOP)
   ============================================================== */
@media (min-width: 992px) {
    .ghv-bottom-sheet {
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important; /* Membatalkan posisi menempel di bawah bawaan HP */
        width: 500px !important; /* Lebar popup yang proporsional untuk PC */
        max-height: 85vh !important;
        border-radius: 20px !important; /* Melengkung di semua sisi */
        
        /* Efek animasi muncul melayang dari tengah */
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -45%) scale(0.95) !important;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        box-shadow: 0 25px 60px rgba(0,0,0,0.15) !important;
    }

    /* Posisi akhir saat popup aktif */
    .ghv-bottom-sheet.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1) !important;
    }
    
    /* Memberikan ruang napas ekstra di dalam popup desktop */
    .ghv-bs-content {
        padding: 30px !important;
    }
    
    /* Tombol silang (close) yang lebih elegan */
    .ghv-bs-close {
        background: transparent !important;
        font-size: 1.2rem;
        top: 15px !important;
        right: 15px !important;
    }
    .ghv-bs-close:hover {
        color: var(--color-primary) !important;
    }
}