/* Azja Motors design layer — CAR PAGE (views/car-detail.ejs, body.am-car).
   Ported 1:1 from design-system/concept/concept.css (CAR PAGE + responsive + review fixes), written for the real
   production markup. Plain unlayered rules (they beat the layered foundation/components without !important),
   every selector scoped to body.am-car so nothing leaks to other pages.
   Production hooks styled here: [data-gallery-*] gallery + lightbox ([hidden]), .aa-detail-thumb.is-active[aria-current],
   .aa-detail-thumbs-slider-wrap.is-single-row, [data-tech-compact-grid].is-expanded / .is-tech-extra and the
   pricing [data-*] spans (the import calculator partial is styled by the pages area). */

.am-car .am-car-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- title block ---------- */
.am-car .car-head { position: relative; padding-top: clamp(16px, 2vw, 28px); }
.am-car .car-crumbs { min-height: 44px; color: var(--muted); }
.am-car .car-crumbs svg { width: 14px; height: 14px; flex: none; color: var(--line-input); }
.am-car .car-crumbs a { min-height: 44px; min-width: 44px; justify-content: center; padding-inline: 4px; margin-inline: -4px; font-weight: 600; color: var(--ink); }
.am-car .car-crumbs a:hover { color: var(--cherry); }
.am-car .car-crumbs [aria-current] { color: var(--muted); }
.am-car .car-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-top: 14px; margin-bottom: var(--head-gap); }
.am-car .car-title > div:first-child { min-width: 0; flex: 1 1 320px; }
.am-car .car-title h1 { margin-top: 8px; overflow-wrap: anywhere; }
.am-car .car-title__version { margin-top: 6px; font-size: clamp(1.0625rem, 1rem + .4vw, 1.375rem); color: var(--body); overflow-wrap: anywhere; }
.am-car .car-title__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: .875rem; color: var(--muted); }
.am-car .car-title__id strong { font-weight: 500; color: var(--muted); }
.am-car .car-title__tools { display: flex; gap: 10px; }

/* ---------- layout: content column + sticky price panel ---------- */
/* markup order is photo, price panel, details (= the phone order); on desktop the panel takes the right column
   over both rows, so it stays sticky alongside the photo and all the details like the concept's aside */
.am-car .car-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 28vw, 420px); grid-template-rows: auto 1fr; column-gap: var(--gutter); row-gap: 0; align-items: start; }
.am-car .car-grid > .gallery { grid-column: 1; grid-row: 1; }
.am-car .car-grid > .buy { grid-column: 2; grid-row: 1 / span 2; }
.am-car .car-grid > .car-main { grid-column: 1; grid-row: 2; margin-top: clamp(48px, 5vw, 80px); }
.am-car .car-main > * + * { margin-top: clamp(48px, 5vw, 80px); }
.am-car .car-main > *, .am-car .car-grid > * { min-width: 0; }
.am-car .car-pricebar-start { height: 0; }

/* ---------- gallery (production single-photo stage, concept look) ---------- */
.am-car .gallery { position: relative; }
.am-car .gallery__stage { position: relative; aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: #0E0D0C; outline: none; touch-action: pan-y; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.am-car .gallery__stage:focus-visible { box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--ink); }
.am-car .gallery__frame { position: absolute; inset: 0; }
.am-car .gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; color: transparent; -webkit-user-drag: none; pointer-events: none; }
.am-car .gallery__stage.is-dragging { cursor: grabbing; }
.am-car .gallery__spinner { position: absolute; left: 50%; top: 50%; z-index: 1; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 3px solid rgb(255 255 255 / .22); border-top-color: var(--cherry-on-dark); animation: am-spin 900ms linear infinite;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 180ms var(--ease-out), visibility 0s linear 180ms; }
.am-car .gallery__stage.is-loading .gallery__spinner { opacity: 1; visibility: visible; transition: opacity 200ms var(--ease-out) 120ms, visibility 0s linear 120ms; }
.am-car .gallery__ui { position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; pointer-events: none; }
.am-car .gallery__ui > * { pointer-events: auto; }
.am-car .gallery__counter { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--pill); background: var(--glass-dark); color: #fff; font-weight: 600; font-size: .875rem; font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.am-car .gallery__sep { opacity: .72; font-weight: 500; margin: 0 4px; }
.am-car .gallery__zoom { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--pill); background: var(--glass-dark); color: #fff; font-weight: 600; font-size: .875rem; -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); transition: background-color var(--t-color), transform var(--t-fast); }
.am-car .gallery__zoom:hover { background: rgb(17 17 17 / .8); }
.am-car .gallery__zoom:active { transform: scale(.96); }
.am-car .gallery__zoom svg { width: 18px; height: 18px; }
.am-car .gallery__prev, .am-car .gallery__next { position: absolute; top: 50%; z-index: 2; margin-top: -24px; opacity: 0; transition: opacity var(--t-color) var(--ease-out), background-color var(--t-color), transform var(--t-fast); }
.am-car .gallery__prev { left: 16px; }
.am-car .gallery__next { right: 16px; }
.am-car .gallery:hover .gallery__prev, .am-car .gallery:hover .gallery__next, .am-car .gallery__prev:focus-visible, .am-car .gallery__next:focus-visible { opacity: 1; }
@media (hover: none) { .am-car .gallery__prev, .am-car .gallery__next { display: none; } }

