/* Stage three: make map offers scannable and make supplier trust status visible. */
.car-card__supplier-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.car-card__supplier-status.is-verified {
    color: var(--success);
}

.car-card__supplier-status > span:first-child {
    display: grid;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-secondary);
    color: var(--text-muted);
    font-size: 11px;
}

.car-card__supplier-status.is-verified > span:first-child {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
}

#map-wrapper .map-preview-card {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1002;
    display: block;
    width: min(370px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-card);
    box-shadow: var(--shadow-raised);
}

#map-wrapper .map-preview-card[hidden] {
    display: none;
}

.map-preview-card__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(23, 32, 42, .12);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--text-main);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.map-preview-card__close:hover {
    background: var(--bg-card);
}

.map-preview-card__image {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: contain;
    border-radius: 18px 18px 0 0;
    background: var(--surface-secondary);
}

.map-preview-card__body {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
}

.map-preview-card__eyebrow {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.map-preview-card h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 21px;
    line-height: 1.2;
}

.map-preview-card__price {
    color: var(--primary);
    font-size: 20px;
    font-weight: 850;
}

.map-preview-card__price small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.map-preview-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-preview-card__facts span {
    max-width: 100%;
    padding: 6px 8px;
    overflow-wrap: anywhere;
    border-radius: 8px;
    background: var(--surface-secondary);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 650;
}

.map-preview-card__trust {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.map-preview-card__trust.is-verified {
    color: var(--success);
}

.map-preview-card__note {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.map-preview-card__actions {
    display: flex;
    margin-top: 2px;
}

.map-preview-card__open {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.map-preview-card__open:hover {
    background: var(--primary-hover);
}

@media (max-width: 760px) {
    #map-wrapper .map-preview-card {
        right: auto;
        bottom: 12px;
        left: 12px;
        width: min(350px, calc(100% - 24px));
        max-height: min(45vh, 330px);
        border-radius: 14px;
    }

    .map-preview-card__image {
        height: 96px;
    }

    .map-preview-card h3 {
        font-size: 17px;
    }

    .map-preview-card__body {
        gap: 5px;
        padding: 9px 11px 11px;
    }

    .map-preview-card__eyebrow {
        font-size: 10px;
    }

    .map-preview-card__price {
        font-size: 17px;
    }

    .map-preview-card__facts {
        max-height: 44px;
        overflow: hidden;
        gap: 4px;
    }

    .map-preview-card__facts span {
        padding: 4px 6px;
        font-size: 11px;
    }

    .map-preview-card__trust {
        font-size: 10px;
    }

    .map-preview-card__note {
        display: none;
    }

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

    .map-preview-card__close {
        top: 7px;
        right: 7px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

/* Keep the condition shortcuts readable and make their horizontal movement
   explicit. Earlier compact layers hid the hint or reduced the row to a
   single clipped line on phones. */
body.marketplace-experience #stories-bar.p0-collections,
body.catalog-reference-upgrade #stories-bar.p0-collections {
    position: relative;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 8px 0 4px !important;
}

body.marketplace-experience #stories-bar.p0-collections .p0-collections__head,
body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__head {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px !important;
}

body.marketplace-experience #stories-bar.p0-collections .p0-collections__head .p0-collections__hint,
body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__head .p0-collections__hint {
    display: block !important;
    margin-top: 3px;
    color: var(--text-muted) !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

body.marketplace-experience #stories-bar.p0-collections .p0-collections__list,
body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__list {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 1px 30px 9px 2px !important;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

body.marketplace-experience #stories-bar.p0-collections .p0-collections__list:focus-visible,
body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__list:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 10px;
}

body.marketplace-experience #stories-bar.p0-collections .p0-collections__item,
body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__item {
    flex: 0 0 190px !important;
    min-height: 66px !important;
    scroll-snap-align: start;
}

body.marketplace-experience #stories-bar.p0-collections::after,
body.catalog-reference-upgrade #stories-bar.p0-collections::after {
    content: '›';
    position: absolute;
    right: 0;
    bottom: 7px;
    display: grid;
    width: 25px;
    height: 42px;
    place-items: center;
    border-radius: 9px 0 0 9px;
    background: linear-gradient(90deg, transparent, var(--bg-main) 42%);
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    pointer-events: none;
}

@media (max-width: 760px) {
    body.marketplace-experience #stories-bar.p0-collections .p0-collections__item,
    body.catalog-reference-upgrade #stories-bar.p0-collections .p0-collections__item {
        flex-basis: min(184px, 70vw) !important;
    }
}

/* Keep the catalogue controls in the same decision column as the offers.
   The old desktop rail is hidden when the side map is active, which made the
   quick filters disappear even though their buttons were still generated. */
body.marketplace-experience #catalog-map-layout > #p0-quick-filters,
body.catalog-reference-upgrade #catalog-map-layout > #p0-quick-filters {
    position: relative;
    display: flex !important;
    grid-column: 1;
    grid-row: auto;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0 0 8px !important;
    padding: 0 0 5px !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

body.marketplace-experience #catalog-map-layout > #p0-quick-filters button,
body.catalog-reference-upgrade #catalog-map-layout > #p0-quick-filters button {
    flex: 0 0 166px;
    min-height: 56px;
}

body.marketplace-experience #catalog-map-layout > #p0-quick-filters .p0-clear,
body.catalog-reference-upgrade #catalog-map-layout > #p0-quick-filters .p0-clear {
    flex-basis: 116px;
    margin-left: 0;
}

