/* ========================================
   AUTO.FANLI - Vehicle Website Stylesheet
   Inspired by Car and Driver
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-primary: #E10600;
    --color-primary-dark: #B80500;
    --color-primary-light: #FF2D28;
    --color-dark: #1a1a1a;
    --color-darker: #111111;
    --color-gray-900: #212121;
    --color-gray-800: #333333;
    --color-gray-700: #4a4a4a;
    --color-gray-600: #666666;
    --color-gray-500: #888888;
    --color-gray-400: #aaaaaa;
    --color-gray-300: #cccccc;
    --color-gray-200: #e5e5e5;
    --color-gray-100: #f0f0f0;
    --color-gray-50: #f8f8f8;
    --color-white: #ffffff;
    --color-bg: #ffffff;
    --color-card-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-gold: #FFB800;
    --color-green: #00A86B;
    --color-blue: #0066CC;

    --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Poppins', 'Nunito', -apple-system, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1400px;
    --header-height: 64px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

ul, ol { list-style: none; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 48px;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-primary);
}

.logo-icon svg { width: 28px; height: 28px; }

.logo-text {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1.5px;
    line-height: 1;
}

.logo-auto { color: var(--color-white); }
.logo-drive { color: var(--color-primary); }

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-300);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.08);
}

.nav-link.active {
    color: var(--color-primary);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-gray-300);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-dropdown-toggle:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.08);
}

.nav-dropdown-toggle.active {
    color: var(--color-primary);
}

.nav-dropdown-arrow {
    transition: transform 0.25s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

/* The floating panel - HIDDEN by default */
.nav-dropdown-menu {
    display: none !important;
    flex-wrap: wrap;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

/* Invisible bridge between toggle and menu to prevent hover gap */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* Show on hover (desktop); .open used by Rankings for delay-close so menu stays when moving to it */
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown.open > .nav-dropdown-menu {
    display: flex !important;
}

.nav-dropdown:hover .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu items */
.nav-dropdown-item {
    display: block;
    width: 50%;
    box-sizing: border-box;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--color-white);
}

.nav-dropdown-item.active {
    color: var(--color-primary);
}

/* Rankings dropdown: wider, grouped */
.nav-dropdown-menu-rankings::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown-menu-rankings {
    width: 280px !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    max-height: 70vh;
    overflow-y: auto;
}

.nav-dropdown-group-title {
    display: block;
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-gray-500);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
}

.nav-dropdown-menu-rankings .nav-dropdown-group-title:first-child {
    padding-top: 8px;
}

.nav-dropdown-menu-rankings .nav-dropdown-item {
    width: 100%;
    padding: 8px 20px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-gray-300);
    border-radius: 50%;
    transition: all var(--transition);
}

.search-btn:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.1);
}

.search-btn svg { width: 20px; height: 20px; }

/* Header Inline Search */
.header-search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    cursor: pointer;
    transition: all var(--transition);
    min-width: 240px;
}

.header-search-input:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.header-search-input svg {
    width: 16px;
    height: 16px;
    color: var(--color-gray-400);
    flex-shrink: 0;
}

.header-search-input span {
    font-size: 13px;
    color: var(--color-gray-400);
    white-space: nowrap;
}

.header-search-input kbd {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-gray-500);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: auto;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   SEARCH OVERLAY
   ======================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-overlay-inner {
    width: 100%;
    max-width: 720px;
    padding: 0 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
}

.search-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-gray-500);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: transparent;
}

.search-box input::placeholder { color: var(--color-gray-400); }

.search-close {
    font-size: 28px;
    color: var(--color-gray-500);
    line-height: 1;
    padding: 4px;
    transition: color var(--transition);
}

.search-close:hover { color: var(--color-text); }

.search-results {
    margin-top: 16px;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: var(--radius-md);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-100);
    cursor: pointer;
    transition: background var(--transition);
}

.search-result-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.search-result-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom: none; }
.search-result-item:only-child { border-radius: var(--radius-md); }

.search-result-item:hover { background: var(--color-gray-50); }

.search-result-img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-gray-100);
    flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-meta {
    font-size: 13px;
    color: var(--color-gray-600);
}

.search-no-results {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-gray-400);
    background: var(--color-white);
    border-radius: var(--radius-md);
    font-size: 15px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    margin-top: var(--header-height);
    height: 560px;
    overflow: hidden;
    background: var(--color-darker);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.8) 100%
    );
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 64px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    margin-bottom: 12px;
}

