/**
 * CARDEALER Custom Styles
 * Uses CSS variables from config for theming
 * Dual theme system: Dark (default) + Light
 */

/* ================================================
   THEME SYSTEM - CSS VARIABLES
   Single source of truth for both themes
   ================================================ */

/* Dark Theme (Default) - Arres Industrial */
:root,
.theme-dark {
    --theme-bg-page: #050505;
    --theme-bg-section: #0a0a0a;
    --theme-bg-card: #0f0f0f;
    --theme-bg-elevated: #141414;
    --theme-bg-input: rgba(255, 255, 255, 0.05);

    --theme-text-primary: #ffffff;
    --theme-text-secondary: rgba(255, 255, 255, 0.7);
    --theme-text-muted: rgba(255, 255, 255, 0.5);
    --theme-text-subtle: rgba(255, 255, 255, 0.35);

    --theme-border-primary: rgba(255, 255, 255, 0.12);
    --theme-border-subtle: rgba(255, 255, 255, 0.06);
    --theme-border-accent: rgba(255, 255, 255, 0.2);

    --theme-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --theme-shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.5);
    --theme-shadow-glow: 0 0 40px rgba(var(--accent-rgb, 230, 0, 18), 0.15);

    --theme-overlay-gradient: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    --theme-hero-gradient: linear-gradient(135deg, #050505 0%, #0a0a0a 50%, #050505 100%);

    --theme-glass-bg: rgba(15, 15, 15, 0.8);
    --theme-glass-border: rgba(255, 255, 255, 0.08);

    --theme-tag-bg: transparent;
    --theme-tag-bg-hover: rgba(255, 255, 255, 0.05);
    --theme-tag-border: rgba(255, 255, 255, 0.2);
    --theme-tag-text: rgba(255, 255, 255, 0.6);

    --theme-btn-outline-bg: transparent;
    --theme-btn-outline-border: rgba(255, 255, 255, 0.2);
    --theme-btn-outline-text: rgba(255, 255, 255, 0.7);
    --theme-btn-outline-hover-bg: #ffffff;
    --theme-btn-outline-hover-text: #0a0a0a;
}

/* Light Theme - Clean White */
.theme-light {
    --theme-bg-page: #ffffff;
    --theme-bg-section: #fafafa;
    --theme-bg-card: #ffffff;
    --theme-bg-elevated: #f5f5f5;
    --theme-bg-input: #ffffff;

    --theme-text-primary: #111111;
    --theme-text-secondary: #444444;
    --theme-text-muted: #777777;
    --theme-text-subtle: #999999;

    --theme-border-primary: rgba(0, 0, 0, 0.12);
    --theme-border-subtle: rgba(0, 0, 0, 0.06);
    --theme-border-accent: rgba(0, 0, 0, 0.2);

    --theme-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
    --theme-shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.1);
    --theme-shadow-glow: 0 0 30px rgba(var(--accent-rgb, 230, 0, 18), 0.1);

    --theme-overlay-gradient: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    --theme-hero-gradient: #ffffff;

    --theme-glass-bg: rgba(255, 255, 255, 0.95);
    --theme-glass-border: rgba(0, 0, 0, 0.1);

    --theme-tag-bg: #ffffff;
    --theme-tag-bg-hover: #f5f5f5;
    --theme-tag-border: rgba(0, 0, 0, 0.15);
    --theme-tag-text: #444444;

    --theme-btn-outline-bg: transparent;
    --theme-btn-outline-border: rgba(0, 0, 0, 0.2);
    --theme-btn-outline-text: #111111;
    --theme-btn-outline-hover-bg: #111111;
    --theme-btn-outline-hover-text: #ffffff;
}

/* ================================================
   TAXI THEME - Yellow & Black Checkered
   ================================================ */
.theme-taxi {
    --theme-bg-page: #0a0a0a;
    --theme-bg-section: #111111;
    --theme-bg-card: #1a1a1a;
    --theme-bg-elevated: #222222;
    --theme-bg-input: rgba(255, 222, 0, 0.05);

    --theme-text-primary: #ffffff;
    --theme-text-secondary: rgba(255, 255, 255, 0.75);
    --theme-text-muted: rgba(255, 255, 255, 0.5);
    --theme-text-subtle: rgba(255, 255, 255, 0.35);

    --theme-border-primary: rgba(255, 222, 0, 0.15);
    --theme-border-subtle: rgba(255, 222, 0, 0.08);
    --theme-border-accent: rgba(255, 222, 0, 0.25);

    --theme-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    --theme-shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.6);
    --theme-shadow-glow: 0 0 40px rgba(255, 222, 0, 0.15);

    --theme-overlay-gradient: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    --theme-hero-gradient: linear-gradient(135deg, #0a0a0a 0%, #111111 50%, #0a0a0a 100%);

    --theme-glass-bg: rgba(20, 20, 20, 0.9);
    --theme-glass-border: rgba(255, 222, 0, 0.1);

    --theme-tag-bg: rgba(255, 222, 0, 0.05);
    --theme-tag-bg-hover: rgba(255, 222, 0, 0.1);
    --theme-tag-border: rgba(255, 222, 0, 0.2);
    --theme-tag-text: rgba(255, 222, 0, 0.8);

    --theme-btn-outline-bg: transparent;
    --theme-btn-outline-border: rgba(255, 222, 0, 0.3);
    --theme-btn-outline-text: #ffde00;
    --theme-btn-outline-hover-bg: #ffde00;
    --theme-btn-outline-hover-text: #000000;

    /* Taxi accent override */
    --accent: #ffde00;
    --accent-hover: #e6c800;
    --accent-rgb: 255, 222, 0;
}

/* Taxi hero checkered pattern stripe */
.hero-checkered {
    display: none;
}

.theme-taxi .hero-checkered {
    display: block;
    background-image:
        repeating-linear-gradient(
            90deg,
            #ffde00 0px, #ffde00 30px,
            #000000 30px, #000000 60px
        );
    background-size: 60px 30px;
}

/* Hero CTA button - uses accent-text for auto contrast */
.btn-hero-cta {
    background: var(--accent);
    color: var(--accent-text, #ffffff);
}

/* Accent button - auto contrast text color */
.btn-accent {
    background-color: var(--accent) !important;
    color: var(--accent-text, #ffffff) !important;
}

.btn-accent:hover {
    opacity: 0.9;
}

/* Force accent text color on all btn-accent elements */
button.btn-accent,
a.btn-accent,
.btn-accent span,
.btn-accent * {
    color: var(--accent-text, #ffffff) !important;
}

/* Desktop scaling - increase base font size by 30% */
@media (min-width: 1024px) {
    html {
        font-size: 20px; /* Default 16px * 1.25 = 20px (25% increase for readability) */
    }
}

@media (min-width: 1440px) {
    html {
        font-size: 21px; /* 16px * 1.31 ≈ 21px (30% increase for large screens) */
    }

    /* Smooth brand thumbnails - reduce pixelation */
    #menu-brands button img {
        image-rendering: auto;
        filter: blur(0.3px);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Left panel - Live monitor feed: increase font sizes */
    #desktop-feed-container .feed-item-enter {
        font-size: 12px !important;
    }
    #desktop-feed-container .feed-item-enter .text-slate-200 {
        font-size: 13px !important;
    }
    #desktop-feed-container .feed-item-enter .text-slate-500 {
        font-size: 11px !important;
    }
}

/* Hero section adjustments for MacBook screens (1024-1599px) */
@media (min-width: 1024px) and (max-width: 1599px) {
    /* Reduce hero title size - text-8xl (96px) is too big */
    .condensed-title.text-8xl,
    .condensed-title.lg\:text-8xl {
        font-size: 4.5rem !important; /* 72px instead of 96px */
    }

    /* Reduce hero section min-height */
    section.lg\:min-h-\[75vh\] {
        min-height: 60vh !important;
    }

    /* Reduce hero spacing */
    .mt-12.md\:mt-12 {
        margin-top: 2rem !important;
    }
}

