/* Mobile Navigation Styles - Added for Modernization */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 10001;
    /* Above almost everything but drawer */
    width: 30px;
    height: 21px;
    cursor: pointer;
    /* Removed absolute position, now flexed inside controls */
}

.mobile-cart-btn {
    display: none;
    /* Desktop hidden */
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    align-items: center;
    gap: 5px;
}

.mobile-header-controls {
    display: none;
    /* Desktop hidden */
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
}

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

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    /* Hidden by default */
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 20003;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.mobile-nav-drawer.open {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.close-mobile-nav {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav-item {
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.mobile-nav-link {
    display: block;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    padding: 5px 0;
    text-decoration: none;
}

.mobile-subnav {
    padding-left: 15px;
    margin-top: 5px;
}

.mobile-subnav a {
    display: block;
    color: #666;
    font-size: 0.95rem;
    padding: 5px 0;
    text-decoration: none;
}

/* Media Queries for Mobile Nav */
/* Media Queries for Mobile Nav */
@media (max-width: 900px) {

    /* Hide Desktop Nav & Elements */
    .desktop-nav,
    .desktop-only-actions,
    .user-actions,
    .search-bar,
    .top-bar .contact-links a:first-child {
        display: none !important;
    }

    /* Sticky Header Setup */
    header.main-header {
        position: sticky;
        top: 0;
        z-index: 10000;
        background: #fff;
        padding: 10px 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        /* Left Control, Logo, Right Control */
        align-items: center;
        width: 100%;
    }

    /* 1. Left Control: Hamburger */
    .mobile-header-controls {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        height: 2px;
        background-color: #333;
    }

    /* 2. Center: Logo */
    header .logo {
        text-align: center;
        margin: 0;
        max-width: 100%;
        overflow: visible;
        /* Fix truncation */
    }

    header .logo h1 {
        font-size: 1.1rem;
        /* Better scaling */
        white-space: normal;
        /* Allow wrap if really needed, but usually scale down */
        line-height: 1.2;
        margin: 0;
        padding: 0 5px;
        display: inline-block;
    }

    header .logo h1 a {
        text-decoration: none;
        color: var(--primary-color);
    }

    /* 3. Right Control: Cart */
    .mobile-header-controls-right {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .mobile-cart-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        color: #333;
        text-decoration: none;
        position: relative;
    }

    .cart-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: var(--primary-color);
        color: white;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    /* Top Bar Adjustment */
    .top-bar {
        font-size: 0.7rem;
        padding: 5px;
        text-align: center;
    }

    .top-bar .notice {
        display: block;
        margin-bottom: 2px;
    }
}

/* Global Overflow Fix */
html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}