body.marketplace-experience .catalog-brand-shortcuts__list .brand-shortcut__logo,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list .brand-shortcut__logo {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: var(--surface-secondary);
    color: var(--text-main);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
}

body.marketplace-experience .catalog-brand-shortcuts__list .brand-shortcut__logo img,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list .brand-shortcut__logo img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

body.marketplace-experience .catalog-brand-shortcuts__list .brand-shortcut__logo--fallback,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list .brand-shortcut__logo--fallback {
    background: var(--text-main);
    color: var(--bg-card);
}

body.marketplace-experience .catalog-brand-shortcuts__list .brand-shortcut__logo--all,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list .brand-shortcut__logo--all {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
}

body.marketplace-experience .catalog-brand-shortcuts__list .brand-shortcut__logo--fallback[hidden],
body.catalog-reference-upgrade .catalog-brand-shortcuts__list .brand-shortcut__logo--fallback[hidden] {
    display: none !important;
}

/* The selected rental tier remains visible even when dates are filled in. */
.card-price-tiers span.is-current {
    padding: 3px 5px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
}

.card-price-tiers span.is-current strong,
.card-price-tiers span.is-current em {
    color: inherit;
}

@media (min-width: 1100px) {
    body.marketplace-experience #catalog-map-layout.has-side-map > #p0-quick-filters,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map > #p0-quick-filters {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Final cascade guard for the refined card.  This block deliberately sits at
   EOF so legacy catalogue layers cannot restore the narrow thumbnail rail. */
body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue {
    display: grid !important;
    grid-template-columns: minmax(300px, 46%) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !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 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
}

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 {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
}

body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-content,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-content {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-checkout,
body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-checkout {
    grid-column: auto !important;
    grid-row: auto !important;
    margin-top: auto !important;
    border-top: 1px solid var(--border) !important;
    border-left: 0 !important;
}

@media (max-width: 760px) {
    body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        grid-template-rows: none !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 {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10 !important;
    }

    body.marketplace-experience #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-content,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map #fleet-grid .car-card.car-card--catalogue .offer-content {
        width: 100% !important;
    }
}

/* Stage four: the catalogue card is a real two-column component.  Earlier
   layers still contain historical three-column and flex rules; this scoped
   block is intentionally last so the public card has one predictable layout
   for partner offers and CarMisto-operated cars alike. */
body.marketplace-experience #fleet-grid .car-card.car-card--catalogue,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue {
    display: grid !important;
    grid-template-columns: minmax(300px, 46%) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

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 {
    position: relative;
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    background: var(--surface-secondary) !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 {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    border-radius: 0 !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 {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 14px !important;
    object-fit: contain !important;
    object-position: center !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-content,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-content {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: var(--bg-card) !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-info,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 20px 22px 8px !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-checkout,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-checkout {
    display: flex !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin-top: auto !important;
    padding: 12px 22px 20px !important;
    border-top: 1px solid var(--border) !important;
    border-left: 0 !important;
    background: var(--bg-card) !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .car-card__badge,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .car-card__badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    margin: 0 !important;
    padding: 6px 9px !important;
    border: 1px solid rgba(255,255,255,.64) !important;
    border-radius: 8px !important;
    background: rgba(17, 24, 39, .82) !important;
    color: #fff !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    text-align: right;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .car-card__badge::before,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .car-card__badge::before {
    content: none !important;
}

body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .card-price-tiers,
body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .card-price-tiers {
    margin-top: 7px !important;
}

/* The map preview is a compact listing, not a second full offer page.  It
   keeps the image, selected-term price and the action readable at once. */
#map-wrapper .map-preview-card {
    width: min(430px, calc(100% - 32px)) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

#map-wrapper .map-preview-card__image {
    height: 218px !important;
    padding: 12px !important;
    box-sizing: border-box;
    object-fit: contain !important;
}

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

#map-wrapper .map-preview-card__price em {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

#map-wrapper .map-preview-card__facts span {
    flex: 1 1 auto;
    min-width: 0;
}

/* One discovery toolbar owns the shortcut controls.  The legacy collections
   rail stays hidden to prevent duplicate conditions above the catalogue. */
body.marketplace-experience #stories-bar[hidden],
body.catalog-reference-upgrade #stories-bar[hidden] {
    display: none !important;
}

@media (max-width: 1099px) and (min-width: 761px) {
    body.marketplace-experience #fleet-grid .car-card.car-card--catalogue,
    body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue {
        grid-template-columns: minmax(250px, 42%) minmax(0, 1fr) !important;
    }
}

@media (max-width: 760px) {
    body.marketplace-experience #fleet-grid .car-card.car-card--catalogue,
    body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    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 {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10 !important;
    }

    body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-content,
    body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-content {
        display: flex !important;
        width: 100% !important;
    }

    body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-info,
    body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-info {
        padding: 15px 16px 7px !important;
    }

    body.marketplace-experience #fleet-grid .car-card.car-card--catalogue .offer-checkout,
    body.catalog-reference-upgrade #fleet-grid .car-card.car-card--catalogue .offer-checkout {
        padding: 11px 16px 16px !important;
    }

    #map-wrapper .map-preview-card {
        width: min(370px, calc(100% - 24px)) !important;
        max-height: min(54vh, 390px) !important;
        border-radius: 16px !important;
    }

    #map-wrapper .map-preview-card__image {
        height: 136px !important;
        padding: 8px !important;
    }

    #map-wrapper .map-preview-card__body {
        gap: 6px !important;
        padding: 11px 12px 13px !important;
    }
}