/* Increase sidebar widths only on very large screens (1600px+) to avoid overflow on MacBook */
@media (min-width: 1600px) {
    aside.w-\[300px\] {
        width: 380px !important;
    }
    aside.w-\[320px\] {
        width: 400px !important;
    }

    /* Increase main container max-width */
    .max-w-\[1600px\] {
        max-width: 2000px !important;
    }
    #desktop-feed-container .feed-item-enter .text-\[9px\] {
        font-size: 11px !important;
    }

    /* Right panel - Similar cars: increase font sizes */
    #similar-cars-container .text-\[10px\] {
        font-size: 12px !important;
    }
    #similar-cars-container .text-\[9px\] {
        font-size: 11px !important;
    }
}

/* Prevent horizontal scroll on mobile - comprehensive fix */
html {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Ensure main wrapper doesn't cause overflow */
main, section, header, footer, nav, aside {
    max-width: 100vw;
    overflow-x: clip;
}

/* Fix for elements with translate animations causing overflow */
.translate-x-full,
.-translate-x-full,
[class*="translate-x"] {
    backface-visibility: hidden;
}

/* Base body styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* Safe area for iPhone notch/home indicator */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .safe-area-bottom {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Grid pattern background */
.bg-grid-pattern {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Glass morphism panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.glass-sidebar {
    background: var(--bg-sidebar);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ================================================
   FILTER CONTAINER - Unified gray bubble
   ================================================ */
.filter-container {
    background: var(--theme-bg-elevated);
    border: 1px solid var(--theme-border-primary);
    box-shadow: var(--theme-shadow-card);
}

.filter-divider {
    height: 1px;
    background: var(--theme-border-subtle);
}

.filter-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--theme-text-muted);
    font-weight: 500;
}

.filter-label-small {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-subtle);
}

.filter-value {
    font-size: 0.75rem;
    color: var(--theme-text-primary);
    font-variant-numeric: tabular-nums;
}

.filter-icon {
    color: var(--theme-text-muted);
    opacity: 0.6;
}

.filter-input {
    background: var(--theme-bg-input);
    border: 1px solid var(--theme-border-primary);
    color: var(--theme-text-primary);
    outline: none;
}

.filter-input::placeholder {
    color: var(--theme-text-muted);
}

.filter-input:focus {
    border-color: var(--accent);
    background: var(--theme-bg-card);
}

/* Light theme adjustments */
.theme-light .filter-container {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.08);
}

.theme-light .filter-input {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}

.theme-light .filter-input:focus {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Navigation button active state */
.nav-btn-active {
    border-color: var(--accent) !important;
    transform: scale(0.98);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3);
}

/* Scanline animation effect */
.scanline {
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.1), transparent);
    position: absolute;
    z-index: 10;
    animation: scan 3s linear infinite;
    pointer-events: none;
}

/* Input error state */
.input-error {
    border-color: #ef4444 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom scrollbar styling */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Firefox scrollbar */
html, body, div {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--bg-primary);
}

/* Range input styling */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -6px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--scrollbar-thumb);
    border-radius: 2px;
}

input[type=range]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--scrollbar-thumb);
    border-radius: 2px;
}

/* Footer hide animation */
.footer-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Fade in up animation */
.fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing animation */
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.animate-typing {
    animation: typing 1.4s infinite ease-in-out both;
}

/* Scan animation */
@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Pulse slow animation */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Grab scroll cursor */
.grab-scroll {
    cursor: grab;
}

.grab-scroll:active {
    cursor: grabbing;
}

/* Car card hover effect */
.car-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ================================================
   CONFIG-DRIVEN BORDER RADIUS
   Apply --border-radius to common elements
   ================================================ */

/* Buttons with Tailwind rounded classes - override with config value */
.rounded-full.btn-primary,
.rounded-full.btn-outline,
button.rounded-full,
a.rounded-full {
    border-radius: var(--border-radius, 9999px) !important;
}

/* Cards and panels */
.rounded-lg,
.rounded-xl {
    border-radius: var(--border-radius-lg, 1rem) !important;
}

/* Small rounded elements */
.rounded,
.rounded-md {
    border-radius: var(--border-radius, 0.5rem) !important;
}

/* Form inputs */
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    border-radius: var(--border-radius, 0.5rem) !important;
}

/* ALL buttons with btn-primary class (regardless of rounded class) */
.btn-primary,
button.btn-primary,
a.btn-primary {
    border-radius: var(--border-radius, 9999px) !important;
}

/* Brand filter tags and filter buttons */
#menu-brands-row button,
#menu-models button,
.filter-tag,
button.border {
    border-radius: var(--border-radius, 0.5rem) !important;
}

/* Hero CTA button - ensure it respects config radius */
section button[onclick*="scrollTo"],
a[href="#catalog"] {
    border-radius: var(--border-radius, 9999px) !important;
}

/* Image gallery thumbnail */
.gallery-thumb {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
}

/* Messenger buttons */
.btn-whatsapp {
    background-color: #25D366;
}

.btn-telegram {
    background-color: #229ED9;
}

.btn-yandex-maps {
    background-color: #FC3F1D;
}

/* Selection color */
::selection {
    background-color: var(--accent);
    color: white;
}

/* ================================================
   ACCENT COLOR UTILITIES
   Replace hardcoded Tailwind orange-* classes
   ================================================ */

/* Text colors */
.text-accent { color: var(--accent); }
.text-accent-light { color: var(--accent); opacity: 0.8; }

/* Background colors */
.bg-accent { background-color: var(--accent); }
.bg-accent-dark { background-color: var(--accent-hover); }
.bg-accent-gradient { background: linear-gradient(to right, var(--accent-hover), var(--accent)); }
.bg-accent-gradient-dark { background: linear-gradient(to right, var(--accent-hover), color-mix(in srgb, var(--accent-hover) 70%, black)); }

/* Border colors */
.border-accent { border-color: var(--accent); }
.border-accent-30 { border-color: rgba(var(--accent-rgb), 0.3); }
.border-accent-50 { border-color: rgba(var(--accent-rgb), 0.5); }
.border-accent-20 { border-color: rgba(var(--accent-rgb), 0.2); }

/* Shadow */
.shadow-accent { box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2); }
.shadow-accent-lg { box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.3); }

/* Hover states */
.hover\:text-accent:hover { color: var(--accent); }
.hover\:bg-accent:hover { background-color: var(--accent); }
.hover\:bg-accent-dark:hover { background-color: var(--accent-hover); }
.hover\:border-accent:hover { border-color: var(--accent); }

/* Focus states */
.focus\:border-accent:focus { border-color: var(--accent); }

/* Accent input checkbox/radio */
.accent-themed { accent-color: var(--accent); }

/* Promo panel with accent gradient */
.promo-accent {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(15, 23, 42, 0.4));
    border-color: rgba(var(--accent-rgb), 0.2);
}

/* Accent progress bar */
.progress-accent {
    background-color: var(--accent);
}

/* Button styles with accent */
.btn-accent-primary {
    background: linear-gradient(to right, var(--accent-hover), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2);
    transition: all 0.2s ease;
}

.btn-accent-primary:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3);
}

.btn-accent-secondary {
    background-color: var(--accent);
    color: white;
    transition: background-color 0.2s ease;
}

.btn-accent-secondary:hover {
    background-color: var(--accent-hover);
}

/* ================================================
   BRAND NAME TAGS (both themes)
   ================================================ */

/* Dark theme - brand names as compact tags (skip first "ALL" button) */
#menu-brands button:not(:first-child) > div:last-child {
    background: rgba(0, 0, 0, 0.85) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 9px !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    bottom: 4px !important;
}

/* Larger brand buttons on desktop */
@media (min-width: 1024px) {
    #menu-brands button {
        width: 140px !important;
        height: 80px !important;
    }
    #menu-brands button:first-child {
        width: 100px !important;
    }
    #menu-brands button:not(:first-child) > div:last-child {
        font-size: 10px !important;
        padding: 3px 8px !important;
        bottom: 6px !important;
    }
}

/* ================================================
   LIGHT THEME
   Applied when body has .theme-light class
   ================================================ */

/* Light theme base colors */
.theme-light {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.8);
    --bg-sidebar: rgba(248, 250, 252, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --scrollbar-thumb: #cbd5e1;
}

