/* R-DRIVE PERFORMANCE — Car Sales */

:root {
    --primary-black:   #000000;
    --secondary-black: #111111;
    --accent-black:    #1a1a1a;
    --primary-white:   #ffffff;
    --off-white:       #f5f5f5;
    --grey-light:      #e0e0e0;
    --grey-medium:     #888888;
    --grey-dark:       #333333;
    --gold:            #d4af37;
    color-scheme: light only !important;
}

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

html { color-scheme: light only !important; background-color: #fff !important; overflow-x: hidden; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff !important;
    color: #000000 !important;
    line-height: 1.6;
    overscroll-behavior-x: none;
}

@media (prefers-color-scheme: dark) {
    html, body { background-color: #ffffff !important; color: #000000 !important; }
}

/* ── LOGO ───────────────────────────────────────────────── */
.brand-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-logo .brand-rdrive {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-white);
    text-transform: uppercase;
}
.brand-logo .brand-performance {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 4.25px; /* ← tweak this to align with RDRIVE above */
    color: var(--grey-medium);
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
    background-color: var(--primary-black);
    padding: 1rem 0;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-link {
    color: var(--primary-white) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--grey-light) !important; }
.nav-link.active { border: 1px solid rgba(255,255,255,0.4); border-radius: 2px; }
.nav-link.btn-nav-cta {
    background-color: var(--primary-white);
    color: var(--primary-black) !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0.45rem 1.1rem !important;
    font-weight: 600;
}
.nav-link.btn-nav-cta:hover { background-color: var(--grey-light); }
/* Selected (any stock page): inverts to an outline, matching the other links'
   active border. Inset shadow instead of a border so the size doesn't shift. */
.nav-link.btn-nav-cta.active {
    background-color: transparent;
    color: var(--primary-white) !important;
    box-shadow: inset 0 0 0 1px var(--primary-white);
}
.nav-link.btn-nav-cta.active:hover { background-color: rgba(255,255,255,0.1); }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-black) 0%, #0d0d0d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(80px + 4rem);
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.015) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.01) 0%, transparent 40%);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-white);
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.hero-stats {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}
.hero-stats > div,
.hero-stat-link {
    display: inline-flex;
    flex-direction: column;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.75rem 1.25rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.hero-stat-link:hover {
    background: rgba(0,0,0,0.65);
    border-color: rgba(255,255,255,0.35);
}
.hero-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-white);
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.7rem;
    color: var(--grey-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

/* ── SECTION ────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-dark { background: var(--primary-black); color: var(--primary-white); }
.section-grey { background: #141414; color: var(--primary-white); }
.section-light { background: var(--off-white); }
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--grey-medium);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 3rem;
}
.section-dark .section-subtitle { color: var(--grey-medium); }

/* ── VEHICLE CARD ────────────────────────────────────────── */
.vehicle-card {
    background: var(--primary-white);
    border: 1px solid var(--grey-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.vehicle-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-black);
    text-decoration: none;
    color: inherit;
}
.vehicle-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--off-white);
}
.vehicle-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.vehicle-card:hover .vehicle-card-img img { transform: scale(1.04); }
.vehicle-card-img .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-medium);
    font-size: 2.5rem;
}
.vehicle-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary-black);
    color: var(--primary-white);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.25rem 0.6rem;
}
/* Reserved / Sold: diagonal corner ribbon across the photo's top-left, in the
   admin's status colours (reserved orange #e86a00, sold blue #0d47a1). A
   deliberate colour exception to the public monochrome palette, requested by
   the user so these cars stand out. .vehicle-card-img clips the ribbon ends
   (overflow: hidden). */
