/**
 * AutoDrive Theme Main Responsive Stylesheet
 * Fully optimized for Mobile, Tablet, Desktop & 4K displays
 * Mobile-First Responsive Architecture
 */

/* =========================================
   1. RESET & BASE FLUID TYPOGRAPHY
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%; /* 16px base */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main, 'Vazirmatn', sans-serif);
    background-color: #0d121c;
    color: #e2e8f0;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast, 0.2s);
}

.container {
    width: 100%;
    max-width: var(--container-max, 1320px);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* =========================================
   2. HEADER & NAVIGATION (RESPONSIVE)
   ========================================= */
.site-header {
    background-color: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.header-top-bar {
    background: #090d16;
    padding-block: 0.4rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.header-top-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trending-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
}

.pulse-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.top-bar-meta {
    display: flex;
    gap: 1.25rem;
    color: #94a3b8;
}

.ai-status-indicator {
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.main-header {
    padding-block: 0.85rem;
}

.main-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: #ffffff;
}

.logo-icon {
    color: var(--primary-color, #e63946);
    font-size: 1.8rem;
}

.site-logo strong {
    color: var(--primary-color, #e63946);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: 0.2s ease;
}

.primary-nav {
    display: flex;
    align-items: center;
}

.nav-menu-list {
    display: flex;
    list-style: none;
    gap: clamp(0.75rem, 1.8vw, 1.75rem);
    align-items: center;
}

.nav-menu-list a {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #cbd5e1;
    padding: 0.5rem 0.6rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-menu-list a:hover,
.nav-menu-list a.active {
    color: #ffffff;
    background: rgba(230, 57, 70, 0.12);
}

.search-trigger-btn {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.search-trigger-btn:hover {
    background: var(--primary-color, #e63946);
    color: #fff;
}

/* =========================================
   3. PRICE TICKER & HERO SPOTLIGHT
   ========================================= */
.price-ticker-bar {
    background: #080c14;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-block: 0.5rem;
    font-size: 0.85rem;
}

.ticker-flex {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.ticker-badge {
    color: #38bdf8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ticker-items {
    display: flex;
    gap: 1.5rem;
}

.ticker-item strong {
    color: #ffffff;
}

.ticker-all-link {
    margin-right: auto;
    color: #f87171;
    font-weight: 700;
}

.hero-spotlight-section {
    padding-block: clamp(2rem, 5vw, 4rem);
    background: radial-gradient(circle at 80% 20%, rgba(230, 57, 70, 0.15) 0%, transparent 60%), #0d121c;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
}

.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(230, 57, 70, 0.2);
    color: #ff6b6b;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.hero-title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 900;
    line-height: 1.35;
    color: #ffffff;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 65ch;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-hero {
    background: var(--primary-color, #e63946);
    color: #ffffff;
    padding: 0.85rem 1.75rem;
    border-radius: 0.6rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.4);
}

.btn-primary-hero:hover {
    background: #c92a37;
    transform: translateY(-2px);
}

.btn-secondary-hero {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.85rem 1.5rem;
    border-radius: 0.6rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-stats-card {
    background: #141d2c;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stat-mini-box {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 1rem;
}

.stat-mini-box:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-number {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 900;
    color: var(--primary-color, #e63946);
}

.stat-label {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* =========================================
   4. BRANDS SHOWCASE
   ========================================= */
.brands-showcase-section {
    padding-block: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 1rem;
}

.brand-badge-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.85rem;
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.brand-badge-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color, #e63946);
    background: #182233;
}

.brand-icon {
    font-size: 1.6rem;
    color: var(--primary-color, #e63946);
}

.brand-name {
    font-size: 0.95rem;
    color: #fff;
}

.brand-count {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* =========================================
   5. CARDS & GRID ARCHITECTURE
   ========================================= */
.latest-cars-section,
.archive-cars-main,
.taxonomy-brand-main,
.taxonomy-segment-main,
.search-results-main,
.blog-archive-main {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.title-with-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-with-bar h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
}

.red-bar {
    width: 6px;
    height: 1.8rem;
    background: var(--primary-color, #e63946);
    border-radius: 3px;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.45rem 1.1rem;
    background: #1a2333;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.05);
}

.filter-pill.active,
.filter-pill:hover {
    background: var(--primary-color, #e63946);
    color: #ffffff;
}

.cars-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 30vw, 380px), 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.car-card-item {
    background: #141c2a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.car-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(230, 57, 70, 0.4);
}

.car-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #090e17;
}

.car-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.car-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #334155;
}

.car-card-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.4rem;
}

.badge-brand-tag,
.badge-year-tag {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-brand-tag {
    background: rgba(230, 57, 70, 0.9);
}

.car-card-score-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: #10b981;
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.car-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.car-card-title a {
    color: #ffffff;
}

.car-card-title a:hover {
    color: var(--primary-color, #e63946);
}

.car-card-excerpt {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.car-card-quick-specs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.spec-mini-pill {
    background: #0f172a;
    color: #cbd5e1;
    font-size: 0.775rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255,255,255,0.05);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.car-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 0.85rem;
}

.car-card-price strong {
    font-size: 0.95rem;
    color: #38bdf8;
    display: block;
}

.price-prefix {
    font-size: 0.75rem;
    color: #64748b;
}

.car-card-btn {
    background: rgba(230, 57, 70, 0.15);
    color: #ff6b6b;
    padding: 0.4rem 0.85rem;
    border-radius: 0.375rem;
    font-size: 0.825rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.car-card-btn:hover {
    background: var(--primary-color, #e63946);
    color: #fff;
}

/* =========================================
   6. SINGLE VEHICLE REVIEW & SPEC CARDS
   ========================================= */
.car-single-main {
    padding-block: clamp(1.5rem, 3.5vw, 3rem);
}

.car-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.car-breadcrumbs a { color: #94a3b8; }
.car-breadcrumbs a:hover { color: var(--primary-color, #e63946); }
.car-breadcrumbs .sep { font-size: 0.65rem; }
.car-breadcrumbs .current { color: #e2e8f0; font-weight: 600; }

.car-header-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.car-badges-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-brand { background: var(--primary-color, #e63946); color: #fff; }
.badge-segment { background: #1e293b; color: #94a3b8; border: 1px solid rgba(255,255,255,0.1); }
.badge-year { background: #0f766e; color: #ccfbf1; }

.car-main-title {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 0.65rem;
}

.car-lead-intro {
    color: #94a3b8;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
}

.car-price-score-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #0d121c;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-label { font-size: 0.75rem; color: #64748b; }
.price-value { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 900; color: #38bdf8; }
.price-value small { font-size: 0.85rem; font-weight: 500; }
.price-usd-sub { font-size: 0.75rem; color: #94a3b8; }

.score-box {
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 1.25rem;
}

.score-circle {
    background: #10b981;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
}

.score-num { font-size: 1.25rem; font-weight: 900; line-height: 1; }
.score-max { font-size: 0.65rem; opacity: 0.9; }
.score-label { display: block; font-size: 0.7rem; color: #94a3b8; margin-top: 0.35rem; }

/* Highlights Grid */
.car-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 15vw, 180px), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.highlight-pill {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 0.85rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.pill-icon {
    width: 44px;
    height: 44px;
    background: rgba(230, 57, 70, 0.15);
    color: var(--primary-color, #e63946);
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.pill-info { display: flex; flex-direction: column; }
.pill-title { font-size: 0.75rem; color: #94a3b8; }
.pill-val { font-size: 0.95rem; font-weight: 800; color: #ffffff; }

.car-featured-media {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.car-main-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.image-country-tag {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.9rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

.car-content-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.car-body-content { min-width: 0; }

.section-heading-wrapper {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.08);
    padding-bottom: 0.6rem;
}

.section-heading {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-heading i { color: var(--primary-color, #e63946); }

.entry-content {
    font-size: 1.025rem;
    line-height: 1.9;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

.entry-content p { margin-bottom: 1.25rem; }

/* Technical Specification Matrix */
.car-spec-card-wrapper {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
}

.spec-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 1rem;
}

.spec-card-header h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; color: #ffffff; }

.spec-card-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.spec-tables-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 45%, 1fr), 1fr));
    gap: 1.5rem;
}

.spec-group {
    background: #0e1522;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
    overflow: hidden;
}

.spec-group-title {
    background: #1a2333;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 0.75rem 1rem; font-size: 0.875rem; }
.spec-table td:first-child { color: #94a3b8; width: 45%; }
.spec-table td:last-child { color: #ffffff; text-align: left; }

/* Pros & Cons Split */
.pros-cons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.pro-box, .con-box { border-radius: 1rem; padding: 1.25rem; }
.pro-box { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); }
.con-box { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); }

.pro-title { color: #10b981; font-size: 1.05rem; font-weight: 800; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.con-title { color: #ef4444; font-size: 1.05rem; font-weight: 800; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }

.pro-list, .con-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.pro-list li, .con-list li { font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.pro-list li i { color: #10b981; margin-top: 0.25rem; }
.con-list li i { color: #ef4444; margin-top: 0.25rem; }

/* Editorial Ratings Meter */
.editorial-ratings-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.ratings-card-title { font-size: 1.15rem; font-weight: 800; color: #ffffff; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.rating-meters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.bar-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.4rem; }
.bar-header strong { color: var(--primary-color, #e63946); }
.progress-track { background: #0f172a; height: 8px; border-radius: 9999px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #e63946, #f59e0b); height: 100%; border-radius: 9999px; }

/* Sidebar Widgets */
.car-single-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget { background: #141c2a; border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; padding: 1.25rem; }
.widget-title { font-size: 1.05rem; font-weight: 800; color: #ffffff; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.btn-compare-action { display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--primary-color, #e63946); color: #fff; padding: 0.75rem; border-radius: 0.5rem; font-weight: 700; margin-top: 1rem; }
.btn-compare-action:hover { background: #c92a37; }

/* =========================================
   7. COMPARE PAGE & PRICE LIST STYLES
   ========================================= */
.compare-header, .price-list-header, .archive-header-card, .brand-hero-header, .segment-hero-header {
    background: linear-gradient(135deg, #141c2a 0%, #1e293b 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.compare-selector-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.compare-select-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 1.25rem;
    align-items: flex-end;
}

.compare-select-box label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.compare-dropdown, .filter-col select, .filter-col input {
    width: 100%;
    background: #090e17;
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.compare-vs-badge span {
    background: var(--primary-color, #e63946);
    color: #fff;
    font-weight: 900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-hero-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.compare-vehicle-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compare-thumb-box {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.compare-thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.compare-car-name { font-size: 1.3rem; margin-bottom: 0.5rem; font-weight: 800; color: #fff; }
.compare-car-price { font-size: 1.2rem; font-weight: 900; color: #38bdf8; margin-bottom: 0.75rem; }
.compare-score-pill { background: #10b981; color: #fff; padding: 0.35rem 0.85rem; border-radius: 20px; font-weight: 700; font-size: 0.85rem; }

.comparison-matrix-wrapper {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    overflow-x: auto;
    margin-bottom: 3rem;
}

.comparison-table, .live-price-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th, .comparison-table td,
.live-price-table th, .live-price-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.comparison-table th, .live-price-table th {
    background: #090e17;
    color: #fff;
    font-weight: 800;
}

.table-section-row td {
    background: #1a2333;
    font-weight: 800;
    color: #38bdf8;
    padding: 0.75rem 1.25rem;
}

.price-filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-search-box {
    display: flex;
    align-items: center;
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    gap: 0.6rem;
    width: 320px;
    max-width: 100%;
}

.price-search-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
}

.price-tab-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-filter-btn {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.price-filter-btn.active, .price-filter-btn:hover {
    background: var(--primary-color, #e63946);
    color: #fff;
}

.price-table-card {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    overflow-x: auto;
    margin-bottom: 2rem;
}

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }
.trend-stable { color: #94a3b8; }
.market-price { color: #38bdf8; font-weight: 800; }
.table-review-link { color: var(--primary-color, #e63946); font-weight: 700; }

.ai-price-analysis-card {
    background: #101826;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.5rem;
}

.ai-card-title { color: #38bdf8; font-weight: 800; font-size: 1.1rem; margin-bottom: 0.6rem; }

/* Filter Toolbar */
.cars-filter-toolbar {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.filter-form-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
    gap: 1rem;
}

.input-with-icon {
    display: flex;
    align-items: center;
    background: #090e17;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 0 1rem;
    gap: 0.6rem;
}

.input-with-icon input {
    border: none;
    background: none;
    color: #fff;
    padding: 0.75rem 0;
    outline: none;
    width: 100%;
}

/* 404 & Empty State */
.notfound-card, .no-cars-found {
    background: #141c2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: clamp(2rem, 5vw, 4rem);
    text-align: center;
    margin-block: 2rem;
}

.notfound-code {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    color: var(--primary-color, #e63946);
    line-height: 1;
}

.notfound-icon { font-size: 3rem; color: #94a3b8; margin-block: 1rem; }
.notfound-title { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.notfound-desc { color: #94a3b8; max-width: 60ch; margin-inline: auto; margin-bottom: 2rem; }
.notfound-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Ad Banners */
.ad-banner-container {
    text-align: center;
    margin-block: 1.5rem;
    overflow: hidden;
}

.floating-bottom-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    z-index: 1500;
    text-align: center;
    backdrop-filter: blur(8px);
}

.close-ad-btn {
    position: absolute;
    top: 5px;
    left: 10px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
}

/* =========================================
   8. FOOTER STYLES
   ========================================= */
.site-footer {
    background: #080c14;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: auto;
}

.footer-top {
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.85rem;
}

.footer-logo strong { color: var(--primary-color, #e63946); }

.footer-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: #141c2a;
    color: #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.social-links a:hover {
    background: var(--primary-color, #e63946);
    color: #fff;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    position: relative;
    padding-bottom: 0.4rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25px;
    height: 2px;
    background: var(--primary-color, #e63946);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a { color: #94a3b8; font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary-color, #e63946); padding-right: 4px; }

.ai-footer-card {
    background: #101624;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 0.825rem;
    color: #94a3b8;
}

.ai-card-badge { color: #38bdf8; font-weight: 700; margin-bottom: 0.5rem; }
.system-status { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem; color: #10b981; font-weight: 600; }
.status-dot-green { width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 6px #10b981; }

.footer-bottom {
    background: #05080e;
    padding-block: 1rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.825rem;
    color: #64748b;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* =========================================
   9. MOBILE DRAWER & MEDIA QUERIES
   ========================================= */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: min(300px, 80vw);
    height: 100vh;
    background: #111827;
    z-index: 2000;
    padding: 1.5rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open { right: 0; }
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.drawer-title { font-weight: 700; color: #fff; }
.drawer-close { background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }

.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.mobile-nav-list a {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.mobile-nav-list a:hover { background: rgba(230, 57, 70, 0.15); color: #ff6b6b; }

/* Responsive Breakpoints */
@media screen and (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .car-content-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .compare-select-grid { grid-template-columns: 1fr; }
    .filter-form-grid { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 768px) {
    .primary-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .car-header-card { grid-template-columns: 1fr; }
    .car-price-score-banner { flex-direction: row; justify-content: space-between; }
    .pros-cons-container { grid-template-columns: 1fr; }
    .rating-meters-grid { grid-template-columns: 1fr; }
    .compare-hero-cards-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .filter-form-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 480px) {
    .header-top-flex { flex-direction: column; align-items: flex-start; }
    .top-bar-meta { font-size: 0.75rem; gap: 0.75rem; }
    .car-price-score-banner { flex-direction: column; align-items: stretch; text-align: center; gap: 1rem; }
    .score-box { border-right: none; border-top: 1px solid rgba(255,255,255,0.08); padding-right: 0; padding-top: 0.75rem; }
    .spec-table td { font-size: 0.8rem; padding: 0.6rem 0.75rem; }
    .highlight-pill { padding: 0.75rem; }
}
