/* Modern Header CSS - MSL 3-Level Navigation (Clean Version) */

/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Add space for fixed header */
}

/* Modern Header - Fixed at top */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: 80px;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 30px;
    max-width: 100%;
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.burger-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.burger-menu-btn:hover {
    background: #f8f9fa;
}

/* Burger Icon */
.burger-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
    position: relative;
}

.burger-icon span {
    display: block;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger to X animation */
.burger-menu-btn.active .burger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu-btn.active .burger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu-btn.active .burger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.burger-text {
    color: #333;
    font-weight: 500;
}

/* Navigation Links */
.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2c3e2c;
}

/* Header Center Section */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo-link {
    display: block;
}

.logo {
    height: 40px;
    width: auto;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-end;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
    position: relative;
}

.icon-btn:hover {
    background: #f8f9fa;
    color: #2c3e2c;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
}

.language-text {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* ============================
   MSL 3-LEVEL SIDEBAR NAVIGATION
   ============================ */

.sidebar-overlay {
    position: fixed;
    top: 80px; /* Start below the header */
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px); /* Reduced height, below header */
    background: rgba(0, 0, 0, 0.2); /* More subtle overlay */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Level 1: Static main links - Leftmost panel (280px) */
.sidebar-level-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: calc(100vh - 80px); /* Reduced height */
    background: #195764; /* Primary brand color */
    color: white;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 3;
}

.sidebar-overlay.active .sidebar-level-1 {
    transform: translateX(0);
}

.level-1-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.level-1-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: white;
}

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

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.level-1-list {
    list-style: none;
    margin: 0;
    padding: 40px 0;
}

.level-1-list li {
    margin: 0;
}

.level-1-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.level-1-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.3);
    padding-left: 35px;
}

/* Level 2: Categories - Middle panel (300px) */
.sidebar-level-2 {
    position: absolute;
    top: 0;
    left: 280px;
    width: 300px;
    height: calc(100vh - 80px); /* Reduced height */
    background: #2a7a87; /* Lighter shade of brand color */
    color: white;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) 0.1s;
    z-index: 2;
}

.sidebar-overlay.active .sidebar-level-2 {
    transform: translateX(0);
}

.level-2-scroll {
    height: calc(100vh - 80px); /* Adjusted height */
    overflow-y: auto;
    padding: 30px 0;
}

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

.level-2-item {
    margin: 0;
}

.level-2-item.header {
    padding: 20px 30px 15px;
}

.level-2-header {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.level-2-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.level-2-link:hover,
.level-2-item.highlighted .level-2-link {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.3);
    padding-left: 35px;
}

.level-2-item.has-submenu .level-2-link::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.level-2-item.has-submenu:hover .level-2-link::after {
    opacity: 1;
    right: 15px;
}

/* Level 3: Sub-categories - Rightmost panel (350px) - No sliding animation */
.sidebar-level-3 {
    position: absolute;
    top: 0;
    left: 580px; /* 280px + 300px */
    width: 350px;
    height: calc(100vh - 80px); /* Reduced height */
    background: #3e9aa9; /* Even lighter shade of brand color */
    color: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease; /* Removed sliding, just fade */
    z-index: 1;
}

.sidebar-level-3.active {
    opacity: 1;
    visibility: visible;
}

.level-3-list {
    list-style: none;
    margin: 0;
    padding: 30px 0;
    height: calc(100vh - 80px); /* Adjusted height */
    overflow-y: auto;
}

.level-3-list li {
    margin: 0;
}

.level-3-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.level-3-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.3);
    padding-left: 35px;
}

/* Special styling for "SEE ALL" link */
.level-3-list li:first-child .level-3-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

/* Scrollbar styling for Level 2 */
.level-2-scroll::-webkit-scrollbar {
    width: 4px;
}

.level-2-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.level-2-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.level-2-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Scrollbar styling for Level 3 */
.level-3-list::-webkit-scrollbar {
    width: 4px;
}

.level-3-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.level-3-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.level-3-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================
   RESPONSIVE MOBILE NAVIGATION
   ============================ */

/* Mobile Menu - Single Level, Compact */
.mobile-menu {
    display: none; /* Hidden by default on desktop */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 280px;
    height: calc(100vh - 80px);
    background: #195764;
    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 5;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: white;
}

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

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.mobile-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-section {
    background: rgba(0, 0, 0, 0.15);
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-link {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: #3e9aa9;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-menu-link:hover::before {
    transform: scaleY(1);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    /* Hide desktop 3-level navigation on tablets/mobile */
    .sidebar-level-1,
    .sidebar-level-2,
    .sidebar-level-3 {
        display: none;
    }
    
    /* Show mobile menu */
    .mobile-menu {
        display: block;
    }
    
    /* Adjust header for smaller screens */
    .header-inner {
        padding: 0 20px;
    }
    
    .header-left {
        gap: 20px;
    }
    
    .header-right {
        gap: 15px;
    }
    
    .logo {
        height: 35px;
    }
}

@media (max-width: 768px) {
    /* Very compact mobile version */
    .header-inner {
        padding: 0 15px;
    }
    
    .header-left {
        gap: 15px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .burger-text {
        display: none; /* Hide "Boutique" text on very small screens */
    }
    
    .mobile-menu {
        max-width: 260px;
    }
    
    .mobile-menu-link {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .mobile-menu-section {
        padding: 8px 15px;
        font-size: 10px;
    }
    
    .mobile-menu-header {
        padding: 12px 15px;
    }
    
    .icon-btn {
        width: 35px;
        height: 35px;
    }
    
    .logo {
        height: 30px;
    }
}

@media (min-width: 1025px) {
    /* Ensure mobile menu is hidden on desktop */
    .mobile-menu {
        display: none !important;
    }
}