/* Light theme grid pattern */
.theme-light.bg-grid-pattern {
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
}

/* Light theme glass panels */
.theme-light .glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.theme-light .glass-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.theme-light .glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Light theme promo block */
.theme-light .promo-accent {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(248, 250, 252, 0.8));
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}

/* Light theme text colors */
.theme-light .text-white {
    color: #1e293b;
}

.theme-light .text-slate-100,
.theme-light .text-slate-200 {
    color: #334155;
}

.theme-light .text-slate-300 {
    color: #475569;
}

.theme-light .text-slate-400 {
    color: #64748b;
}

.theme-light .text-slate-500 {
    color: #94a3b8;
}

/* Light theme backgrounds */
.theme-light .bg-slate-800,
.theme-light .bg-slate-800\/40,
.theme-light .bg-slate-800\/60 {
    background-color: rgba(241, 245, 249, 0.9);
}

.theme-light .bg-slate-900 {
    background-color: #f1f5f9;
}

.theme-light .bg-slate-900\/50 {
    background-color: rgba(241, 245, 249, 0.5);
}

.theme-light .bg-\[\#0f172a\] {
    background-color: #ffffff;
}

.theme-light .bg-\[\#050b14\] {
    background-color: #f1f5f9;
}

.theme-light .bg-\[\#1e293b\]\/60 {
    background-color: rgba(248, 250, 252, 0.8);
}

.theme-light .bg-black\/50,
.theme-light .bg-black\/60 {
    background-color: rgba(255, 255, 255, 0.8);
}

.theme-light .bg-black\/90 {
    background-color: rgba(255, 255, 255, 0.95);
}

.theme-light .bg-white\/5,
.theme-light .bg-white\/20 {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Light theme borders */
.theme-light .border-slate-600,
.theme-light .border-slate-700 {
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .border-white\/5,
.theme-light .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.06);
}

/* Light theme gradients */
.theme-light .from-slate-900 {
    --tw-gradient-from: #ffffff var(--tw-gradient-from-position);
}

.theme-light .from-black\/90 {
    --tw-gradient-from: rgba(255, 255, 255, 0.9) var(--tw-gradient-from-position);
}

.theme-light .via-black\/40 {
    --tw-gradient-via: rgba(255, 255, 255, 0.4) var(--tw-gradient-via-position);
}

/* Light theme scrollbar */
.theme-light *::-webkit-scrollbar-track {
    background: #f8fafc;
}

.theme-light *::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.theme-light *::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Light theme range input */
.theme-light input[type=range]::-webkit-slider-runnable-track {
    background: #e2e8f0;
}

.theme-light input[type=range]::-moz-range-track {
    background: #e2e8f0;
}

/* Light theme input fields */
.theme-light input[type="text"],
.theme-light input[type="tel"],
.theme-light textarea {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.theme-light input[type="text"]::placeholder,
.theme-light input[type="tel"]::placeholder,
.theme-light textarea::placeholder {
    color: #94a3b8;
}

/* Light theme car cards */
.theme-light .car-card,
.theme-light article.group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.theme-light .car-card:hover,
.theme-light article.group:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Light theme hover states */
.theme-light .hover\:bg-slate-700:hover,
.theme-light .hover\:bg-slate-600:hover,
.theme-light .hover\:bg-slate-800:hover {
    background-color: #e2e8f0;
}

.theme-light .hover\:text-white:hover {
    color: var(--accent);
}

/* Light theme selection */
.theme-light ::selection {
    background-color: var(--accent);
    color: white;
}

/* Light theme modal overlay */
.theme-light #modal-overlay {
    background: rgba(255, 255, 255, 0.9);
}

/* Light theme nav button active */
.theme-light .nav-btn-active {
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
}

/* Light theme scanline */
.theme-light .scanline {
    background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.05), transparent);
}

/* Light theme success/status colors remain vivid */
.theme-light .text-green-400,
.theme-light .text-green-500 {
    color: #22c55e;
}

.theme-light .bg-green-500\/20 {
    background-color: rgba(34, 197, 94, 0.15);
}

.theme-light .border-green-500\/50 {
    border-color: rgba(34, 197, 94, 0.3);
}

/* Light theme red alert colors */
.theme-light .text-red-400,
.theme-light .text-red-500 {
    color: #ef4444;
}

.theme-light .bg-red-500 {
    background-color: #ef4444;
}

/* Light theme yellow star color */
.theme-light .text-yellow-400 {
    color: #facc15;
}

/* Light theme chat bubbles */
.theme-light .bg-accent {
    background-color: var(--accent);
    color: white;
}

/* Keep accent buttons with white text */
.theme-light .btn-accent-primary,
.theme-light .btn-accent-secondary {
    color: white;
}

/* Light theme progress bar background */
.theme-light .bg-slate-700 {
    background-color: #e2e8f0;
}

/* ================================================
   LIGHT THEME - ENHANCED UI ELEMENTS
   ================================================ */

/* Brand buttons - cleaner look without dark overlay */
.theme-light #menu-brands button .overlay {
    background: transparent !important;
}

.theme-light #menu-brands button {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.theme-light #menu-brands button:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
}

.theme-light #menu-brands button img {
    opacity: 1 !important;
}

/* Brand names as compact tags (skip first "ALL" button) */
.theme-light #menu-brands button:not(:first-child) > div:last-child {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 9px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    bottom: 4px !important;
}

/* Model buttons */
.theme-light #menu-models button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

.theme-light #menu-models button:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Chat message bubbles - light blue tint with border */
.theme-light .glass-panel:not(#nav-menu .glass-panel):not(.promo-accent) {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.03), rgba(255, 255, 255, 0.95)) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.15) !important;
}

/* Manager avatar area styling */
.theme-light #chat-feed > div:not(#nav-menu):not(#s-cars):not(.text-center) .glass-panel {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), #ffffff) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.08);
}

/* Benefits panel - subtle accent tint */
.theme-light .bg-\[\#1e293b\]\/60 {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(255, 255, 255, 0.9)) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}

/* Car cards - cleaner white design */
.theme-light .bg-slate-800\/40 {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.theme-light .bg-slate-800\/40:hover {
    border-color: rgba(var(--accent-rgb), 0.4) !important;
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.12);
}

/* Left sidebar panels */
.theme-light .glass-sidebar {
    background: #ffffff !important;
    border: 1px solid rgba(var(--accent-rgb), 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Right sidebar promo - enhanced */
.theme-light .promo-accent {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), #ffffff) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
}

/* Live monitor section */
.theme-light .bg-\[\#050b14\] {
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.03), #f8fafc) !important;
    border-radius: 0.75rem;
}

/* Manager card in sidebar */
.theme-light aside .glass-sidebar:last-child {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), #ffffff) !important;
}

/* Online status indicator */
.theme-light .text-green-400 {
    color: #10b981 !important;
}

/* Links and interactive elements accent */
.theme-light a:hover {
    color: var(--accent);
}

/* Form inputs with accent focus */
.theme-light input:focus,
.theme-light textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Quiz buttons */
.theme-light #quiz-block .glass-panel {
    background: #ffffff !important;
    border: 1px solid rgba(var(--accent-rgb), 0.15) !important;
}

/* Lead form */
.theme-light #lead-form {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.03), #ffffff) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
}

/* Mobile header */
.theme-light .glass-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.1) !important;
}

