/* ================= NAVBAR - FIXED CENTER LOGO ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Mengikuti style.css height default 90px */
    height: 90px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Background transparent */
    background: transparent; 
    /* Mengikuti style.css padding default 12px 40px */
    padding: 12px 40px; 
    z-index: 1000;
    transition: all 0.4s ease, transform 0.3s ease-in-out;
    box-sizing: border-box;
}

.navbar.scrolled {
    /* Mengikuti style.css height scrolled 75px */
    height: 75px; 
    padding: 12px 40px; 
    /* Tetap transparent (sesuai style.css) */
    background: transparent; 
}

/* Penyesuaian untuk efek menu-hovered (diambil dari style.css) */
.navbar.menu-hovered {
    background-color: #fff;
    backdrop-filter: blur(10px);
    padding: 12px 40px;
}

.navbar.menu-hovered.scrolled {
    height: 75px;
    padding: 8px 40px;
}

/* NAV LEFT & RIGHT - FLEXIBLE */
.nav-left, .nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-left {
    /* Mengikuti style.css gap 25px */
    gap: 25px; 
    z-index: 1001;
}

.nav-right {
    /* Mengikuti style.css gap 25px */
    gap: 25px; 
    z-index: 1001;
}

/* Navigasi KIRI: Menu Links (Diambil dari style.css) */
.nav-menu {
    display: flex;
    list-style: none;
    /* Mengikuti style.css (gap kecil) */
    gap: 2px; 
}

.nav-menu li a {
    text-decoration: none;
    color: white; 
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 14px;
    letter-spacing: 1px;
}

.nav-menu li a:hover {
    color: #ccc;
}

/* NAV CENTER - TRUE CENTER */
.nav-center {
    position: absolute; 
    left: 50%;
    transform: translateX(-50%); 
    z-index: 1000;
    flex-shrink: 0;
}

.logo-container {
    display: block;
    position: relative;
}

.logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    width: auto;
    height: auto;
}

.logo-default {
    /* Mengikuti style.css height 90px */
    width: auto;
    height: 60px; 
    opacity: 1;
}

.logo-scroll {
    /* Mengikuti style.css height 75px */
    width: auto;
    height: 50px; 
    opacity: 0;
    /* Mengikuti style.css transform awal saat tidak scroll */
    transform: translate(-50%, 20px); 
}

.logo-default-black {
    width: auto;
    height: 60px; 
    opacity: 0;
}

.logo-scroll-black {
    width: auto;
    height: 50px; 
    opacity: 0;
    transform: translate(-50%, 20px); 
}

.navbar.scrolled .logo-default {
    opacity: 0;
}

.navbar.scrolled .logo-scroll {
    opacity: 1;
    /* Mengikuti style.css transform saat scroll */
    transform: translate(-50%, -50%); 
}

.navbar.menu-hovered .logo-default {
    opacity: 0;
}

.navbar.menu-hovered .logo-scroll {
    opacity: 0;
}

.navbar.menu-hovered .logo-default-black {
    opacity: 1;
}

.navbar.menu-hovered.scrolled .logo-default-black {
    opacity: 0;
}

