/* ============================================
   AUTOGROUPEU - LAND ROVER PREMIUM E-COMMERCE
   Design System & Base Styles
   ============================================ */

/* ============================================
   DESIGN SYSTEM VARIABLES
   ============================================ */

:root {
    /* Brand Colors - Land Rover Heritage */
    --lr-forest-green: #1a4d2e;      /* Primary - Land Rover heritage */
    --lr-british-racing: #0f3020;    /* Darker accent */
    --lr-silver: #a8b3b8;            /* Premium silver */
    --lr-gold: #c9a961;              /* Luxury accent */
    
    /* Modern Accents */
    --primary-blue: #2d6a4f;         /* CTA buttons - LR Green */
    --primary-hover: #1a4d2e;
    
    /* Neutrals */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    
    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-premium: 0 8px 32px rgba(26,77,46,0.15);
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-headings: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: #fafafa;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* ============================================
   HEADER - DIAGNOSTIC ANTI-FLICKER FIX
   Problem: Avoid ANY height calculations during scroll
   Solution: Hard-code dimensions, use visibility not display
   ============================================ */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: var(--shadow-sm);
}

.main-header.is-sticky {
    box-shadow: var(--shadow-lg);
}

/* Top Bar - Pure opacity fade */
.header-top {
    background: linear-gradient(135deg, var(--lr-forest-green) 0%, var(--lr-british-racing) 100%);
    color: white;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    overflow: hidden;
    opacity: 1;
}

.main-header.is-compact .header-top {
    opacity: 1;
}

.header-top-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.header-top-logo {
    display: none;
    align-items: center;
    text-decoration: none;
}

.header-top-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

/* Header Contacts */
.header-contacts {
    display: flex;
    gap: 1.5rem;
}

.header-contact-item {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.header-contact-item:hover {
    color: var(--lr-gold);
}

.header-contact-item i {
    font-size: 1rem;
}

/* Language Selector */
.header-lang-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: var(--lr-gold);
}

/* Main Header Bar */
.header-main {
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    overflow: visible;
    border-bottom: 1px solid var(--border-light);
}

.header-main-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.header-logo {
    font-family: var(--font-headings);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--lr-forest-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.2s;
    white-space: nowrap;
    align-self: center;
}

.header-logo:hover {
    color: var(--lr-gold);
}

.header-logo:hover .logo-icon {
    border-color: rgba(201, 169, 97, 0.95);
    background: rgba(201, 169, 97, 0.08);
}

.logo-icon {
    height: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(201, 169, 97, 0.72);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s, background 0.2s;
}

.logo-img {
    height: 38px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 560px;
    position: relative;
}

.search-form {
    width: 100%;
    position: relative;
    max-width: none;
    margin: 0;
}

.search-input {
    width: 100%;
    padding: 0.68rem 3.25rem 0.68rem 0.95rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--lr-forest-green);
    box-shadow: 0 0 0 3px rgba(26,77,46,0.12);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.42rem 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Prevent legacy public.css from displacing header search */
.header-search .search-form {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.search-btn-label {
    display: inline;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-50%) scale(1.05);
}

/* Header Actions (Cart, Profile, Wishlist) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    position: relative;
    transition: all 0.2s;
    padding: 0.35rem;
}

.header-action-btn:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.header-action-btn i {
    font-size: 1.25rem;
}

.action-label {
    font-size: 0.68rem;
    font-weight: 500;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 0.25rem;
}

/* Navigation Bar */
.header-nav {
    background: var(--bg-light);
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease, min-height 0.3s ease, max-height 0.3s ease;
}

.main-header.is-compact .header-nav {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    height: 0;
    min-height: 0;
    max-height: 0;
}

.header-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 1.4rem;
    list-style: none;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Quick Actions */
.header-quick-actions {
    display: flex;
    gap: 0.55rem;
}

.quick-action-btn {
    padding: 0.38rem 0.78rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--text-primary);
}

.quick-action-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn.primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    font-weight: 600;
}