/* Mobile footer */
.theme-light .lg\:hidden.fixed.bottom-0 {
    background: #ffffff !important;
    border-top: 1px solid rgba(var(--accent-rgb), 0.15) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* Diagnostic card badge - light theme */
.theme-light .bg-green-900\/30 {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.theme-light .text-green-400.bg-green-900\/30 {
    color: #15803d !important; /* darker green for contrast */
}

/* WhatsApp button - keep white text in light theme */
.theme-light .bg-green-600,
.theme-light .bg-green-600 svg {
    color: white !important;
    fill: white !important;
}

/* Mobile Live Monitor - light theme */
.theme-light .bg-\[\#0f172a\]\/90 {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.theme-light .bg-slate-800\/50 {
    background-color: rgba(248, 250, 252, 0.95) !important;
}

.theme-light .border-slate-600\/50 {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

.theme-light .border-slate-700\/50 {
    border-color: rgba(0, 0, 0, 0.04) !important;
}

/* Red LIVE indicator with glow */
.theme-light .bg-red-500 {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7), 0 0 20px rgba(239, 68, 68, 0.4);
}

.theme-light .animate-ping.bg-red-400 {
    background-color: rgba(248, 113, 113, 0.6) !important;
}

/* Mobile Live Monitor - ensure all 3 items visible */
.theme-light .bg-\[\#0f172a\]\/90 [id^="feed-"] {
    padding-bottom: 0.75rem !important;
    height: 130px !important;
}

/* Dark theme - same height fix */
.bg-\[\#0f172a\]\/90 [id^="feed-"] {
    height: 130px !important;
}

/* ================================================
   SIDE NAVIGATION PANEL
   ================================================ */

.side-nav {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav:hover {
    background: rgba(10, 10, 10, 0.95);
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    white-space: nowrap;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
}

.side-nav-item:last-child {
    border-bottom: none;
}

.side-nav-item:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.side-nav-item.active {
    color: var(--accent);
}

.side-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.side-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav:hover .side-nav-label {
    opacity: 1;
    max-width: 120px;
    margin-right: 4px;
}

.side-nav-item.accent {
    color: var(--accent);
}

.side-nav-item.accent:hover {
    background: var(--accent);
    color: white;
}

.side-nav-toggle {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.side-nav-toggle .close-icon {
    display: none;
}

.side-nav-toggle .hamburger-icon {
    display: block;
}

.side-nav.expanded .side-nav-label {
    opacity: 1;
    max-width: 120px;
    margin-right: 4px;
}

.side-nav.expanded .side-nav-toggle .close-icon {
    display: block;
}

.side-nav.expanded .side-nav-toggle .hamburger-icon {
    display: none;
}

/* Collapsed state - overrides hover */
.side-nav.collapsed .side-nav-label {
    opacity: 0 !important;
    max-width: 0 !important;
    margin-right: 0 !important;
}

.side-nav.collapsed .side-nav-toggle .close-icon {
    display: none !important;
}

.side-nav.collapsed .side-nav-toggle .hamburger-icon {
    display: block !important;
}

/* Mobile side-nav - compact version */
@media (max-width: 1023px) {
    .side-nav {
        top: auto;
        bottom: 20px;
        transform: none;
        border-radius: 12px 0 0 12px;
        max-height: 320px;
        overflow-y: auto;
    }

    .side-nav-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .side-nav-item svg {
        width: 18px;
        height: 18px;
    }

    .side-nav-label {
        font-size: 10px;
    }

    /* Labels hidden by default on mobile */
    .side-nav .side-nav-label {
        display: none !important;
        opacity: 0;
    }

    /* Show labels when expanded on mobile */
    .side-nav.expanded .side-nav-label {
        display: block !important;
        opacity: 1 !important;
        max-width: 100px;
    }
}

/* Large desktop - more prominent menu */
@media (min-width: 1400px) {
    .side-nav {
        background: rgba(15, 15, 15, 0.95);
        border: 1px solid rgba(var(--accent-rgb), 0.2);
        border-right: none;
        box-shadow:
            0 0 30px rgba(0, 0, 0, 0.5),
            -5px 0 20px rgba(var(--accent-rgb), 0.1);
    }

    .side-nav:hover {
        border-color: rgba(var(--accent-rgb), 0.4);
        box-shadow:
            0 0 40px rgba(0, 0, 0, 0.6),
            -8px 0 30px rgba(var(--accent-rgb), 0.2);
    }

    .side-nav-item {
        padding: 16px 20px;
        gap: 14px;
    }

    .side-nav-item svg {
        width: 22px;
        height: 22px;
    }

    .side-nav-label {
        font-size: 12px;
    }

    .side-nav-item.accent {
        position: relative;
    }

    .side-nav-item.accent::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
        background: var(--accent);
        border-radius: 0 2px 2px 0;
    }
}

/* Attention animation - shake */
@keyframes side-nav-shake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateY(-50%) translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateY(-50%) translateX(4px); }
}

/* Attention animation - intense glow */
@keyframes side-nav-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
    50% {
        box-shadow:
            0 0 30px 10px rgba(var(--accent-rgb), 0.8),
            0 0 60px 20px rgba(var(--accent-rgb), 0.4),
            0 0 100px 40px rgba(var(--accent-rgb), 0.2);
    }
}

/* Red flashlight beam pointing left */
@keyframes side-nav-beam {
    0%, 100% {
        opacity: 0;
    }
    30%, 70% {
        opacity: 1;
    }
}

.side-nav.attention {
    animation: side-nav-shake 0.6s ease-in-out, side-nav-glow 1.2s ease-in-out 0.6s;
    border-color: rgba(var(--accent-rgb), 0.7);
}

.side-nav.attention::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    width: 200px;
    height: 120px;
    background: linear-gradient(
        to left,
        rgba(var(--accent-rgb), 0.5) 0%,
        rgba(var(--accent-rgb), 0.3) 20%,
        rgba(var(--accent-rgb), 0.1) 50%,
        transparent 100%
    );
    clip-path: polygon(100% 30%, 0% 0%, 0% 100%, 100% 70%);
    animation: side-nav-beam 1.2s ease-in-out 0.6s;
    pointer-events: none;
}

/* Light theme side nav */
.theme-light .side-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .side-nav:hover {
    background: rgba(255, 255, 255, 0.98);
}

.theme-light .side-nav-item {
    color: rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.theme-light .side-nav-item:hover {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.03);
}

