/* Final release layer for the audited public catalogue.
   Keep it scoped to the current marketplace shell so legacy cabinets and
   booking APIs keep their existing contracts. */

body.marketplace-experience .catalog-availability-summary,
body.catalog-reference-upgrade .catalog-availability-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 1180px;
    margin: -4px auto 10px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

#map-wrapper .map-context {
    left: 58px !important;
    right: 12px !important;
    max-width: calc(100% - 70px) !important;
    box-sizing: border-box;
}

body.marketplace-experience .catalog-availability-summary[hidden],
body.catalog-reference-upgrade .catalog-availability-summary[hidden] {
    display: none !important;
}

.catalog-availability-toggle {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--primary);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.catalog-availability-toggle:hover,
.catalog-availability-toggle:focus-visible {
    background: var(--primary);
    color: #fff;
}

/* The cluster represents one real pick-up point with several offers. It is a
   single, keyboard-accessible control instead of nine price labels painted on
   top of one another. */
.leaflet-marker-icon.map-price-marker-icon {
    pointer-events: none;
}

.leaflet-marker-icon.map-price-marker-icon .map-price-marker {
    pointer-events: auto;
}

.leaflet-marker-icon .map-price-marker {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 66px;
    min-height: 34px;
    padding: 5px 10px;
    border: 2px solid var(--primary);
    border-radius: 18px;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(23, 32, 42, .24);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.05;
    white-space: nowrap;
    translate: var(--map-marker-offset-x, 0) var(--map-marker-offset-y, 0);
    will-change: translate;
    cursor: pointer;
}

.leaflet-marker-icon .map-price-marker:hover,
.leaflet-marker-icon .map-price-marker:focus-visible {
    z-index: 5;
    background: var(--primary);
    color: #fff;
    outline: 3px solid color-mix(in srgb, var(--primary) 24%, transparent);
    outline-offset: 2px;
}

.leaflet-marker-icon .map-price-marker::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    background: var(--bg-card);
    transform: translateX(-50%) rotate(45deg);
}

.leaflet-marker-icon .map-price-marker:hover::after,
.leaflet-marker-icon .map-price-marker:focus-visible::after {
    border-color: var(--primary);
    background: var(--primary);
}

.leaflet-marker-icon .map-price-marker--cluster {
    min-width: 94px;
    flex-direction: column;
    padding: 6px 10px;
    border-radius: 14px;
}

.leaflet-marker-icon .map-price-marker--cluster small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.leaflet-marker-icon .map-price-marker--cluster:hover small,
.leaflet-marker-icon .map-price-marker--cluster:focus-visible small {
    color: rgba(255,255,255,.86);
}

#map-wrapper .map-preview-card__group-head {
    padding: 16px 18px 8px;
}

#map-wrapper .map-preview-card__group-head h3 {
    margin: 3px 0 2px;
    font-size: 20px;
}

#map-wrapper .map-preview-card__group-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

#map-wrapper .map-preview-card__group-list {
    display: grid;
    gap: 6px;
    max-height: min(42vh, 330px);
    padding: 6px 12px 14px;
    overflow-y: auto;
}

/* Four offers fit in the compact preview. Let the panel itself own any
   remaining scroll so the last row is never hidden behind a nested scrollbar. */
#map-wrapper .map-preview-card--group-short .map-preview-card__group-list {
    max-height: none;
    overflow-y: visible;
}

#map-wrapper .map-preview-card__group-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 58px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-main);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

#map-wrapper .map-preview-card__group-item:hover,
#map-wrapper .map-preview-card__group-item:focus-visible {
    border-color: var(--primary);
    outline: none;
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
}

#map-wrapper .map-preview-card__group-item img {
    width: 52px;
    height: 42px;
    border-radius: 7px;
    background: var(--surface-secondary);
    object-fit: contain;
}