.hero-badge-tea {
    background: #8B6914;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 700;
    color: white;
    line-height: 1.15;
    max-width: 700px;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
}

.hero-nav {
    position: absolute;
    bottom: 24px;
    right: 64px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all var(--transition);
}

.hero-dot.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* ========================================
   SEARCH BAR SECTION
   ======================================== */
.search-section {
    position: relative;
    margin-top: -40px;
    z-index: 10;
    padding: 0 48px;
    margin-bottom: 60px;
}

.search-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px 36px;
}

.search-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-600);
}

.search-field select,
.search-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.search-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.search-field select:focus,
.search-field input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-submit {
    padding: 12px 32px;
    background: var(--color-primary);
    color: white;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-submit:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

/* ========================================
   SECTION HEADERS
   ======================================== */
.section {
    padding: 48px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all var(--transition);
}

.section-link:hover {
    color: var(--color-primary-dark);
}

.section-link::after {
    content: ' →';
}

/* ========================================
   VEHICLE CARDS
   ======================================== */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.vehicle-card {
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
}

.vehicle-card-wrap-ranking {
    position: relative;
    transition: transform var(--transition);
}

.vehicle-card-wrap-ranking:hover {
    transform: translateY(-4px);
}

.vehicle-card-wrap-ranking:hover .vehicle-card {
    box-shadow: var(--shadow-lg);
}

.vehicle-card-wrap-ranking .vehicle-card:hover {
    transform: none;
}

.ranking-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-gold, #d4a012);
    color: var(--color-dark, #1a1a1a);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Top 3: single-piece corner ribbon — one triangle, no separate strips */
.ranking-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    z-index: 2;
    pointer-events: none;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 14px 0 0 14px;
    box-sizing: border-box;
}

.ranking-ribbon-text {
    transform: rotate(-45deg);
    transform-origin: center center;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ranking-ribbon-1 {
    background: linear-gradient(160deg, #f5e6a3 0%, #e8c547 35%, #c9a227 70%, #a68522 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ranking-ribbon-1 .ranking-ribbon-text {
    color: #1a1a1a;
}

.ranking-ribbon-2 {
    background: linear-gradient(160deg, #eaeaea 0%, #c8c8c8 35%, #a0a0a0 70%, #787878 100%);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.ranking-ribbon-2 .ranking-ribbon-text {
    color: #1a1a1a;
}

.ranking-ribbon-3 {
    background: linear-gradient(160deg, #e8c4a0 0%, #cd7f32 35%, #a0522d 70%, #7a3d1f 100%);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.ranking-ribbon-3 .ranking-ribbon-text {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Unified red focus ring (no blue outline) */
.vehicle-card:focus {
    outline: none;
}

.vehicle-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.vehicle-card-img {
    position: relative;
    padding-top: 62%;
    overflow: hidden;
    background: var(--color-gray-100);
}

.vehicle-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-card-img img {
    transform: scale(1.05);
}

.vehicle-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.vehicle-card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    min-width: 0;
}

.vehicle-card-title-row .vehicle-card-name {
    margin: 0;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-card-badges-inline {
    position: static;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.badge {
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 3px;
    white-space: nowrap;
}

.badge-ten-best {
    background: var(--color-gold);
    color: var(--color-dark);
}

.badge-editors {
    background: #d64545;
    color: white;
}

.badge-ev {
    background: var(--color-green);
    color: white;
}

.badge-hybrid {
    background: #0891b2;
    color: white;
}

.badge-category {
    background: rgba(0,0,0,0.6);
    color: white;
}

.vehicle-card-body {
    padding: 16px;
}

.vehicle-card-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-gray-900, #111);
    margin-bottom: 8px;
}

.vehicle-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vehicle-card-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-700);
}

.vehicle-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Vehicle card: rating as stars + score (avoid confusion with ranking) */
.vehicle-rating-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vehicle-rating-display .star-row {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.vehicle-rating-display .star-svg {
    display: block;
}

.vehicle-rating-score {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-gray-700);
}

.rating-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    background: var(--color-primary);
}

.rating-circle.high { background: var(--color-green); }
.rating-circle.medium { background: var(--color-gold); }
.rating-circle.low { background: var(--color-gray-500); }

/* ========================================
   REVIEW CARDS
   ======================================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.reviews-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.reviews-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.review-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.review-card-featured {
    grid-column: span 1;
    flex-direction: column;
}

.review-card-img {
    position: relative;
    padding-top: 56%;
    overflow: hidden;
    background: var(--color-gray-100);
}

.review-card-featured .review-card-img {
    padding-top: 56%;
    width: 100%;
    min-height: auto;
    flex-shrink: 0;
}

.review-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.review-card:hover .review-card-img img {
    transform: scale(1.05);
}

.review-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.review-card-cat {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.review-card-cat.first-drives { background: var(--color-blue); }
.review-card-cat.instrumented-tests { background: #8B6914; }

.review-card-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.review-card-featured .review-card-title {
    font-size: 20px;
    font-family: var(--font-serif);
}

/* ========================================
   CATEGORY CARDS
   ======================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: all var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.category-card-name {
    color: white;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-card-count {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
}

.ranking-list-card {
    background: var(--color-darker);
}

/* ========================================
   BRAND CARDS
   ======================================== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.brand-card-logo-wrap {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s;
}

.brand-card:hover .brand-card-logo-wrap {
    background: rgba(255,255,255,0.12);
}

.brand-card-logo {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    transition: transform 0.2s;
}

.brand-card:hover .brand-card-logo {
    transform: scale(1.08);
}

.brand-card-initial {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
    background: rgba(225,6,0,0.1);
    border-radius: 12px;
}

.brand-card-info {
    min-width: 0;
}

.brand-card-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-card-count {
    font-size: 12px;
    color: var(--color-gray-500);
    margin-top: 2px;
}

/* ========================================
   VEHICLE DETAIL PAGE
   ======================================== */
.detail-hero {
    margin-top: var(--header-height);
    position: relative;
    background: var(--color-darker);
    padding: 40px 0;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.detail-hero-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--color-gray-900);
}

.detail-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-info {
    color: white;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-gray-400);
    margin-bottom: 16px;
}

.detail-breadcrumb a {
    color: var(--color-gray-400);
    transition: color var(--transition);
}

.detail-breadcrumb a:hover { color: white; }
.detail-breadcrumb span { color: var(--color-gray-600); }

.detail-title {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.detail-rank {
    font-size: 13px;
    color: var(--color-gold);
    font-weight: 600;
    margin-bottom: 12px;
}

.detail-rating-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-rating-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-400);
}