.theme-light .side-nav-toggle {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

/* ================================================
   LIGHT THEME - PREMIUM REDESIGN
   Warm, refined aesthetic with careful attention to detail
   Uses CSS variables from :root for consistency
   ================================================ */

/* === BASE BACKGROUNDS === */
.theme-light body,
.theme-light main {
    background-color: var(--theme-bg-page) !important;
    color: var(--theme-text-primary) !important;
}

.theme-light .bg-brand-dark,
.theme-light .bg-\[\#050505\],
.theme-light .bg-\[\#0f0f0f\] {
    background-color: var(--theme-bg-page) !important;
}

.theme-light .bg-brand-gray,
.theme-light .bg-\[\#0A0A0A\],
.theme-light .bg-\[\#0a0a0a\] {
    background-color: var(--theme-bg-section) !important;
}

/* === HERO SECTION === */
.theme-light section.relative.min-h-\[70vh\],
.theme-light section.relative.min-h-\[80vh\] {
    background: var(--theme-hero-gradient) !important;
}

.theme-light section .absolute.inset-0.z-0 > div {
    background: transparent !important;
}

.theme-light section .from-brand-dark,
.theme-light section .via-brand-dark,
.theme-light section .to-brand-dark,
.theme-light section .from-brand-dark\/80,
.theme-light section .via-brand-dark\/60 {
    --tw-gradient-from: transparent !important;
    --tw-gradient-via: transparent !important;
    --tw-gradient-to: transparent !important;
}

/* Hero text contrast */
.theme-light .condensed-title,
.theme-light h1,
.theme-light h2,
.theme-light h3 {
    color: var(--theme-text-primary) !important;
}

.theme-light h1 .text-brand-red,
.theme-light .text-brand-red {
    color: var(--accent, #E60012) !important;
}

/* === TEXT HIERARCHY === */
.theme-light .text-white {
    color: var(--theme-text-primary) !important;
}

.theme-light .text-white\/70,
.theme-light .text-white\/60 {
    color: var(--theme-text-secondary) !important;
}

.theme-light .text-white\/50,
.theme-light .text-white\/40 {
    color: var(--theme-text-muted) !important;
}

.theme-light .text-gray-300,
.theme-light .text-gray-400,
.theme-light .text-gray-500 {
    color: var(--theme-text-muted) !important;
}

/* === CARDS - PREMIUM STYLING === */
.theme-light article.group {
    background-color: var(--theme-bg-card) !important;
    border: 1px solid var(--theme-border-primary) !important;
    box-shadow: var(--theme-shadow-card) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.theme-light article.group:hover {
    border-color: var(--accent, #E60012) !important;
    box-shadow: var(--theme-shadow-elevated), var(--theme-shadow-glow) !important;
    transform: translateY(-2px);
}

/* Card internal borders */
.theme-light article .border-white\/10,
.theme-light article .border-t.border-white\/10 {
    border-color: var(--theme-border-subtle) !important;
}

/* Year badge */
.theme-light article .bg-black\/50,
.theme-light .absolute.top-3.right-3 {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Image overlay gradient */
.theme-light article .bg-gradient-to-t {
    background: var(--theme-overlay-gradient) !important;
}

/* Card image overlay text - MUST stay white (on dark gradient) */
.theme-light article a .absolute .font-display,
.theme-light article a .absolute.bottom-3 .text-white,
.theme-light article a .absolute.bottom-3 div {
    color: #ffffff !important;
}

.theme-light article a .absolute.bottom-3 .text-white\/70,
.theme-light article a .absolute .uppercase.text-white\/70 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* === BUTTONS === */

/* Outline buttons */
.theme-light button.border-white\/20,
.theme-light a.border-white\/20,
.theme-light .border.border-white\/20 {
    background-color: var(--theme-btn-outline-bg) !important;
    border-color: var(--theme-btn-outline-border) !important;
    color: var(--theme-btn-outline-text) !important;
    transition: all 0.2s ease !important;
}

.theme-light button.border-white\/20:hover,
.theme-light a.border-white\/20:hover {
    background-color: var(--theme-btn-outline-hover-bg) !important;
    color: var(--theme-btn-outline-hover-text) !important;
    border-color: var(--theme-btn-outline-hover-bg) !important;
}

/* Primary button stays accent colored */
.theme-light .bg-brand-red,
.theme-light button.bg-brand-red {
    background-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* === BRAND FILTER TAGS === */
.theme-light #menu-brands-row button {
    background-color: var(--theme-tag-bg) !important;
    border-color: var(--theme-tag-border) !important;
    color: var(--theme-tag-text) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease !important;
}

.theme-light #menu-brands-row button:hover {
    background-color: var(--theme-tag-bg-hover) !important;
    border-color: var(--theme-border-accent) !important;
    color: var(--theme-text-primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.theme-light #menu-brands-row button.bg-brand-red {
    background-color: var(--accent, #E60012) !important;
    border-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* Tab buttons (ALL, OTHER) */
.theme-light #menu-brands button.bg-transparent {
    background-color: var(--theme-tag-bg) !important;
    border-color: var(--theme-tag-border) !important;
    color: var(--theme-tag-text) !important;
}

/* === SECTIONS === */
.theme-light section.bg-brand-gray,
.theme-light .hairline-top {
    background-color: var(--theme-bg-section) !important;
    border-color: var(--theme-border-subtle) !important;
}

/* CTA Section */
.theme-light .py-16.px-4.bg-brand-gray {
    background: linear-gradient(135deg, var(--theme-bg-section) 0%, var(--theme-bg-page) 100%) !important;
}

/* === REVIEWS === */
.theme-light .border.border-white\/10.p-6,
.theme-light .border.border-white\/10.p-6.rounded-lg {
    background-color: var(--theme-bg-card) !important;
    border-color: var(--theme-border-primary) !important;
    box-shadow: var(--theme-shadow-card) !important;
}

.theme-light .text-yellow-400 {
    color: #f59e0b !important;
}

/* Yandex badge keeps original colors */
.theme-light .bg-\[\#FFCC00\] {
    background-color: #FFCC00 !important;
}

/* === INPUTS === */
.theme-light input[type="text"],
.theme-light input[type="tel"],
.theme-light input.bg-transparent,
.theme-light textarea {
    background-color: var(--theme-bg-input) !important;
    border-color: var(--theme-border-primary) !important;
    color: var(--theme-text-primary) !important;
}

.theme-light input::placeholder,
.theme-light textarea::placeholder {
    color: var(--theme-text-muted) !important;
}

.theme-light input:focus,
.theme-light textarea:focus {
    border-color: var(--accent, #E60012) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 230, 0, 18), 0.1) !important;
}

/* === HEADER === */

/* Dark theme header - glass effect */
header {
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Light theme header - glass effect */
.theme-light header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.theme-light header a {
    color: var(--theme-text-muted) !important;
}

.theme-light header a:hover {
    color: var(--theme-text-primary) !important;
}

.theme-light header .text-white {
    color: var(--theme-text-primary) !important;
}

/* === MOBILE HEADER/FOOTER === */
.theme-light .fixed.top-0.bg-brand-dark,
.theme-light .lg\:hidden.fixed.top-0,
.theme-light nav.fixed.top-0 {
    background-color: rgba(247, 245, 243, 0.98) !important;
    border-bottom: 1px solid var(--theme-border-subtle) !important;
}

.theme-light .fixed.bottom-0.bg-brand-dark,
.theme-light .lg\:hidden.fixed.bottom-0,
.theme-light nav.fixed.bottom-0 {
    background-color: rgba(247, 245, 243, 0.98) !important;
    border-top: 1px solid var(--theme-border-subtle) !important;
}

/* Mobile nav text */
.theme-light .fixed.top-0 .text-white,
.theme-light .fixed.bottom-0 .text-white {
    color: var(--theme-text-primary) !important;
}

/* === FOOTER - STAYS DARK FOR CONTRAST === */
.theme-light footer {
    background-color: #1a1715 !important;
}

.theme-light footer .text-white {
    color: #ffffff !important;
}

.theme-light footer .text-white\/40,
.theme-light footer .text-white\/60 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.theme-light footer .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* === SIDE NAV - REFINED FOR LIGHT === */
.theme-light .side-nav {
    background: var(--theme-glass-bg) !important;
    border-color: var(--theme-glass-border) !important;
    box-shadow: var(--theme-shadow-elevated) !important;
}

.theme-light .side-nav-item {
    color: var(--theme-text-muted) !important;
    border-bottom-color: var(--theme-border-subtle) !important;
}

.theme-light .side-nav-item:hover {
    color: var(--theme-text-primary) !important;
    background: var(--theme-tag-bg-hover) !important;
}

.theme-light .side-nav-item.accent {
    color: var(--accent, #E60012) !important;
}

/* === SCROLLBAR === */
.theme-light *::-webkit-scrollbar-track {
    background: var(--theme-bg-section);
}

.theme-light *::-webkit-scrollbar-thumb {
    background: var(--theme-border-accent);
    border-radius: 4px;
}

.theme-light *::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-muted);
}

/* === MISC OVERRIDES === */
.theme-light .border-white\/10 {
    border-color: var(--theme-border-subtle) !important;
}

.theme-light .border-white\/20 {
    border-color: var(--theme-border-primary) !important;
}

.theme-light .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.theme-light .bg-white\/10,
.theme-light .bg-white\/20 {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Range slider */
.theme-light input[type=range]::-webkit-slider-runnable-track {
    background: var(--theme-border-primary);
}

.theme-light input[type=range]::-webkit-slider-thumb {
    background: var(--accent, #E60012);
}

/* ================================================
   BENEFITS SECTION - MODERN INDUSTRIAL DESIGN
   Clean typography, accent highlights, dual theme
   Identical structure for dark & light — only colors invert
   ================================================ */

/* Section */
.benefits-section {
    padding: 40px 16px;
    position: relative;
}

@media (min-width: 768px) {
    .benefits-section {
        padding: 56px 32px;
    }
}

/* Grid: 1 col small mobile → 2 cols mobile → 4 cols desktop */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Individual item */
.benefit-item {
    position: relative;
    padding: 20px 16px 16px;
    transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
    .benefit-item {
        padding: 24px 24px 20px;
    }
}

@media (min-width: 1024px) {
    .benefit-item {
        padding: 28px 32px 24px;
    }
}

/* Hover background */
.benefit-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Accent bar — thin line at top of each item */
.benefit-accent-bar {
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: rgba(var(--accent-rgb, 230, 0, 18), 0.15);
    border-radius: 1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .benefit-accent-bar {
        left: 24px;
        right: 24px;
    }
}

@media (min-width: 1024px) {
    .benefit-accent-bar {
        left: 32px;
        right: 32px;
    }
}

.benefit-item:hover .benefit-accent-bar {
    background: var(--accent, #E60012);
    box-shadow: 0 0 12px rgba(var(--accent-rgb, 230, 0, 18), 0.5);
    height: 3px;
}

/* Dividers — bottom on mobile, right on desktop */
.benefit-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 1024px) {
    .benefit-divider {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* Label — small uppercase tracking */
.benefit-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .benefit-label {
        font-size: 10px;
        margin-bottom: 12px;
    }
}

/* Number value container */
.benefit-value--number {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

/* Big accent number */
.benefit-number {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent, #E60012);
    letter-spacing: -0.03em;
}

@media (min-width: 640px) {
    .benefit-number {
        font-size: 42px;
    }
}

@media (min-width: 1024px) {
    .benefit-number {
        font-size: 52px;
    }
}

/* Suffix next to number */
.benefit-suffix {
    font-size: 20px;
    line-height: 1;
    color: var(--accent, #E60012);
    opacity: 0.6;
}

@media (min-width: 640px) {
    .benefit-suffix {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .benefit-suffix {
        font-size: 30px;
    }
}

/* Text-only value (no number) */
.benefit-value--text {
    font-size: 15px;
    line-height: 1.4 !important;
    color: #ffffff;
    white-space: normal;
    word-spacing: 0.05em;
}

/* Override condensed-title line-height for text benefits */
.benefit-value--text.condensed-title {
    line-height: 1.35 !important;
}

@media (min-width: 640px) {
    .benefit-value--text {
        font-size: 20px;
    }
}

@media (min-width: 1024px) {
    .benefit-value--text {
        font-size: 26px;
    }
}

/* Hint line */
.benefit-hint {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.28);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .benefit-hint {
        font-size: 10px;
        margin-top: 10px;
    }
}

/* ---- LIGHT THEME — same design, inverted palette ---- */

.theme-light .benefits-section {
    background-color: #ffffff !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* Grid dividers - matching dark theme structure */
.theme-light .benefit-divider {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

@media (min-width: 1024px) {
    .theme-light .benefit-divider {
        border-bottom-color: transparent !important;
        border-right-color: rgba(0, 0, 0, 0.06) !important;
    }
}

/* Accent bar - subtle by default, vibrant on hover */
.theme-light .benefit-accent-bar {
    background: rgba(var(--accent-rgb, 230, 0, 18), 0.15);
}

.theme-light .benefit-item:hover .benefit-accent-bar {
    background: var(--accent, #E60012);
    box-shadow: 0 0 12px rgba(var(--accent-rgb, 230, 0, 18), 0.35);
    height: 3px;
}

/* Item hover - subtle lift effect */
.theme-light .benefit-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Labels - subtle uppercase */
.theme-light .benefit-label {
    color: rgba(0, 0, 0, 0.45);
}

/* Numbers - keep accent color same as dark theme */
.theme-light .benefit-number {
    color: var(--accent, #E60012);
}

/* Suffix - accent with slight transparency */
.theme-light .benefit-suffix {
    color: var(--accent, #E60012);
    opacity: 0.65;
}

/* Text value - dark text for readability */
.theme-light .benefit-value--text {
    color: #111111;
}

/* Hint - muted text */
.theme-light .benefit-hint {
    color: rgba(0, 0, 0, 0.38);
}

/* Text value - proper word wrapping for multi-word text */
.benefit-value--text {
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* ================================================
   LIGHT THEME - BUTTONS & BADGES
   ================================================ */

/* btn-primary must keep white text in light theme */
.theme-light .btn-primary,
.theme-light button.btn-primary,
.theme-light a.btn-primary {
    color: white !important;
}

/* btn-accent must keep white text in light theme */
.theme-light .btn-accent,
.theme-light button.btn-accent,
.theme-light a.btn-accent,
.theme-light .btn-accent * {
    color: white !important;
}

/* Hero CTA button - white text in light theme */
.theme-light a[href="#catalog"].bg-brand-red {
    color: white !important;
}

/* DEALER badge - white text in light theme */
.theme-light .bg-brand-red.text-white {
    color: white !important;
}

/* ================================================
   LIGHT THEME - CAR CARD INFO SECTION FIX
   Make specs readable on white background
   ================================================ */

/* Card body area */
.theme-light article.group .p-4 {
    background: var(--theme-bg-card) !important;
}

/* Specs labels */
.theme-light article .text-white\/40 {
    color: var(--theme-text-muted) !important;
}

/* Specs values */
.theme-light article .text-white\/70 {
    color: var(--theme-text-primary) !important;
    font-weight: 500 !important;
}

/* Specs grid borders */
.theme-light article .border-b.border-white\/10,
.theme-light article .border-t.border-white\/10 {
    border-color: var(--theme-border-primary) !important;
}

/* Price section styling */
.theme-light article .text-\[9px\].text-white\/40 {
    color: var(--theme-text-subtle) !important;
}

/* Price amount - accent color */
.theme-light article .font-display.text-3xl.text-brand-red {
    color: var(--accent, #E60012) !important;
}

/* Monthly payment text */
.theme-light article .text-xs.text-white\/40 {
    color: var(--theme-text-muted) !important;
}

/* Action buttons */
.theme-light article .border.border-white\/20 {
    background: transparent !important;
    border-color: var(--theme-border-primary) !important;
    color: var(--theme-text-secondary) !important;
}

.theme-light article .border.border-white\/20:hover {
    background: var(--theme-text-primary) !important;
    color: var(--theme-bg-card) !important;
    border-color: var(--theme-text-primary) !important;
}

/* Keep primary button accent */
.theme-light article .bg-brand-red {
    background-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* Year badge on card image */
.theme-light article .bg-black\/50 {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--theme-text-primary) !important;
    border: 1px solid var(--theme-border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================================================
   CATALOG NAVIGATION - COMPACT CHIP STYLE
   Same style for countries and brands
   ================================================ */

/* Country/Brand chips container */
#menu-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 0;
}

/* Brand chips container */
#menu-brands-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 12px 0;
}

/* Section labels for catalog navigation */
.catalog-section-label {
    color: var(--theme-text-subtle, rgba(255,255,255,0.3));
    user-select: none;
    display: block;
}

.theme-light .catalog-section-label {
    color: var(--theme-text-subtle) !important;
}

/* Model chips - same style */
#menu-models button {
    padding: 8px 14px !important;
    background: transparent !important;
    border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15)) !important;
    color: var(--theme-text-secondary, rgba(255,255,255,0.6)) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    transition: all 0.15s ease !important;
    border-radius: var(--border-radius, 4px) !important;
}

#menu-models button:hover {
    border-color: var(--theme-text-muted, rgba(255,255,255,0.4)) !important;
    color: var(--theme-text-primary, #fff) !important;
}

#menu-models button.bg-brand-red {
    background: var(--accent, #E60012) !important;
    border-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* Search input - industrial style */
#brand-search {
    background: var(--theme-bg-input, rgba(255,255,255,0.05)) !important;
    border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15)) !important;
    color: var(--theme-text-primary, #fff) !important;
}

#brand-search::placeholder {
    color: var(--theme-text-muted, rgba(255,255,255,0.4)) !important;
}

#brand-search:focus {
    border-color: var(--accent, #E60012) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Filter label */
.text-gray-500.text-xs.uppercase {
    color: var(--theme-text-muted, rgba(255,255,255,0.4)) !important;
}

/* Price/Year filter container - no extra background, inside unified filter-container */

/* Breadcrumbs */
#breadcrumbs {
    color: var(--theme-text-muted, rgba(255,255,255,0.4)) !important;
}

#breadcrumbs a {
    color: var(--theme-text-secondary, rgba(255,255,255,0.6)) !important;
}

#breadcrumbs a:hover {
    color: var(--accent, #E60012) !important;
}

/* Cars count */
#cars-count {
    color: var(--theme-text-primary, #fff) !important;
}

/* Section header divider */
.hairline-bottom {
    border-color: var(--theme-border-primary, rgba(255,255,255,0.1)) !important;
}

/* === LIGHT THEME OVERRIDES === */
.theme-light #menu-models button {
    border-color: var(--theme-border-primary);
    color: var(--theme-text-secondary);
}

.theme-light #menu-models button:hover {
    border-color: var(--theme-border-accent);
    color: var(--theme-text-primary);
}

.theme-light #brand-search {
    background: var(--theme-bg-input);
    border-color: var(--theme-border-primary);
    color: var(--theme-text-primary);
}

/* Light theme filters - no extra background */

/* ================================================
   LIGHT THEME - GLOBAL OVERRIDES
   All white/dark text and bg classes inverted
   ================================================ */

/* Text color overrides */
.theme-light .text-white {
    color: var(--theme-text-primary) !important;
}

.theme-light .text-white\/60,
.theme-light .text-white\/70 {
    color: var(--theme-text-secondary) !important;
}

.theme-light .text-white\/40,
.theme-light .text-white\/50 {
    color: var(--theme-text-muted) !important;
}

.theme-light .text-white\/30,
.theme-light .text-white\/35 {
    color: var(--theme-text-subtle) !important;
}

/* Background overrides */
.theme-light .bg-brand-dark,
.theme-light .bg-\[\#050505\],
.theme-light .bg-\[\#0a0a0a\],
.theme-light .bg-brand-gray {
    background-color: #fafafa !important;
}

.theme-light .bg-\[\#0f0f0f\],
.theme-light .bg-\[\#141414\] {
    background-color: #ffffff !important;
}

/* Main content area */
.theme-light main {
    background-color: #ffffff !important;
}

/* Border overrides */
.theme-light .border-white\/10,
.theme-light .border-white\/8 {
    border-color: var(--theme-border-primary) !important;
}

.theme-light .border-white\/5,
.theme-light .border-white\/6 {
    border-color: var(--theme-border-subtle) !important;
}

.theme-light .border-white\/20,
.theme-light .border-white\/30 {
    border-color: var(--theme-border-accent) !important;
}

/* ================================================
   LIGHT THEME - HEADER/NAVIGATION
   ================================================ */

.theme-light header nav a,
.theme-light header nav span {
    color: var(--theme-text-primary);
}

.theme-light header .text-white\/60 a,
.theme-light header .text-white\/60 button {
    color: var(--theme-text-secondary) !important;
}

.theme-light header .text-white\/60 a:hover,
.theme-light header .text-white\/60 button:hover {
    color: var(--theme-text-primary) !important;
}

/* Mobile menu lines */
.theme-light #menu-line-1,
.theme-light #menu-line-2,
.theme-light #menu-line-3 {
    background-color: var(--theme-text-primary) !important;
}

/* Mobile menu overlay */
.theme-light #mobile-menu {
    background-color: var(--theme-bg-page) !important;
}

.theme-light #mobile-menu a,
.theme-light #mobile-menu button {
    color: var(--theme-text-primary) !important;
}

/* ================================================
   LIGHT THEME - HERO SECTION
   ================================================ */

/* Hero background container - white */
.theme-light section.relative.min-h-\[70vh\] {
    background: #ffffff !important;
}

/* Hero gradient overlays - make light */
.theme-light section.relative .bg-gradient-to-br,
.theme-light section.relative .bg-gradient-to-t,
.theme-light section.relative .bg-gradient-to-r {
    background: transparent !important;
}

.theme-light section.relative .from-brand-dark {
    --tw-gradient-from: #ffffff !important;
}

.theme-light section.relative .via-brand-gray,
.theme-light section.relative .via-brand-dark\/60 {
    --tw-gradient-via: transparent !important;
}

.theme-light section.relative .to-brand-dark,
.theme-light section.relative .to-transparent {
    --tw-gradient-to: transparent !important;
}

/* Hero text colors */
.theme-light .condensed-title {
    color: #111111;
    font-weight: 700 !important;
}

.theme-light section.relative h1.text-white {
    color: #111111 !important;
    font-weight: 700 !important;
}

.theme-light section.relative h1.condensed-title {
    color: #111111 !important;
    font-weight: 700 !important;
}

.theme-light section.relative .text-gray-300 {
    color: #444444 !important;
}

.theme-light section.relative .text-white\/40,
.theme-light section.relative .text-white\/50 {
    color: #777777 !important;
}

/* Hero label line */
.theme-light section.relative .bg-brand-red {
    background-color: var(--accent, #E60012) !important;
}

/* ================================================
   LIGHT THEME - CTA SECTION
   ================================================ */

.theme-light section.bg-brand-red {
    /* Keep accent background */
    background-color: var(--accent, #E60012) !important;
}

/* ================================================
   LIGHT THEME - ACTION CARD (Hero right side)
   ================================================ */

/* Card container */
.theme-light .bg-gradient-to-b.from-white\/\[0\.03\] {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Card title */
.theme-light .font-display.text-2xl.text-white {
    color: #111111 !important;
}

/* Card subtitle */
.theme-light .text-white\/40.text-sm {
    color: #777777 !important;
}

/* Phone button */
.theme-light .border-white\/20.bg-white\/\[0\.02\] {
    background: #fafafa !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.theme-light .border-white\/20.bg-white\/\[0\.02\]:hover {
    background: #f5f5f5 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Phone text */
.theme-light .text-\[10px\].uppercase.text-white\/40 {
    color: #999999 !important;
}

.theme-light .font-display.text-xl.text-white {
    color: #111111 !important;
}

/* WhatsApp/Telegram buttons */
.theme-light .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.theme-light .text-white\/60 {
    color: #666666 !important;
}

/* Stats section */
.theme-light .font-display.text-3xl.text-white,
.theme-light .font-display.text-2xl.text-white {
    color: #111111 !important;
}

.theme-light .text-\[9px\].uppercase.text-white\/40 {
    color: #999999 !important;
}

/* Mobile stats border */
.theme-light .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* ================================================
   LIGHT THEME - FOOTER
   ================================================ */

.theme-light footer,
.theme-light #contacts {
    background-color: #fafafa !important;
    color: #111111 !important;
}

.theme-light footer * {
    color: inherit;
}

.theme-light footer a {
    color: #444444 !important;
}

.theme-light footer a:hover {
    color: var(--accent, #E60012) !important;
}

.theme-light footer .text-white,
.theme-light footer .text-white\/40,
.theme-light footer .text-white\/50,
.theme-light footer .text-white\/60,
.theme-light footer .text-white\/70 {
    color: #777777 !important;
}

.theme-light footer h3,
.theme-light footer h4,
.theme-light footer .font-display,
.theme-light footer .font-bold {
    color: #111111 !important;
}

.theme-light footer p {
    color: #444444 !important;
}

/* Footer borders */
.theme-light footer .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Footer phone */
.theme-light footer .text-brand-red {
    color: var(--accent, #E60012) !important;
}

/* ================================================
   LIGHT THEME - REVIEWS SECTION
   ================================================ */

.theme-light .review-card {
    background: var(--theme-bg-card) !important;
    border-color: var(--theme-border-primary) !important;
}

.theme-light .review-card .text-white {
    color: var(--theme-text-primary) !important;
}

.theme-light .review-card .text-white\/60 {
    color: var(--theme-text-secondary) !important;
}

/* ================================================
   LIGHT THEME - MODALS
   ================================================ */

.theme-light .modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
}

.theme-light .modal-content,
.theme-light [class*="modal"] > div {
    background: var(--theme-bg-card) !important;
    color: var(--theme-text-primary);
}

.theme-light .modal-content input,
.theme-light .modal-content select,
.theme-light .modal-content textarea {
    background: var(--theme-bg-input) !important;
    border-color: var(--theme-border-primary) !important;
    color: var(--theme-text-primary) !important;
}

/* ================================================
   LIGHT THEME - SIDE NAVIGATION
   ================================================ */

.theme-light .side-nav {
    background: var(--theme-glass-bg) !important;
    border-color: var(--theme-glass-border) !important;
    box-shadow: var(--theme-shadow-elevated);
}

.theme-light .side-nav-item {
    color: var(--theme-text-secondary) !important;
    border-color: var(--theme-border-subtle) !important;
}

.theme-light .side-nav-item:hover {
    color: var(--theme-text-primary) !important;
    background: var(--theme-tag-bg-hover) !important;
}

/* ================================================
   LIGHT THEME - MISC ELEMENTS
   ================================================ */

/* Glass panels */
.theme-light .backdrop-blur-lg,
.theme-light .backdrop-blur-xl {
    background: var(--theme-glass-bg) !important;
}

/* Tags */
.theme-light .bg-white\/5,
.theme-light .bg-white\/10 {
    background: var(--theme-tag-bg) !important;
}

/* Dividers */
.theme-light hr {
    border-color: var(--theme-border-primary) !important;
}

/* Selection */
.theme-light ::selection {
    background: var(--accent, #E60012);
    color: #ffffff;
}

/* ================================================
   CATALOG SECTION - UNIFIED STYLING
   ================================================ */

/* Search Input - Dark Theme */
.catalog-search {
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.catalog-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.catalog-search:focus {
    border-color: var(--accent, #E60012);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 230, 0, 18), 0.15);
}

/* Brand Tags - Unified style for countries and brands */
.brand-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0 12px !important;
    line-height: 1 !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Flag emoji inside brand tags - constrain to text height */
.brand-tag .flag-icon {
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: 14px;
    overflow: hidden;
}

/* Tag count badge - numeric indicator */
.tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    border-radius: 9px;
    background: rgba(var(--accent-rgb, 230, 0, 18), 0.15);
    color: var(--accent, #E60012);
}

/* Active tag - invert count badge */
.bg-brand-red .tag-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Light theme count badge */
.theme-light .tag-count {
    background: rgba(var(--accent-rgb, 230, 0, 18), 0.12);
    color: var(--accent, #E60012);
}

.theme-light .bg-brand-red .tag-count {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* Model Tags */
.model-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

/* ================================================
   CATALOG - LIGHT THEME OVERRIDES
   ================================================ */

/* Search Input - Light Theme */
.theme-light .catalog-search {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #111111 !important;
}

.theme-light .catalog-search::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
}

.theme-light .catalog-search:focus {
    border-color: var(--accent, #E60012) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 230, 0, 18), 0.15) !important;
}

/* Search container in light theme */
.theme-light .bg-white\/5 {
    background: rgba(0, 0, 0, 0.03) !important;
}

.theme-light .border-white\/10,
.theme-light .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Brand Tags - Light Theme (unified for countries and brands) */
.theme-light .brand-tag {
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
}

.theme-light .brand-tag:hover {
    border-color: var(--accent, #E60012) !important;
    background: transparent !important;
    color: var(--accent, #E60012) !important;
}

.theme-light .brand-tag.bg-brand-red {
    background: var(--accent, #E60012) !important;
    border-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* Model Tags - Light Theme */
.theme-light .model-tag {
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
}

.theme-light .model-tag:hover {
    border-color: var(--accent, #E60012) !important;
    background: transparent !important;
    color: var(--accent, #E60012) !important;
}

.theme-light .model-tag.bg-brand-red {
    background: var(--accent, #E60012) !important;
    border-color: var(--accent, #E60012) !important;
    color: #ffffff !important;
}

/* Catalog section title - Light Theme */
.theme-light #catalog .condensed-title {
    color: #111111 !important;
}

.theme-light #catalog .text-gray-500 {
    color: #666666 !important;
}

/* Filter container inside unified filter-container - no extra background */

/* Filter labels - Light Theme */
.theme-light #filters-container .text-gray-500 {
    color: #555555 !important;
}

.theme-light #filters-container .text-white\/30 {
    color: rgba(0, 0, 0, 0.4) !important;
}

.theme-light #filters-container .text-white {
    color: #111111 !important;
}

/* Range sliders - Light Theme */
.theme-light input[type=range]::-webkit-slider-runnable-track {
    background: rgba(0, 0, 0, 0.15) !important;
}

/* Breadcrumbs - Light Theme */
.theme-light #breadcrumbs a {
    color: #888888 !important;
}

.theme-light #breadcrumbs a:hover {
    color: var(--accent, #E60012) !important;
}

.theme-light #breadcrumbs span.text-white {
    color: #111111 !important;
}

.theme-light #breadcrumbs span.text-white\/20 {
    color: rgba(0, 0, 0, 0.2) !important;
}

/* Catalog helper text - Light Theme */
.theme-light .text-white\/50 {
    color: rgba(0, 0, 0, 0.5) !important;
}

.theme-light .text-white\/40 {
    color: rgba(0, 0, 0, 0.4) !important;
}

/* ================================================
   MODAL SYSTEM - Theme-aware modals
   ================================================ */

/* Modal backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.theme-light .modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

/* Modal content box */
.modal-content {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border-primary);
    border-radius: var(--border-radius, 0);
    box-shadow: var(--theme-shadow-elevated);
}

/* Quiz container - handles car photo header */
.quiz-container {
    overflow: hidden;
}

.quiz-container > div:first-child img {
    border-top-left-radius: var(--border-radius, 0);
    border-top-right-radius: var(--border-radius, 0);
}

/* Modal header */
.modal-header {
    color: var(--theme-text-primary);
}

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

/* Modal form inputs */
.modal-input {
    background: var(--theme-bg-input);
    border: 1px solid var(--theme-border-primary);
    border-radius: var(--border-radius, 0);
    color: var(--theme-text-primary);
    transition: all 0.2s;
}

.modal-input::placeholder {
    color: var(--theme-text-subtle);
}

.modal-input:focus {
    border-color: var(--accent, #E60012);
    outline: none;
}

/* Modal labels */
.modal-label {
    color: var(--theme-text-muted);
}

/* Modal consent text */
.modal-consent {
    color: var(--theme-text-subtle);
}

/* Modal close button */
.modal-close {
    background: var(--theme-bg-elevated);
    color: var(--theme-text-secondary);
    border-radius: var(--border-radius, 0);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--accent, #E60012);
    color: white;
}

/* Modal accent line */
.modal-accent-line {
    background: linear-gradient(to right, transparent, var(--accent, #E60012), transparent);
}

/* Modal corner accents */
.modal-corner {
    border-color: color-mix(in srgb, var(--accent, #E60012) 50%, transparent);
}

/* Radio/checkbox buttons in modals */
.modal-option {
    background: transparent;
    border: 1px solid var(--theme-border-primary);
    border-radius: var(--border-radius, 0);
    color: var(--theme-text-muted);
    transition: all 0.2s;
}

.modal-option:hover {
    border-color: var(--theme-border-accent);
    color: var(--theme-text-primary);
}

.modal-option.active,
.modal-option:has(input:checked) {
    border-color: var(--accent, #E60012);
    background: color-mix(in srgb, var(--accent, #E60012) 10%, transparent);
    color: var(--theme-text-primary);
}

/* Checkbox styling - high specificity to override Tailwind reset */
input[type="checkbox"].modal-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: var(--theme-bg-input) !important;
    border: 1px solid var(--theme-border-accent) !important;
    border-radius: calc(var(--border-radius, 0) * 0.5) !important;
    transition: all 0.2s !important;
    background-size: 60% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

input[type="checkbox"].modal-checkbox:checked {
    background-color: var(--accent, #E60012) !important;
    border-color: var(--accent, #E60012) !important;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%273%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M5 13l4 4L19 7%27/%3E%3C/svg%3E') !important;
}

/* Light theme specific modal overrides */
.theme-light .modal-content {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.theme-light .modal-input {
    border-color: var(--theme-border-primary);
}

.theme-light .modal-input:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #E60012) 15%, transparent);
}

/* Modal buttons - always white text */
.modal-content button[type="submit"],
.modal-content .bg-\[var\(--accent\)\],
.modal-content .bg-brand-red,
.modal-content .bg-green-500,
.modal-content .bg-blue-500,
#quiz-container button[type="submit"],
#quiz-modal button[type="submit"] {
    color: white !important;
}

/* Ensure accent-colored buttons have white text in light theme */
.theme-light .modal-content button[type="submit"],
.theme-light #quiz-modal button[type="submit"] {
    color: white !important;
}