.vehicle-badge.reserved,
.vehicle-badge.sold {
    top: 1.75rem;
    left: -2.4rem;
    width: 9.5rem;
    padding: 0.4rem 0;
    text-align: center;
    transform: rotate(-45deg);
    background: #e86a00;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2; /* stays above the photo's hover zoom */
}
.vehicle-badge.sold { background: #0d47a1; }
/* Sold cars stay listed but read as no longer available */
.vehicle-card--sold .vehicle-card-img img { filter: grayscale(1); opacity: 0.7; }
.vehicle-card--sold .vehicle-card-price { color: var(--grey-medium); }
.vehicle-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.vehicle-card-make {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-medium);
    margin-bottom: 0.2rem;
}
.vehicle-card-model {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}
.vehicle-card-variant {
    font-size: 0.8rem;
    color: var(--grey-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.vehicle-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.vehicle-card-spec {
    font-size: 0.72rem;
    color: var(--grey-dark);
    background: var(--off-white);
    padding: 0.2rem 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vehicle-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-top: auto;
}

/* ── STOCK PAGE ─────────────────────────────────────────── */
.stock-layout { display: flex; gap: 2rem; align-items: flex-start; }
.stock-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}
.stock-sidebar-inner {
    border: 1px solid var(--grey-light);
    padding: 1.5rem;
}
.stock-main { flex: 1; min-width: 0; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-dark);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--grey-light);
}
.filter-group .form-control,
.filter-group .form-select {
    border-radius: 0;
    border-color: var(--grey-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
}
.filter-group .form-control:focus,
.filter-group .form-select:focus {
    border-color: var(--primary-black);
    box-shadow: none;
}
.filter-group .form-check-label {
    font-size: 0.82rem;
    cursor: pointer;
}
.filter-group .form-check-input:checked { background-color: var(--primary-black); border-color: var(--primary-black); }
.filter-group .range-row { display: flex; gap: 0.5rem; }
.filter-group .range-row .form-control { min-width: 0; }

.stock-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.stock-count {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-medium);
}
.stock-sort .form-select {
    border-radius: 0;
    border-color: var(--grey-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
}
.stock-sort .form-select:focus { border-color: var(--primary-black); box-shadow: none; }

.stock-grid { display: grid; gap: 1.5rem; }
.stock-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stock-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

.stock-loading {
    text-align: center;
    padding: 4rem;
    color: var(--grey-medium);
}
.stock-empty {
    text-align: center;
    padding: 4rem 2rem;
    border: 1px solid var(--grey-light);
}
.stock-empty i { font-size: 3rem; color: var(--grey-light); margin-bottom: 1rem; }

.filter-drawer-toggle {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-align: left;
    margin-bottom: 1.5rem;
}
.filter-badge {
    background: var(--primary-white);
    color: var(--primary-black);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.btn-filter-reset {
    width: 100%;
    background: transparent;
    border: 1px solid var(--grey-light);
    color: var(--grey-dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.6rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.btn-filter-reset:hover { border-color: var(--primary-black); color: var(--primary-black); }

.stock-pagination { margin-top: 2.5rem; display: flex; justify-content: center; gap: 0.25rem; }
.stock-pagination .page-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--grey-light);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
}
.stock-pagination .page-btn:hover,
.stock-pagination .page-btn.active { background: var(--primary-black); color: var(--primary-white); border-color: var(--primary-black); }

/* ── CAR DETAIL PAGE ─────────────────────────────────────── */
.car-gallery { margin-bottom: 2rem; }
.car-gallery-main {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--accent-black);
    overflow: hidden;
    cursor: zoom-in;
}
.car-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s;
}
.car-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.car-gallery-thumbs::-webkit-scrollbar { height: 4px; }
.car-gallery-thumbs::-webkit-scrollbar-track { background: var(--grey-light); }
.car-gallery-thumbs::-webkit-scrollbar-thumb { background: var(--grey-dark); }
.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: all 0.2s;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--primary-black); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.25rem 0.6rem;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-inner img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav.prev { left: -3.5rem; }
.lightbox-nav.next { right: -3.5rem; }