.detail-rating-stars {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.detail-rating-score {
    display: flex;
    align-items: baseline;
}

.detail-rating-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1;
}

.detail-rating-max {
    font-size: 13px;
    color: var(--color-gray-400);
    font-weight: 600;
}

.detail-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-price-label {
    font-size: 13px;
    color: var(--color-gray-400);
    margin-bottom: 20px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-badge-category {
    background: rgba(255,255,255,0.12);
    color: white;
}

a.detail-badge {
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition);
}

a.detail-badge:hover {
    opacity: 0.8;
}

.detail-badge-fuel {
    background: rgba(0,168,107,0.2);
    color: var(--color-green);
}

.detail-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-gray-300);
    margin-top: 16px;
}

/* Vehicle Overview & Why Choose */
.vehicle-overview,
.vehicle-why-choose {
    padding-top: 0;
    margin-bottom: 8px;
}

.overview-section,
.why-choose-section {
    max-width: 100%;
}

.overview-text p,
.why-choose-text p,
.detail-section-prose p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--color-gray-700);
    margin-bottom: 16px;
}

.overview-text p:last-child,
.why-choose-text p:last-child,
.detail-section-prose p:last-child {
    margin-bottom: 0;
}

.why-choose-section {
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    position: relative;
}

.why-choose-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    margin-bottom: 16px;
}

.why-choose-section .detail-section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    border-bottom: none;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Detail Content Sections */
.detail-content {
    padding: 48px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    min-width: 0;
    align-self: start;
    position: sticky;
    top: 80px;
}

.sidebar-brand-list-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-gray-800);
}

.sidebar-brand-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-gray-100);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background var(--transition);
}

.sidebar-brand-item:hover {
    background: var(--color-gray-50);
    border-radius: 8px;
    padding-left: 8px;
    margin-left: -8px;
    padding-right: 8px;
}

.sidebar-brand-item-img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--color-gray-100);
    flex-shrink: 0;
}