.quick-action-btn.primary:hover {
    background: var(--primary-hover);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* ============================================
   MOBILE RESPONSIVE HEADER
   ============================================ */

@media (max-width: 992px) {
    .header-top {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
    }

    .header-top-inner {
        height: 44px;
        padding: 0 1rem;
    }

    .header-top-logo {
        display: inline-flex;
    }

    .header-lang-selector {
        margin-left: auto;
    }

    .header-contacts {
        display: none;
    }

    .header-main {
        height: auto;
        min-height: 72px;
        max-height: none;
    }

    .header-main-inner {
        padding: 0.625rem 1rem;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
    }

    .header-main-inner .header-logo {
        display: none;
    }

    .header-search {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .header-actions {
        gap: 0.5rem;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .header-action-btn {
        padding: 0.25rem;
    }

    .action-label {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
    
    .header-nav-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .header-quick-actions {
        flex-wrap: wrap;
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    /* Більшість мобільних стилів хедера переїхали в секцію MOBILE BOTTOM NAVIGATION BAR */
    .search-btn-label {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu.mobile-open {
        display: flex;
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        z-index: 999;
    }
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    font-family: var(--font-primary);
}

/* Primary Button - Blue CTA */
.btn-primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Outline Primary */
.btn-outline-primary {
    background: transparent;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
}

/* Secondary Button - Land Rover Green */
.btn-secondary {
    background: var(--lr-forest-green);
    color: white;
    border-color: var(--lr-forest-green);
}

.btn-secondary:hover {
    background: var(--lr-british-racing);
    border-color: var(--lr-british-racing);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Outline Secondary */
.btn-outline-secondary {
    background: transparent;
    color: var(--lr-forest-green);
    border-color: var(--lr-forest-green);
}

.btn-outline-secondary:hover {
    background: var(--lr-forest-green);
    color: white;
}

/* Success Button */
.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Danger Button */
.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Small Button */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Large Button */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Disabled State */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

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

/* Footer - підтримуємо both .main-footer і .improved-footer (з шаблону) */
.main-footer,
.improved-footer,
.footer.improved-footer {
    background: linear-gradient(135deg, var(--lr-forest-green) 0%, var(--lr-british-racing) 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

/* Заголовки секцій — шаблон використовує h5 */
.footer-section h3,
.footer-section h5 {
    color: var(--lr-gold);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Текст і параграфи */
.footer-section p {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Навігаційні списки */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.375rem;
}

/* Посилання */
.footer-section a,
.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    display: block;
    line-height: 1.6;
}

.footer-section a:hover,
.footer-links a:hover {
    color: var(--lr-gold);
}

/* Контактні елементи */
.footer-section .contact-item,
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-section .contact-item i,
.contact-item i {
    color: var(--lr-gold);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Соціальні іконки */
.footer-section .social-icons,
.social-icons {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-top: 0.875rem;
}

.footer-section .social-icons a,
.social-icons a {
    color: rgba(255,255,255,0.7);
    font-size: 1.3rem;
    display: inline-flex;
    transition: color 0.2s, transform 0.2s;
}

.footer-section .social-icons a:hover,
.social-icons a:hover {
    color: var(--lr-gold);
    transform: translateY(-2px);
}

/* footer-links (альтернативний клас) */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.375rem;
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    text-align: center;
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section .contact-item,
    .contact-item {
        justify-content: center;
    }

    .footer-section .social-icons,
    .social-icons {
        justify-content: center;
    }
}

/* ============================================
   MOBILE MENU - Додатові стилі
   ============================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none;
}

.mobile-menu.open ~ .mobile-menu-backdrop,
body.menu-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
    display: block;
}

.mobile-menu-header {
    padding: 1rem;
    background: var(--lr-forest-green);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.close-mobile-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-mobile-menu:hover {
    opacity: 0.8;
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.mobile-catalog-section {
    border-bottom: 1px solid var(--border-light);
}

.mobile-catalog-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-catalog-btn:hover {
    background: var(--bg-light);
}

.mobile-cat-arrow {
    margin-left: auto;
}

.mobile-catalog-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-catalog-menu.open {
    max-height: 1000px;
}

.mobile-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-cat-item {
    border-bottom: 1px solid var(--border-light);
}

.mobile-cat-header {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: space-between;
}

.mobile-cat-link,
.mobile-cat-sub-link {
    flex: 1;
    width: 100%;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-size: 1rem;
    line-height: 1.4;
    background: transparent;
    border: none;
    border-radius: 0;
    font: inherit;
    text-align: left;
    box-shadow: none;
    appearance: none;
}

.mobile-cat-link:hover,
.mobile-cat-sub-link:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.mobile-cat-toggle,
.mobile-cat-toggle-l2 {
    background: none;
    border: none;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

.mobile-cat-toggle:hover,
.mobile-cat-toggle-l2:hover {
    color: var(--primary-blue);
}

.mobile-cat-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-cat-sub.open {
    max-height: 500px;
}

.mobile-cat-sub-item {
    border-top: 1px solid var(--border-light);
}

.mobile-cat-sub-l3 {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-cat-sub-l3.open {
    max-height: 300px;
}

.mobile-cat-link-l3 {
    display: block;
    padding: 0.7rem 1rem 0.7rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.2s;
}

.mobile-cat-link-l3:hover {
    color: var(--primary-blue);
    background: var(--bg-light);
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-list li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-list a {
    display: block;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-menu-list a:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    padding-left: 1.5rem;
}

.mobile-language-selector {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
}

.mobile-lang-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.mobile-lang-buttons {
    display: flex;
    gap: 0.5rem;
}

.mobile-lang-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.mobile-lang-btn:hover,
.mobile-lang-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.lang-flag {
    font-size: 1.2rem;
}

/* ============================================
   STATIC PAGE COMPONENTS
   .card-base, .page-header — used by about.html, contacts.html,
   terms.html, privacy.html, returns.html, shipping_payment.html
   ============================================ */

/* Page Header */
.page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.page-header h2 {
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 700;
    color: var(--lr-forest-green);
    margin-bottom: 0.25rem;
}

.page-header .lead {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Base Card */
.card-base {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card-base:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Category Card (used in about.html parts catalog list) */
.category-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    height: 100%;
    border: 1px solid var(--border-light);
    transition: border-color 0.2s;
}

.category-card:hover {
    border-color: var(--lr-gold);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.category-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.category-items {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Category Icon */
.category-icon {
    font-size: 1rem;
    color: var(--lr-forest-green);
    flex-shrink: 0;
}

/* Fade-in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out both;
}

/* ============================================
   UTILITIES
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex {
    display: flex;
}

.d-none {
    display: none !important;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   MODALS - VIN, Help, Service
   ============================================ */

.vin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vin-modal-overlay.d-none {
    display: none !important;
}

.vin-modal-window {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vin-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.vin-modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.vin-modal-title {
    margin: 0;
    padding: 2rem 2rem 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lr-forest-green);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

/* Пряма розмітка для тіла модалки (якщо немає .vin-modal-body) */
.vin-modal-window > p,
.vin-modal-window > form,
.vin-modal-window > .mb-3,
.vin-modal-window > a.btn {
    padding-left: 2rem;
    padding-right: 2rem;
    margin-top: 1rem;
}
.vin-modal-window > p:first-of-type {
    margin-top: 1.25rem;
}
.vin-modal-window > p:last-of-type,
.vin-modal-window > form {
    padding-bottom: 1.5rem;
}

.vin-modal-body {
    padding: 1.5rem 2rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.vin-modal-body p {
    margin: 0.75rem 0;
}

.vin-modal-body strong {
    color: var(--lr-forest-green);
    font-weight: 600;
}

.vin-form-group {
    margin-bottom: 1rem;
}

.vin-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.vin-form-input,
.vin-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.vin-form-input:focus,
.vin-form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.vin-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.vin-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.vin-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.vin-modal-btn-primary {
    background: var(--primary-blue);
    color: white;
}

.vin-modal-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.vin-modal-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.vin-modal-btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
}

/* Modal для Help та Service мають те ж стилі */
#helpModalOverlay,
#serviceModalOverlay {
    display: none !important;
}

#helpModalOverlay.d-flex,
#serviceModalOverlay.d-flex {
    display: flex !important;
}

/* Order Details Modal - wider window */
.order-modal-window {
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.order-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

#orderModalContent {
    overflow-y: auto;
    flex: 1;
    padding: 1.5rem;
}

@media (max-width: 576px) {
    .order-modal-window {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        margin-top: auto;
        margin-bottom: 0;
    }
}

/* Запобігання прокрутці коли меню/модалі відкриті */
body.menu-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* ========== BOOTSTRAP PRIMARY OVERRIDE ========== */
/* Перевизначаємо Bootstrap primary на зелений, щоб .text-primary, .btn-primary були зелені */
:root {
    --bs-primary: #2d6a4f;
    --bs-primary-rgb: 45, 106, 79;
    --bs-link-color: #2d6a4f;
    --bs-link-hover-color: #1a4d2e;
}
.btn-primary {
    background-color: #2d6a4f;
    border-color: #2d6a4f;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #1a4d2e;
    border-color: #1a4d2e;
}
.btn-outline-primary {
    color: #2d6a4f;
    border-color: #2d6a4f;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:focus-visible,
.btn-outline-primary.active,
.btn-outline-primary:focus:active {
    background-color: #2d6a4f !important;
    border-color: #2d6a4f !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: none;
}
.text-primary { color: #2d6a4f !important; }
a { color: inherit; }

/* ========== COOKIE NOTICE ========== */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #f8fafc;
    z-index: 9999;
    padding: 14px 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}
.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cookie-text {
    flex: 1;
    font-size: 0.95rem;
    color: #cbd5e1;
}
.cookie-link {
    color: #c9a961;
    text-decoration: underline;
}
.cookie-link:hover { color: #e8c97a; }
.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ========== WHATSAPP / FIXED CONTACT BUTTONS ========== */
.fixed-contact-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.whatsapp-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    color: white;
    text-decoration: none;
}
.whatsapp-button i { font-size: 26px; }

/* ========== BREADCRUMBS ========== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Load More button wrapper — replaces Bootstrap .pagination */
.load-more-wrap {
    text-align: center;
    padding: 2rem 0;
}

.breadcrumb-link {
    color: #1a4d2e;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.breadcrumb-link:hover {
    color: #0f3020;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #cbd5e1;
}

.breadcrumb-current {
    color: #334155;
    font-weight: 500;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION BAR (Rozetka-style)
   ============================================ */

.mobile-bottom-nav {
    display: none;
}

.mobile-drawer-backdrop,
.mobile-bottom-drawer {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        align-items: stretch;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 0;
        background: none;
        border: none;
        color: #64748b;
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 500;
        cursor: pointer;
        transition: color 0.15s;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .bottom-nav-item.active,
    .bottom-nav-item:active {
        color: var(--lr-forest-green);
    }

    .bottom-nav-badge {
        position: absolute;
        top: 2px;
        left: 50%;
        margin-left: 4px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: #ef4444;
        color: #fff;
        font-size: 0.6rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    /* === HEADER SIMPLIFICATION (mobile) === */
    .header-top {
        height: 36px;
        min-height: 36px;
        max-height: 36px;
    }

    .header-top-inner {
        height: 36px;
        padding: 0 8px;
    }

    .header-top-logo {
        display: inline-flex;
    }

    .header-top-logo-img {
        height: 22px;
    }

    .header-contacts {
        display: none;
    }

    .header-lang-selector {
        margin-left: auto;
    }

    .header-nav {
        display: none !important;
    }

    /* Ховаємо cart та account dropdown — вони в bottom nav та hamburger */
    .header-actions .header-action-btn,
    .header-actions .dropdown {
        display: none;
    }

    /* Але гамбургер залишаємо! */
    .header-actions {
        display: flex !important;
        gap: 0;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .header-main {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
    }

    .header-main-inner {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 0 8px;
        height: 44px;
    }

    .header-main-inner .header-logo {
        display: none;
    }

    .header-search {
        flex: 1;
        min-width: 0;
    }

    .search-input {
        height: 34px;
        font-size: 0.85rem;
        padding: 0 0.75rem;
        border-radius: 8px 0 0 8px;
        border-right: none;
    }

    .search-form {
        display: flex;
        align-items: stretch;
    }

    .search-btn {
        position: static;
        transform: none;
        min-width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 0 8px 8px 0;
        margin-left: -1px;
    }

    /* === Compact mode не потрібен — хедер вже мінімальний === */
    .main-header.is-compact .header-nav {
        display: none !important;
    }

    /* === Fixed elements piднімаємо над bottom nav === */
    .fixed-contact-buttons {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .cookie-notice {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    /* === Контент не ховається за bottom nav === */
    .improved-footer {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 1rem);
    }

    /* === body padding для bottom nav === */
    body {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1085;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .mobile-drawer-backdrop.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-bottom-drawer {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
        height: min(70vh, calc(100vh - (56px + env(safe-area-inset-bottom, 0px)) - 8px));
        max-height: min(70vh, calc(100vh - (56px + env(safe-area-inset-bottom, 0px)) - 8px));
        background: #fff;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.2);
        transform: translateY(100%);
        transition: transform 0.25s ease;
        z-index: 1090;
        flex-direction: column;
        overflow: hidden;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        will-change: transform;
    }

    .mobile-bottom-drawer.open {
        transform: translateY(0);
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }

    .mobile-drawer-handle {
        width: 44px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 4px;
        margin: 10px auto 6px;
    }

    .mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 1rem 0.75rem;
        border-bottom: 1px solid var(--border-light);
        font-weight: 700;
        color: var(--text-primary);
    }

    .mobile-drawer-close {
        border: none;
        background: none;
        color: #64748b;
        font-size: 1.6rem;
        line-height: 1;
        padding: 0;
        width: 32px;
        height: 32px;
    }

    .mobile-drawer-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
        min-height: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .mobile-drawer-body.mobile-account-section {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        border-bottom: none;
    }

    body.drawer-open {
        overflow: hidden;
    }
}

/* ============================================
   MOBILE MENU — Account Section
   ============================================ */

.mobile-account-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.mobile-account-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background 0.15s;
    width: 100%;
}

.mobile-account-link:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.mobile-account-link i {
    font-size: 1.1rem;
}

.mobile-account-logout {
    color: var(--danger);
}

.mobile-account-logout:hover {
    color: var(--danger);
    background: rgba(239,68,68,0.06);
}
