/* Homepage scope keeps the existing dealer sliders and CRM unchanged. */
@font-face { font-family: 'Cardealers Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/InterVariable.woff2') format('woff2'); }
.marketplace-body:has(.cd-home) { min-width: 0; font-family: 'Cardealers Inter', Inter, ui-sans-serif, system-ui, sans-serif; }
.marketplace-body:has(.cd-home) .marketplace-header__inner { width: calc(100% - 112px); gap: 110px; }
.marketplace-body:has(.cd-home) .marketplace-brand { font-size: 26px; font-weight: 800; }
.marketplace-body:has(.cd-home) .marketplace-brand strong { font-size: 18px; }
.cd-home { color: var(--ink); background: #fff; }
.cd-home .marketplace-shell { width: calc(100% - 112px); max-width: 1440px; }
.cd-home .marketplace-shell, .cd-home-search, .cd-home-search__form, .cd-home-search__form > * { min-width: 0; }
.cd-home svg { flex-shrink: 0; width: 20px; height: 20px; }
.cd-home__intro { position: relative; padding: 20px 0 12px; }
.cd-home__intro h1 { margin: 0; font-size: 54px; font-weight: 800; line-height: 1.1; letter-spacing: 0; }
.cd-home__intro h1 span { color: var(--royal); }
.cd-home__ownership { margin: 6px 0 0; font-size: 40px; font-weight: 750; line-height: 1.2; }
.cd-home__motto { position: absolute; right: 0; top: 30px; color: var(--royal); font-size: 14px; font-weight: 600; }
.cd-home__text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--royal); font-size: 14px; font-weight: 550; }
.cd-home__text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.cd-home-search__header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.cd-home-search__tabs { display: flex; align-self: stretch; }
.cd-home-search__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 24px; border: 0; border-bottom: 2px solid transparent; background: #f5f6f8; color: #5f6977; font-size: 14px; }
.cd-home-search__tabs button.is-active { color: var(--royal); border-bottom-color: var(--royal); background: white; font-weight: 650; }
.cd-home-search__tabs button:hover { background: var(--royal-soft); }
.cd-home-search__form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(240px,.85fr); gap: 12px; margin-top: 12px; }
.cd-home-search__form > label { min-width: 0; display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 4px; padding: 7px 12px 3px; font-weight: 400; background: white; }
.cd-home-search__form > label:focus-within { border-color: var(--royal); }
.cd-home-search__form > label > span { font-size: 12px; line-height: 16px; color: #5f6977; }
.cd-home .cd-home-search__form > label > span { margin-bottom: 0; }
.marketplace-body .cd-home-search__form select { width: 100%; min-height: 28px; height: 28px; padding: 0 24px 0 0; border: 0; border-radius: 0; box-shadow: none; color: var(--ink); background-color: transparent; font-size: 14px; }
.cd-home-search__form select:disabled { color: #68717f; opacity: 1; }
.cd-home__submit { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 56px; padding: 8px 14px; background: var(--royal); color: white; border: 1px solid var(--royal); border-radius: 4px; font-size: 14px; font-weight: 650; }
.cd-home__submit:hover { background: var(--royal-dark); }
.cd-home__submit:disabled { opacity: .7; cursor: progress; }
.cd-home__submit small { display: block; margin-top: 2px; font-size: 11px; font-weight: 450; line-height: 14px; }
.cd-home-search__presets { grid-column: 1 / -1; display: flex; align-items: stretch; gap: 8px; background: #f5f6f8; border-radius: 4px; overflow-x: auto; scrollbar-width: none; }
.cd-home-search__presets::-webkit-scrollbar { display: none; }
.cd-home-search__presets a { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; min-width: 140px; padding: 10px 20px; color: #5f6977; border-bottom: 2px solid transparent; font-size: 14px; }
.cd-home-search__presets a.is-active { color: var(--royal); border-bottom-color: var(--royal); }
.cd-home-search__presets a:hover { background: #edf3ff; color: var(--royal); }
.cd-home-search__form--budget { margin-bottom: 14px; }
.cd-showroom { padding: 24px 0 12px; }
.cd-home__section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.cd-home__section-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 750; }
.cd-showroom__actions, .cd-showroom__controls { display: flex; align-items: center; gap: 12px; }
.cd-showroom__actions { gap: 28px; }
.cd-showroom__controls button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 4px; color: var(--royal); background: #fff; }
.cd-showroom__controls button:hover { border-color: var(--royal); background: var(--royal-soft); }
.cd-showroom__controls button:disabled { color: #8993a2; cursor: default; background: #fff; }
.cd-showroom__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 0 4px; }
.cd-showroom__track::-webkit-scrollbar { display: none; }
.cd-showroom-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; scroll-snap-align: start; background: white; }
.cd-showroom-card:focus-within { border-color: var(--royal); }
.cd-showroom-card__media { position: relative; aspect-ratio: 16 / 9; background: #f3f4f6; }
.cd-showroom-card__media > a, .cd-showroom-card__media picture { display: block; width: 100%; height: 100%; }
.cd-showroom-card__media > a { position: absolute; inset: 0; }
.cd-showroom-card__media img { width: 100%; height: 100%; object-fit: contain; }
.cd-showroom-card__media .marketplace-favorite { top: 12px; right: 12px; width: 40px; height: 40px; background: #fff; color: #171a20; border: 1px solid var(--line); box-shadow: 0 1px 4px #00000012; }
.cd-showroom-card__media .marketplace-favorite.is-active { color: var(--royal); background: var(--royal-soft); }
.cd-showroom-card__media .marketplace-favorite.is-active svg { fill: var(--royal); }
.cd-showroom-card__body { padding: 12px 14px; }
.cd-showroom-card__body h3 { min-height: 24px; margin: 0 0 3px; font-size: 20px; font-weight: 700; line-height: 24px; }
.cd-showroom-card__body h3 a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cd-showroom-card__body h3 a:hover { color: var(--royal); }
.cd-showroom-card__specs { min-height: 18px; margin: 0; color: #5f6977; font-size: 13px; line-height: 18px; }
.cd-showroom-card__prices { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; margin-top: 5px; }
.cd-showroom-card__prices > strong { font-size: 24px; line-height: 1.2; font-weight: 750; }
.cd-showroom-card__prices a { display: flex; flex-direction: column; color: var(--royal); }
.cd-showroom-card__prices a small { display: block; margin-bottom: 2px; color: #68717f; font-size: 11px; line-height: 12px; }
.cd-showroom-card__prices a strong { font-size: 18px; line-height: 22px; font-weight: 700; white-space: nowrap; }
.cd-showroom-card__prices a strong span { font-size: 14px; font-weight: 450; }
.cd-showroom-card__footer { margin-top: auto; padding: 11px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.cd-showroom-card__dealer { display: flex; align-items: center; min-width: 0; gap: 10px; flex: 1 1 180px; }
.cd-showroom-card__dealer > img { width: 54px; height: 38px; object-fit: contain; border-radius: 2px; }
.cd-showroom-card__dealer > span { min-width: 0; }
.cd-showroom-card__dealer strong { display: block; color: var(--ink); font-size: 12px; line-height: 17px; overflow-wrap: anywhere; }
.cd-showroom-card__dealer small { display: block; margin-top: 2px; color: #68717f; font-size: 11px; }
.cd-showroom-card__detail { display: flex; align-items: center; min-height: 32px; gap: 6px; color: var(--royal); font-size: 12px; }
.cd-showroom-card__detail svg { width: 16px; height: 16px; }
.cd-showroom__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.cd-home__note { margin: 0; color: #68717f; font-size: 11px; line-height: 1.5; }
.cd-showroom__playback { display: flex; align-items: center; gap: 8px; color: #68717f; font-size: 11px; }
.cd-showroom__playback button { width: 32px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--royal); }
.cd-showroom__playback svg { width: 14px; height: 14px; }
.cd-showroom__playback [hidden] { display: none; }
.cd-showroom__empty { grid-column: 1 / 4; padding: 48px 0; text-align: center; }
.cd-showroom__empty > svg { margin: 0 auto 12px; width: 32px; height: 32px; color: #68717f; }
.cd-home-dealers { padding: 32px 0; background: #f5f6f8; }
.cd-home #haendler { display: block; }
.cd-home-dealers .cd-home__section-heading { margin-bottom: 12px; }
.cd-home-dealers .cd-home__section-heading p { margin-top: 4px; font-size: 13px; line-height: 18px; }
.cd-home-dealers .cd-home__section-heading h2 { font-size: 30px; }
.cd-home__section-heading p { margin: 6px 0 0; color: #5f6977; font-size: 14px; }
.cd-home-dealers__grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 14px; }
.cd-home .cd-home-dealers .marketplace-dealer-card { display: flex; flex-direction: column; border: 0; background: transparent; border-radius: 0; box-shadow: none; }
.cd-home .cd-home-dealers .marketplace-dealer-card__offer-image { aspect-ratio: 2.8 / 1; border-radius: 4px; overflow: hidden; }
.cd-home .cd-home-dealers .marketplace-dealer-card__offer-image img { object-fit: contain; }
.cd-home .cd-home-dealers .marketplace-dealer-card__logo,
.cd-home .cd-home-dealers .marketplace-dealer-card__copy > small,
.cd-home .cd-home-dealers .marketplace-dealer-card__stock,
.cd-home .cd-home-dealers .marketplace-dealer-card__offer { display: none; }
.cd-home .cd-home-dealers .marketplace-dealer-card__body { padding: 7px 0 0; }
.cd-home .cd-home-dealers .marketplace-dealer-card__name strong { min-height: 0; display: block; font-size: 11px; line-height: 16px; font-weight: 650; }
.cd-home .cd-home-dealers .marketplace-dealer-card__name:hover { text-decoration: underline; }
.cd-home-worlds { padding-block: 32px 40px; }
.cd-home-worlds__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.cd-home-worlds__grid[data-world-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cd-home-worlds__grid[data-world-count="1"] { grid-template-columns: minmax(0,1fr); max-width: 640px; }
.cd-home-world { min-width: 0; color: var(--ink); }
.cd-home-world__media { display: block; overflow: hidden; border-radius: 5px; aspect-ratio: 16 / 10; background: #f5f6f8; }
.cd-home-world__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.cd-home-world h3 { margin: 14px 0 5px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.cd-home-world__link { display: flex; align-items: center; gap: 10px; min-height: 32px; color: var(--royal); font-size: 14px; }
.cd-home-world:hover .cd-home-world__media img { transform: scale(1.025); }
.cd-home-world:hover .cd-home-world__link { text-decoration: underline; text-underline-offset: 4px; }
.cd-home-garage-stories { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-block: 20px 24px; }
.cd-home-garage-story { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; }
.cd-home-garage-story__media { display: block; position: relative; aspect-ratio: 16 / 7; background: #edf0f3; }
.cd-home-garage-story__media picture { display: block; position: absolute; inset: 0; }
.cd-home-garage-story__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cd-home-garage-story__body { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 16px; }
.cd-home-garage-story__body > span { min-width: 0; }
.cd-home-garage-story__body strong { display: block; font-size: 17px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.cd-home-garage-story__body small { display: block; margin-top: 4px; color: #68717f; font-size: 13px; }
.cd-home-garage-story__link { display: inline-flex; align-items: center; gap: 8px; color: var(--royal); font-size: 13px; min-height: 32px; }
.cd-home-garage-story:hover { border-color: var(--royal); }
.cd-home-garage-story:hover .cd-home-garage-story__link { text-decoration: underline; text-underline-offset: 4px; }
.cd-home-partners { padding-block: 36px; }
.cd-home-partners .cd-home__section-heading h2 { font-size: 24px; }
.cd-home-partners__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.cd-home-partner { display: flex; flex-direction: column; min-width: 0; min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: 5px; color: #5f6977; background: #fff; transition: border-color 160ms ease, background-color 160ms ease; }
.cd-home-partner__logo { display: flex; align-items: center; justify-content: center; height: 58px; margin-bottom: 16px; }
.cd-home-partner__logo img { display: block; max-width: 190px; max-height: 52px; width: auto; height: auto; object-fit: contain; }
.cd-home-partner[data-home-partner="Pirelli"] img { width: 144px; }
.cd-home-partner__category { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13px; }
.cd-home-partner__category svg { width: 17px; height: 17px; color: #68717f; }
.cd-home-partner:hover { border-color: var(--royal); background: #f9fbff; }
.cd-home-partner:hover .cd-home-partner__category svg { color: var(--royal); }
.cd-home-world:focus-visible, .cd-home-garage-story:focus-visible, .cd-home-partner:focus-visible { outline: 3px solid var(--royal); outline-offset: 4px; }
.cd-home-trade { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px 36px; border-top: 1px solid var(--line); }
.cd-home-trade > div { min-width: 0; }
.cd-home-trade h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; line-height: 1.3; }
.cd-home-trade p { margin: 0; max-width: 65ch; color: #68717f; font-size: 14px; line-height: 1.6; }
.cd-home-trade > a { flex-shrink: 0; }
.cd-home-browse { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-block: 36px; }
.cd-home-browse h2 { font-size: 18px; font-weight: 650; margin-bottom: 12px; }
.cd-home-browse nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.cd-home-browse a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: #5f6977; font-size: 13px; }
.cd-home-browse a:hover { color: var(--royal); }
.cd-home-browse a svg { width: 14px; height: 14px; }
@media (max-width: 1100px) {
    .marketplace-body:has(.cd-home) .marketplace-header__inner { width: calc(100% - 48px); gap: 32px; }
    .marketplace-body:has(.cd-home) .marketplace-brand { font-size: 20px; }
    .marketplace-body:has(.cd-home) .marketplace-brand strong { font-size: 13px; }
    .cd-home .marketplace-shell { width: calc(100% - 48px); }
    .cd-home__intro h1 { font-size: 44px; }
    .cd-home__ownership { font-size: 28px; }
    .cd-home__motto { display: none; }
    .cd-showroom__track { grid-auto-columns: calc((100% - 16px) / 2); }
    .cd-home-search__form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cd-home__section-heading h2 { font-size: 26px; }
    .cd-home-dealers__grid { gap: 10px; }
    .cd-home-dealers .cd-home__section-heading h2 { font-size: 26px; }
    .cd-home-worlds__grid, .cd-home-garage-stories { gap: 16px; }
    .cd-home-world h3 { font-size: 19px; }
    .cd-home-partners__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cd-home-partner__logo img { max-width: min(190px,100%); }
}
@media (max-width: 640px) {
    .marketplace-body:has(.cd-home) .marketplace-header__inner { width: calc(100% - 32px); gap: 12px; }
    .cd-home .marketplace-shell { width: calc(100% - 32px); }
    .cd-home__intro { padding: 24px 0 20px; }
    .cd-home__intro h1 { font-size: 32px; }
    .cd-home__ownership { font-size: 24px; margin-top: 8px; }
    .cd-home-search__header { flex-wrap: wrap; gap: 0; }
    .cd-home-search__tabs { flex: 1 1 100%; }
    .cd-home-search__tabs button { flex: 1; padding-inline: 12px; }
    .cd-home-search__header > a { margin-left: auto; font-size: 12px; min-height: 38px; }
    .cd-home-search__header > a svg { width: 16px; height: 16px; }
    .cd-home-search__form { gap: 10px; }
    .marketplace-body .cd-home-search__form select { font-size: 16px; }
    .cd-home__submit { font-size: 12px; padding-inline: 8px; gap: 6px; }
    .cd-home__submit > svg { width: 18px; height: 18px; }
    .cd-home-search__presets { gap: 0; }
    .cd-home-search__presets a { min-width: 100px; padding: 10px 12px; gap: 8px; font-size: 12px; }
    .cd-showroom { padding-top: 26px; }
    .cd-home__section-heading { flex-wrap: wrap; gap: 8px; }
    .cd-home__section-heading h2 { font-size: 24px; }
    .cd-showroom__actions { width: 100%; justify-content: space-between; }
    .cd-showroom__actions > a { font-size: 13px; }
    .cd-showroom__track { grid-auto-columns: 100%; gap: 12px; }
    .cd-showroom-card__prices > strong { font-size: 24px; }
    .cd-showroom-card__prices a strong { font-size: 18px; }
    .cd-showroom-card__footer { gap: 6px; }
    .cd-home-dealers__grid { display: none; }
    .cd-home-worlds { padding-block: 28px 32px; }
    .cd-home-worlds__grid, .cd-home-worlds__grid[data-world-count], .cd-home-garage-stories { grid-template-columns: minmax(0,1fr); gap: 24px; }
    .cd-home-world h3 { margin-top: 12px; font-size: 21px; }
    .cd-home-dealers { padding-block: 28px; }
    .cd-home-dealers .cd-home__section-heading h2 { font-size: 24px; }
    .cd-home-garage-stories { margin-bottom: 0; gap: 16px; }
    .cd-home-garage-story__media { aspect-ratio: 16 / 9; }
    .cd-home-partners { padding-block: 28px; }
    .cd-home-partners__grid { gap: 12px; }
    .cd-home-partner { padding: 14px 12px; min-height: 138px; }
    .cd-home-partner__logo img { max-width: 100%; max-height: 48px; }
    .cd-home-partner__category { font-size: 12px; }
    .cd-home-trade { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 24px 28px; }
    .cd-home-trade h2 { font-size: 24px; }
    .cd-home-trade > a { max-width: 100%; font-size: 13px; }
    .cd-home-browse { grid-template-columns: 1fr; gap: 24px; padding-block: 24px; }
}
@media (prefers-reduced-motion: reduce) { .cd-showroom__track { scroll-behavior: auto; } .cd-home-world__media img, .cd-home-partner { transition: none; } .cd-home-world:hover .cd-home-world__media img { transform: none; } }
@media (max-width: 767.98px) { .cd-home-dealers__grid { display: none; } }
@media (max-width: 360px) {
    .cd-home-search__form { grid-template-columns: minmax(0,1fr); }
    .cd-home__submit { font-size: 14px; }
}
