/**
 * High-end dealership UI — homepage, inventory, vehicle detail
 * Palette: primary #C8102E · bg #0B0B0C · secondary #1A1A1D · text #FFF · accent #E5E5E5
 */

/* -------------------------------------------------------------------------
   Typography rhythm — dealer pages
   ------------------------------------------------------------------------- */

.home-featured .section-header,
.home-trust .section-header,
.home-contact .section-header,
section.section-dark .section-header {
    margin-bottom: clamp(3.25rem, 8vw, 5.75rem);
}

.home-featured .section-title,
.home-trust .section-title,
.home-contact .section-title,
section.section-dark .section-title {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    letter-spacing: -0.042em;
    line-height: 1.02;
}

.home-featured .section-tag,
.home-trust .section-tag,
.home-contact .section-tag,
section.section-dark .section-tag {
    letter-spacing: 0.38em;
    margin-bottom: 1.5rem;
}

.home-featured .section-subtitle,
.home-trust .section-subtitle,
.home-contact .section-subtitle,
section.section-dark .section-subtitle {
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: 38rem;
    font-weight: 400;
}

.home-featured .section-line,
.home-trust .section-line,
.home-contact .section-line,
section.section-dark .section-line {
    width: 88px;
    height: 2px;
    margin-bottom: 2.5rem;
}

section.section-dark .testimonial-card {
    border-radius: 20px;
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, #1e1e24 0%, #18181c 100%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

section.section-dark .testimonial-card:hover {
    background: linear-gradient(180deg, #222228 0%, #1A1A1D 100%);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------
   Homepage — hero (showroom)
   ------------------------------------------------------------------------- */

.hero.hero--showroom {
    min-height: 100svh;
    min-height: 100vh;
    padding: clamp(6rem, 12vh, 8rem) 0 clamp(4rem, 8vh, 6rem);
}

.hero.hero--showroom::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(200, 16, 46, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse 90% 60% at 80% 100%, rgba(200, 16, 46, 0.08) 0%, transparent 45%),
        linear-gradient(180deg, rgba(11, 11, 12, 0.15) 0%, rgba(11, 11, 12, 0.55) 45%, rgba(11, 11, 12, 0.92) 100%);
}

.hero.hero--showroom::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 90% at 50% 50%, transparent 30%, rgba(11, 11, 12, 0.75) 100%);
}

.hero.hero--showroom .hero-bg {
    filter: saturate(1.08) contrast(1.05);
    animation: heroZoom 28s ease-in-out infinite alternate;
    background-color: #080809;
    background-image:
        radial-gradient(ellipse 100% 75% at 50% 100%, rgba(200, 16, 46, 0.2) 0%, transparent 52%),
        radial-gradient(ellipse 130% 100% at 50% 40%, transparent 38%, rgba(11, 11, 12, 0.88) 100%),
        linear-gradient(165deg, rgba(11, 11, 12, 0.2) 0%, rgba(11, 11, 12, 0.75) 48%, rgba(11, 11, 12, 0.96) 100%),
        url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1920&q=80');
    background-size: cover;
    background-position: center;
}

.hero.hero--showroom .hero-bg[style] {
    background-size: cover !important;
    background-position: center !important;
}

.hero.hero--showroom .hero-content {
    position: relative;
    z-index: 2;
    max-width: 56rem;
    padding-left: var(--space-page-x);
    padding-right: var(--space-page-x);
}

.hero.hero--showroom .hero-tag {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    padding: 0.65rem 1.75rem;
    letter-spacing: 0.32em;
    font-size: 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 100px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero.hero--showroom .hero-title {
    font-size: clamp(3rem, 9.5vw, 5.75rem);
    font-weight: 800;
    letter-spacing: -0.048em;
    line-height: 0.96;
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    text-wrap: balance;
    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.4),
        0 8px 48px rgba(0, 0, 0, 0.65),
        0 0 80px rgba(0, 0, 0, 0.35);
}

