/* ===== CSS VARIABLES ===== */
:root {
    --primary-blue: #004AAD;
    --accent-red: #ED3237;
    --light-blue: #14A8E0;
    --dark-blue: #2c3e50;
    --gold: #ffd700;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;

    /* Font Families */
    --font-heading: 'Geist', serif;
    /* --font-body: 'Inter', sans-serif; */
    --font-body: 'Geist', sans-serif;

    /*Font sizes */
    /*
    1rem = whatever the root font-size is in html tag(usually 16px)
    2rem = 2 × root font-size
    0.5rem = 0.5 × root font-size
    */

    --text-xs: 0.5rem; /*8px - Tiny Text-labels*/ 

    --text-xs: 0.75rem; /*12px - small text-captions*/

    --text-sm: 0.875rem; /*14px - small body text*/

    --text-base:1rem; /*16px- Base body text*/

    --text-lg: 1.125rem; /*18px  - Slightly Larger body text*/

    --text-xl: 1.25rem; /*20px - Large body, small headings*/

    --text-2xl: 1.5rem; /*24px - sub-headings h3,h4*/

    --text-3xl: 1.875rem; /*30px - Medium Headings*/

    --text-4xl: 2.0rem; /*32px - Main Headings*/

    --text-5xl: 2.25rem; /*36px - Large Headings*/

    --text-6xl: 2.5rem; /*40px - Hero Text*/

    --text-7xl: 3rem; /*48px - Large Hero Text*/

    --text-8xl: 4rem; /*64px* - Extra Large Displays/

    /* Font weight */
    --light:300;

    --normal:400;

    --medium: 500;

    --semibold: 600;

    --bold: 700;
}

/* ==========================================
   HEADER BASE STYLES
   ========================================== */
header {
    width: 100%;
    z-index: 99;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   TOP BAR
   ========================================== */

.top-bar {
    display: none;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-blue) 100%);
    color: white;
    padding: 8px 0;
}