.sidebar-brand-item-info {
    flex: 1;
    min-width: 0;
}

.sidebar-brand-item-name {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand-item-meta {
    font-size: 12px;
    color: var(--color-gray-500);
    margin-top: 2px;
}

.sidebar-brand-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    transition: all var(--transition);
}

.sidebar-brand-view-all:hover {
    background: var(--color-primary);
    color: white;
}

.sidebar-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.sidebar-row .sidebar-card {
    margin-bottom: 0;
}

.detail-section {
    margin-bottom: 40px;
}

.detail-section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-gray-200);
}

/* Trims Table */
.trims-table {
    width: 100%;
    border-collapse: collapse;
}

.trims-table th,
.trims-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
}

.trims-table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-600);
    background: var(--color-gray-50);
}

.trims-table td {
    font-size: 15px;
}

.trims-table tr:hover td {
    background: var(--color-gray-50);
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spec-item {
    padding: 16px;
    background: var(--color-gray-50);
    border-radius: var(--radius-sm);
}

.spec-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
    margin-bottom: 4px;
}

.spec-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

/* Star Ratings - SVG based */
.star-row {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.star-svg {
    display: block;
    flex-shrink: 0;
}

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.star-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-500);
    margin-left: 0;
}

.warranty-item .star-rating {
    display: flex;
    margin-top: 2px;
}

/* Warranty & Sidebar */
.sidebar-card {
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-gray-200);
}

.warranty-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-gray-200);
    font-size: 14px;
    line-height: 1.5;
}

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

/* Year Selector */
.year-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.year-pill {
    padding: 6px 14px;
    border: 2px solid var(--color-gray-200);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    background: transparent;
    color: var(--color-text);
}

.year-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.year-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ========================================
   CATEGORY/LISTING PAGE
   ======================================== */
.page-header {
    margin-top: var(--header-height);
    background: var(--color-darker);
    padding: 24px 0;
    color: white;
}

.page-header .container {
    padding-left: 64px;
    padding-right: 64px;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--color-gray-400);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 8px 32px 8px 12px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--color-text);
    background: white;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color var(--transition);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Ad slots */
.ad-slot {
    margin: 16px 0;
    position: relative;
}

/* Advertisement label — above ad, right-aligned; hidden when ad unfilled */
.ad-label {
    font-size: 12px;
    color: var(--color-text);
    padding: 0 0 6px 0;
    text-align: right;
    line-height: 1;
}

/* Collapse unfilled ad slots — hide label too when ad fails */
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) .ad-label {
    display: none;
}
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    min-height: 0;
    padding: 0;
    /* Keep margin so surrounding layout spacing stays consistent */
}

.ad-slot-banner {
    width: 100%;
    max-width: 728px;
    max-height: 140px;
    margin: 24px auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ad-slot-banner .ad-label {
    flex-shrink: 0;
}
.ad-slot-banner .adsbygoogle {
    flex: 1;
    min-height: 0;
}

/* In-feed ads: match vehicle/review card size in grid */
.ad-slot-infeed {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-card-bg);
    position: relative;
}

.ad-slot-infeed .adsbygoogle {
    width: 100% !important;
    flex: 1;
}

/* Infeed ad inside grids: don't let ad height stretch the row */
.vehicle-grid > .ad-slot-infeed,
.reviews-grid > .ad-slot-infeed {
    margin: 0;
    /* Collapse intrinsic height so cards determine row height, then stretch to fill */
    height: 0;
    min-height: 100%;
}

/* Static pages (Privacy, Cookie, Terms, About, Contact) */
.static-page-content {
    max-width: 720px;
    font-size: 16px;
    line-height: 1.75;
}

.static-page-content p {
    margin-bottom: 16px;
    color: var(--color-gray-700);
}

.static-page-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--color-gray-900);
}

.static-page-content h2:first-child {
    margin-top: 0;
}

.static-page-content a {
    color: var(--color-primary);
    text-decoration: none;
}

.static-page-content a:hover {
    text-decoration: underline;
}

.filter-count {
    font-size: 14px;
    color: var(--color-gray-500);
    margin-left: auto;
}

.load-more {
    display: block;
    margin: 40px auto 0;
    padding: 14px 48px;
    background: var(--color-dark);
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.load-more:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   REVIEW ARTICLE PAGE
   ======================================== */
.review-hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: var(--color-darker);
}