.hero.hero--showroom .hero-title em {
    color: var(--color-gold-light);
    font-style: normal;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero.hero--showroom .hero-title em {
        background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.92) 35%, var(--color-gold-light) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

.hero.hero--showroom .hero-description {
    font-size: clamp(1.0625rem, 2vw, 1.3125rem);
    font-weight: 500;
    color: rgba(229, 229, 229, 0.9);
    max-width: 36rem;
    margin: 0 auto clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
}

.hero.hero--showroom .hero-buttons {
    gap: 1rem 1.25rem;
}

.hero.hero--showroom .hero-buttons .btn {
    border-radius: 999px;
    min-width: 12rem;
    min-height: 3.25rem;
    justify-content: center;
    padding-left: 2rem;
    padding-right: 2rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.hero.hero--showroom .hero-buttons .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
}

.hero.hero--showroom .scroll-indicator {
    z-index: 2;
    bottom: clamp(2rem, 5vh, 3.5rem);
    opacity: 0.85;
}

.stats-bar--dealer {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, #151518 0%, #0c0c0e 40%, #0B0B0C 100%);
    padding-top: clamp(3rem, 6vw, 4.5rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.stats-bar--dealer .stat-number {
    font-variant-numeric: tabular-nums;
    font-size: clamp(2.5rem, 5vw, 3.35rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .stats-bar--dealer .stat-number {
        background: linear-gradient(180deg, #ffffff 0%, rgba(229, 229, 229, 0.82) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: none;
    }
}

.stats-bar--dealer .stat-label {
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(229, 229, 229, 0.5);
}

.home-featured {
    padding: clamp(6rem, 12vw, 9rem) var(--space-page-x);
    background: var(--color-bg-primary);
}

.home-featured .section-subtitle {
    color: rgba(229, 229, 229, 0.68);
}

.home-featured .vehicles-grid {
    align-items: stretch;
    gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.home-trust {
    padding: clamp(6rem, 12vw, 9rem) var(--space-page-x);
    background: linear-gradient(180deg, #121215 0%, #1A1A1D 50%, #16161a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    max-width: 1240px;
    margin: 0 auto;
}

.home-trust__card {
    position: relative;
    padding: 2.25rem 1.75rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(165deg, rgba(26, 26, 29, 0.95) 0%, rgba(11, 11, 12, 0.65) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.5s var(--ease-out-expo), border-color 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
    overflow: hidden;
}

.home-trust__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 16, 46, 0.45), transparent);
    opacity: 0.9;
}

.home-trust__card:hover {
    transform: translateY(-8px);
    border-color: rgba(200, 16, 46, 0.28);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(200, 16, 46, 0.12);
}

.home-trust__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, rgba(200, 16, 46, 0.18) 0%, rgba(200, 16, 46, 0.06) 100%);
    border: 1px solid rgba(200, 16, 46, 0.28);
    color: var(--color-gold-light);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.12);
}

.home-trust__icon svg {
    width: 26px;
    height: 26px;
}

.home-trust__title {
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.625rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.home-trust__text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(229, 229, 229, 0.72);
}

.home-contact {
    padding: clamp(6rem, 12vw, 9rem) var(--space-page-x);
    background: var(--color-bg-primary);
}

.home-contact .section-subtitle {
    color: rgba(229, 229, 229, 0.68);
}

/* Vehicle cards — dealer variant (luxury) */
.vehicle-card--dealer {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, #1c1c21 0%, #121214 48%, #0e0e10 100%);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.35),
        0 28px 56px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    overflow: hidden;
    transition: transform 0.55s var(--ease-out-expo), box-shadow 0.55s var(--ease-out-expo), border-color 0.45s ease;
}

.vehicle-card--dealer:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: rgba(200, 16, 46, 0.35);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 40px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(200, 16, 46, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.vehicle-card--dealer .vehicle-card__media {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.vehicle-card--dealer .vehicle-card-image {
    aspect-ratio: 16 / 10;
    background: #080809;
}

.vehicle-card--dealer .vehicle-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 25%, rgba(11, 11, 12, 0.4) 65%, rgba(11, 11, 12, 0.92) 100%);
}

.vehicle-card--dealer .vehicle-card-image img {
    transition: transform 1.1s var(--ease-out-expo);
}

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

.vehicle-card--dealer .vehicle-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1.875rem 1.75rem 1.75rem;
}

.vehicle-card--dealer .vehicle-year {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: rgba(229, 229, 229, 0.45);
    margin-bottom: 0.375rem;
}

.vehicle-card--dealer .vehicle-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.625rem;
}