/* thumbnails: the production strip (dHash de-duplication, strip arrows) in the concept look */
.am-car .thumbs-wrap { position: relative; margin-top: 12px; }
.am-car .thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; scroll-snap-type: x proximity; }
.am-car .thumbs::-webkit-scrollbar { display: none; }
.am-car .thumbs button { position: relative; flex: 0 0 104px; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; scroll-snap-align: start; background: var(--page-deep); opacity: .62; transition: opacity var(--t-color), transform var(--t-fast); }
.am-car .thumbs button:hover { opacity: 1; }
.am-car .thumbs button:active { transform: scale(.96); }
.am-car .thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--cherry); }
.am-car .thumbs img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.am-car .thumbs-wrap__nav { position: absolute; top: 50%; z-index: 2; margin-top: -22px; opacity: 0; transition: opacity var(--t-color) var(--ease-out), background-color var(--t-color), transform var(--t-fast); }
.am-car .thumbs-wrap__nav.is-prev { left: 6px; }
.am-car .thumbs-wrap__nav.is-next { right: 6px; }
.am-car .thumbs-wrap:hover .thumbs-wrap__nav, .am-car .thumbs-wrap__nav:focus-visible { opacity: 1; }
.am-car .thumbs-wrap__nav:disabled { visibility: hidden; }
@media (hover: none) { .am-car .thumbs-wrap__nav { display: none; } }