.car-specs-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.6rem;
    margin-bottom: 2rem;
}
.spec-item {
    background: var(--primary-white);
    border: 1px solid var(--grey-light);
    padding: 0.9rem 0.6rem;
    text-align: center;
    transition: border-color 0.2s;
}
.spec-item:hover { border-color: var(--primary-black); }
.spec-item .spec-icon { font-size: 1rem; color: var(--grey-medium); margin-bottom: 0.4rem; display: block; }
.spec-item .spec-label { font-size: 0.58rem; color: var(--grey-medium); text-transform: uppercase; letter-spacing: 1.5px; display: block; margin-bottom: 0.2rem; }
.spec-item .spec-value { font-size: 0.88rem; font-weight: 700; color: var(--primary-black); display: block; line-height: 1.2; }

.car-price-block {
    background: var(--off-white);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-black);
    margin-bottom: 1.5rem;
}
.car-price-block .price { font-size: 2.25rem; font-weight: 700; color: var(--primary-black); line-height: 1; }
.car-price-block .price-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--grey-medium); margin-bottom: 0.4rem; }

.full-spec-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.full-spec-table tr { border-bottom: 1px solid var(--grey-light); }
.full-spec-table tr:last-child { border-bottom: none; }
.full-spec-table td { padding: 0.65rem 0; }
.full-spec-table td:first-child { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.75rem; color: var(--grey-dark); width: 45%; }

.features-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feature-pill {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--grey-light);
    color: var(--grey-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.feature-pill i { color: var(--primary-black); font-size: 0.7rem; }

.whatsapp-btn {
    background: #128C7E;
    color: #fff !important;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.whatsapp-btn:hover { background: #075E54; color: #fff !important; }

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    padding: 8.25rem 0 2.25rem;
    text-align: center;
}
.page-header h1 {
    color: var(--primary-white);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}
.page-header p { color: var(--grey-medium); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }

/* ── PAGE HEADER BACKGROUNDS ────────────────────────────── */
.page-header--contact {
    background: linear-gradient(rgba(0,0,0,0.8),rgba(0,0,0,0.8)), url('/assets/images/contact.jpg') center/cover no-repeat;
}
.page-header--enquire {
    background: linear-gradient(rgba(0,0,0,0.75),rgba(0,0,0,0.75)), url('/assets/images/enquire.jpg') center/cover no-repeat;
}

/* ── ADMIN PREVIEW BAR (hidden vehicle viewed by a logged-in admin) ── */
.admin-preview-bar { background: #000; color: #fff; font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.admin-preview-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.admin-preview-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb-bar {
    background: var(--off-white);
    border-bottom: 1px solid var(--grey-light);
    position: sticky;
    top: 82px;
    z-index: 40;
}
.breadcrumb-bar .container {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding-top: 0.55rem;
    padding-bottom: calc(0.25rem + 3px);
}
.breadcrumb { margin: 0; padding: 0; background: none; font-size: 0.78rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--grey-medium); }
.breadcrumb-item a { color: var(--grey-dark); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary-black); }
.breadcrumb-item.active { color: var(--grey-medium); }

/* ── CONTACT STRIP ──────────────────────────────────────── */
.contact-strip {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 2.5rem 0;
}
.contact-strip-item { display: flex; align-items: center; gap: 1rem; }
.contact-strip-item i { font-size: 1.5rem; color: var(--grey-medium); }
.contact-strip-item .item-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; color: var(--grey-medium); }
.contact-strip-item .item-value { font-size: 0.95rem; font-weight: 600; color: var(--primary-white); }
.contact-strip-item a { color: inherit; text-decoration: none; }

/* ── FORMS ──────────────────────────────────────────────── */
.rdrive-form .form-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--grey-dark);
    margin-bottom: 0.35rem;
}
.rdrive-form .form-control,
.rdrive-form .form-select {
    border-radius: 0;
    border: 1px solid var(--grey-light);
    padding: 0.75rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.rdrive-form .form-control:focus,
.rdrive-form .form-select:focus {
    border-color: var(--primary-black);
    box-shadow: none;
}
.rdrive-form textarea.form-control { min-height: 140px; resize: vertical; }
.rdrive-form .form-section-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-black);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--grey-light);
}

