/* ==========================================================================
   RTP Auto – Listing search (/marketplace/search, /used-cars/{slug})
   Full-bleed hero with the search bar riding its angled edge, body-style
   pills, a refine panel and a wide results grid.
   Depends on the tokens in site.css and the card in vehicle-card.css.
   ========================================================================== */

.listings {
    padding-bottom: clamp(3rem, 6vw, 5rem);
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
}

/* Wide, fluid content column (the page is no longer boxed into the theme container). */
.lwrap {
    width: min(100% - clamp(2rem, 6vw, 6rem), 1560px);
    margin-inline: auto;
}

/* Zero specificity so component margins below still apply. */
:where(.listings ul[role="list"], .listings ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

/* The theme removes focus outlines on form controls; put them back here. */
.listings :is(a, button, input, select, summary):focus-visible {
    outline: 3px solid var(--c-brand);
    outline-offset: 2px;
}

.listings ::selection { background: rgb(43 182 232 / 28%); color: var(--c-ink); }

/* ==========================================================================
   Hero
   ========================================================================== */
.shero { position: relative; z-index: 5; isolation: isolate; } /* above the pills and panel, so the suggestions can overlap them */

.shero__stage {
    position: relative;
    padding: clamp(1.75rem, 3.5vw, 3rem) 0 clamp(6.75rem, 9vw, 8.5rem);
    background:
        radial-gradient(50% 80% at 92% 0%, rgb(43 182 232 / 26%), transparent 65%),
        radial-gradient(45% 70% at 0% 100%, rgb(217 54 62 / 18%), transparent 70%),
        var(--c-ink);
    color: var(--c-on-dark);
    overflow: hidden;
    /* Angled bottom edge, like the homepage */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - clamp(1.5rem, 4vw, 3.5rem)));
}

/* Faint grid + drifting triangles */
.shero__decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.shero__decor::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent 75%);
}
.shero__tri {
    position: absolute;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    animation: shero-drift 14s ease-in-out infinite alternate;
}
.shero__tri--a { top: 14%; right: 7%; width: 150px; height: 130px; background: linear-gradient(160deg, rgb(43 182 232 / 35%), transparent 75%); }
.shero__tri--b { bottom: 30%; right: 30%; width: 64px; height: 56px; background: linear-gradient(160deg, rgb(217 54 62 / 40%), transparent 80%); animation-duration: 11s; animation-delay: -4s; }
.shero__tri--c { top: 38%; right: -28px; width: 110px; height: 95px; background: linear-gradient(160deg, rgb(255 255 255 / 10%), transparent 80%); animation-duration: 17s; }
@keyframes shero-drift {
    from { transform: translateY(0) rotate(0deg); }
    to   { transform: translateY(-22px) rotate(14deg); }
}

.shero__inner { position: relative; z-index: 1; }

