/* ========================================
   VARIABLES & BASE
   ======================================== */
:root {
    --primary: #9333ea;
    --primary-light: #a855f7;
    --secondary: #06b6d4;
    --dark-bg: #1a1625;
    --darker-bg: #13111c;
    --header-bg: rgba(19, 17, 28, 0.98);
    --text-light: #9ca3af;
    --text-white: #ffffff;
    --border-color: rgba(147, 51, 234, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
}

/* ========================================
   HEADER & NAVIGATION STYLES
   ======================================== */

/* Header Container */
header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

/* Navigation */
nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
    color: var(--text-white);
}

.logo svg {
    width: 35px;
    height: 35px;
}

.logo span {
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

/* Navigation Links */
.nav-links > a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links > a:hover {
    color: var(--text-white);
}

/* Active link underline */
.nav-links > a.active {
    color: var(--text-white);
}

.nav-links > a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #9333ea 0%, #06b6d4 100%);
    border-radius: 2px;
}

/* Cart Button */
.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1.5px solid rgba(147, 51, 234, 0.5);
    border-radius: 50px;
    color: var(--text-white);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: rgba(147, 51, 234, 0.1);
    border-color: var(--primary);
    transform: scale(1.02);
}

.cart-count {
    background: var(--secondary);
    color: var(--text-white);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.language-btn:hover {
    color: var(--text-white);
}

#current-lang {
    font-weight: 500;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: -10px;
    background: var(--darker-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-option:hover {
    background: rgba(147, 51, 234, 0.1);
}

.language-option.active {
    background: rgba(147, 51, 234, 0.15);
}

.language-flag {
    font-size: 1.25rem;
}

.language-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-white);
}

.language-native {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1002;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

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

/* ========================================
   FOOTER STYLES
   ======================================== */

/* Footer Container */
footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 1.5rem;
    margin-top: auto;
}

/* Footer Content Grid */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

/* Footer Brand Section */
.footer-brand,
.footer-section,
.footer-column {
    display: flex;
    flex-direction: column;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 30px;
    height: 30px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer Text */
.footer-description {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Footer Headings */
.footer-section h3,
.footer-section h4,
.footer-column h4 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer Links */
.footer-section ul,
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-section ul li {
    margin: 0;
}

.footer-section a,
.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover,
.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(2px);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.3);
    color: var(--primary-light);
    transform: translateY(-2px);
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-light);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Header Mobile Adjustments */
    header {
        padding: 0.75rem 0;
        z-index: 1000 !important;
    }
    
    nav {
        padding: 0 1rem;
        position: relative;
    }
    
    /* Show Mobile Menu Button */
    .mobile-menu-btn {
        display: block !important;
        position: relative !important;
        z-index: 1003 !important;
        background: transparent !important;
        border: 1px solid rgba(147, 51, 234, 0.3) !important;
        border-radius: 8px !important;
        padding: 0.5rem 0.75rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-menu-btn:active {
        background: rgba(147, 51, 234, 0.1) !important;
    }
    
    /* Mobile Navigation Menu */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 400px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: var(--darker-bg) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 5rem 2rem 2rem !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8) !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Active Mobile Menu */
    .nav-links.mobile-active {
        right: 0 !important;
        display: flex !important;
    }
    
    /* Mobile Navigation Links */
    .nav-links a {
        width: 100% !important;
        padding: 1rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        font-size: 1rem !important;
        color: var(--text-light) !important;
        display: block !important;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--text-white) !important;
    }
    
    .nav-links a.active::after {
        display: none;
    }
    
    /* Mobile Language Selector */
    .language-selector {
        width: 100% !important;
        margin: 1rem 0 !important;
        order: 10 !important;
    }
    
    .language-btn {
        width: 100% !important;
        justify-content: center !important;
        display: flex !important;
        padding: 0.75rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.02) !important;
    }
    
    /* Mobile Cart Button */
    .cart-btn {
        width: 100% !important;
        justify-content: center !important;
        margin: 1rem 0 !important;
        order: 9 !important;
        display: flex !important;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-section,
    .footer-column {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Mobile Menu Animation */
    .nav-links.mobile-active a,
    .nav-links.mobile-active .cart-btn,
    .nav-links.mobile-active .language-selector {
        animation: slideInRight 0.4s ease-out forwards;
        opacity: 0;
    }
    
    .nav-links.mobile-active a:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.mobile-active a:nth-child(2) { animation-delay: 0.15s; }
    .nav-links.mobile-active a:nth-child(3) { animation-delay: 0.2s; }
    .nav-links.mobile-active a:nth-child(4) { animation-delay: 0.25s; }
    .nav-links.mobile-active a:nth-child(5) { animation-delay: 0.3s; }
    .nav-links.mobile-active a:nth-child(6) { animation-delay: 0.35s; }
    .nav-links.mobile-active a:nth-child(7) { animation-delay: 0.4s; }
    .nav-links.mobile-active .cart-btn { animation-delay: 0.45s; }
    .nav-links.mobile-active .language-selector { animation-delay: 0.5s; }
}

/* Small Mobile */
@media (max-width: 480px) {
    nav {
        padding: 0 1rem;
    }
    
    .nav-links {
        width: 90%;
        padding: 4rem 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.875rem 0;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo svg {
        width: 30px;
        height: 30px;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-dropdown {
    right: auto;
    left: -10px;
}

[dir="rtl"] .footer-section a:hover,
[dir="rtl"] .footer-links a:hover {
    transform: translateX(-2px);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    header,
    footer,
    .cart-btn,
    .language-selector {
        display: none;
    }
}