/* ===== FONT FAMILY BARLOW UNTUK SEMUA ELEMEN ===== */
.top-bar,
.logo-area,
.logo-wrapper,
.logo-text,
.custom-logo-link,
.mobile-icons,
.mobile-search-btn,
.hamburger,
.main-nav-bg,
.main-nav-wrapper,
.main-nav,
.main-nav a,
.nav-item-with-dropdown,
.nav-item-with-dropdown a,
.dropdown-menu,
.dropdown-menu a,
.search-overlay,
.search-bar,
.search-bar input,
.search-bar button,
.mobile-overlay,
.overlay-header,
.overlay-close,
.overlay-auth,
.overlay-content,
.overlay-section-title,
.overlay-category,
.overlay-category-header,
.overlay-submenu,
.overlay-submenu-item,
.overlay-category-link,
.sub-nav-bg,
.sub-nav-wrapper,
.sub-nav,
.sub-nav a {
    font-family: 'Barlow', sans-serif;
}

/* ===== TOP RED BAR ===== */
.top-bar {
    width: 100%;
    height: 5px;
    background: #8b1a1a;
    position: sticky;
    top: 0;
    z-index: 300;
}

/* ===== LOGO AREA ===== */
.logo-area {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* Wrapper logo di kiri */
.logo-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Fallback teks jika tidak ada logo */
.logo-text {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

/* Link custom logo dari WordPress */
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Gambar logo - DIKONTROL PENUH VIA CSS */
.custom-logo-link img,
.custom-logo {
    width: auto !important;
    height: 40px !important;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

/* Mobile icons tetap di kanan */
.mobile-icons {
    display: none;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.mobile-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-btn svg {
    fill: none;
    stroke: #c62828;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 26px;
    height: 26px;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #8b1a1a;
    margin: 4px 0;
    transition: all 0.3s;
    border-radius: 1px;
}

/* ===== MAIN NAV BG ===== */
.main-nav-bg {
    width: 100%;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 200;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.main-nav-bg.is-sticky {
    background: #8b1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
    
.main-nav-wrapper {
    max-width: 980px;
    margin: 0 auto;
}

/* ===== MAIN NAV ===== */
.main-nav {
    background: #8b1a1a;
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0;
    border-radius: 8px 8px 0 0;
    overflow: visible;
}

.main-nav > ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 40px !important;
    width: 100%;
}

.main-nav > ul > li,
.main-nav > ul > .nav-item-with-dropdown {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex-shrink: 0;
    position: relative;
}

.main-nav > ul > li > a,
.main-nav > ul > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    transition: background 0.15s ease !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.main-nav > ul > li:last-child > a,
.main-nav > ul > a:last-child {
    border-right: none !important;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.main-nav > ul > .nav-item-with-dropdown,
.main-nav > ul > li.nav-item-with-dropdown {
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.main-nav > ul > .nav-item-with-dropdown:last-child,
.main-nav > ul > li.nav-item-with-dropdown:last-child {
    border-right: none !important;
}

.nav-item-with-dropdown > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    transition: background 0.15s ease !important;
}

.nav-item-with-dropdown:hover > a {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* ===== IKON HOME & SEARCH ===== */
.main-nav > .nav-home,
.main-nav > ul > .nav-home,
.main-nav > ul > li.nav-home {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background 0.15s ease !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    flex-shrink: 0;
}

.main-nav > .nav-home svg,
.main-nav > ul > .nav-home svg,
.main-nav > ul > li.nav-home svg {
    fill: #fff !important;
    width: 17px !important;
    height: 17px !important;
    display: block;
}

.main-nav > .nav-home:hover,
.main-nav > ul > .nav-home:hover,
.main-nav > ul > li.nav-home:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.live-dot {
    width: 9px;
    height: 9px;
    background: #e53935;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    margin-right: 6px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.main-nav > .nav-icons,
.main-nav > ul > .nav-icons,
.main-nav > ul > li.nav-icons {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: none !important;
    flex-shrink: 0;
}

.main-nav > .nav-icons > a,
.main-nav > ul > .nav-icons > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    transition: background 0.15s ease !important;
}

.main-nav > .nav-icons > a:hover,
.main-nav > ul > .nav-icons > a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.search-icon svg {
    fill: none !important;
    stroke: #fff !important;
    stroke-width: 2.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    width: 18px !important;
    height: 18px !important;
    display: block;
}

/* ===== DROPDOWN MENU ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #8b1a1a;
    border-top: 2px solid #9e2424;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 250;
    flex-direction: column;
    padding: 4px 0;
    border-radius: 0 0 6px 6px;
    list-style: none !important;
    margin: 0 !important;
}

.nav-item-with-dropdown:hover .dropdown-menu {
    display: flex !important;
}

.dropdown-menu a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center;
    white-space: nowrap;
    transition: background 0.15s ease, padding-left 0.15s ease;
    border-bottom: 1px solid rgba(158, 36, 36, 0.4);
    height: auto !important;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    padding-left: 20px !important;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-bar {
    width: 92%;
    max-width: 560px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    overflow: hidden;
    transform: translateY(-16px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-overlay.active .search-bar {
    transform: translateY(0) scale(1);
}

.search-bar .search-icon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 18px;
    flex-shrink: 0;
}

.search-bar .search-icon-inner svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #999;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 12px;
    font-size: 15px;
    font-family: 'Barlow', sans-serif;
    color: #1a1a1a;
    background: transparent;
    min-width: 0;
}

.search-bar input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-bar button {
    background: #8b1a1a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    margin: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    font-family: 'Barlow', sans-serif;
    letter-spacing: 0.3px;
}

.search-bar button:hover {
    background: #a02020;
}

.search-bar button:active {
    transform: scale(0.96);
}

/* ===== MOBILE OVERLAY MENU ===== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-overlay.active {
    transform: translateY(0);
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 3px solid #c62828;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.overlay-close {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #c62828;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.15s;
}

.overlay-close:hover {
    background: rgba(198, 40, 40, 0.08);
}

.overlay-close .close-icon {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.overlay-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-auth .btn-daftar {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}

.overlay-auth .btn-daftar:hover {
    background: #333;
}

.overlay-auth .btn-masuk {
    background: none;
    border: none;
    color: #c62828;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
    transition: background 0.15s;
}

.overlay-auth .btn-masuk:hover {
    background: rgba(198, 40, 40, 0.08);
}

.overlay-content {
    padding: 0 16px 40px 16px;
    max-width: 600px;
}

.overlay-section-title {
    color: #c62828;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 16px 0 12px 0;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.3px;
}

.overlay-category {
    border-bottom: 1px solid #e0e0e0;
}

.overlay-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    cursor: pointer;
    user-select: none;
}

.overlay-category-header .cat-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.overlay-category-header .cat-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.25s ease;
}

.overlay-category-header .cat-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #c62828;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overlay-category-header .cat-arrow.rotated {
    transform: rotate(180deg);
}

.overlay-submenu {
    display: none;
    padding: 4px 0 16px 0;
}

.overlay-submenu.active {
    display: block;
}

.overlay-submenu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.overlay-submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 0 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    position: relative;
    transition: background 0.15s, padding-left 0.15s;
}

.overlay-submenu-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1em;
    background: #c62828;
    border-radius: 2px;
}

.overlay-submenu-item:hover {
    background: rgba(198, 40, 40, 0.04);
    padding-left: 20px;
}

.overlay-submenu-item:hover::before {
    left: 8px;
}

.overlay-category-link {
    display: block;
    padding: 16px 0;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e0e0e0;
    transition: color 0.15s;
}

.overlay-category-link:hover {
    color: #c62828;
}

/* ===== SUB NAV BG ===== */
.sub-nav-bg {
    width: 100%;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.sub-nav-bg.is-sticky {
    background: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sub-nav-wrapper {
    max-width: 980px;
    margin: 0 auto;
}

.sub-nav {
    background: #e0e0e0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 36px;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

.sub-nav > ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 36px !important;
    width: 100%;
}

.sub-nav > ul > li {
    display: flex !important;
    align-items: center !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex: 1;
    position: relative;
}

.sub-nav a {
    color: #222 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 0 10px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    transition: background 0.15s;
    flex: 1;
    position: relative;
}

.sub-nav a:hover {
    background: #d5d5d5 !important;
}

.sub-nav a:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    height: 20px;
    width: 1px;
    background: #c8c8c8;
}

.sub-nav a:last-child::after {
    display: none;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */
@media (min-width: 769px) {
    .mobile-icons {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .main-nav-bg {
        display: none;
    }

    .mobile-icons {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .logo-area {
        padding: 12px 0 12px 0;
        position: sticky;
        top: 5px;
        z-index: 200;
        background: #fff;
    }

    .logo img {
        height: 28px;
    }

    .sub-nav-bg {
        position: sticky;
        top: 5px;
        z-index: 100;
    }

    .sub-nav {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .sub-nav > ul {
        justify-content: flex-start !important;
        width: auto !important;
    }

    .sub-nav > ul > li {
        flex: none !important;
        min-width: 90px !important;
    }

    .sub-nav a {
        flex: none !important;
        min-width: 90px !important;
    }

    .sub-nav::-webkit-scrollbar {
        height: 3px;
    }

    .sub-nav::-webkit-scrollbar-thumb {
        background: #bbb;
        border-radius: 3px;
    }

    .search-overlay {
        padding-top: 70px;
    }

    .search-bar {
        width: 94%;
        max-width: 480px;
    }
}

@media (max-width: 480px) {
    .logo-area {
        padding: 12px 16px 10px 16px;
    }

    .logo img {
        height: 24px;
    }

    .mobile-search-btn svg {
        width: 24px;
        height: 24px;
    }

    .hamburger span {
        width: 24px;
    }

    .sub-nav {
        height: 34px;
    }

    .sub-nav > ul {
        height: 34px !important;
    }

    .sub-nav > ul > li {
        height: 34px !important;
        min-width: 80px !important;
    }

    .sub-nav a {
        font-size: 12px !important;
        min-width: 80px !important;
        padding: 0 8px !important;
        height: 34px !important;
    }

    .search-overlay {
        padding-top: 60px;
    }

    .search-bar {
        width: 96%;
    }

    .search-bar input {
        font-size: 14px;
        padding: 12px 10px;
    }

    .search-bar button {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .logo-area {
        padding: 10px 16px 8px 16px;
    }

    .logo img {
        height: 20px;
    }

    .custom-logo-link img,
    .custom-logo {
        width: auto !important;
        height: 30px !important;
        display: block;
        margin: 0;
        padding: 0;
        object-fit: contain;
    }

    .mobile-icons {
        gap: 1px;
    }

    .mobile-search-btn {
        padding: 3px;
    }

    .mobile-search-btn svg {
        width: 22px;
        height: 22px;
    }

    .hamburger {
        padding: 3px;
    }

    .hamburger span {
        width: 22px;
        height: 3px;
        margin: 3px 0;
    }

    .sub-nav {
        height: 32px;
    }

    .sub-nav > ul {
        height: 32px !important;
    }

    .sub-nav > ul > li {
        height: 32px !important;
        min-width: 70px !important;
    }

    .sub-nav a {
        font-size: 11px !important;
        min-width: 70px !important;
        padding: 0 6px !important;
        height: 32px !important;
    }

    .sub-nav a::after {
        top: 6px;
        height: 18px;
    }

    .search-overlay {
        padding-top: 50px;
    }

    .search-bar {
        width: 98%;
    }
}