/* ===========================================
   COMPLETE HEADER & FOOTER STYLES
   =========================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER STYLES ===== */
.site-header {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.75rem 2.5rem;
    position: relative;
}

/* Header content layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    z-index: 1001;
    flex-shrink: 0;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.9rem;
    font-weight: 900;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: relative;
    margin-left: auto;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: #1e3a8a;
    border-radius: 2px;
    transition: 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Navigation - Desktop */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: #1e3a8a;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: #1e3a8a;
    font-weight: bold;
}

.nav-link i {
    font-size: 1.1rem;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.25rem;
    background: white;
    flex-shrink: 0;
}

.lang-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: #f8fafc;
    color: #1e3a8a;
}

.lang-btn.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

/* Nav Actions (Cart, Auth) */
.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

/* Cart Link */
.cart-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.cart-link i {
    font-size: 1.25rem;
}

.cart-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

/* Auth Links */
.auth-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    white-space: nowrap;
}

.auth-link:hover {
    background: white;
    border-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

/* ===== FOOTER STYLES ===== */
.site-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 4rem 0 2.5rem;
    margin-top: auto;
    width: 100%;
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 1rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-section ul li a i {
    font-size: 1.1rem;
    color: #0ea5e9;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo .logo-img {
    height: 45px;
    width: auto;
}

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #0ea5e9;
    transform: translateY(-3px);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.contact-info i {
    color: #0ea5e9;
    font-size: 1.3rem;
    width: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 1rem;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    cursor: pointer;
}

.mobile-overlay.active {
    display: block;
}

/* Body lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ===== MOBILE MENU - PERFECTLY CENTERED ===== */
@media (max-width: 992px) {
    /* Show hamburger button */
    .hamburger-btn {
        display: flex;
    }
    
    /* Mobile overlay active state */
    .mobile-overlay.active {
        display: block;
    }
    
    /* Mobile menu container - CENTERED LAYOUT */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: center; /* Center horizontally */
        justify-content: flex-start; /* Start from top */
        padding: 100px 20px 40px; /* Ample padding */
        overflow-y: auto;
        z-index: 999;
        gap: 0;
        transition: right 0.3s ease-out;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        margin: 0;
    }
    
    /* Show mobile menu */
    .main-nav.active {
        right: 0;
    }
    
    /* Mobile navigation items - PERFECTLY CENTERED */
    .main-nav > * {
        width: 100%;
        max-width: 240px; /* Limit width for better centering */
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 5px;
    }
    
    /* Navigation links - CENTERED */
    .nav-link {
        width: 100%;
        padding: 16px 20px;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        justify-content: center; /* Center content */
        text-align: center;
        font-size: 1.1rem;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        color: #1e293b;
        transition: background-color 0.2s ease;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        background: #f8fafc;
        transform: none;
        color: #1e3a8a;
    }
    
    .nav-link i {
        width: 24px;
        font-size: 1.2rem;
        color: #1e3a8a;
        text-align: center;
    }
    
    /* Language switcher - CENTERED */
    .language-switcher {
        margin: 10px 0;
        justify-content: center;
        border: 2px solid #e5e7eb;
        background: white;
        padding: 8px;
        border-radius: 10px;
        width: 100%;
        max-width: 200px;
        display: flex;
        flex-direction: row;
    }
    
    .language-switcher .lang-btn {
        padding: 8px 16px;
        font-size: 1rem;
    }
    
    /* Nav actions - CENTERED */
    .nav-actions {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 10px;
        gap: 10px;
        width: 100%;
        max-width: 320px;
        align-items: center;
        justify-content: center;
    }
    
    .auth-link {
        width: auto;
        flex: 1;
        min-width: 120px;
        justify-content: center;
        text-align: center;
        padding: 12px 15px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
    }

    .cart-link {
        width: 100%;
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
        padding: 12px 15px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
    }
    
    .auth-link {
        background: #f8fafc;
        color: #1e3a8a;
        border: 2px solid #e5e7eb;
    }
    
    .cart-link {
        background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
        color: white;
    }
    
    /* Cart count in mobile */
    .cart-count {
        background: rgba(255, 255, 255, 0.3);
        font-size: 0.9rem;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .site-footer {
        padding: 3rem 0 2rem;
    }
    
    /* Adjust mobile menu width */
    .main-nav {
        width: 90%;
        max-width: 280px;
    }
    
    .nav-link {
        padding: 15px 18px;
        font-size: 1.05rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .logo-text {
        font-size: 1.4rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    /* Full width mobile menu on very small screens */
    .main-nav {
        width: 100%;
        max-width: none;
        right: -100%;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-link {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .nav-link i {
        font-size: 1.1rem;
    }
    
    .language-switcher,
    .nav-actions {
        max-width: 90%;
    }
}

/* Ensure desktop menu stays visible on large screens */
@media (min-width: 993px) {
    .hamburger-btn {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
    
    .main-nav {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }
    
    .nav-link {
        border-bottom: none !important;
        border-radius: 10px !important;
        width: auto !important;
        max-width: none !important;
        justify-content: flex-start !important;
    }
    
    .language-switcher {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
    }
    
    .nav-actions {
        flex-direction: row !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
    }
    
    .auth-link, .cart-link {
        width: auto !important;
        max-width: none !important;
    }
}

/* Ensure cart count is visible */
.cart-count {
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Cart link positioning */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Hide cart count when 0 */
.cart-count:empty,
.cart-count[style*="display: none"] {
    display: none !important;
}

/* Mobile cart count */
@media (max-width: 992px) {
    .cart-count {
        position: static;
        margin-left: 8px;
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
}