/* Stage 4: one predictable discovery toolbar above the catalogue.  The old
   condition cards remain in the DOM for compatibility, but are no longer
   rendered as a second copy of the same filters. */
body.marketplace-experience #stories-bar.p0-collections,
body.catalog-reference-upgrade #stories-bar.p0-collections {
    display: none !important;
}

/* Older hardening rules used :not([hidden]) with a more specific selector.
   Match that specificity as well so the legacy condition rail cannot return
   after a catalogue rerender. */
body.marketplace-experience #stories-bar.p0-collections:not([hidden]),
body.catalog-reference-upgrade #stories-bar.p0-collections:not([hidden]) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.marketplace-experience .marketplace-search-extra-wrap > summary,
body.catalog-reference-upgrade .marketplace-search-extra-wrap > summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 9px;
}

body.marketplace-experience .marketplace-search-extra__hint,
body.catalog-reference-upgrade .marketplace-search-extra__hint {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

body.marketplace-experience .marketplace-search-extra__intro,
body.catalog-reference-upgrade .marketplace-search-extra__intro {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

body.marketplace-experience #catalog-discovery-toolbar,
body.catalog-reference-upgrade #catalog-discovery-toolbar {
    display: grid;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto 12px;
    padding: 10px 12px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: 0 5px 18px rgba(23, 32, 42, .045);
}

body.marketplace-experience .catalog-discovery-toolbar__head,
body.catalog-reference-upgrade .catalog-discovery-toolbar__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 3px;
}