/* ── BUTTONS ────────────────────────────────────────────── */

/* Shared base — all variants identical box model */
.btn-rdrive,
.btn-rdrive-outline,
.btn-rdrive-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: all 0.2s;
    white-space: nowrap;
}

/* Variants */
.btn-rdrive         { background: var(--primary-black); color: var(--primary-white); border-color: var(--primary-black); }
.btn-rdrive:hover   { background: var(--grey-dark);     color: var(--primary-white); border-color: var(--grey-dark); }

.btn-rdrive-outline       { background: transparent;        color: var(--primary-black); border-color: var(--primary-black); }
.btn-rdrive-outline:hover { background: var(--primary-black); color: var(--primary-white); }

.btn-rdrive-white       { background: var(--primary-white); color: var(--primary-black); border-color: var(--primary-white); }
.btn-rdrive-white:hover { background: var(--grey-light);    color: var(--primary-black); border-color: var(--grey-light); }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 4rem 0 2rem;
}
.footer-brand { display: flex; flex-direction: column; line-height: 1; }
.footer-brand .brand-rdrive { font-size: 1.75rem; font-weight: 700; letter-spacing: 4px; color: var(--primary-white); }
.footer-brand .brand-performance { font-size: 0.68rem; font-weight: 500; letter-spacing: 4.25px; /* ← tweak this to align with RDRIVE above */ color: var(--grey-medium); text-transform: uppercase; margin-top: 2px; }
.footer-tagline { color: var(--grey-medium); font-size: 0.82rem; margin-top: 0.5rem; }
.footer h6 { font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; margin-bottom: 1.25rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--grey-light); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-white); }
.footer-text { color: var(--grey-light); font-size: 0.85rem; line-height: 1.8; }
.footer-divider { border-color: #1f1f1f; margin: 2rem 0; }
.footer-social a { color: var(--grey-medium); text-decoration: none; margin-right: 1rem; font-size: 1.25rem; transition: color 0.2s; }
.footer-social a:hover { color: var(--primary-white); }
.copyright { color: var(--grey-dark); font-size: 0.8rem; }

/* ── MAP EMBED ──────────────────────────────────────────── */
.map-embed iframe { width: 100% !important; height: 100% !important; border: 0; }

/* ── ALERTS / FLASH ─────────────────────────────────────── */
.alert { border-radius: 0; border: none; font-size: 0.88rem; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 3px solid #2e7d32; }
.alert-danger  { background: #fce4ec; color: #880e4f; border-left: 3px solid #c62828; }

/* ── VEHICLE CAROUSEL ───────────────────────────────────── */
.vcar-gallery {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: hidden;
    padding: 6.5rem 0 2rem;
}
.detail-gallery-wrapper {
    max-width: 80rem;
    margin: 0 auto;
}
#detailGallery {
    overflow: visible;
}
#detailGallery .swiper-wrapper {
    align-items: center;
}
#detailGallery .swiper-slide {
    cursor: pointer;
}
#detailGallery .dt-gallery__img {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    aspect-ratio: 1.33333333;
    object-fit: cover;
}
#detailGallery .swiper-button-next,
#detailGallery .swiper-button-prev {
    color: #fff;
    text-shadow: 0 1px 5px rgba(0,0,0,0.55);
}
.vcar-counter {
    position: absolute;
    right: 1.5rem;
    bottom: 2.5rem;
    z-index: 15;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.25rem 0.65rem;
    pointer-events: none;
}

@media (max-width: 991px) {
    .vcar-gallery {
        padding: 3.5rem 0 1rem;
    }
    .vcar-counter { bottom: 1.5rem; }
}