/* lightbox (production [data-gallery-lightbox], toggled with [hidden]) */
.am-car .lightbox { position: fixed; inset: 0; z-index: var(--z-lightbox); display: flex; flex-direction: column; background: #0B0B0B; color: #fff; }
.am-car .lightbox__backdrop { position: absolute; inset: 0; background: transparent; cursor: default; }
.am-car .lightbox__inner { position: relative; display: flex; flex-direction: column; height: 100%; will-change: transform; }
.am-car .lightbox:not([hidden]) .lightbox__inner { animation: amc-lightbox-in 320ms cubic-bezier(.2, .8, .2, 1); }
@keyframes amc-lightbox-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.am-car .lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--margin); }
.am-car .lightbox__title { min-width: 0; flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-car .lightbox__count { margin-left: 10px; color: var(--on-dark-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.am-car .lightbox__count .gallery__sep { opacity: 1; }
.am-car .lightbox__tools { display: flex; align-items: center; gap: 8px; }
.am-car .lightbox__zoom { min-width: 52px; text-align: center; font-size: .875rem; font-weight: 600; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.am-car .lightbox__reset { min-height: 44px; padding: 0 16px; border-radius: var(--pill); background: rgb(255 255 255 / .12); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); color: #fff; font-size: .875rem; font-weight: 600; transition: background-color var(--t-color), color var(--t-color); }
.am-car .lightbox__reset:hover { background: #fff; color: var(--ink); }
.am-car .lightbox__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
.am-car .lightbox__img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: calc(100% - 2 * var(--margin)); max-height: calc(100% - 12px); border-radius: 6px; object-fit: contain; color: transparent; transform-origin: center; transition: transform 160ms var(--ease-out); -webkit-user-drag: none; user-select: none; }
.am-car .lightbox__nav { position: absolute; top: 50%; z-index: 1; margin-top: -24px; }
.am-car .lightbox__nav--prev { left: 16px; }
.am-car .lightbox__nav--next { right: 16px; }
.am-car .lightbox__bottom { display: flex; justify-content: center; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); }
.am-car .lightbox__thumbs { margin: 0; max-width: 100%; }
.am-car .lightbox__thumbs button { flex-basis: 84px; }
.am-car .lightbox__thumbs button[aria-current="true"] { box-shadow: 0 0 0 2px #0B0B0B, 0 0 0 4px #fff; }

/* ---------- key facts (production priority rows) + why this offer ---------- */
.am-car .keyfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-radius: var(--r); overflow: hidden; }
.am-car .keyfacts div { padding: 24px 28px 26px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.am-car .keyfacts div:nth-child(-n+3) { border-top: 0; }
.am-car .keyfacts div:nth-child(3n+1) { border-left: 0; }
.am-car .keyfacts dt { font-size: .875rem; color: var(--muted); letter-spacing: .01em; }
/* long values: sized so the longest real word ("Автоматическая", 7.15 em) fits one cell at 768–1440 px */
.am-car .keyfacts dd.is-long { font-size: clamp(1.25rem, .97rem + .85vw, 1.75rem); }
.am-car .keyfacts dd { margin-top: 6px; font-family: var(--serif); font-stretch: 75%; font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.25rem); line-height: 1.12; color: var(--ink); letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: auto; }
.am-car .keyfacts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am-car .keyfacts--one { grid-template-columns: minmax(0, 1fr); }
.am-car .keyfacts--two div:nth-child(3) { border-top: 1px solid var(--line); }
.am-car .keyfacts--two div:nth-child(3n+1) { border-left: 1px solid var(--line); }
.am-car .keyfacts--two div:nth-child(2n+1) { border-left: 0; }
/* narrow desktop column (1100–~1300 px): three cells of 136–180 px cannot hold real values ("17 700 km", "Механічна",
   "Автоматическая") at the display size, so there the facts use two columns, like on phones */
.am-car .car-facts { container: car-facts / inline-size; }
@media (min-width: 1100px) {
  @container car-facts (max-width: 720px) {
    .am-car .keyfacts:not(.keyfacts--one) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .am-car .keyfacts div:nth-child(-n+3) { border-top: 1px solid var(--line); }
    .am-car .keyfacts div:nth-child(-n+2) { border-top: 0; }
    .am-car .keyfacts div:nth-child(3n+1) { border-left: 1px solid var(--line); }
    .am-car .keyfacts div:nth-child(2n+1) { border-left: 0; }
  }
}
.am-car .why-offer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 24px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.am-car .why-offer li { display: grid; grid-template-columns: 40px 1fr; gap: 4px 16px; padding: 22px 24px; background: var(--surface); }
.am-car .why-offer svg { grid-row: span 2; width: 28px; height: 28px; margin-top: 2px; color: var(--cherry); }
.am-car .why-offer h3 { font-size: 1rem; font-weight: 700; }
.am-car .why-offer p { font-size: .9375rem; line-height: 1.55; color: var(--muted); }

/* ---------- technical data: tabs per production category ---------- */
.am-car .tile--spec { padding-top: 8px; }
.am-car .tile--spec .tabs { margin-inline: -8px; border-bottom-color: var(--line); }
.am-car .spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.am-car .spec div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.am-car .spec dt { color: var(--muted); }
.am-car .spec dd { font-weight: 600; color: var(--ink); text-align: right; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.am-car .tile--spec .spec div:nth-last-child(-n+2) { border-bottom: 0; }
.am-car [data-tech-compact-grid]:not(.is-expanded) [role="tab"].is-tech-extra { display: none; }
.am-car .car-specs__more { margin-top: 16px; }
.am-car .car-specs .tabs.is-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.am-car .car-specs .tabs.is-more-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px); mask-image: linear-gradient(to right, transparent, #000 56px); }
.am-car .car-specs .tabs.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); }

/* ---------- equipment ---------- */
.am-car .car-equip__sub { margin-top: 8px; font-size: 1rem; font-weight: 400; line-height: 1.625; color: var(--muted); }
.am-car .equip-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.am-car .equip-highlights li { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--surface); font-weight: 600; color: var(--ink); line-height: 1.35; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.am-car .equip-highlights svg { width: 26px; height: 26px; flex: none; color: var(--cherry); }
.am-car .equip-highlights span { min-width: 0; }
.am-car .equip-groups.tile { margin-top: 0; }
.am-car .equip-groups .acc > summary { color: var(--ink); }
.am-car .equip-groups .acc > summary:hover { color: var(--cherry); }
.am-car .acc__title { font: inherit; color: inherit; }
.am-car .equip-groups > .acc:last-of-type { border-bottom: 0; }
.am-car .equip-list { columns: 2; column-gap: var(--gutter); }
.am-car .equip-list li { break-inside: avoid; display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; color: var(--body); font-size: .9375rem; line-height: 1.5; }
.am-car .equip-list li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ok); }
.am-car .equip-list mark { background: var(--cherry-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.am-car .equip-empty { padding: 20px 0; color: var(--muted); }

/* ---------- financing card ---------- */
.am-car .fin-sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.am-car .fin-sum__main { display: flex; flex-direction: column; padding: clamp(22px, 2.6vw, 32px); background: var(--dark); color: var(--on-dark); }
.am-car .fin-sum__main .t-label { color: var(--on-dark-muted); }
.am-car .fin-sum__rate { margin-top: 4px; font-size: clamp(2.25rem, 1.9rem + 1.4vw, 3rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.am-car .fin-sum__rate strong { font-weight: inherit; }
.am-car [data-unit]::after { content: "\00a0" attr(data-unit); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.am-car .fin-sum__rate[data-unit]::after { color: var(--on-dark-muted); }
.am-car .fin-sum__params { margin-top: 10px; font-size: .9375rem; color: var(--on-dark-muted); }
.am-car .fin-sum__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 24px; }
.am-car .fin-sum__actions .btn--dark { --bg: #fff; --bg-h: #F4F1EC; --bg-p: #E5E0D8; --fg: var(--ink); }
.am-car .fin-sum__actions svg { width: 18px; height: 18px; }
.am-car .fin-lines { align-self: center; padding: clamp(14px, 2vw, 22px) clamp(22px, 2.6vw, 32px); }
.am-car .fin-lines div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.am-car .fin-lines div:first-child { border-top: 0; }
.am-car .fin-lines dt { color: var(--muted); }
.am-car .fin-lines dd { font-weight: 600; color: var(--ink); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.am-car .fin-lines dd.strike { color: var(--muted); font-weight: 500; }

/* ---------- sticky price panel ---------- */
/* The card sticks 16 px under the header like the concept. The panel is also a scroll box no taller than the window:
   on laptop screens (and with long ru/uk/de labels) it is taller than the room under the header, so the price and the
   CTAs stay on top and the facts and the last link stay reachable by wheel, touchpad and keyboard focus. The padding /
   negative margin pair keeps the card's float shadow inside the box (card position and size unchanged); no
   scrollbar gutter, so the card keeps the concept width on every OS. */
.am-car .buy { position: sticky; top: calc(var(--header-h) + 2px); max-height: calc(100vh - var(--header-h) - 2px); overflow-y: auto; scrollbar-width: none; padding: 14px 30px 46px; margin: -14px -30px -46px; transition: top var(--t-panel) var(--ease-settle); }
.am-car .buy::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { html.header-hidden .am-car .buy { top: 2px; max-height: calc(100vh - 2px); } }
.am-car .buy__card { padding: 26px 26px 22px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-float); overflow-wrap: anywhere; }
.am-car .buy__label { font-size: .875rem; color: var(--muted); }
.am-car .buy__price { margin-top: 2px; font-size: clamp(2.25rem, 1.9rem + 1vw, 2.75rem); line-height: 1.08; }
.am-car .buy__list { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.am-car .buy__rate { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.am-car .buy__rate > div { min-width: 0; }
.am-car .buy__rate-link { min-height: 44px; font-size: .9375rem; white-space: nowrap; }
.am-car .buy__rate-value { font-size: 1.5rem; }
.am-car .buy__rate-value strong { font-weight: inherit; }
.am-car .buy__rate-value[data-unit]::after { font-size: .9375rem; }
.am-car .buy__ctas { display: grid; gap: 10px; margin-top: 22px; }
.am-car .buy__ctas svg, .am-car .pricebar .btn svg { width: 18px; height: 18px; }
.am-car .buy__phone { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; margin-top: 6px; border-radius: var(--pill); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.am-car .buy__phone:hover { color: var(--cherry); }
.am-car .buy__phone svg { width: 20px; height: 20px; }
.am-car .buy__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.am-car .buy__facts .wide { grid-column: 1 / -1; }
.am-car .buy__facts dt { font-size: .8125rem; letter-spacing: .02em; color: var(--muted); }
.am-car .buy__facts dd { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.am-car .buy__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.am-car .buy__tags .chip { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.am-car .buy__more { margin-top: 14px; padding: 20px 22px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .9375rem; color: var(--body); }
.am-car .buy__more strong { display: block; color: var(--ink); }
.am-car .buy__more .link { min-height: 44px; margin-top: 6px; }

/* ---------- contextual price bar (desktop) and bottom bar (tablet / phone) ---------- */
/* it sits under the header through `translate` (compositor-only) instead of animating `top`, so following the
   header in and out never counts as layout shift */
.am-car .pricebar { position: fixed; left: 0; right: 0; top: 0; translate: 0 var(--header-h); z-index: var(--z-pricebar); transform: translateY(calc(-100% - var(--header-h))); transition: transform var(--t-panel) var(--ease-settle), translate var(--t-panel) var(--ease-settle); }
.am-car .pricebar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--glass); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: 0 1px 0 var(--hair), 0 8px 24px -14px rgb(26 25 23 / .3); }
.am-car .pricebar.is-on { transform: none; }
/* WCAG 1.4.3: the bar keeps the concept's --glass (.74, the same material as the header above it), so its muted
   lines (version line, "Cena dla Ciebie netto", "Twoja rata netto") take the darker muted (#45413B, the
   prefers-contrast value, as the listing toolbar does): >= 4.85:1 over the black booking tile (#111) and >= 4.6:1
   even over pure black under the .74 glass (#5E5952 fell to 3.32:1 over the booking tile). */
.am-car .pricebar { --muted: #45413B; }
html.header-hidden .am-car .pricebar { translate: none; }
.am-car .pricebar__inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.am-car .pricebar img { width: 72px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; background: var(--page-deep); color: transparent; }
.am-car .pricebar__name { min-width: 0; flex: 1; font-weight: 700; color: var(--ink); line-height: 1.3; }
.am-car .pricebar__name span { display: block; font-weight: 400; font-size: .875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-car .pricebar__price { text-align: right; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.am-car .pricebar__price small { display: block; font-size: .8125rem; color: var(--muted); }
.am-car .pricebar__price .price { font-size: 1.25rem; }
.am-car .pricebar__price b { color: var(--ink); }
.am-car .pricebar .btn { min-height: 48px; }
.am-car .buybar { display: none; }

/* ---------- inquiry dialog (production contact fields, posts to /kontakt) ---------- */
.am-car .car-inquiry .modal__car { align-items: flex-start; }
.am-car .car-inquiry .modal__car img { background: var(--page-deep); color: transparent; }
.am-car .car-inquiry .modal__car > div { min-width: 0; }
.am-car .car-inquiry .modal__car > div > span { display: block; }
.am-car .car-inquiry .modal__car b span { font-size: inherit; color: inherit; }
.am-car .car-inquiry__meta span + span::before { content: " · "; }
.am-car .car-inquiry .modal__head h2 { font-size: 1.75rem; }
.am-car .car-inquiry__lead { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.am-car .car-inquiry .form-actions { grid-column: 1 / -1; }
.am-car .car-inquiry .consent { grid-column: 1 / -1; }

/* ---------- import costs: views/partials/import-calculator.ejs (variant "block") is styled by the pages area (50-pages.css);
   on the car page it sits in the content column like the concept block, nothing to add here ---------- */

/* ---------- related cars: the concept rail (shared .rail / .card components) ---------- */
.am-car .car-related .card { height: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1099px) {
  .am-car .car-grid { display: flex; flex-direction: column; align-items: stretch; gap: clamp(40px, 6vw, 64px); }
  .am-car .car-main { display: contents; }
  .am-car .car-main > * + * { margin-top: 0; }
  .am-car .buy { position: static; max-height: none; overflow: visible; padding: 0; margin: 0; }
  .am-car .buy__card { box-shadow: none; }
  .am-car .pricebar { display: none; }
  .am-car .buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bottombar); display: flex; align-items: center; gap: 14px; padding: 12px var(--margin) calc(12px + env(safe-area-inset-bottom)); transition: transform var(--t-panel) var(--ease-settle), opacity 200ms var(--ease-out); }
  .am-car .buybar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: 0 -1px 0 var(--hair), 0 -10px 24px -16px rgb(26 25 23 / .35); }
  .am-car .buybar.is-tucked { transform: translateY(110%); }
  .am-car .buybar__price { flex: 1; min-width: 0; line-height: 1.2; }
  .am-car .buybar__price .price { display: block; font-size: 1.25rem; }
  .am-car .buybar__price .price { white-space: nowrap; }
  .am-car .buybar__price small { display: block; font-size: .8125rem; color: var(--muted); }
  .am-car .buybar .btn { min-height: 52px; padding: 0 22px; }
  /* long labels (ru/uk/de) wrap inside the pill instead of covering the price */
  .am-car .buybar .btn { flex: 0 1 auto; max-width: 58%; white-space: normal; text-wrap: balance; line-height: 1.2; text-align: center; }
  body.am-car.has-bottom-bar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.am-car.has-bottom-bar :is(.toast, .flash-toast-wrap) { bottom: calc(108px + env(safe-area-inset-bottom)); }
}
@media (max-width: 1099px) and (prefers-reduced-motion: reduce) {
  .am-car .buybar.is-tucked { transform: none; opacity: 0; pointer-events: none; }
}
@media (max-width: 767px) {
  .am-car .car-title__tools { position: absolute; right: var(--margin); top: clamp(16px, 2vw, 28px); }
  .am-car .car-title__tools .icon-btn { width: 44px; height: 44px; }
  .am-car .car-crumbs { padding-right: 108px; }
  .am-car .keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-car .keyfacts div { padding: 18px 18px 20px; }
  .am-car .keyfacts div:nth-child(-n+3) { border-top: 1px solid var(--line); }
  .am-car .keyfacts div:nth-child(-n+2) { border-top: 0; }
  .am-car .keyfacts div:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .am-car .keyfacts div:nth-child(2n+1) { border-left: 0; }
  .am-car .keyfacts dd { font-size: 1.625rem; }
  .am-car .keyfacts dd.is-long { font-size: 1.125rem; }
  .am-car .keyfacts--one { grid-template-columns: minmax(0, 1fr); }
  .am-car .why-offer { grid-template-columns: minmax(0, 1fr); }
  .am-car .spec { grid-template-columns: minmax(0, 1fr); }
  .am-car .tile--spec .spec div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .am-car .equip-highlights { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .am-car .equip-highlights li { padding: 14px; gap: 10px; font-size: .875rem; }
  .am-car .equip-highlights li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .am-car .equip-list { columns: 1; }
  .am-car .gallery { margin-inline: calc(-1 * var(--margin)); }
  .am-car .gallery__stage { border-radius: 0; }
  .am-car .thumbs { padding-inline: var(--margin); scroll-padding-inline: var(--margin); }
  .am-car .buy__card { padding: 22px; }
  .am-car .fin-sum { grid-template-columns: minmax(0, 1fr); }
  .am-car .fin-sum__actions .btn { flex: 1 1 100%; }
  .am-car .lightbox__nav { display: none; }
  .am-car .lightbox__tools .lightbox__zoom, .am-car .lightbox__reset { display: none; }
}

/* ---------- preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .am-car .lightbox:not([hidden]) .lightbox__inner { animation: none; }
  .am-car .gallery__spinner { animation: none; border-top-color: var(--cherry-on-dark); }
  .am-car .pricebar { transform: none; opacity: 0; pointer-events: none; transition: opacity 120ms linear; }
  .am-car .pricebar.is-on { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-transparency: reduce) {
  .am-car .pricebar::before, .am-car .buybar::before, .am-car .gallery__counter, .am-car .gallery__zoom { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .am-car .gallery__counter, .am-car .gallery__zoom { background: #1C1C1C; }
}
@media (prefers-contrast: more) {
  .am-car :is(.fin-sum, .buy__card, .keyfacts, .tile) { box-shadow: inset 0 0 0 1px #5E5952; }
}

/* ---------- shared-part fixes scoped to the car page ---------- */
/* the concept's disabled photo arrow stays faintly visible (the unlayered .gallery__prev opacity would hide it) */
.am-car .gallery__prev[disabled], .am-car .gallery__next[disabled] { opacity: .35; }
/* import costs head: the loading spinner must not take width from the title (one line at 390 like the concept) */
.am-car .import-calc__head { position: relative; }
.am-car .import-calc__loading { position: absolute; top: -10px; right: 0; }
