/* ==========================================================================
   Public "Vehicles for sale" listing and detail pages.
   Inherits the site palette from app.css (--color-accent, --color-surface…).
   ========================================================================== */

.vehicles-page,
.vehicle-detail-page {
    background: var(--color-bg, #000);
    color: var(--color-text, #fff);
    padding: 40px 0 72px;
}

.vehicles-page h1,
.vehicle-detail-page h1 { letter-spacing: -0.02em; }

/* ── Filters ───────────────────────────────────────────────────────────── */

.vehicles-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.vehicles-filters::-webkit-scrollbar { display: none; }

.vehicles-filter {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid var(--color-border-strong, #3a3a3a);
    color: var(--color-text-dim, #b5b5b5);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    min-height: 40px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vehicles-filter:hover { color: #fff; border-color: var(--color-accent, #c5151f); }

.vehicles-filter.is-active {
    background: var(--color-accent, #c5151f);
    border-color: var(--color-accent, #c5151f);
    color: #fff;
}

/* ── Empty state ───────────────────────────────────────────────────────── */

.vehicles-empty {
    background: var(--color-surface, #1e1e1e);
    border: 1px dashed var(--color-border-strong, #3a3a3a);
    border-radius: 16px;
    padding: 56px 24px;
    text-align: center;
}

/* ── Listing card ──────────────────────────────────────────────────────── */

.vehicle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-surface, #1e1e1e);
    border: 1px solid var(--color-border, #2f2f2f);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent, #c5151f);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    color: inherit;
}

.vehicle-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #141414;
    overflow: hidden;
}

.vehicle-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.vehicle-card:hover .vehicle-card-media img { transform: scale(1.04); }

.vehicle-card-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 14px;
    color: var(--color-text-dim, #b5b5b5);
}

.vehicle-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 6px;
    color: #fff;
}

.vehicle-flag-sold { background: var(--color-accent, #c5151f); }
.vehicle-flag-featured { background: rgba(0, 0, 0, 0.78); border: 1px solid var(--color-accent, #c5151f); }

.vehicle-photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
}

.vehicle-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
}

.vehicle-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
}

.vehicle-card-specs {
    font-size: 13.5px;
    color: var(--color-text-dim, #b5b5b5);
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vehicle-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--color-border, #2f2f2f);
}

.vehicle-card-price { font-size: 20px; font-weight: 700; }

.vehicle-card-cta { font-size: 13px; font-weight: 600; color: var(--color-accent-hover, #ff3141); }

/* ── Detail page ───────────────────────────────────────────────────────── */

.vehicle-back {
    display: inline-block;
    font-size: 14px;
    color: var(--color-text-dim, #b5b5b5);
    text-decoration: none;
    margin-bottom: 20px;
}

.vehicle-back:hover { color: #fff; }

.vehicle-gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #141414;
    border-radius: 16px;
    overflow: hidden;
}

.vehicle-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.vehicle-gallery-empty {
    aspect-ratio: 4 / 3;
    background: var(--color-surface, #1e1e1e);
    border: 1px dashed var(--color-border-strong, #3a3a3a);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dim, #b5b5b5);
}

.vehicle-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.vehicle-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    background: #141414;
    cursor: pointer;
    transition: border-color 0.18s ease, opacity 0.18s ease;
    opacity: 0.65;
}

.vehicle-thumb:hover { opacity: 1; }

.vehicle-thumb.is-active { border-color: var(--color-accent, #c5151f); opacity: 1; }

.vehicle-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

.vehicle-description { margin-top: 32px; }

.vehicle-description p { color: var(--color-text-dim, #b5b5b5); line-height: 1.75; }

/* ── Summary panel ─────────────────────────────────────────────────────── */

.vehicle-summary {
    background: var(--color-surface, #1e1e1e);
    border: 1px solid var(--color-border, #2f2f2f);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 20px;
}

@media (max-width: 991.98px) { .vehicle-summary { position: static; } }

.vehicle-detail-title { font-size: 25px; font-weight: 700; margin: 0 0 6px; line-height: 1.25; }

.vehicle-detail-price {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-accent-hover, #ff3141);
    margin: 0 0 20px;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 22px;
    padding: 18px 0;
    border-top: 1px solid var(--color-border, #2f2f2f);
    border-bottom: 1px solid var(--color-border, #2f2f2f);
}

.vehicle-specs dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--color-text-dim, #b5b5b5);
    font-weight: 600;
    margin-bottom: 2px;
}

.vehicle-specs dd { font-size: 15px; font-weight: 600; margin: 0; }

.vehicle-sold-notice {
    background: rgba(197, 21, 31, 0.12);
    border: 1px solid var(--color-accent, #c5151f);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.vehicle-enquiry .form-control {
    background: #0d0d0d;
    border: 1px solid var(--color-border-strong, #3a3a3a);
    color: #fff;
    /* 16px stops iOS Safari zooming when the field is focused. */
    font-size: 16px;
    min-height: 46px;
    border-radius: 9px;
}

.vehicle-enquiry .form-control:focus {
    background: #0d0d0d;
    color: #fff;
    border-color: var(--color-accent, #c5151f);
    box-shadow: 0 0 0 3px rgba(197, 21, 31, 0.22);
}

.vehicle-enquiry .form-label { font-size: 13px; font-weight: 600; margin-bottom: 5px; }

.vehicle-enquiry-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.45);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* Honeypot — hidden from people, still reachable by bots. */
.vehicle-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.vehicle-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border, #2f2f2f);
    font-size: 14px;
    color: var(--color-text-dim, #b5b5b5);
}

.vehicle-call-link { font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; }
.vehicle-call-link:hover { color: var(--color-accent-hover, #ff3141); }