/* ── VEHICLE HEADER ROW ─────────────────────────────────── */
.vcar-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 3.5rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--grey-light);
    margin-bottom: 2rem;
}
.vcar-header-left { flex: 1 1 auto; }
.vcar-title {
    font-size: 1.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    color: var(--primary-black);
}
.vcar-variant {
    font-size: 0.82rem;
    color: var(--grey-medium);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.65rem;
}
.vcar-price {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--primary-black);
    line-height: 1;
}
.vcar-header-right {
    display: flex;
    flex-direction: row;
    gap: 0.65rem;
    flex: 0 0 auto;
    align-items: center;
}
.vcar-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.5px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Reserved / sold: status label above the price, and a closed-enquiries
   panel in place of the call / WhatsApp / enquire buttons */
.vcar-status {
    display: inline-block;
    background: var(--primary-black);
    color: var(--primary-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.6rem;
}
.vcar-status--reserved { background: #e86a00; } /* matches the /cars/ Reserved ribbon and admin reserved colour */
.vcar-status--sold     { background: #0d47a1; } /* matches the /cars/ Sold ribbon and admin sold colour */
.vcar-price--sold { color: var(--grey-medium); }
.vcar-closed {
    border: 1px solid var(--primary-black);
    padding: 1.25rem 1.5rem;
    max-width: 360px;
}
.vcar-closed__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}
.vcar-closed p {
    font-size: 0.85rem;
    color: var(--grey-dark);
    line-height: 1.6;
    margin-bottom: 0;
}
/* Sold: just "Sold" and one line, nothing else (user's choice; no slant, no double border) */
.vcar-closed--sold .vcar-closed__title { font-size: 1.1rem; letter-spacing: 3px; }

/* /enquire/ for a reserved or sold vehicle */
.enq-closed { border: 1px solid var(--primary-black); padding: 2rem; }
.enq-closed h2 { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.75rem; }
.enq-closed p { color: var(--grey-dark); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* ── VEHICLE ENQUIRY SECTION ────────────────────────────── */
.vcar-enquiry-section {
    border-top: 1px solid var(--grey-light);
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}
.vcar-enquiry-section h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}
.vcar-enquiry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}
.vcar-enquiry-grid .full-width { grid-column: 1 / -1; }

/* ── ENQUIRY PAGE ───────────────────────────────────────── */
.enq-vehicle-card {
    border: 1px solid var(--grey-light);
    overflow: hidden;
}
.enq-vehicle-card__img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--off-white);
}
.enq-vehicle-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.enq-vehicle-card__body {
    padding: 1.5rem;
}
.enq-vehicle-card__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-medium);
    margin-bottom: 0.4rem;
}
.enq-vehicle-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-black);
    margin-bottom: 0.2rem;
}
.enq-vehicle-card__variant {
    font-size: 0.8rem;
    color: var(--grey-medium);
    margin-bottom: 0.75rem;
}
.enq-vehicle-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.25rem;
}
.enq-vehicle-card__back {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--grey-dark);
    text-decoration: none;
}
.enq-vehicle-card__back:hover { color: var(--primary-black); }

/* ── PART EXCHANGE YES/NO SWITCH ───────────────────────── */
.pex-switch-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.pex-switch-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--grey-dark);
}
.pex-switch {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}
.pex-switch__track {
    position: relative;
    display: block;
    width: 46px;
    height: 24px;
    background: var(--primary-white);
    border: 2px solid var(--primary-black);
    transition: background-color 0.2s ease;
}
.pex-switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--primary-black);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.pex-switch[aria-checked="true"] .pex-switch__track { background: var(--primary-black); }
.pex-switch[aria-checked="true"] .pex-switch__knob {
    background: var(--primary-white);
    transform: translateX(22px);
}