.review-hero-img {
    position: absolute;
    inset: 0;
}

.review-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 48px;
    z-index: 2;
}

.review-hero-title {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    max-width: 800px;
    margin-top: 12px;
}

.article-container {
    padding-top: 48px;
    padding-bottom: 48px;
}

.article-body {
    max-width: 100%;
    margin: 0 auto;
}

.article-paragraph {
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-gray-800);
    margin-bottom: 24px;
}

.article-paragraph:first-child {
    font-size: 19px;
    line-height: 1.8;
    color: var(--color-text);
}

.article-paragraph:first-child::first-letter {
    font-family: var(--font-serif);
    font-size: 3.5em;
    float: left;
    line-height: 0.8;
    margin: 6px 12px 0 0;
    font-weight: 700;
    color: var(--color-text);
}

.article-figure {
    margin: 36px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.article-figcaption {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--color-gray-500);
    background: var(--color-gray-50);
    text-align: center;
}

.article-source {
    max-width: 100%;
    margin: 0 auto 48px;
    padding: 20px 24px;
    background: var(--color-gray-50);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-source a {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 15px;
    transition: color var(--transition);
}

.article-source a:hover {
    color: var(--color-primary-dark);
}

.article-gallery-section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--color-gray-200);
}

@media (max-width: 992px) {
    .review-hero { height: 400px; }
    .review-hero-title { font-size: 32px; }
    .article-figure { margin: 28px 0; }
}

@media (max-width: 768px) {
    .review-hero { height: 320px; }
    .review-hero-title { font-size: 26px; }
    .review-hero-content { padding-bottom: 24px; }
    .article-paragraph { font-size: 16px; }
    .article-paragraph:first-child { font-size: 17px; }
    .article-figure { margin: 20px 0; }
}

@media (max-width: 480px) {
    .review-hero { height: 260px; }
    .review-hero-title { font-size: 22px; }
    .article-paragraph:first-child::first-letter { font-size: 2.8em; }
}

/* ========================================
   GALLERY LIGHTBOX
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.gallery-item {
    aspect-ratio: 16/10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--color-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.back-to-top svg { width: 20px; height: 20px; }

/* ========================================
   FOOTER
   ======================================== */
/* Cookie consent banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-darker);
    color: var(--color-gray-400);
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.cookie-consent-banner.cookie-consent-banner--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.cookie-consent-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cookie-consent-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}
.cookie-consent-text a {
    color: var(--color-primary, #E10600);
    text-decoration: underline;
}
.cookie-consent-text a:hover {
    color: var(--color-white);
}
.cookie-consent-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cookie-consent-accept,
.cookie-consent-reject {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.cookie-consent-accept {
    background: var(--color-primary, #E10600);
    color: var(--color-white);
}
.cookie-consent-accept:hover {
    background: #b80500;
    border-color: rgba(255,255,255,0.9);
}
.cookie-consent-reject {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.cookie-consent-reject:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.9);
    color: #fff;
}
.cookie-consent-accept:active,
.cookie-consent-reject:active {
    transform: scale(0.98);
}
@media (max-width: 768px) {
    .cookie-consent-inner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-consent-actions { justify-content: center; }
}

.site-footer {
    background: var(--color-darker);
    color: var(--color-gray-400);
    padding: 40px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 32px 48px;
    margin-bottom: 28px;
    align-items: start;
}

.footer-nav-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 32px 40px;
    min-width: 0;
}

.footer-col {
    min-width: 0;
}

.footer-logo {
    font-size: 22px;
    font-weight: 900;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.6;
    max-width: 320px;
}

.footer-col h4 {
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    white-space: nowrap;
}

.footer-col-links {
    display: block;
}

.footer-col a {
    display: block;
    font-size: 13px;
    padding: 2px 0;
    color: var(--color-gray-400);
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--color-white); }

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 12px;
}

/* ========================================
   LOADING
   ======================================== */
.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    margin-top: var(--header-height);
}

.loader {
    text-align: center;
}

