/* =========================================
   Hamburger Menu Styles
   ========================================= */

/* --- Hamburger Icon --- */
.hamburger-menu {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Above header and overlay */
    margin-right: 20px;
    /* Spacing from logo */

    /* Critical for Flexbox visibility */
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.hamburger-line {
    display: block;
    /* Ensure block rendering */
    width: 100%;
    height: 3px;
    background-color: var(--color-secondary);
    /* Dark color for better visibility */
    transition: all 0.3s ease;
    border-radius: 3px;
    transform-origin: center;
    opacity: 1;
    /* Force opacity */
}

/* Hamburger Animation (Active State) */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
    background-color: var(--color-primary);
    /* Change color when active */
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
    background-color: var(--color-primary);
}

/* --- Mobile Menu Wrapper --- */
.mobile-menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    /* Highest level */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.mobile-menu-wrapper.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

/* --- Overlay --- */
.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    backdrop-filter: blur(2px);
}

/* --- Mobile Menu Content (Sidebar) --- */
.mobile-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

/* Close Button */
.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.mobile-menu-close:hover {
    color: #F44336;
}

/* Menu Header (Logo area inside menu) */
.mobile-menu-header {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-logo {
    font-family: var(--font-en);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-secondary);
    text-decoration: none;
}

.mobile-menu-logo i {
    color: var(--color-primary);
    margin-right: 5px;
}

/* Menu List */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.mobile-menu-list li {
    border-bottom: 1px solid #f9f9f9;
}

.mobile-menu-list li a {
    display: block;
    padding: 18px 30px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-en);
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.mobile-menu-list li a:hover {
    background: #f0f8ff;
    /* Light blue tint */
    color: var(--color-primary);
    padding-left: 35px;
}

/* Active State */
.mobile-menu-list li.active a {
    background: #E3F2FD;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    padding-left: 35px;
}

/* Menu Footer */
.mobile-menu-footer {
    padding: 30px;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.mobile-menu-footer p {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    line-height: 1.5;
}

.mobile-menu-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.mobile-menu-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-menu-social a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

/* --- Responsive Settings --- */
@media (max-width: 1024px) {

    /* Show Hamburger */
    .hamburger-menu {
        display: flex !important;
        /* Force display on mobile */
    }

    /* Hide Desktop Nav */
    .desktop-nav {
        display: none !important;
    }

    /* Hide Wishlist and Account icons on mobile */
    .header__actions>a[href*="wishlist"],
    .header__actions>a[href*="my-account"] {
        display: none !important;
    }

    /* Hide search button on mobile */
    .header__actions>#searchToggle {
        display: none !important;
    }
}

/* Mobile Menu Divider */
.mobile-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
    border: none;
}

.mobile-menu-divider+li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Body Scroll Lock */
body.menu-open {
    overflow: hidden;
    height: 100vh;
}