/* Breadcrumb */
.crumbs { margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; font-size: .85rem; font-weight: 600; }
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; color: var(--c-on-dark-muted); }
.crumbs li + li::before { content: "/"; color: rgb(159 176 198 / 50%); }
.crumbs a { color: var(--c-on-dark-muted); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: #fff; }

.listings__title {
    position: relative;
    margin: 0;
    max-width: 22ch;
    color: #fff !important;
    font-family: var(--f-display);
    font-size: clamp(2rem, 1.1rem + 3.4vw, 3.9rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.02;
    text-wrap: balance;
}
/* Hand-drawn underline in the homepage's coral stroke */
.listings__title::after {
    content: "";
    display: block;
    width: min(190px, 45%);
    height: 14px;
    margin-top: .55rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14' preserveAspectRatio='none'%3E%3Cpath d='M2 10 Q 48 2 95 7 T 188 4' fill='none' stroke='%23d9363e' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left / 100% 100%;
}

.listings__intro {
    max-width: 62ch;
    margin: 1rem 0 0;
    color: var(--c-on-dark-muted) !important;
    font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
    line-height: 1.6;
}

/* ==========================================================================
   Search bar (overlaps the hero's angled edge)
   ========================================================================== */
.sbar-wrap { position: relative; z-index: 3; margin-top: clamp(-6rem, -7.5vw, -4.75rem); }

.sbar {
    padding: .75rem;
    border-radius: 28px;
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgb(11 22 38 / 4%);
}

.sbar__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .6rem; }

.seg-group {
    display: inline-flex;
    gap: .25rem;
    min-width: 0;
    margin: 0;
    padding: .25rem;
    border: 0;
    border-radius: 999px;
    background: var(--c-bg);
}
.seg { position: relative; margin: 0; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span {
    display: block;
    padding: .45rem 1rem;
    border-radius: 999px;
    color: var(--c-muted);
    font-family: var(--f-display);
    font-size: .825rem;
    font-weight: 700;
    transition: background-color .2s, color .2s;
}
.seg:hover span { color: var(--c-text); }
.seg input:checked + span { background: var(--c-ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--c-brand); outline-offset: 2px; }

.sbar__fields {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr) auto;
    align-items: stretch;
    border: 1.5px solid var(--c-line);
    border-radius: 22px;
    background: #f8fafc;
}

.sfield {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: .7rem 1.1rem .55rem;
    border-radius: 20px;
    transition: background-color .2s, box-shadow .2s;
}
.sfield + .sfield::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: var(--c-line);
    transition: opacity .2s;
}
.sfield:hover { background: #eef2f7; }
.sfield:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--c-brand), 0 12px 24px -12px rgb(11 22 38 / 30%); z-index: 4; }
.sfield:hover::before, .sfield:focus-within::before,
.sfield:hover + .sfield::before, .sfield:focus-within + .sfield::before { opacity: 0; }
.sfield:has([aria-invalid="true"]) { box-shadow: 0 0 0 2px var(--c-coral); background: #fff5f5; }

.sfield > label {
    margin: 0;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sfield input,
.sfield select {
    width: 100%;
    height: 30px;
    padding: 0;
    border: 0;
    background-color: transparent;
    color: var(--c-text);
    font: 600 1rem var(--f-body);
}
.sfield input:focus, .sfield select:focus { outline: none; }
.sfield input:focus-visible, .sfield select:focus-visible { outline: none; }
.sfield input::placeholder { color: #64748b; font-weight: 400; }
.sfield input[aria-invalid="true"] { color: var(--c-coral-hover); }
.sfield select {
    appearance: none;
    padding-right: 1.5rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b80' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 14px;
}

.sfield__box { display: flex; align-items: center; gap: .55rem; }
.sfield__box svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--c-muted); stroke-width: 2.3; stroke-linecap: round; }
.sfield__box input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.zip-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.zip-group input { letter-spacing: .08em; }
.zip-group select {
    width: auto;
    height: 26px;
    padding: 0 1.4rem 0 .6rem;
    border-radius: 999px;
    background-color: var(--c-bg);
    background-position: right .4rem center;
    background-size: 12px;
    font-size: .85rem;
}

.sbar__go {
    align-self: center;
    height: 56px;
    margin: .35rem;
    padding-inline: 1.7rem;
    border-radius: 18px;
    font-size: 1rem;
}
.sbar__error { margin: .6rem .5rem .1rem; }

/* ---------- Suggestions ---------- */
.suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 30;
    width: max(100%, 340px);
    max-height: 380px;
    overflow-y: auto;
    padding: .4rem;
    border: 1px solid var(--c-line);
    border-radius: 18px;
    background: var(--c-surface);
    box-shadow: var(--shadow-lg);
    animation: suggest-in .16s var(--ease);
}
.suggest[hidden] { display: none; }
@keyframes suggest-in { from { opacity: 0; transform: translateY(-4px); } }