.top-bar-content {
    
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar-item:hover {
    opacity: 0.8;
}

.top-bar-item i {
    font-size: 12px;
}

/* ==========================================
   MAIN NAVIGATION
   ========================================== */

.main-navigation {
    background: white;
    padding: .35rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.nav-container {
   
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 600px;
}

.search-form {
    position: relative;
    display: none;
}

.search-box {
    display: none;
    flex: 1;
    padding: 12px 50px 12px 16px;
    /* border: 2px solid #e0e0e0; */
    border-radius: 999999px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-button {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--light-blue);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 999999px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-button:hover {
    background: var(--accent-red);
}

.search-button i {
    font-size: 14px;
}

/* Navigation Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon-item {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #2c3e50;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    position: relative;
    min-width: 60px;
}

.nav-icon-item:hover {
    background: #f8f9fa;
    color: var(--accent-red);
}

.nav-icon-item i {
    font-size: 20px;
}

.nav-icon-label {
    font-size: 11px;
    font-weight: 500;
}

/* Cart Button */
.cart-button {
    background: var(--light-blue);
    color: white;
}

.cart-button:hover {
    background: var(--accent-red);
    color: white;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================
   CATEGORIES NAVIGATION
   ========================================== */

.categories-nav {
    display: none;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.categories-container {
    /* max-width: 1400px; */
    margin: 0 auto;
    padding: 0 20px;
    display: none;
    align-items: center;
    gap: 15px;
}

/* Categories Toggle */
.categories-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.categories-toggle:hover {
    background: #5568d3;
}

.categories-toggle .toggle-icon {
    transition: transform 0.3s;
}

.categories-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Categories Menu */
.categories-menu {
    display: none;
    align-items: center;
    gap: 5px;
    flex: 1;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-menu::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.category-item i {
    font-size: 16px;
}

/* Additional Menu */
.additional-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.menu-item:hover {
    background: white;
    color: #667eea;
}

/* ==========================================
   MOBILE NAVIGATION OVERLAY
   ========================================== */

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* Don't block clicks when hidden */
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
     pointer-events: auto; /* Allow clicks when visible */
}

.mobile-nav {
      position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    height: 100vh; /* Fallback for older browsers */
    height: calc(var(--vh, 1vh) * 100); /* iPhone fix */
    background: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    
    /* Animation using transform (better performance) */
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile Nav Header */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--light-blue) 100%);
    color: white;
}

.mobile-nav-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.close-nav {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.close-nav i {
    font-size: 20px;
}

/* Mobile Nav Content */
.mobile-nav-content {
    padding: 20px;
}

.mobile-user-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.mobile-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--accent-red) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.mobile-user-link:hover {
    transform: translateX(5px);
}

.mobile-user-link i {
    font-size: 24px;
}

/* Mobile Nav Sections */
.mobile-nav-section {
    margin-bottom: 25px;
}

.mobile-nav-title {
    font-size: 0.9rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 10px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.mobile-nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(5px);
}

.mobile-nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.mobile-contact .mobile-nav-item {
    font-size: 14px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

   /* iPhone 5/SE specific */
@media (min-width: 374px) {
    .nav-icons {
        gap: 5px;
    }

    .nav-icon-item {
        padding: 6px;
    }

    .nav-icon-item i {
        font-size: 16px;
    }

    .mobile-menu-toggle {
        width: 25px;
        height: 20px;
    }

    .mobile-menu-toggle span {
        height: 2px;
    }
}

/* Small phones */
@media (min-width: 480px) {
    .main-navigation {
        padding: 10px 0;
    }

    .nav-container {
        padding: 0 10px;
    }

    .logo img {
        height: 35px;
    }

    .search-box {
        padding: 8px 40px 8px 10px;
        font-size: 14px;
    }

    .search-button {
        padding: 6px 12px;
    }

    .nav-icon-item i {
        font-size: 18px;
    }

    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .categories-toggle {
        padding: 10px 16px;
        font-size: 13px;
    }

    .mobile-nav {
        width: 90%;
    }

    .mobile-nav-header {
        padding: 15px;
    }

    .mobile-nav-header h2 {
        font-size: 1.25rem;
    }

    .mobile-nav-content {
        padding: 15px;
    }
}

/* Mobile devices */
@media (min-width: 768px) {
    .top-bar {
        display: flex;
    }

    .nav-container {
        width: 750px;
        padding: 0 15px;
        gap: 10px;
    }

    .content-container {
        width: 100%;
        overflow: hidden;
        flex-direction: column;
        border-radius: 8px;
    }

    .logo img {
        height: 75px;
    }

    .search-container {
        /* order: 3; */
        /* width: 100%; */
        /* max-width: 100%; */
    }

    .search-form{
        display: flex;
        width: 650px;
    }

    .search-box {
        display: flex;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 45px 10px 12px;
    }

    .nav-icons {
        order: 2;
        gap: 8px;
    }

    .nav-icon-label {
        display: none;
    }

    .nav-icon-item {
        min-width: auto;
        padding: 8px;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .categories-nav {
        padding: 10px 0;
    }

    .categories-container {
        display: flex;
        padding: 0 15px;
        flex-direction: row;
        align-items: stretch;
    }

    .categories-toggle {
        display: flex;
        /* width: 100%; */
        justify-content: center;
    }

    .categories-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 15px 0 10px;
    }

    .categories-menu.active {
        display: flex;
    }

    .category-item {
        width: 100%;
        justify-content: flex-start;
    }
}



/* Tablets and below */
@media (min-width: 992px) {
    .additional-menu {
        display: none;
    }

    .categories-menu {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}


/* ==========================================
   TOUCH OPTIMIZATIONS
   ========================================== */

@media (min-width: 768px) {
    .nav-icon-item,
    .mobile-menu-toggle,
    .categories-toggle,
    .category-item,
    .mobile-nav-item {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-icon-item{
        display: flex;
    }

    .search-button {
        min-width: 88px;
        min-height: 44px;
    }
}

/* Desktop (1024px+) */
@media screen and (min-width: 1024px) {
        .content-container {
        width: 100%;
        max-width: 924px;
        display: flex;
    }

    .top-bar{
        height: 35px;
        align-content: center;
    }

    .top-bar-text.sales-mail{
        display: flex;
    }
}



/* Large Desktop (1200px+) */
@media screen and (min-width: 1200px) {
       .nav-container{
        width: 100%;
        max-width: 1100px;
    }

            .content-container {
        width: 100%;
        max-width: 1144px;
        display: flex;
    }

}

/* Extra Large Desktop (1400px+) */
@media screen and (min-width: 1400px) {
       .nav-container{
        width: 100%;
        max-width: 1360px;
    }

            .content-container {
        width: 100%;
        max-width: 1360px;
        display: flex;
    }

}

/* Ultra Wide (1600px+) */
@media screen and (min-width:1600px) {
        .nav-container{
        max-width: 1440px;
        width: 1440px;
        padding: auto;
    }

            .content-container {
        width: 100%;
        max-width: 1524px;
        display: flex;
    }

}


/* 4K Screens (1920px+) */
@media screen and (min-width:1920px) {

    .content-container {
        width: 100%;
        max-width: 1530px;
        display: flex;
    }


}


/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.nav-icon-item:focus,
.category-item:focus,
.mobile-nav-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}