/* ── UK REG PLATE INPUT ─────────────────────────────────── */
.pex-plate {
    display: flex;
    align-items: stretch;
    height: 48px;
    border: 2px solid #000;
    border-radius: 6px;
    overflow: hidden;
    background: #FFD800;
}
#pex-mileage-input { height: 48px; }
.pex-plate__gb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #003399;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0 0.5rem;
    line-height: 1.2;
}
.pex-plate__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: #000;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    padding: 0 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
}
.pex-plate__input:focus {
    outline: none;
    background: rgba(255,255,255,0.35);
}
.pex-plate__input::placeholder {
    color: rgba(0,0,0,0.35);
    letter-spacing: 3px;
    font-weight: 700;
}

/* ── PART EXCHANGE VALUATION BOX ───────────────────────── */
.pex-valuation {
    position: relative;
    border: 2px solid var(--primary-black);
    background: var(--off-white);
    padding: 1.75rem 1.5rem;
}
.pex-valuation::before {
    content: '';
    position: absolute;
    top: 6px; right: 6px; bottom: 6px; left: 6px;
    border: 1px solid var(--grey-light);
    pointer-events: none;
}
.pex-valuation__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-dark);
    margin-bottom: 1rem;
}
.pex-valuation__header i { color: var(--primary-black); font-size: 0.8rem; }
.pex-valuation__amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-black);
    line-height: 1;
}
.pex-valuation__vehicle {
    font-size: 0.85rem;
    color: var(--grey-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}
.pex-valuation__note {
    font-size: 0.72rem;
    color: var(--grey-medium);
    border-top: 1px solid var(--grey-light);
    padding-top: 0.75rem;
    margin-top: 1.1rem;
}
.pex-valuation__warning {
    font-size: 0.78rem;
    color: #e65100;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    padding: 0.6rem 0.8rem;
    margin-top: 0.75rem;
}

/* ── VEHICLE ACCORDION ──────────────────────────────────── */
.vcar-accordion {
    margin-bottom: 2.5rem;
}
.vcar-acc-item {
    border-top: 1px solid var(--grey-light);
}
.vcar-acc-item:last-child {
    border-bottom: 1px solid var(--grey-light);
}
.vcar-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-black);
    text-align: left;
    transition: color 0.15s;
}
.vcar-acc-header:hover { color: var(--grey-medium); }
.vcar-acc-icon {
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.vcar-acc-header[aria-expanded="true"] .vcar-acc-icon {
    transform: rotate(180deg);
}
.vcar-acc-body {
    padding-bottom: 2rem;
}
.vcar-desc-text {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--grey-dark);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 991px) {
    .navbar-collapse .nav-link { padding-top: 0.85rem !important; padding-bottom: 0.85rem !important; }
    .navbar-collapse .nav-link:not(.active) { border-bottom: 1px solid rgba(255,255,255,0.07); }
    .navbar-collapse .nav-item:last-child .nav-link { border-bottom: none; }
    .navbar-collapse .nav-link.btn-nav-cta { margin-top: 0.75rem; }
    .hero h1 { font-size: 2.5rem; }
    .section { padding: 3.5rem 0; }
    .stock-layout { flex-direction: column; }
    .stock-sidebar { width: 100%; position: static; display: none; }
    .stock-sidebar.open { display: block; }
    .filter-drawer-toggle { display: block; }
    .stock-grid.grid-3 { grid-template-columns: repeat(2, 1fr); }
    .lightbox-nav.prev { left: -2.5rem; }
    .lightbox-nav.next { right: -2.5rem; }
    .vcar-header-row { flex-direction: column; gap: 1.25rem; }
    .vcar-header-right { min-width: unset; width: 100%; justify-content: flex-start; }
}
@media (max-width: 767px) {
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 1.5rem; }
    .page-header h1 { font-size: 2rem; }
    .car-specs-bar { gap: 1rem; justify-content: center; }
    .contact-strip-item { flex-direction: column; text-align: center; }
    .vcar-title { font-size: 1.45rem; letter-spacing: 1px; }
    .vcar-price { font-size: 1.7rem; }
    .vcar-enquiry-grid { grid-template-columns: 1fr; }
    .vcar-header-right { flex-direction: column; }
    .vcar-closed { max-width: none; width: 100%; }
    .vcar-cta-btn { width: 100%; }
}
@media (max-width: 639px) {
    #detailGallery .dt-gallery__img { border-radius: 0; }
}
@media (max-width: 575px) {
    .stock-grid.grid-2, .stock-grid.grid-3 { grid-template-columns: 1fr; }
    .hero-search { max-width: 100%; }
    .lightbox-nav { display: none; }
    .hero h1 { font-size: 1.75rem; letter-spacing: 1px; }
}