body.marketplace-experience .catalog-discovery-toolbar__head strong,
body.catalog-reference-upgrade .catalog-discovery-toolbar__head strong {
    color: var(--text-main);
    font-size: 14px;
    letter-spacing: -.01em;
}

body.marketplace-experience .catalog-discovery-toolbar__head span,
body.catalog-reference-upgrade .catalog-discovery-toolbar__head span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

body.marketplace-experience .catalog-discovery-row,
body.catalog-reference-upgrade .catalog-discovery-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

body.marketplace-experience .catalog-discovery-row__label,
body.catalog-reference-upgrade .catalog-discovery-row__label {
    padding: 9px 4px 0 2px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.marketplace-experience .catalog-discovery-row__body,
body.catalog-reference-upgrade .catalog-discovery-row__body {
    display: flex;
    align-items: center;
    min-width: 0;
}

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 {
    width: 100%;
    min-width: 0;
    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-brand-shortcuts__list,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list,
body.marketplace-experience .catalog-city-shortcuts__list,
body.catalog-reference-upgrade .catalog-city-shortcuts__list {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 5px;
    scrollbar-width: thin;
}

body.marketplace-experience .catalog-brand-shortcuts__list button,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list button,
body.marketplace-experience .catalog-city-shortcuts__list button,
body.catalog-reference-upgrade .catalog-city-shortcuts__list button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-card);
    color: var(--text-main);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
}

body.marketplace-experience .catalog-brand-shortcuts__list button[aria-pressed="true"],
body.catalog-reference-upgrade .catalog-brand-shortcuts__list button[aria-pressed="true"],
body.marketplace-experience .catalog-city-shortcuts__list button[aria-pressed="true"],
body.catalog-reference-upgrade .catalog-city-shortcuts__list button[aria-pressed="true"] {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

body.marketplace-experience .catalog-city-shortcuts__list button,
body.catalog-reference-upgrade .catalog-city-shortcuts__list button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.marketplace-experience .catalog-city-shortcuts__list button > span:first-child,
body.catalog-reference-upgrade .catalog-city-shortcuts__list button > span:first-child {
    color: var(--primary);
    font-size: 14px;
}

body.marketplace-experience .catalog-brand-shortcuts__list small,
body.catalog-reference-upgrade .catalog-brand-shortcuts__list small,
body.marketplace-experience .catalog-city-shortcuts__list small,
body.catalog-reference-upgrade .catalog-city-shortcuts__list small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters,
body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters {
    display: flex !important;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 1px 1px 5px !important;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button,
body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters button.active,
body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters button.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

body.marketplace-experience #catalog-discovery-toolbar #p0-quick-filters .p0-clear,
body.catalog-reference-upgrade #catalog-discovery-toolbar #p0-quick-filters .p0-clear {
    margin-left: auto;
    border-style: dashed;
    color: var(--text-muted);
}

body.marketplace-experience #catalog-discovery-toolbar #cat-filters,
body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !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;
}

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;
    align-items: center;
    gap: 6px;
    margin-right: 2px;
}

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 {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

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: 38px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 12px !important;
    font-weight: 750;
}

body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn.active,
body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* The previous side-map rule left a narrow thumbnail column.  Give the
   source photo a real visual role while keeping the whole image visible. */