.navbar.menu-hovered.scrolled .logo-scroll-black {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Icon Styling (Diambil dari style.css) */
.icon-link {
    font-size: 1.3rem; 
    color: white; 
    transition: color 0.3s ease;
}

.icon-link:hover {
    color: #ccc; 
}

/* Icon saat menu hovered (Diambil dari style.css) */
.navbar.menu-hovered .icon-link {
    color: #000;
}

.navbar.menu-hovered .icon-link:hover {
    color: #333;
}

/* ================= CART COUNTER STYLING (Diambil dari style.css) ================= */
/* Aturan untuk menampung ikon dan counter */
.cart-link {
    position: relative; 
    display: inline-block;
    text-decoration: none; 
}

/* Penyesuaian Angka Keranjang */
.cart-counter {
    position: absolute;
    /* Geser angka agar lebih dekat ke ikon */
    top: -4px; 
    right: -8px; 
    
    /* Warna Hitam Putih */
    background-color: #000; /* Latar Belakang Hitam */
    color: white; /* Angka Putih */
    
    border-radius: 50%;
    padding: 1px 5px; /* Kurangi padding agar lebih kecil */
    font-size: 0.65rem; /* Ukuran font lebih kecil */
    font-weight: bold;
    line-height: 1;
    text-align: center;
    min-width: 16px; /* Lebar minimum sedikit lebih kecil */
    pointer-events: none; 
    
    /* Tambahkan border putih untuk memisahkan dari background hitam navbar */
    border: 1px solid white; 
}

/* Saat navbar memiliki class menu-hovered (submenu desktop terbuka) */
.navbar.menu-hovered .cart-counter {
    background-color: white; /* Latar Belakang Putih */
    color: #000; /* Angka Hitam */
    border: 1px solid #000; /* Border Hitam */
}

/* ================= MOBILE MENU - FIXED (Disesuaikan dengan style.css) ================= */

/* Menu Toggle (Hamburger) - Diambil dari style.css */
.menu-toggle {
    display: none; /* Sembunyikan di desktop */
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.navbar.menu-hovered .menu-toggle {
    color: #000; /* Sesuaikan warna saat menu hovered */
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 999; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%; 
    width: 80%; 
    max-width: 300px; 
    height: 100vh;
    background: #fff; 
    color: #000; 
    padding: 20px; 
    z-index: 1000; 
    transition: left 0.3s ease; 
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; 
    border-bottom: 1px solid #ccc; 
    background: #fff; 
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 10px; 
    padding-bottom: 5px;
}

.menu-header h3 {
    margin: 0;
    color: #000; 
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-menu {
    background: none;
    border: none;
    color: #000; 
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.close-menu i {
    font-size: 1.8rem;
}

.close-menu:hover {
    color: #e94560; 
    background: #f8f9fa;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    border-bottom: none; 
    margin-bottom: 15px; 
}

.submenu-toggle.mobile-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 0; 
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em; 
    color: #000; 
    font-weight: 500;
    transition: all 0.3s ease;
}

.submenu-toggle.mobile-toggle:hover {
    background: none;
    color: #e94560; 
}

.menu-text {
    flex: 1;
}

.menu-icon {
    font-size: 1.2em; 
    color: #000; 
    transition: transform 0.3s ease;
}

.submenu-toggle.mobile-toggle.active .menu-icon {
    transform: rotate(90deg);
    color: #e94560; 
}

.mobile-menu-footer {
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.mobile-cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #e94560;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    justify-content: space-between;
}

.mobile-cart-btn:hover {
    background: #c93d50;
    transform: translateY(-1px);
}

.cart-badge {
    background: #000; /* Latar belakang Hitam */
    color: #fff; /* Angka Putih */
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid white;
}

/* ================= SUBMENU MODAL - FIXED (Disesuaikan dengan style.css) ================= */
.submenu-modal {
    position: fixed;
    top: 0;
    left: -100%; 
    right: auto;
    width: 80%;
    max-width: 300px; 
    height: 100vh;
    background: #fff; 
    color: #000; 
    padding: 20px; 
    z-index: 1001;
    transition: left 0.3s ease; 
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: none; 
}

.submenu-modal.active {
    left: 0; 
    right: auto;
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; 
    border-bottom: 1px solid #ccc; 
    background: #fff; 
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 20px; 
    padding-bottom: 5px; 
}

.modal-header h4 {
    margin: 0;
    color: #000; 
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-modal {
    background: none;
    border: none;
    color: #000; 
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.close-modal i {
    font-size: 1.5rem; 
}

.close-modal:hover {
    color: #e94560; 
    background: #f8f9fa;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    border-bottom: 1px solid #f0f0f0; 
}

.modal-list a {
    display: block;
    padding: 16px 20px;
    color: #000; 
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-list a:hover {
    background: #f8f9fa;
    color: #e94560;
    padding-left: 25px;
}

/* ================= MOBILE RESPONSIVE (Disesuaikan dengan style.css) ================= */
.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

@media (max-width: 900px) {
    .navbar {
        padding: 10px 30px;
        height: 80px;
    }

    .navbar.scrolled {
        height: 65px;
    }

    .logo-default,
    .logo-default-black {
        height: 50px;
    }

    .logo-scroll,
    .logo-scroll-black {
        height: 45px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px; 
        height: 80px; 
    }
    
    .navbar.scrolled {
        padding: 10px 20px;
        height: 65px; 
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .menu-toggle {
        display: block; 
        width: 40px; 
        height: 40px; 
        background: none;
        color: white; 
        z-index: 1002; 
    }
    
    .logo-default,
    .logo-default-black {
        height: 45px; 
    }
    
    .logo-scroll,
    .logo-scroll-black {
        height: 40px; 
    }
    
    .nav-right {
        gap: 15px; 
    }
    
    .icon-link {
        font-size: 1.3rem;
        padding: 0; 
    }
    
    /* Mobile menu TIDAK full width */
    .mobile-menu,
    .submenu-modal {
        width: 80%;
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .logo-default,
    .logo-default-black {
        height: 40px; /* Very small and suitable for small mobile screens */
    }

    .logo-scroll,
    .logo-scroll-black {
        height: 35px; /* Very small and suitable for small mobile screens */
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu,
    .submenu-modal {
        width: 85%;
        max-width: 320px;
    }
    
    .navbar {
        padding: 10px 20px;
    }
}

/* Desktop Menu Styling (Override untuk min-width 769px) */
@media (min-width: 769px) {
    .nav-left {
        gap: 5px; /* Menu sangat berdekatan */
    }

    .nav-menu {
        gap: 2px; /* Gap sangat kecil antar menu */
    }

    .nav-menu .submenu-toggle.desktop-toggle {
        text-transform: none; 
        font-size: 14px; 
        letter-spacing: 0.5px; 
        font-weight: 500; 
        padding: 4px 6px; 
        color: white;
        display: flex;
        align-items: center;
        gap: 4px; 
    }

    .navbar.menu-hovered .nav-menu .submenu-toggle.desktop-toggle {
        color: #000;
    }

    .nav-menu .submenu-toggle.desktop-toggle:hover {
        color: #ccc;
    }

    .navbar.menu-hovered .nav-menu .submenu-toggle.desktop-toggle:hover {
        color: #333;
    }

    .nav-menu .submenu-toggle.desktop-toggle i {
        font-size: 10px; 
        color: inherit; /* PENTING: Mewarisi warna teks parent (span) */
    }

    /* Desktop logo size adjustments */
    .logo-default,
    .logo-default-black {
        height: 50px; /* Reduced from 60px for desktop */
    }

    .logo-scroll,
    .logo-scroll-black {
        height: 40px; /* Reduced from 50px for desktop */
    }
}

/* Desktop Submenu Styling */
@media (min-width: 769px) {
    .desktop-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 220px;
        background-color: #fff;
        color: #000;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border: 1px solid #000; 
        z-index: 1001;
        display: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 0;
        transform: translateY(10px);
        border-radius: 0; 
    }

    .desktop-submenu.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .desktop-submenu ul {
        list-style: none;
        padding: 0;
    }

    .desktop-submenu li {
        margin-bottom: 12px;
    }

    .desktop-submenu li a {
        color: #000;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s ease;
    }

    .desktop-submenu li a:hover {
        color: #666;
    }
}

/* ================= TAMBAHAN: AUTO HIDE ON SCROLL ================= */
.navbar.hide-on-scroll {
    /* Geser navbar ke atas (-100% dari tingginya) */
    transform: translateY(-100%); 
}