/* ── RESERVE NOW (car page button, /reserve/, /reserve/complete/) ── */
/* Car page: enquiry buttons on one row, the reserve button full width below */
.vcar-header-right--stack { flex-direction: column; align-items: stretch; }
.vcar-cta-row { display: flex; gap: 0.65rem; }
.vcar-reserve { display: flex; flex-direction: column; gap: 0.4rem; }
.vcar-reserve .vcar-cta-btn { width: 100%; }
.vcar-reserve__hold { border: 1px solid var(--grey-light); padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--grey-dark); line-height: 1.5; }
.vcar-reserve__hold i { margin-right: 0.4rem; }
@media (max-width: 767px) {
    .vcar-cta-row { flex-direction: column; }
}

.reserve-steps { list-style: none; padding: 0; margin: 1rem 0 1.75rem; }
.reserve-steps li { display: flex; gap: 0.85rem; align-items: flex-start; font-size: 0.9rem; color: var(--grey-dark); line-height: 1.6; margin-bottom: 0.65rem; }
.reserve-steps i { width: 1.1rem; margin-top: 0.3rem; color: var(--primary-black); text-align: center; flex: 0 0 auto; }

.reserve-terms { border-left: 3px solid var(--primary-black); background: var(--off-white); padding: 1rem 1.25rem; margin-bottom: 1.75rem; }
.reserve-terms__label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--grey-medium); margin-bottom: 0.4rem; }
.reserve-terms__text { font-size: 0.85rem; color: var(--grey-dark); line-height: 1.7; }

.reserve-accept { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.85rem; color: var(--grey-dark); line-height: 1.6; cursor: pointer; }
.reserve-accept input { width: 18px; height: 18px; margin-top: 0.15rem; flex: 0 0 auto; accent-color: #000; border-radius: 0; }
.reserve-small { font-size: 0.78rem; color: var(--grey-medium); margin-top: 1rem; line-height: 1.6; }
.reserve-small a { color: var(--primary-black); font-weight: 600; }

.reserve-deposit-line { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--grey-light); padding: 0.85rem 0; margin: -0.5rem 0 1rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--grey-dark); }
.reserve-deposit-line strong { font-size: 1.1rem; color: var(--primary-black); letter-spacing: 0; }

.reserve-result { max-width: 640px; margin: 0 auto; border: 1px solid var(--primary-black); padding: 2.5rem 2rem; text-align: center; }
.reserve-result__icon { width: 3.25rem; height: 3.25rem; margin: 0 auto 1.25rem; display: flex; align-items: center; justify-content: center; background: var(--primary-black); color: var(--primary-white); font-size: 1.3rem; }
.reserve-result--sorry .reserve-result__icon { background: var(--off-white); color: var(--primary-black); border: 1px solid var(--primary-black); }
.reserve-result h2 { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; }
.reserve-result p { font-size: 0.9rem; color: var(--grey-dark); line-height: 1.7; margin-bottom: 0.75rem; }
.reserve-result__summary { text-align: left; background: var(--off-white); padding: 1rem 1.25rem; margin: 1.5rem 0 0.5rem; }
.reserve-result__summary div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--grey-light); }
.reserve-result__summary div:last-child { border-bottom: none; }
.reserve-result__summary dt { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--grey-medium); }
.reserve-result__summary dd { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--primary-black); text-align: right; }
@media (max-width: 575px) {
    .reserve-result { padding: 2rem 1.25rem; }
}