.vehicle-card--dealer .vehicle-specs {
    font-size: 0.8125rem;
    color: rgba(229, 229, 229, 0.62);
    margin-bottom: 1.375rem;
    line-height: 1.65;
}

.vehicle-card--dealer .vehicle-card-footer {
    margin-top: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 1.125rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vehicle-card--dealer .vehicle-price {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.vehicle-card--dealer .vehicle-card-btn {
    display: none;
}

.vehicle-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.vehicle-card-actions .btn {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.75rem 0.875rem;
    border-radius: 999px;
    justify-content: center;
}

/* -------------------------------------------------------------------------
   Inventory
   ------------------------------------------------------------------------- */

.inventory-page {
    background: var(--color-bg-primary);
}

.inventory-hero {
    padding: clamp(6rem, 14vw, 8.5rem) var(--space-page-x) clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(200, 16, 46, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #18181c 0%, #0B0B0C 100%);
}

.inventory-hero__eyebrow {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--color-gold-light);
    margin-bottom: 1.25rem;
}

.inventory-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5.5vw, 3.75rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.042em;
    line-height: 1.02;
    margin-bottom: 1rem;
}

.inventory-hero__lead {
    font-size: 1.125rem;
    color: rgba(229, 229, 229, 0.68);
    max-width: 38rem;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

.inventory-section--dealer {
    padding: clamp(3.25rem, 6vw, 5rem) var(--space-page-x) clamp(5rem, 10vw, 7rem);
}

.inventory-container {
    max-width: 1320px;
    margin: 0 auto;
}

.inventory-hero__meta {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.inventory-hero__count {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.inventory-hero__cta {
    min-height: 40px;
    padding: 0.5rem 0.95rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.inventory-grid--dealer {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(1.75rem, 3vw, 2.5rem);
}

.inventory-grid--dealer .vehicle-card--dealer .vehicle-card-image {
    aspect-ratio: 16 / 10;
}

.inventory-grid--dealer .vehicle-card--dealer .vehicle-card-body {
    padding: 1.25rem 1.25rem 1.35rem;
}

.inventory-grid--dealer .vehicle-card--dealer .vehicle-year {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.inventory-grid--dealer .vehicle-card--dealer .vehicle-specs {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.inventory-grid--dealer .vehicle-card--dealer .vehicle-price {
    font-size: clamp(1.35rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--primary);
}

.inventory-grid--dealer .vehicle-card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.inventory-grid--dealer .vehicle-card-actions .btn {
    min-height: 42px;
    font-size: 0.67rem;
    letter-spacing: 0.11em;
}

.inventory-count--dealer {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.filter-bar--dealer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.filter-bar--dealer .search-input-wrapper {
    min-width: 0;
    position: relative;
}

.filter-bar--dealer .search-input-wrapper svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--color-text-muted);
}

.filter-bar--dealer .search-input-wrapper input {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--text);
    padding: 0.68rem 0.8rem 0.68rem 2.4rem;
    font-size: 0.9rem;
}

.filter-bar--dealer .form-group {
    margin: 0;
}

.filter-bar--dealer select {
    min-height: 44px;
    border-radius: 10px;
    padding: 0.55rem 2rem 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
}

.inventory-more-filters {
    position: relative;
}

.inventory-more-filters > summary {
    list-style: none;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    padding: 0 0.85rem;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    background: #fff;
    gap: 0.45rem;
}

.inventory-more-filters > summary::-webkit-details-marker {
    display: none;
}

.inventory-more-filters > summary::after {
    content: '▾';
    color: #334155;
    font-size: 0.85rem;
    line-height: 1;
}

.inventory-more-filters[open] > summary {
    border-color: var(--accent);
    color: var(--accent);
}

.inventory-more-filters__grid {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    min-width: 280px;
    z-index: 30;
    display: grid;
    gap: 0.55rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
}

.inventory-empty--dealer {
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    padding: 2.2rem 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

/* 4-up cards on wide screens */
@media (min-width: 1400px) {
    .inventory-grid--dealer {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .inventory-grid--dealer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-bar--dealer {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar--dealer .search-input-wrapper {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .inventory-grid--dealer {
        grid-template-columns: 1fr;
    }

    .inventory-grid--dealer .vehicle-card-actions {
        grid-template-columns: 1fr;
    }

    .filter-bar--dealer {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .inventory-more-filters {
        width: 100%;
    }

    .inventory-more-filters > summary {
        width: 100%;
    }

    .inventory-more-filters__grid {
        position: static;
        min-width: 0;
        margin-top: 0.55rem;
        box-shadow: none;
        border-radius: 10px;
    }
}

/* Old rules retained below for compatibility */
.filter-bar--dealer .form-group {
    margin: 0;
    min-width: 0;
}

.filter-bar--dealer select {
    width: 100%;
    border-radius: 999px;
    padding: 0.875rem 1.125rem;
    background: #0B0B0C;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    font-weight: 600;
}

.inventory-grid--dealer {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(1.75rem, 3.5vw, 2.5rem);
}

.inventory-grid--dealer .vehicle-card {
    border-radius: 20px;
}

.inventory-grid--dealer .vehicle-card:hover {
    transform: translateY(-10px) scale(1.01);
}

.inventory-count--dealer {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.875rem;
    color: rgba(229, 229, 229, 0.5);
    font-weight: 500;
}

.inventory-empty--dealer {
    text-align: center;
    padding: 4rem 2rem;
}

@media (max-width: 1100px) {
    .filter-bar--dealer {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar--dealer .search-input-wrapper {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .home-trust__grid {
        grid-template-columns: 1fr;
    }

    .filter-bar--dealer {
        grid-template-columns: 1fr;
    }

    .vehicle-card-actions {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
   Vehicle detail
   ------------------------------------------------------------------------- */

.vehicle-detail--dealer {
    padding-top: 0;
    background: var(--color-bg-primary);
}

.vehicle-detail--dealer .vehicle-detail-container {
    padding: 1.5rem var(--space-page-x) 4rem;
}

.vehicle-detail--dealer .vehicle-layout {
    grid-template-columns: 1fr minmax(280px, 400px);
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.vehicle-specs-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.875rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.vehicle-specs-highlight__item {
    padding: 1.125rem 1.25rem;
    background: linear-gradient(180deg, #222228 0%, #1A1A1D 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.vehicle-specs-highlight__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(229, 229, 229, 0.5);
    margin-bottom: 0.35rem;
}

.vehicle-specs-highlight__value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.vehicle-sidebar--dealer .vehicle-sidebar-header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.25rem;
}

.vehicle-sidebar--dealer .vehicle-sidebar-price {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.vehicle-cta--dealer .cta-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.vehicle-cta--dealer .btn {
    border-radius: 999px;
    justify-content: center;
}

.vehicle-cta--dealer > .btn + .btn,
.vehicle-cta--dealer > a.btn + a.btn {
    margin-top: 0.5rem;
}

.vehicle-cta--dealer .btn-buy-now {
    margin-top: 0.75rem;
}

.vehicle-related {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vehicle-related__header {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.vehicle-related__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.875rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.038em;
    line-height: 1.08;
}

.vehicle-related__grid {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.vehicle-related__grid .vehicle-card--dealer .vehicle-card-actions {
    grid-template-columns: 1fr;
}

/* Vehicle page mobile: explicit section order (gallery → title/CTAs → chips → tabs → inquiry).
   Matches display:contents flattening from style.css ≤1200px; does not apply above 1200px. */
@media (max-width: 1200px) {
    .vehicle-detail--dealer .vehicle-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        /* Override global 3-row rule so five template areas each get a row */
        grid-template-rows: repeat(5, minmax(0, auto)) !important;
        grid-template-areas:
            'gallery'
            'sidebar'
            'specs'
            'content'
            'inquiry' !important;
        gap: clamp(1.5rem, 3vw, 2.5rem) !important;
        align-items: start;
    }

    .vehicle-detail--dealer .vehicle-main {
        display: contents !important;
    }

    .vehicle-detail--dealer .vehicle-gallery {
        grid-area: gallery !important;
    }

    .vehicle-detail--dealer .vehicle-sidebar {
        grid-area: sidebar !important;
        position: static !important;
    }

    .vehicle-detail--dealer .vehicle-specs-highlight {
        grid-area: specs !important;
        margin-top: 0;
    }

    .vehicle-detail--dealer .vehicle-content {
        grid-area: content !important;
    }

    .vehicle-detail--dealer .vehicle-inquiry {
        grid-area: inquiry !important;
    }
}

@media (max-width: 1024px) {
    .vehicle-related__grid {
        grid-template-columns: 1fr;
    }
}

/* Footer polish */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Design refresh overrides */
.home-featured,
.home-contact,
.inventory-page,
.inventory-section--dealer,
.vehicle-detail--dealer,
.shipping-services,
.shipping-faq-section {
    background: var(--background);
}

.home-trust,
.section-dark {
    background: var(--section-bg);
    border-color: var(--color-border);
}

.home-trust__card,
.shipping-option-card,
.shipping-faq-panel,
.shipping-process-step,
.vehicle-specs-highlight__item {
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.home-trust__title,
.inventory-hero__title,
.vehicle-related__title,
.shipping-faq-question__label {
    color: var(--primary);
}

.home-trust__text,
.inventory-hero__lead,
.inventory-count--dealer,
.shipping-faq-answer__inner {
    color: var(--color-text-secondary);
}

.inventory-hero {
    background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
}

/* Reusable premium vehicle card system */
.vehicle-card-system {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.vehicle-card-system:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.vehicle-card-system .vehicle-card-image {
    aspect-ratio: 16 / 10;
    background: #f8fafc;
    position: relative;
}

.vehicle-card-system .vehicle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.vehicle-card-system:hover .vehicle-card-image img {
    transform: scale(1.03);
}

.vehicle-card-system .vehicle-card-image--placeholder {
    border-bottom: 1px solid var(--color-border);
}

.vehicle-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: #f8fafc;
    color: #64748b;
}

.vehicle-card-placeholder__icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.vehicle-card-placeholder__icon svg {
    width: 24px;
    height: 24px;
}

.vehicle-card-placeholder__label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.vehicle-card-system__body {
    padding: 1.05rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vehicle-card-system__year {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.vehicle-card-system__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0b1f3a;
    margin-bottom: 0.1rem;
}

.vehicle-card-system__specs {
    font-family: var(--font-body);
    font-size: 0.84rem;
    line-height: 1.55;
    color: #475569;
    margin-bottom: 0.55rem;
    min-height: 1.35rem;
}

.vehicle-card-system__footer {
    border-top: 1px solid var(--color-border);
    padding-top: 0.72rem;
    margin-top: auto;
    margin-bottom: 0.75rem;
}

.vehicle-card-system__price {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2.3vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--primary);
}

.vehicle-card-system__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.vehicle-card-system__actions .btn {
    min-height: 42px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.vehicle-card-system .vehicle-card-btn {
    display: none;
}

/* Card visibility hard-fix: prevent legacy dealer-card overrides */
.vehicle-card-system__body {
    color: #0f172a !important;
    opacity: 1 !important;
}

.vehicle-card-system__year {
    color: #64748b !important;
    opacity: 1 !important;
}

.vehicle-card-system__title {
    color: #0b1f3a !important;
    opacity: 1 !important;
}

.vehicle-card-system__specs {
    color: #475569 !important;
    opacity: 1 !important;
}

.vehicle-card-system__price {
    color: #0b1f3a !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

.vehicle-card-system__footer {
    border-top: 1px solid #dbe4ee !important;
    opacity: 1 !important;
}

.vehicle-card-system__actions {
    opacity: 1 !important;
}

/* Vehicle detail conversion layout */
.vehicle-detail--dealer .vehicle-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 420px);
    align-items: start;
}

.vehicle-sidebar--dealer {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.vehicle-sidebar--dealer .vehicle-sidebar-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.vehicle-sidebar--dealer .vehicle-sidebar-price {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1;
    color: var(--primary);
    margin-bottom: 0.65rem;
}

.vehicle-sidebar--dealer .vehicle-sidebar-title {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 0;
}

.vehicle-specs-compact .spec-row {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.vehicle-specs-compact .spec-label {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.vehicle-specs-compact .spec-value {
    color: var(--text);
    font-size: 0.9rem;
}

.vehicle-sidebar-form {
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.vehicle-sidebar-form .form-group {
    margin-bottom: 0.7rem;
}

.vehicle-sidebar-form .form-group label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.vehicle-sidebar-form .form-group input {
    min-height: 44px;
}

.vehicle-content-stack {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.vehicle-content-stack .vehicle-description {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.vehicle-content-stack .vehicle-description h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.vehicle-content-stack .vehicle-description p {
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.vehicle-shipping-info {
    display: grid;
    gap: 0.75rem;
}

.vehicle-shipping-info__item {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    background: #f8fbff;
}

.vehicle-shipping-info__item strong {
    display: block;
    color: var(--primary);
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
}

.vehicle-shipping-info__item span {
    color: var(--color-text-secondary);
    font-size: 0.86rem;
}

@media (max-width: 1200px) {
    .vehicle-detail--dealer .vehicle-layout {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "gallery"
            "sidebar"
            "specs"
            "content"
            "inquiry" !important;
    }

    .vehicle-sidebar--dealer {
        position: static;
    }
}

/* VDP premium conversion refinements */
.vehicle-detail--dealer {
    background: #ffffff;
}

.vehicle-detail--dealer .vehicle-detail-container {
    max-width: 1320px;
    margin: 0 auto;
    padding-top: 1.25rem;
}

.vehicle-detail--dealer .vehicle-gallery,
.vehicle-detail--dealer .gallery-main {
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.vehicle-detail--dealer .gallery-thumbnails {
    gap: 0.65rem;
    padding: 0.85rem;
    background: #ffffff;
    border-top: 1px solid var(--color-border);
}

.vehicle-detail--dealer .gallery-thumb {
    border-radius: 8px;
    opacity: 0.75;
}

.vehicle-detail--dealer .gallery-thumb.active {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.vehicle-sidebar--dealer {
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 1.2rem;
    background: #ffffff;
}

.vehicle-sidebar--dealer .vehicle-sidebar-price {
    color: var(--primary);
    font-size: clamp(2.1rem, 4vw, 3rem);
}

.vehicle-sidebar--dealer .vehicle-sidebar-title {
    color: var(--primary);
}

.vehicle-summary-chips {
    display: none;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.vehicle-summary-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.vehicle-secondary-cta {
    margin-top: 0.55rem;
    margin-bottom: 0.3rem;
    border-color: var(--accent);
    color: var(--accent);
}

.vehicle-sidebar-form {
    margin-top: 0.7rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-border);
}

.vehicle-sidebar-form .form-group label {
    color: var(--primary);
    font-weight: 600;
}

.vehicle-sidebar-form .btn {
    margin-top: 0.35rem;
}

.vehicle-buy-now {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.vehicle-inquiry--prominent {
    margin-top: 1.1rem;
    margin-bottom: 1.2rem;
}

.vehicle-inquiry__inner {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 1.35rem;
}

.vehicle-inquiry__title {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    margin-bottom: 0.35rem;
}

.vehicle-inquiry__subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 0.95rem;
}

.vehicle-inquiry-form--prominent {
    margin-top: 0.2rem;
    border-top: 0;
    padding-top: 0;
}

.vehicle-inquiry-form--prominent .consent-group {
    background: #f8fbff;
    border-color: #cfe0ff;
    border-left-color: var(--accent);
    box-shadow: none;
}

.vehicle-inquiry-form--prominent .consent-group label,
.vehicle-inquiry-form--prominent .consent-group label span {
    color: #334155 !important;
}

.vehicle-content-stack {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
}

.vehicle-content-stack .vehicle-description {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.45rem;
}

.vehicle-content-stack .vehicle-description h2 {
    color: var(--primary);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: 0.65rem;
}

.vehicle-content-stack .vehicle-description p {
    color: var(--color-text-secondary);
    line-height: 1.78;
}

.vehicle-shipping-info__item {
    background: #f8fbff;
    border: 1px solid #dbeafe;
}

.vehicle-shipping-info__item strong {
    color: var(--primary);
}

.vehicle-related {
    margin-top: clamp(2.6rem, 5vw, 4rem);
}

.vehicle-related__title {
    color: var(--primary);
}

.vehicle-related__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

/* Mobile: keep lead form high and visible */
@media (max-width: 1200px) {
    .vehicle-detail--dealer .vehicle-layout {
        grid-template-areas:
            "gallery"
            "sidebar"
            "content"
            "inquiry" !important;
    }

    .vehicle-detail--dealer .vehicle-specs-highlight {
        display: none !important;
    }

    .vehicle-sidebar--dealer {
        position: static;
        top: auto;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .vehicle-detail--dealer {
        padding-top: 0;
    }

    .vehicle-detail--dealer .vehicle-detail-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .vehicle-sidebar--dealer {
        padding: 1rem;
    }

    .vehicle-sidebar--dealer .vehicle-sidebar-price {
        font-size: 2rem;
    }

    .vehicle-sidebar-form .btn,
    .vehicle-cta--dealer .btn {
        width: 100%;
    }

    .vehicle-related__grid {
        grid-template-columns: 1fr;
    }
}

/* Homepage lead-gen structure */
.home-hero-split {
    padding: calc(var(--nav-height) + 40px) var(--space-page-x) 70px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fc 100%);
}

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

.home-hero-split__title {
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 5vw, 3.75rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--primary);
    margin: 0 0 1rem;
}

.home-hero-split__title em {
    color: var(--accent);
    font-style: normal;
}

.home-hero-split__subtitle {
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
    line-height: 1.75;
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.home-hero-split__actions .btn {
    min-width: 180px;
}

.home-hero-split__media img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.home-shipping {
    padding: 70px var(--space-page-x);
    background: var(--background);
}

.home-shipping__grid {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    align-items: center;
    gap: 1rem 1.5rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
}

.home-shipping__icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
}

.home-shipping__icon svg {
    width: 28px;
    height: 28px;
}

.home-shipping__title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--primary);
    margin-bottom: 0.375rem;
}

.home-shipping__text {
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.home-contact--final .contact-form,
.home-contact--final .contact-info {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .home-hero-split__grid {
        grid-template-columns: 1fr;
    }

    .home-hero-split__actions {
        display: flex;
        flex-direction: column;
    }

    .home-hero-split__actions .btn {
        width: 100%;
        min-width: 0;
    }

    .home-shipping__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .home-shipping__icon {
        margin: 0 auto;
    }

    .home-shipping__cta {
        width: 100%;
    }

    .home-shipping__cta .btn {
        width: 100%;
    }
}

/* Homepage contrast cleanup (final explicit overrides) */
.home-featured,
.home-hero-split,
.home-shipping,
.home-contact {
    background: var(--color-bg) !important;
}

.home-hero-split .hero-tag {
    color: var(--color-text-on-light) !important;
    background: #eaf2ff !important;
    border-color: #cfe0ff !important;
    box-shadow: none !important;
}

.home-featured .section-tag,
.home-shipping .section-tag,
.home-contact .section-tag {
    color: var(--color-text-on-light) !important;
}

.home-featured .section-title,
.home-shipping__title,
.home-contact .section-title {
    color: var(--color-heading) !important;
}

.home-featured .section-subtitle,
.home-shipping__text,
.home-contact .section-subtitle,
.home-hero-split__subtitle {
    color: var(--color-text-soft-on-light) !important;
}

.home-trust {
    background: var(--color-bg-soft) !important;
}

.home-trust .section-tag,
.home-trust .section-title,
.home-trust .section-subtitle {
    color: var(--color-text-on-light) !important;
}

.home-trust__card {
    background: #ffffff !important;
    border-color: var(--color-border) !important;
    box-shadow: var(--shadow-md) !important;
}

.home-trust__title {
    color: var(--color-heading) !important;
}

.home-trust__text {
    color: var(--color-text-soft-on-light) !important;
}

.section-dark {
    background: #0b1f3a !important;
}

.section-dark .section-tag,
.section-dark .section-title {
    color: var(--color-text-on-dark) !important;
}

.section-dark .section-subtitle,
.section-dark .testimonial-text,
.section-dark .testimonial-info p {
    color: var(--color-text-soft-on-dark) !important;
}