.map-preview-card__group-copy,
.map-preview-card__group-price {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.map-preview-card__group-copy strong,
.map-preview-card__group-copy small,
.map-preview-card__group-price b,
.map-preview-card__group-price small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-preview-card__group-copy strong { font-size: 13px; }
.map-preview-card__group-copy small,
.map-preview-card__group-price small { color: var(--text-muted); font-size: 10px; }
.map-preview-card__group-price { text-align: right; }
.map-preview-card__group-price b { color: var(--primary); font-size: 12px; }

.brand-shortcut__logo--mercedes {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: currentColor;
}

.brand-shortcut__logo--mercedes svg { width: 22px; height: 22px; }

/* Four horizontal discovery rails keep the mobile catalogue scannable. */
@media (max-width: 760px) {
    body.marketplace-experience #catalog-discovery-toolbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar {
        display: grid !important;
        gap: 5px !important;
        margin: 6px 0 8px !important;
        padding: 8px 9px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-toolbar__head,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-toolbar__head {
        margin-bottom: 0;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row {
        display: grid !important;
        grid-template-columns: max-content minmax(0, 1fr) !important;
        align-items: center;
        min-height: 40px;
        gap: 7px !important;
        padding: 0 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__label {
        max-width: 112px;
        color: var(--text-muted);
        font-size: 10px !important;
        line-height: 1.15 !important;
        white-space: normal;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__body,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__body {
        min-width: 0;
        overflow: hidden;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts {
        display: block !important;
        min-height: 0 !important;
        margin: 0 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts > strong,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts > strong,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts > strong,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts > strong {
        display: none;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        gap: 5px !important;
        padding: 0 1px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list::-webkit-scrollbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list::-webkit-scrollbar,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list::-webkit-scrollbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list::-webkit-scrollbar,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters::-webkit-scrollbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters::-webkit-scrollbar,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters::-webkit-scrollbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters::-webkit-scrollbar { display: none; }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-controls-heading,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-controls-heading {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        flex: 0 0 auto !important;
        min-height: 34px !important;
        height: 34px !important;
        padding: 5px 8px !important;
        white-space: nowrap !important;
        font-size: 11px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        display: inline-flex !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0;
        background: transparent;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control__label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control__label { display: none; }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort {
        height: 34px !important;
        min-height: 34px !important;
        max-width: 180px;
    }

    body.marketplace-experience #stories-bar[aria-hidden="true"],
    body.catalog-reference-upgrade #stories-bar[aria-hidden="true"] { display: none !important; }

    body.marketplace-experience .catalog-availability-summary,
    body.catalog-reference-upgrade .catalog-availability-summary {
        align-items: flex-start;
        flex-direction: column;
        margin: 0 0 8px;
        padding: 8px 10px;
    }

    .catalog-availability-toggle { width: 100%; }

    #map-wrapper .map-preview-card__group-head { padding: 12px 13px 6px; }
    #map-wrapper .map-preview-card__group-list { max-height: 35vh; padding-inline: 9px; }
}

/* Factual vehicle details: keep the exact-offer promise visible without
   crowding the price and action hierarchy. */
body.site-shell .car-card__identity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 7px;
    padding: 5px 8px;
    border: 1px solid #b7e4c7;
    border-radius: 999px;
    background: #effaf2;
    color: #167447;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}
body.site-shell .car-card__identity span:first-child { font-size: 13px; }
body.site-shell .car-card__specs { align-items: stretch; }
body.site-shell .car-card__specs span { min-width: 0; line-height: 1.35; }
#map-wrapper .map-preview-card__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#map-wrapper .map-preview-card__facts span { min-width: 0; overflow-wrap: anywhere; }


/* Keep the selected-location preview above the compare utility.  Both are
   useful at the same time, so the preview must not disappear underneath the
   fixed comparison bar. */
body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card.is-visible {
    bottom: 112px !important;
    max-height: calc(100% - 128px) !important;
}

/* A scrollable rail needs an affordance. The cue has its own grid column so it
   never paints over the last filter button. */
body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__body,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__body {
    position: relative;
    min-width: 0;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__cue,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__cue {
    display: none;
    align-items: center;
    max-width: 92px;
    min-width: 0;
    padding: 0 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__cue[hidden],
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__cue[hidden] {
    display: none !important;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"],
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"] {
    grid-template-columns: 104px minmax(0, 1fr) max-content !important;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"] .catalog-discovery-row__cue,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"] .catalog-discovery-row__cue {
    display: inline-flex;
}

/* The old catalogue layer positioned every badge absolutely at the bottom of
   the whole card. Keep factual badges in normal flow, above the terms link. */
body.marketplace-experience #fleet-grid .car-card[data-offer-layout] .offer-info .car-card__badges,
body.catalog-reference-upgrade #fleet-grid .car-card[data-offer-layout] .offer-info .car-card__badges {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    min-height: 0 !important;
    margin: 8px 0 !important;
}

body.marketplace-experience #fleet-grid .car-card[data-offer-layout] .offer-info .car-card__badges .car-card__badge,
body.catalog-reference-upgrade #fleet-grid .car-card[data-offer-layout] .offer-info .car-card__badges .car-card__badge,
body.marketplace-experience #fleet-grid .car-card[data-offer-layout] .offer-info > .car-card__badge,
body.catalog-reference-upgrade #fleet-grid .car-card[data-offer-layout] .offer-info > .car-card__badge {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    overflow-wrap: anywhere;
    text-align: left !important;
}

/* Use the natural car-photo shape on desktop and mobile alike. Contain keeps
   every source image undistorted and avoids the squeezed 4:3 media box. */
body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-media,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-media {
    aspect-ratio: 16 / 10 !important;
}

body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media {
    aspect-ratio: 16 / 10 !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-media .card-img,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-media .card-img {
    object-fit: contain !important;
    object-position: center !important;
    padding: 8px !important;
}

/* The extra rental-condition controls are optional; reset must stay a compact
   secondary action instead of stretching like a primary form control. */
body.marketplace-experience .marketplace-search-extra #market-reset,
body.catalog-reference-upgrade .marketplace-search-extra #market-reset {
    align-self: end;
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-input, var(--bg-card));
    color: var(--text-main);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

body.marketplace-experience .marketplace-search-extra #market-reset:hover,
body.marketplace-experience .marketplace-search-extra #market-reset:focus-visible,
body.catalog-reference-upgrade .marketplace-search-extra #market-reset:hover,
body.catalog-reference-upgrade .marketplace-search-extra #market-reset:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
}

/* Let a map offer grow when there is room and scroll only when another fixed
   utility (for example compare) reduces the available height. */
#map-wrapper .map-preview-card {
    max-height: min(calc(100% - 32px), 520px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
}

#map-wrapper .map-preview-card__image {
    height: 180px !important;
    object-fit: contain !important;
}

body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card__image {
    height: 135px !important;
}

/* The old pseudo-element is intentionally disabled; the real cue above owns
   the third grid column. */
body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__body[data-scroll-overflow="true"]::after,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__body[data-scroll-overflow="true"]::after {
    content: none !important;
    display: none !important;
}

/* The toolbar already supplies the row label.  Hiding the old nested heading
   removes the duplicate "Catalogue filters" / "Make, class and sorting" copy
   after the legacy controls are moved into the new row. */
body.marketplace-experience #catalog-discovery-toolbar [data-discovery-row="catalogue"] .catalog-controls-heading,
body.catalog-reference-upgrade #catalog-discovery-toolbar [data-discovery-row="catalogue"] .catalog-controls-heading {
    display: none !important;
}

/* Final desktop density pass: preserve all information while shortening the
   path from search to the first offer. */
@media (min-width: 1000px) {
    body.marketplace-experience #page-fleet > .journey-hero,
    body.catalog-reference-upgrade #page-fleet > .journey-hero {
        padding-top: 16px !important;
        padding-bottom: 4px !important;
    }

    body.marketplace-experience #search-sticky,
    body.catalog-reference-upgrade #search-sticky {
        padding-top: 8px !important;
        padding-bottom: 10px !important;
        margin-bottom: 6px !important;
    }

    body.marketplace-experience #p0-trust-markers,
    body.catalog-reference-upgrade #p0-trust-markers {
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar {
        gap: 3px !important;
        padding-top: 7px !important;
        padding-bottom: 8px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row {
        min-height: 32px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__label {
        font-size: 10px !important;
        line-height: 1.15 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort {
        min-height: 32px !important;
        height: 32px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 760px) {
    body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card.is-visible {
        bottom: 108px !important;
        max-height: calc(100% - 124px) !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"],
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row[data-scroll-overflow="true"] {
        grid-template-columns: max-content minmax(0, 1fr) max-content !important;
        gap: 5px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__cue,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__cue {
        max-width: 72px;
        padding-inline: 0;
        font-size: 9px;
    }

    #map-wrapper .map-preview-card {
        max-height: min(calc(100% - 24px), 460px) !important;
    }

    #map-wrapper .map-preview-card__image {
        height: 120px !important;
    }

    body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card__image {
        height: 88px !important;
    }
}

/* Ensure the dynamically generated all-makes chip and logos fit their rail
   rather than losing the top/bottom glyphs in a 32px clipped row. */
body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list {
    align-items: center !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list button {
    box-sizing: border-box !important;
    height: 36px !important;
    min-height: 36px !important;
    line-height: 1.15 !important;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo {
    display: inline-grid;
    flex: 0 0 22px;
    place-items: center;
    width: 22px !important;
    height: 22px !important;
}

body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo img,
body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo img {
    width: 22px !important;
    height: 22px !important;
}

/* Keep a compact, single-focus mobile booking flow: the request wizard owns
   the right column, while the long vehicle narrative is reduced to identity,
   gallery and key specs. The full conditions remain available on the card
   before opening checkout. */
@media (max-width: 760px) {
    #bookingModal .modal-body { max-height: 96dvh !important; }
    #bookingModal .m-left {
        display: block !important;
        flex: 0 0 auto !important;
        max-height: none !important;
        padding: 0 16px 8px !important;
        overflow: visible !important;
    }
    #bookingModal .m-left #m-partner-badge { margin-bottom: 3px !important; }
    #bookingModal .m-left #m-title { margin: 0 0 5px !important; font-size: 20px !important; }
    #bookingModal .m-left .swipe-gallery-wrapper {
        height: clamp(180px, 44vw, 230px) !important;
        min-height: 180px !important;
        max-height: 230px !important;
        overflow: hidden !important;
    }
    #bookingModal .m-left .swipe-gallery {
        height: 100% !important;
        min-height: 0 !important;
    }
    #bookingModal .m-left .swipe-gallery img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        padding: 10px !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    #bookingModal .m-left .swipe-gallery-wrapper { margin-bottom: 5px !important; }
    #bookingModal .m-left #m-specs {
        max-height: 25px;
        margin: 0 !important;
        overflow: hidden;
        flex-wrap: nowrap !important;
        font-size: 11px !important;
    }
    #bookingModal .m-left #m-rental-conditions,
    #bookingModal .m-left #m-google-maps,
    #bookingModal .m-left #m-product-terms,
    #bookingModal .m-left #m-trust-panel,
    #bookingModal .m-left .booking-offer-report,
    #bookingModal .m-left .booking-offer-description { display: none !important; }
    #bookingModal .m-right { width: 100%; min-height: 0; }
    #bookingModal .booking-panel-actions button { min-height: 40px; }
    #bookingModal .booking-summary-strip { margin-bottom: 10px; }
    #bookingModal .booking-step-panel { min-height: 0; }
}

/* Mobile discovery is a visible filter panel, not a hidden horizontal rail.
   The old swipe pattern made the last brand/condition impossible to discover
   and clipped the dynamically inserted "all makes" control. */
@media (max-width: 760px) {
    body.marketplace-experience #catalog-discovery-toolbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar {
        gap: 8px !important;
        padding: 10px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row {
        display: block !important;
        min-height: 0 !important;
        padding: 0 0 8px !important;
        border-bottom: 1px solid var(--border);
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row:last-child,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row:last-child {
        padding-bottom: 0 !important;
        border-bottom: 0;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__label {
        display: block !important;
        max-width: none !important;
        margin: 0 0 5px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__body,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__body {
        overflow: visible !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__cue,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__cue {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        flex-wrap: initial !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        gap: 6px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        display: inline-flex !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: none !important;
        height: auto !important;
        min-height: 36px !important;
        padding: 7px 8px !important;
        white-space: normal !important;
        overflow: visible !important;
        line-height: 1.15 !important;
        justify-content: flex-start !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list .brand-shortcut__logo {
        flex: 0 0 22px !important;
        width: 22px !important;
        height: 22px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-chip-label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-chip-label {
        overflow: visible !important;
        white-space: normal !important;
        text-overflow: clip !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-controls-heading,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-controls-heading {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        grid-column: 1 / -1;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort {
        width: 100% !important;
        max-width: none !important;
        min-height: 36px !important;
        height: 36px !important;
    }
}

/* Preserve the source photo's ratio. Contain inside a fixed-height box made
   the same 4:3 photo look squeezed and disproportionately small. */
body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-media,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-media,
body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-media .card-img-box,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-media .card-img-box,
body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media .card-img-box,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media .card-img-box {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-media .card-img,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-media .card-img,
body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media .card-img,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-media .card-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 0 !important;
}

/* The preview position is calculated against the live compare bar so a
   selected offer never sits underneath a fixed utility or its close button. */
#map-wrapper .map-preview-card.is-visible {
    bottom: var(--map-preview-bottom, 16px) !important;
    max-height: var(--map-preview-max-height, min(calc(100% - 32px), 520px)) !important;
}

/* Fallback for a cached/slow frame: match the compare bar's real footprint
   even before the geometry observer writes its per-viewport values. */
body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card.is-visible {
    bottom: var(--map-preview-bottom, 144px) !important;
    max-height: var(--map-preview-max-height, calc(100% - 160px)) !important;
}

@media (max-width: 760px) {
    body.site-shell:has(#compare-bar.show) #map-wrapper .map-preview-card.is-visible {
        bottom: var(--map-preview-bottom, 126px) !important;
        max-height: var(--map-preview-max-height, calc(100% - 142px)) !important;
    }
}

/* A zero-result facet is not a useful action. Keep active zero-result facets
   available for clearing, but never leave an unavailable chip in the rail. */
#p0-quick-filters button[hidden] {
    display: none !important;
}

/* On mobile the discovery layer is an explicit, compact disclosure instead
   of a clipped swipe rail. The catalogue remains immediately reachable and
   the full set of filters is still one tap away. */
.catalog-discovery-mobile-actions {
    display: none;
}

@media (max-width: 760px) {
    body.marketplace-experience #catalog-discovery-toolbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar {
        display: block !important;
        padding: 8px !important;
        margin-bottom: 8px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-toolbar__head,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-toolbar__head {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-actions,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        align-items: stretch;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-toggle,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-all-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-toggle,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-all-filters {
        box-sizing: border-box;
        min-width: 0;
        min-height: 42px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg-card);
        color: var(--text-main);
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-toggle,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-toggle {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        padding: 6px 9px;
        text-align: left;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-toggle::before,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-toggle::before {
        content: '☷';
        color: var(--primary);
        font-size: 18px;
        line-height: 1;
    }

    .catalog-discovery-mobile-toggle__title,
    .catalog-discovery-mobile-toggle__summary {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .catalog-discovery-mobile-toggle__title {
        display: block;
        line-height: 1.15;
    }

    .catalog-discovery-mobile-toggle__summary {
        grid-column: 2;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 600;
        line-height: 1.15;
    }

    .catalog-discovery-mobile-toggle__icon {
        grid-column: 3;
        grid-row: 1 / span 2;
        color: var(--text-muted);
        font-size: 17px;
        transition: transform .18s ease;
    }

    #catalog-discovery-toolbar.is-mobile-expanded .catalog-discovery-mobile-toggle__icon {
        transform: rotate(180deg);
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-mobile-all-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-mobile-all-filters {
        padding: 0 10px;
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary);
        white-space: nowrap;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row {
        display: none !important;
        min-height: 0 !important;
        margin-top: 8px !important;
        padding: 8px 0 0 !important;
        border-top: 1px solid var(--border);
        border-bottom: 0 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar.is-mobile-expanded .catalog-discovery-row,
    body.catalog-reference-upgrade #catalog-discovery-toolbar.is-mobile-expanded .catalog-discovery-row {
        display: grid !important;
        grid-template-columns: minmax(70px, .33fr) minmax(0, 1fr) !important;
        gap: 7px !important;
        align-items: start;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row[hidden],
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row[hidden] {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__label {
        display: block !important;
        margin: 3px 0 0 !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__body,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__body {
        min-width: 0;
        overflow: visible !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-discovery-row__cue,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-discovery-row__cue {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        gap: 5px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-brand-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar .catalog-city-shortcuts__list button,
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        display: inline-flex !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 34px !important;
        height: auto !important;
        padding: 6px 7px !important;
        white-space: normal !important;
        overflow: visible !important;
        line-height: 1.15 !important;
        justify-content: flex-start !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-controls-heading,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-controls-heading {
        display: none !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort-control,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort-control {
        grid-column: 1 / -1;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort {
        width: 100% !important;
        max-width: none !important;
        min-height: 34px !important;
        height: 34px !important;
    }

    body.marketplace-experience #stories-bar.p0-collections .p0-collections__list,
    body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        overflow: visible !important;
        padding: 1px 0 2px !important;
    }

    body.marketplace-experience #stories-bar.p0-collections .p0-collections__item,
    body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__item {
        min-width: 0 !important;
        width: 100% !important;
        min-height: 68px !important;
        box-sizing: border-box !important;
        padding: 9px !important;
    }
}

/* Final mobile readability pass.  The quick condition controls are a
   two-line label plus a count; forcing them back to inline-flex makes the
   count paint over a wrapped label on narrow screens.  Keep the icon in a
   fixed first column and the text/count in their own rows. */
@media (max-width: 760px) {
    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button {
        display: grid !important;
        grid-template-columns: 25px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        align-content: center !important;
        align-items: center !important;
        column-gap: 6px !important;
        row-gap: 3px !important;
        min-height: 64px !important;
        height: auto !important;
        padding: 8px !important;
        text-align: left !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-chip-icon,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-chip-icon {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        align-self: start !important;
        width: 25px !important;
        height: 25px !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-chip-label,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-chip-label {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: block !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        line-height: 1.15 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-chip-count,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-chip-count {
        grid-column: 2 !important;
        grid-row: 2 !important;
        display: block !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.1 !important;
    }

    body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-clear,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-clear {
        display: inline-flex !important;
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 38px !important;
        height: auto !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* The map preview is allowed to scroll inside its own panel when a fixed
   comparison bar reduces the available map height.  The previous cascade
   set overflow:hidden after the panel's internal scroll rule, so the lower
   part of the CTA could be clipped.  Contain preserves the whole source
   photo without stretching or cropping it. */
#map-wrapper .map-preview-card.is-visible {
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
}

#map-wrapper .map-preview-card__image {
    display: block !important;
    width: 100% !important;
    height: 180px !important;
    max-width: none !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    object-position: center !important;
}

#map-wrapper .map-preview-card__body {
    min-width: 0 !important;
    gap: 7px !important;
    padding: 14px 16px 16px !important;
}

#map-wrapper .map-preview-card__facts {
    min-width: 0 !important;
}

#map-wrapper .map-preview-card__facts span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#map-wrapper .map-preview-card__actions,
#map-wrapper .map-preview-card__open {
    min-width: 0 !important;
}

#map-wrapper .map-preview-card__actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--bg-card);
    padding-bottom: 3px !important;
}

#map-wrapper .map-preview-card__open {
    min-height: 42px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* Use real currentColor SVG icons so the saved/compare state is visible on
   every platform, including browsers that render emoji in a fixed palette. */
body.site-shell .car-card .act-btn {
    border: 1px solid transparent !important;
    color: var(--text-muted) !important;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

body.site-shell .car-card .act-btn .action-icon {
    display: block;
    width: 19px;
    height: 19px;
    overflow: visible;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

body.site-shell .car-card .act-btn .action-icon--heart {
    fill: transparent;
}

body.site-shell .car-card .act-btn.compare-action.active-cmp {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 30%, transparent) !important;
}

body.site-shell .car-card .act-btn.favorite-action.active {
    background: #fff0f1 !important;
    border-color: #f2a4aa !important;
    color: #d71920 !important;
    box-shadow: 0 5px 14px rgba(215, 25, 32, .2) !important;
}

body.site-shell .car-card .act-btn.favorite-action.active .action-icon--heart {
    fill: currentColor;
}

body.site-shell .car-card .act-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    #map-wrapper .map-preview-card__image {
        height: 100px !important;
        padding: 6px !important;
    }

    #map-wrapper .map-preview-card__body {
        gap: 4px !important;
        padding: 9px 10px 10px !important;
    }

    #map-wrapper .map-preview-card h3 {
        line-height: 1.15 !important;
    }

    #map-wrapper .map-preview-card__facts {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-height: none !important;
        gap: 4px !important;
        overflow: visible !important;
    }

    #map-wrapper .map-preview-card__facts span {
        padding: 4px 6px !important;
        font-size: 10px !important;
    }

    #map-wrapper .map-preview-card__trust {
        min-width: 0 !important;
        font-size: 10px !important;
    }

    #map-wrapper .map-preview-card__open {
        min-height: 38px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    #map-wrapper .map-preview-card {
        scroll-padding-bottom: 8px;
    }

    #map-wrapper .map-preview-card--group-short .map-preview-card__group-list {
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* 2026-09-23 audit pass: keep the route to the first offer compact while
   retaining the existing hero copy, actions, trust strip and filters. */
@media (min-width: 1000px) {
    body.marketplace-experience #page-fleet > .journey-hero,
    body.catalog-reference-upgrade #page-fleet > .journey-hero {
        min-height: 0 !important;
        margin: 8px auto 10px !important;
        padding: 14px 20px 10px !important;
        gap: 8px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero h1,
    body.catalog-reference-upgrade #page-fleet > .journey-hero h1 {
        font-size: clamp(25px, 2.45vw, 32px) !important;
        margin-bottom: 5px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero .journey-actions,
    body.catalog-reference-upgrade #page-fleet > .journey-hero .journey-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 960px !important;
        margin-top: 7px !important;
        gap: 7px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero .journey-action,
    body.catalog-reference-upgrade #page-fleet > .journey-hero .journey-action {
        min-height: 38px !important;
        padding: 8px 9px !important;
        font-size: 12px !important;
        line-height: 1.15 !important;
    }

    body.marketplace-experience #page-fleet > .affiliate-spotlight,
    body.catalog-reference-upgrade #page-fleet > .affiliate-spotlight {
        margin-top: 8px !important;
        margin-bottom: 9px !important;
        padding: 10px 15px !important;
    }

    body.marketplace-experience #page-fleet > .marketplace-proof,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof {
        margin-top: 8px !important;
        margin-bottom: 10px !important;
        gap: 8px !important;
    }

    body.marketplace-experience #page-fleet > .marketplace-proof > div,
    body.marketplace-experience #page-fleet > .marketplace-proof > a,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof > div,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof > a {
        gap: 4px !important;
        padding: 11px 12px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 760px) {
    body.marketplace-experience #page-fleet > .journey-hero,
    body.catalog-reference-upgrade #page-fleet > .journey-hero {
        margin: 7px 10px 8px !important;
        padding: 14px !important;
        gap: 7px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero h1,
    body.catalog-reference-upgrade #page-fleet > .journey-hero h1 {
        font-size: 24px !important;
        line-height: 1.08 !important;
        margin-bottom: 4px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero .journey-actions,
    body.catalog-reference-upgrade #page-fleet > .journey-hero .journey-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        margin-top: 7px !important;
        gap: 6px !important;
    }

    body.marketplace-experience #page-fleet > .journey-hero .journey-action,
    body.catalog-reference-upgrade #page-fleet > .journey-hero .journey-action {
        min-height: 38px !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        line-height: 1.15 !important;
    }

    body.marketplace-experience #page-fleet > .affiliate-spotlight,
    body.catalog-reference-upgrade #page-fleet > .affiliate-spotlight {
        margin: 7px 10px 9px !important;
        padding: 10px 12px !important;
    }

    body.marketplace-experience #page-fleet > .marketplace-proof,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof {
        margin: 7px 10px 9px !important;
        gap: 6px !important;
    }

    body.marketplace-experience #page-fleet > .marketplace-proof > div,
    body.marketplace-experience #page-fleet > .marketplace-proof > a,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof > div,
    body.catalog-reference-upgrade #page-fleet > .marketplace-proof > a {
        gap: 3px !important;
        padding: 10px !important;
        font-size: 12px !important;
    }

    body.marketplace-experience #page-fleet > #search-sticky,
    body.catalog-reference-upgrade #page-fleet > #search-sticky {
        margin-bottom: 6px !important;
        padding: 8px 10px 10px !important;
    }
}