@media (min-width: 1100px) {
    body.marketplace-experience #catalog-map-layout.has-side-map .car-card[data-offer-layout],
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map .car-card[data-offer-layout] {
        grid-template-columns: minmax(260px, 40%) minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
    }

    body.marketplace-experience #catalog-map-layout.has-side-map .offer-media,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map .offer-media {
        align-self: start !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 4 / 3;
    }

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

    body.marketplace-experience #catalog-map-layout.has-side-map .offer-media .card-img,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map .offer-media .card-img {
        width: 100% !important;
        height: 100% !important;
        padding: 10px !important;
        object-fit: contain !important;
    }
}

@media (max-width: 760px) {
    body.marketplace-experience #catalog-discovery-toolbar,
    body.catalog-reference-upgrade #catalog-discovery-toolbar {
        margin: 0 0 10px;
        padding: 9px 10px 10px;
        border-radius: 12px;
    }

    body.marketplace-experience .catalog-discovery-row,
    body.catalog-reference-upgrade .catalog-discovery-row {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 7px;
    }

    body.marketplace-experience .catalog-discovery-row__label,
    body.catalog-reference-upgrade .catalog-discovery-row__label {
        padding-top: 9px;
        font-size: 10px;
    }

    body.marketplace-experience .catalog-discovery-toolbar__head,
    body.catalog-reference-upgrade .catalog-discovery-toolbar__head {
        display: block;
    }

    body.marketplace-experience .catalog-discovery-toolbar__head span,
    body.catalog-reference-upgrade .catalog-discovery-toolbar__head span {
        display: block;
        margin-top: 2px;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    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;
        width: 100%;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .catalog-sort,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .catalog-sort {
        flex: 1;
        min-width: 0;
    }

    body.marketplace-experience #catalog-discovery-toolbar #cat-filters .filter-btn,
    body.catalog-reference-upgrade #catalog-discovery-toolbar #cat-filters .filter-btn {
        width: 100%;
    }
}

@media (max-width: 760px) {
    body.marketplace-experience #catalog-map-layout > #p0-quick-filters,
    body.catalog-reference-upgrade #catalog-map-layout > #p0-quick-filters {
        margin-bottom: 6px !important;
        padding-inline: 0 !important;
    }

    body.marketplace-experience #catalog-map-layout > #p0-quick-filters button,
    body.catalog-reference-upgrade #catalog-map-layout > #p0-quick-filters button {
        flex-basis: min(154px, 68vw);
    }
}

/* Give the offer metadata a plain-language hierarchy instead of a dense
   sentence such as “Class or similar · Bags: 2”. */
body.marketplace-experience .marketplace-offer-kind,
body.catalog-reference-upgrade .marketplace-offer-kind {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    margin: 8px 0 10px !important;
    color: var(--text-main);
}

body.marketplace-experience .marketplace-offer-kind__item,
body.catalog-reference-upgrade .marketplace-offer-kind__item {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 5px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-secondary);
    line-height: 1.25;
}

body.marketplace-experience .marketplace-offer-kind__item--wide,
body.catalog-reference-upgrade .marketplace-offer-kind__item--wide {
    flex: 1 1 100%;
}

body.marketplace-experience .marketplace-offer-kind__item b,
body.catalog-reference-upgrade .marketplace-offer-kind__item b {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .01em;
}

body.marketplace-experience .marketplace-offer-kind__item > span,
body.catalog-reference-upgrade .marketplace-offer-kind__item > span {
    min-width: 0;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
}

/* Match the image frame to the landscape source instead of stretching a
   narrow column to the height of the entire marketplace offer. */
@media (min-width: 1100px) {
    body.marketplace-experience #catalog-map-layout.has-side-map .offer-media,
    body.catalog-reference-upgrade #catalog-map-layout.has-side-map .offer-media {
        align-self: start !important;
        height: auto !important;
        min-height: 0 !important;
    }

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