.loader-wheel {
    width: 48px;
    height: 48px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader p {
    font-size: 14px;
    color: var(--color-gray-500);
    font-weight: 500;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-50) 50%, var(--color-gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 15px;
    color: var(--color-gray-500);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .vehicle-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-nav-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .detail-hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
    .review-card-featured { flex-direction: column; grid-column: span 1; }
    .review-card-featured .review-card-img { width: 100%; min-height: auto; padding-top: 56%; }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero { height: 440px; }
    .hero-title { font-size: 32px; }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }

    .container { padding: 0 24px; }
    .page-header .container { padding-left: 24px; padding-right: 24px; }
    .search-section { padding: 0 24px; }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-dark);
        flex-direction: column;
        justify-content: flex-start;
        padding: 24px;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .main-nav.open { transform: translateX(0); }

    .nav-link {
        padding: 14px 16px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        border-radius: 0;
        width: 100%;
    }

    /* Mobile dropdown */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 14px 16px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    /* Mobile: disable hover, use click via .open class */
    .nav-dropdown:hover > .nav-dropdown-menu {
        display: none !important;
    }

    .nav-dropdown:hover .nav-dropdown-arrow {
        transform: none;
    }

    .nav-dropdown.open > .nav-dropdown-menu {
        display: flex !important;
        flex-direction: column;
    }

    .nav-dropdown.open .nav-dropdown-arrow {
        transform: rotate(180deg);
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: rgba(255,255,255,0.03);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        min-width: 0;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 14px 16px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        border-radius: 0;
    }

    .nav-dropdown-item {
        width: 100%;
        padding: 12px 16px 12px 32px;
        font-size: 15px;
        white-space: normal;
        word-wrap: break-word;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    .nav-dropdown-menu-rankings {
        width: 100% !important;
        max-height: none;
    }

    .nav-dropdown-menu-rankings .nav-dropdown-item {
        padding: 12px 16px 12px 32px;
        font-size: 14px;
        text-transform: none;
    }

    .nav-dropdown-group-title {
        padding-left: 32px;
    }

    .mobile-menu-btn { display: flex; }

    /* Hide inline search on mobile, keep icon */
    .header-search-input { display: none; }

    .ad-slot-banner { max-height: 130px; margin: 16px auto; }

    .vehicle-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: 1fr; }
    .reviews-grid-3 { grid-template-columns: 1fr; }
    .reviews-grid-4 { grid-template-columns: 1fr; }
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-field {
        width: 100%;
    }
    .search-field select,
    .search-field input {
        width: 100%;
        box-sizing: border-box;
    }
    .search-submit {
        width: 100%;
    }
    .search-card { padding: 24px; }
    /* Reduced hero height for low-res */
    .hero { height: 280px; }
    .hero-content { padding: 20px 24px; }
    .hero-title { font-size: 24px; }
    .hero-nav { right: 24px; bottom: 12px; }
    /* Smaller card images */
    .vehicle-card-img { padding-top: 50%; }
    .review-card-img { padding-top: 50%; }
    .review-card-featured .review-card-img { padding-top: 50%; min-height: 180px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .page-title { font-size: 24px; }
    .detail-title { font-size: 30px; }
    .specs-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-nav-row { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .filter-count { margin-left: 0; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .page-header .container { padding-left: 16px; padding-right: 16px; }
    .search-section { padding: 0 16px; }

    .vehicle-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .category-card { aspect-ratio: 16/10; }
    .brands-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .brand-card { padding: 10px; gap: 8px; }
    .brand-card-logo-wrap { width: 36px; height: 36px; }
    .brand-card-logo { max-width: 30px; max-height: 30px; }
    .brand-card-initial { width: 36px; height: 36px; font-size: 16px; }
    .brand-card-name { font-size: 13px; }
    .brand-card-count { font-size: 11px; }
    .detail-hero { padding: 24px 0; }
    /* Further reduced hero height */
    .hero { height: 220px; }
    .hero-content { padding: 16px; }
    .hero-title { font-size: 20px; }
    .hero-nav { right: 16px; bottom: 10px; }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Page transition */
.page-transition {
    animation: fadeIn 0.3s ease;
}

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

/* Lazy image */
/* Lazy image skeleton shimmer */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
img[data-src]:not(.loaded) {
    opacity: 0;
    transition: opacity 0.35s ease;
}
img[data-src].loaded,
img:not([data-src]) {
    opacity: 1;
}
.vehicle-card-img:has(img[data-src]:not(.loaded)),
.review-card-img:has(img[data-src]:not(.loaded)),
.category-card:has(img[data-src]:not(.loaded)) {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}