.suggest__head {
    margin: 0;
    padding: .55rem .75rem .3rem;
    color: var(--c-muted);
    font-family: var(--f-display);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.suggest__item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    margin: 0;
    padding: .55rem .75rem;
    border-radius: 12px;
    color: var(--c-text);
    cursor: pointer;
}
.suggest__item[aria-selected="true"], .suggest__item:hover { background: var(--c-bg); }
.suggest__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgb(43 182 232 / 12%);
    color: var(--c-brand-text);
}
.suggest__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.suggest__item--recent .suggest__icon { background: var(--c-bg); color: var(--c-muted); }
.suggest__label { overflow: hidden; font-size: .98rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.suggest__label mark { padding: 0; background: none; color: var(--c-brand-text); }
.suggest__meta { color: var(--c-muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }

/* ---------- Refine toggle (small screens) ---------- */
.listings__filters-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    min-height: 40px;
    padding: .4rem 1rem;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    background: transparent;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: .825rem;
    font-weight: 700;
    cursor: pointer;
}
.listings__filters-toggle:not([hidden]) { display: inline-flex; }
.listings__filters-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.listings__filters-toggle[aria-expanded="true"] { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.listings__filters-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--c-coral);
    color: #fff;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}
.listings__filters-count[hidden] { display: none; }

/* ==========================================================================
   Body-style pills
   ========================================================================== */
.listings__body { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.rail { min-width: 0; margin: 0 0 clamp(2rem, 3.5vw, 3rem); padding: 0; border: 0; }
.rail__track {
    display: flex;
    gap: .6rem;
    padding: 4px 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }

.pill { position: relative; flex: none; margin: 0; scroll-snap-align: start; cursor: pointer; }
.pill input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pill__body {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 48px;
    padding: .35rem .6rem .35rem .9rem;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-text);
    transition: border-color .15s, background-color .15s, color .15s, transform .2s var(--ease);
}
.pill__icon { display: block; width: 56px; color: var(--c-muted); transition: color .15s; }
.pill__icon svg { display: block; width: 100%; height: auto; }
.pill__label { font-family: var(--f-display); font-size: .875rem; font-weight: 700; white-space: nowrap; }
.pill__count {
    display: grid;
    place-items: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 .45rem;
    border-radius: 999px;
    background: var(--c-bg);
    color: var(--c-muted);
    font-size: .78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: background-color .15s, color .15s;
}
.pill:hover .pill__body { border-color: var(--c-ink); transform: translateY(-2px); }
.pill input:checked + .pill__body { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.pill input:checked + .pill__body .pill__icon { color: var(--c-brand); }
.pill input:checked + .pill__body .pill__count { background: rgb(255 255 255 / 16%); color: #fff; }
.pill input:focus-visible + .pill__body { outline: 3px solid var(--c-brand); outline-offset: 2px; }

/* ==========================================================================
   Layout + refine panel
   ========================================================================== */
.listings__layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: clamp(2rem, 3.5vw, 3.25rem);
    align-items: start;
}

.filters {
    position: sticky;
    top: 88px;
    max-height: calc(100dvh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding: 0 1.5rem 1.5rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
}

.filters__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0 .9rem; }
.filters__title {
    margin: 0;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.fgroup { border-top: 1px solid var(--c-line); }
.fgroup summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 1.2rem 0;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
}
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s var(--ease);
}
.fgroup[open] summary svg { transform: rotate(180deg); }
.fgroup__body { padding: 0 0 1.1rem; }

.filters__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.filters__field { display: flex; flex-direction: column; min-width: 0; }
.filters__field label {
    margin: 0 0 .35rem;
    color: var(--c-muted);
    font-family: var(--f-display);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.filters select {
    width: 100%;
    height: 44px;
    padding: 0 2.25rem 0 .85rem;
    border: 1.5px solid var(--c-line);
    border-radius: 12px;
    background-color: var(--c-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px;
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 1rem;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.filters select:hover { border-color: #cbd5e1; }
.filters select:focus { border-color: var(--c-brand); }

.filters__error { margin: .5rem 0 0; color: var(--c-coral-hover); font-size: .85rem; font-weight: 600; }

/* Checkbox lists */
.filters__checks { display: grid; gap: .1rem; }
.filters__check {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 40px;
    margin: 0;
    padding: 0 .5rem;
    border-radius: 10px;
    color: var(--c-text);
    font-size: .95rem;
    cursor: pointer;
    transition: background-color .15s;
}
.filters__check:hover { background: var(--c-bg); }
.filters__check input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--c-ink); cursor: pointer; }

.filters__actions { padding-top: 1rem; border-top: 1px solid var(--c-line); }
.filters__actions .rtp-btn { width: 100%; }
.filters__reset {
    color: var(--c-muted);
    font-family: var(--f-display);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.filters__reset:hover { color: var(--c-text); }

/* With JavaScript the panel applies changes as they happen. */
.js-filters .filters__actions { display: none; }

/* ==========================================================================
   Results
   ========================================================================== */
.results { min-width: 0; scroll-margin-top: 96px; }
.results:focus { outline: none; }

.results__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin-bottom: 1.25rem;
}
.results__count {
    margin: 0;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}
.results__scope { margin: .2rem 0 0; color: var(--c-muted); font-size: .95rem; }
/* Distances measured from the visitor's area (VisitorLocation) */
.results__near { display: inline-flex; align-items: center; gap: .35rem; }
.results__near svg { width: 15px; height: 15px; fill: none; stroke: var(--c-brand-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.results__change { margin-left: .35rem; color: var(--c-brand-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }


.results__sort { display: flex; align-items: center; gap: .6rem; }
.results__sort label { margin: 0; color: var(--c-muted); font-size: .85rem; font-weight: 700; }
.results__sort select {
    height: 42px;
    padding: 0 2.25rem 0 1rem;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 15px;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: .85rem;
    font-weight: 700;
    appearance: none;
    cursor: pointer;
}
.results__sort select:hover { border-color: var(--c-ink); }

.results__notice {
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: #fff7e6;
    color: #7a4a00;
    font-size: .95rem;
}

.results__chips { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 2rem; }
.results__chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 36px;
    padding: .35rem .55rem .35rem .9rem;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: .825rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s, background-color .15s, color .15s;
}
.results__chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; color: var(--c-muted); }
.results__chip:hover { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.results__chip:hover svg { color: #fff; }
.results__chip-count { color: var(--c-muted); font-weight: 600; }
.results__chip:hover .results__chip-count { color: rgb(255 255 255 / 70%); }
.results__clear {
    padding: .35rem .5rem;
    color: var(--c-muted);
    font-family: var(--f-display);
    font-size: .825rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.results__clear:hover { color: var(--c-text); }

.results {
    --gap: clamp(1.25rem, 2vw, 1.75rem);
    /* At most four cars per row: the minimum width grows with the screen so a fifth column never fits. */
    --card-min: max(236px, calc((100% - 3 * var(--gap)) / 4));
}
.results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
    gap: var(--gap);
    transition: opacity .2s var(--ease);
}
.results__grid > li { display: flex; }

/* Cars rise into place one after another (and again whenever the results change). */
.results__grid > li:not(.results__promo) {
    animation: rise .55s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* A bit more air inside the cards on this page only. */
.results .vcard__body { padding: 1.1rem .8rem .8rem; }
.results .vcard__title { font-size: 1.1rem; }
.results .vcard__foot { padding-top: 1.1rem; }
.results .vcard__facts { margin-top: .9rem; padding-top: .85rem; }

/* While new results load: keep the old ones visible but clearly stale. */
.results[aria-busy="true"] .results__grid,
.results[aria-busy="true"] .results__empty { opacity: .45; pointer-events: none; }
.results[aria-busy="true"] { cursor: progress; }

.results__empty {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    background: var(--c-surface);
}
.results__empty p { max-width: 52ch; margin: 0; color: var(--c-muted); font-size: 1.05rem; }
.results__empty-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.results__didyou { margin-bottom: 1rem !important; color: var(--c-text) !important; font-family: var(--f-display); font-size: 1.15rem !important; font-weight: 700; }
.results__didyou a { color: var(--c-coral-hover); text-underline-offset: 3px; }
.results__popular { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--c-line); }
.results__popular > p { margin-bottom: .75rem !important; font-family: var(--f-display); font-size: .72rem !important; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.results__popular .results__chips { margin-bottom: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
    .sbar__fields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .sfield--q { grid-column: 1 / -1; }
    .sfield:nth-child(2), .sfield:nth-child(3) { grid-column: span 3; }
    .sfield--zip { grid-column: span 4; }
    .sbar__go { grid-column: span 2; width: calc(100% - .7rem); }
    .sfield--q + .sfield::before, .sfield:nth-child(3)::before { display: none; }
    .sfield--q { border-bottom: 1px solid var(--c-line); border-radius: 20px 20px 0 0; }
}

@media (max-width: 991.98px) {
    .listings__layout { grid-template-columns: minmax(0, 1fr); }
    .filters { position: static; max-height: none; overflow: visible; }
    /* The toggle only exists once listings.js has run. */
    .js-filters .filters[data-collapsed] { display: none; }
}

@media (max-width: 575.98px) {
    .sbar { padding: .6rem; border-radius: 22px; }
    .sbar__top { align-items: stretch; }
    .seg-group { flex: 1; }
    .seg { flex: 1; text-align: center; }
    .seg span { padding-inline: .4rem; }
    .sbar__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sfield:nth-child(2), .sfield:nth-child(3) { grid-column: span 1; }
    .sfield--zip, .sbar__go { grid-column: 1 / -1; }
    .sfield--zip::before { display: none; }
    .sbar__go { height: 52px; width: calc(100% - .7rem); }
    .suggest { width: 100%; }
    .results__head { align-items: center; }
    .results__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .shero__tri, .suggest { animation: none; }
    .pill:hover .pill__body { transform: none; }
}

/* The refine panel is always open on desktop, so the toggle only exists below that. */
@media (min-width: 992px) {
    .listings__filters-toggle { display: none !important; }
}

/* ==========================================================================
   Featured spotlight + "All cars" divider + sell card
   ========================================================================== */
.results__sub {
    margin: 0 0 1.25rem;
    color: var(--c-text);
    font-family: var(--f-display);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.promo {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: .75rem;
    width: 100%;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    border-radius: 22px;
    background:
        radial-gradient(70% 70% at 100% 0%, rgb(43 182 232 / 26%), transparent 65%),
        var(--c-ink);
    color: var(--c-on-dark);
    overflow: hidden;
}
.promo__title { margin: 0; color: #fff !important; font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.promo__text { max-width: 26ch; margin: 0; color: var(--c-on-dark-muted); font-size: .98rem; line-height: 1.55; }
.promo .rtp-btn { margin-top: .5rem; }
.promo__tri { position: absolute; z-index: -1; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.promo__tri--a { top: -14px; right: 18px; width: 92px; height: 80px; background: linear-gradient(160deg, rgb(43 182 232 / 40%), transparent 80%); }
.promo__tri--b { right: 74px; bottom: 22px; width: 42px; height: 36px; background: linear-gradient(160deg, rgb(217 54 62 / 45%), transparent 80%); }

@media (max-width: 575.98px) {
}

@media (prefers-reduced-motion: reduce) {
    .results__grid > li:not(.results__promo) { animation: none; }
}
/* ==========================================================================
   Featured by local dealers: light panel, wide cards on a snap-scrolling track
   ========================================================================== */
.spot {
    position: relative;
    margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
    padding: clamp(1.1rem, 2vw, 1.5rem);
    border: 1px solid transparent;
    border-radius: 28px;
    background:
        radial-gradient(60% 120% at 0% 0%, rgb(43 182 232 / 10%), transparent 60%) padding-box,
        radial-gradient(50% 120% at 100% 100%, rgb(217 54 62 / 7%), transparent 60%) padding-box,
        linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
        linear-gradient(120deg, rgb(43 182 232 / 45%), var(--c-line) 40%, var(--c-line) 60%, rgb(217 54 62 / 40%)) border-box;
    box-shadow: 0 1px 2px rgb(11 22 38 / 4%), 0 24px 48px -32px rgb(11 22 38 / 30%);
}

.spot__head { display: flex; align-items: center; gap: .9rem; margin: .25rem .25rem 1.1rem; }
.spot__badge {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c-brand), #6fd0f2);
    color: #fff;
    box-shadow: 0 10px 20px -10px rgb(43 182 232 / 90%);
}
.spot__badge svg { width: 22px; height: 22px; fill: currentColor; }
.spot__heading { min-width: 0; margin-right: auto; }
.spot__title { margin: 0; color: var(--c-text); font-family: var(--f-display); font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.spot__heading p { margin: .15rem 0 0; color: var(--c-muted); font-size: .9rem; }

.spot__nav { display: flex; gap: .4rem; }
.spot__arrow {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--c-line);
    border-radius: 50%;
    background: var(--c-surface);
    color: var(--c-text);
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.spot__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.spot__arrow:hover:not(:disabled) { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.spot__arrow:disabled { opacity: .35; cursor: default; }
.spot__nav[hidden] { display: none; }

.spot__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(100%, 560px);
    gap: 1rem;
    padding: .25rem;
    margin: -.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: .25rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.spot__track::-webkit-scrollbar { display: none; }
/* One or two cars: no scrolling needed, let them share the row. */
.spot__track:has(> .fcard:only-child) { grid-auto-columns: 100%; }

/* ---------- Wide featured card ---------- */
.fcard {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    scroll-snap-align: start;
    min-height: 236px;
    border: 1px solid var(--c-line);
    border-radius: 22px;
    background: var(--c-surface);
    overflow: hidden;
    transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s;
}
.fcard:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow); }
.fcard:focus-within { box-shadow: 0 0 0 3px var(--c-brand); }

.fcard__media { position: relative; display: block; background: linear-gradient(160deg, #eef2f7, #e0e7f0); overflow: hidden; }
.fcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.fcard:hover .fcard__media img { transform: scale(1.05); }
.fcard__nophoto { position: absolute; inset: 0; display: grid; place-items: center; color: #a3b1c2; }
.fcard__nophoto .body-icon, .fcard__nophoto svg { width: 62%; height: auto; }

.fcard__flag {
    position: absolute;
    top: .8rem;
    left: .8rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .7rem .32rem .55rem;
    border-radius: 999px;
    background: rgb(11 22 38 / 72%);
    color: #fff;
    font-family: var(--f-display);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fcard__flag svg { width: 13px; height: 13px; fill: var(--c-brand); }

.fcard__body { display: flex; flex-direction: column; min-width: 0; padding: 1.15rem 1.25rem 1.1rem; }
.fcard__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .35rem; color: var(--c-muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fcard__meta span + span::before { content: "·"; margin-right: .4rem; }
.fcard__title { margin: 0; font-family: var(--f-display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.fcard__title a { color: var(--c-text); text-decoration: none; }
.fcard__title a:focus { outline: none; }
/* Whole card is clickable, one link announced. */
.fcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fcard__trim { margin: .15rem 0 0; overflow: hidden; color: var(--c-muted); font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.fcard__price { margin: auto 0 0; padding-top: .9rem; color: var(--c-text) !important; font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.fcard__facts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem !important; }
.fcard__facts li {
    padding: .22rem .6rem;
    border-radius: 999px;
    background: var(--c-bg);
    color: var(--c-muted);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.fcard__cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .9rem;
    color: var(--c-brand-text);
    font-family: var(--f-display);
    font-size: .85rem;
    font-weight: 800;
}
.fcard__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.fcard:hover .fcard__cta svg { transform: translateX(4px); }

@media (max-width: 575.98px) {
    .spot { padding: .9rem; border-radius: 22px; }
    .spot__track { grid-auto-columns: 86%; }
    .fcard { grid-template-columns: minmax(0, 1fr); }
    .fcard__media { aspect-ratio: 4 / 3; }
    .spot__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .spot__track { scroll-behavior: auto; }
    .fcard:hover { transform: none; }
}
