/* 10X Cars — portal. Wyglad oddzielony od logiki: kolory i odstepy w zmiennych ponizej.
   Mobile-first: baza = telefon (390), potem 768 i 1100. Ruch tylko transform/opacity,
   prefers-reduced-motion honorowany (MOTION.md). */
:root {
  --ink: #0b1b33;
  --ink-2: #33415c;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --accent: #1d5cff;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --good: #0f7a4f;
  --warn: #b42318;
  --radius: 14px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(11, 27, 51, .06), 0 4px 16px rgba(11, 27, 51, .06);
  --dur-fast: 140ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1440px;
  --gutter: 16px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-s); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }

/* Header */
.hdr { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hdr-in { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "logo region" "search search" "nav nav"; align-items: center; gap: 8px 12px; padding-top: 10px; padding-bottom: 0; }
.logo { grid-area: logo; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.logo-mark { background: var(--ink); color: #fff; border-radius: 8px; padding: 2px 7px; font-size: 16px; letter-spacing: .02em; }
.logo-inv { color: #fff; }
.logo-inv .logo-mark { background: var(--accent); }
.nav { grid-area: nav; display: flex; gap: 4px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 10px 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.region { grid-area: region; justify-self: end; display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.region-opt { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.region-opt.is-on { background: var(--ink); color: #fff; }
.region-name { display: none; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #1d3b7a 0%, transparent 60%), var(--ink); color: #fff; }
.hero-in { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; }
.eyebrow { margin: 0 0 10px; color: #9fb4dd; font-weight: 600; font-size: 14px; }
.hero h1 { font-size: 30px; font-weight: 800; }
.hero-sub { color: #c9d4ea; margin: 12px 0 0; max-width: 46ch; }
.search { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.search-row { display: grid; gap: 12px; }
.s-field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
select, input, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); min-height: 44px; padding: 0 12px; width: 100%; }
textarea { padding: 10px 12px; resize: vertical; }
select:disabled { background: var(--bg); color: var(--muted); }
.s-btn { align-self: end; }
.search-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Sections */
.sec { padding-top: 28px; padding-bottom: 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 22px; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-h { font-size: 28px; font-weight: 800; }
.lead-p { font-size: 18px; color: var(--ink-2); max-width: 70ch; }
.narrow { max-width: 860px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }

/* Grid + card */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out); }
.card:hover { transform: translateY(-2px); }
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #dfe4ec; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-weight: 600; aspect-ratio: 4 / 3; }
.tag { position: absolute; left: 10px; top: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.tag-dark { background: var(--ink); }
.card-count { position: absolute; right: 10px; bottom: 10px; background: rgba(11, 27, 51, .72); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.card-body { padding: 12px 14px 14px; display: grid; gap: 2px; }
.card-title { font-size: 17px; font-weight: 700; }
.card-variant { margin: 0; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-facts { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.price { font-size: 20px; font-weight: 800; color: var(--ink); }
.price-lg { font-size: 32px; }
.card-where { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: 11px; padding: 0 5px; border-radius: 5px; }

/* Tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: grid; gap: 4px;
  transition: transform var(--dur-fast) var(--ease-out); }
.tile:hover { transform: translateY(-2px); }
.tile-name { font-weight: 700; font-size: 18px; }
.tile-n { color: var(--muted); font-size: 14px; }

/* How */
.how { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 32px; }
.how-in { padding-top: 28px; padding-bottom: 28px; }
.how h2 { font-size: 22px; margin-bottom: 16px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.how-steps li { display: grid; gap: 4px; padding-left: 44px; position: relative; counter-increment: s; }
.how-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.how-steps span { color: var(--ink-2); }
.how-steps-light { margin: 24px 0; }

/* Stock */
.stock { padding-top: 20px; }
.stock-head { display: grid; gap: 12px; margin-bottom: 12px; }
.stock-head h1 { font-size: 24px; font-weight: 800; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort label { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.sort select { width: auto; min-width: 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.chip-clear { background: transparent; color: var(--ink-2); text-decoration: underline; }
.stock-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.filters summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: inside; }
.filters form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.filters select, .filters input { min-width: 0; max-width: 100%; }   /* 18.11: dluga nazwa modelu rozpychala panel na telefonie */
.f-row { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.f-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 20px 0; }
.pager a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.pager-gap { min-width: 20px; display: grid; place-items: center; color: var(--muted); }
.pager a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Vehicle page */
.crumbs { display: flex; gap: 8px; font-size: 14px; padding: 14px 0; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
/* Telefon: zdjecia → cena i dealer → szczegoly → formularz. Na komputerze dwie kolumny (nizej). */
.vdp { display: flex; flex-direction: column; gap: 16px; }
.vdp-main, .vdp-side { display: contents; }
.gallery { order: 1; } .buybox { order: 2; } .tabs { order: 3; } .vdp-side > .enq { order: 4; }
.gallery-main { position: relative; background: #dfe4ec; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.g-prev { left: 12px; }
.g-next { right: 12px; }
.g-count { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 27, 51, .72); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.thumb { border-radius: 8px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 3 / 2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h2 { font-size: 19px; margin-bottom: 12px; }
/* Flex z rosnacymi polami: ostatni rzad zawsze pelny, bez pustych komorek (zasada 03.10). */
.spec { display: flex; flex-wrap: wrap; column-gap: 20px; margin: 0; }
.spec div { flex: 1 1 calc(50% - 20px); padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: 13px; }
.spec dd { margin: 0; font-weight: 600; }
.feat { display: grid; grid-template-columns: 1fr; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.feat li { padding-left: 22px; position: relative; }
.feat li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.desc { color: var(--ink-2); }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; }
.vdp-title { font-size: 26px; font-weight: 800; }
.vdp-variant { margin: 0; color: var(--ink-2); }
.vdp-price { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.was { color: var(--muted); text-decoration: line-through; }
.facts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.dealer-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.dealer-mini p { margin: 0; font-size: 14px; }
.dealer-name { font-weight: 700; color: var(--ink); }

/* Enquiry */
.enq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.enq h2 { font-size: 19px; margin-bottom: 12px; }
.enq form { display: grid; gap: 12px; }
.f-opt { color: var(--muted); font-weight: 400; }
.f-err { color: var(--warn); font-size: 14px; font-weight: 600; margin: 0; }
.f-err-box { background: #fef3f2; border: 1px solid #fecdca; padding: 10px 12px; border-radius: var(--radius-s); margin-bottom: 12px; }
[aria-invalid="true"] { border-color: var(--warn); }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.f-check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; }
.f-note { margin: 0; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enq-done { display: grid; gap: 10px; justify-items: start; }
.enq-done h2 { color: var(--good); margin: 0; }
.enq-done p { margin: 0; }

/* Dealers */
.dealers { margin-top: 20px; }
.dcard { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink);
  transition: transform var(--dur-fast) var(--ease-out); }
.dcard:hover { transform: translateY(-2px); }
.dcard-mark { width: 52px; height: 52px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.dcard-body { display: grid; gap: 2px; min-width: 0; }
.dcard-name { font-weight: 700; font-size: 17px; }
.dcard-n { color: var(--accent); font-weight: 600; font-size: 14px; }
.dealer-top { display: grid; gap: 16px; }
.dealer-info { display: grid; gap: 10px; align-content: start; }
.dealer-info p { margin: 0; }
.dealer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.h-small { font-size: 16px; margin-top: 8px; }
.hours { margin: 0; display: grid; }
.hours div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hours dd { margin: 0; font-weight: 600; }
.cta { margin-top: 24px; display: grid; gap: 8px; justify-items: start; }
.cta p { margin: 0; color: var(--ink-2); }

/* Footer */
.ftr { background: var(--ink); color: #c9d4ea; margin-top: 40px; }
.ftr-in { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
.ftr-brand p { max-width: 52ch; font-size: 14px; }
.ftr-col { display: grid; gap: 8px; align-content: start; }
.ftr-col h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.ftr-col a { color: #c9d4ea; text-decoration: none; font-size: 15px; }
.ftr-col a:hover { color: #fff; }
.ftr-legal { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; padding-bottom: 20px; font-size: 13px; color: #8ea0c4; }

/* ≥ 768 — tablet */
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .grid-3, .grid-4, .dealers { grid-template-columns: repeat(2, 1fr); }
  .search-row { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
  .tiles-4 { grid-template-columns: repeat(4, 1fr); }
  .tiles-3 { grid-template-columns: repeat(3, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .stock-head { grid-template-columns: 1fr auto; align-items: center; }
  .feat { grid-template-columns: 1fr 1fr; }
  .spec div { flex-basis: calc(33.333% - 20px); }
  .ftr-in { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .dealer-top { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 40px; }
}

/* ≥ 1100 — laptop i wieksze (1280 = najmniejszy laptop, 1620 = wzor) */
@media (min-width: 1100px) {
  :root { --gutter: 32px; }
  .hdr-in { grid-template-columns: auto minmax(180px, 280px) 1fr auto; grid-template-areas: "logo search nav region"; padding-top: 0; gap: 20px; min-height: 68px; }
  .nav { margin: 0; padding: 0; overflow: visible; }
  .nav a { padding: 22px 12px; }
  .region-opt.is-on .region-name { color: #c9d4ea; }
  .region-code { font-weight: 700; }
  .hero-in { grid-template-columns: 1fr 1fr; align-items: center; padding-top: 56px; padding-bottom: 56px; gap: 48px; }
  .hero h1 { font-size: 48px; }
  .search { padding: 22px; }
  .search-row { grid-template-columns: repeat(3, 1fr); }
  .s-btn { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3, .dealers { grid-template-columns: repeat(3, 1fr); }
  .stock-body { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .filters { position: sticky; top: 84px; }
  .filters summary { pointer-events: none; list-style: none; }
  .filters summary::-webkit-details-marker { display: none; }
  .vdp { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 24px; }
  .vdp-main { display: grid; gap: 16px; min-width: 0; }
  .vdp-side { display: grid; gap: 16px; align-content: start; position: sticky; top: 84px; }
  .spec div { flex-basis: calc(25% - 20px); }
  .feat { grid-template-columns: repeat(3, 1fr); }
  .dealer-top { grid-template-columns: 1fr 460px; }
}

/* Baner ze zdjeciem (Robert 18.11: „baner glowny”) — zdjecie salonu 10X, przyciemnienie od lewej pod tekst. */
.hero-photo { position: relative; overflow: hidden; background: var(--ink); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 27, 51, .78) 0%, rgba(11, 27, 51, .55) 55%, rgba(11, 27, 51, .85) 100%); }
.hero-photo .hero-in { position: relative; z-index: 1; display: grid; gap: 18px; padding-top: 36px; padding-bottom: 28px; }
.hero-photo .search { display: grid; gap: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center;
  padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  transition: opacity var(--dur-fast) var(--ease-out); }
.quick a:hover { opacity: .85; }
.hero-note { margin: 0; color: #c9d4ea; font-size: 13px; }
@media (min-width: 768px) {
  .hero-photo .search { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
}
@media (min-width: 1100px) {
  .hero-photo::after { background: linear-gradient(90deg, rgba(11, 27, 51, .9) 0%, rgba(11, 27, 51, .62) 45%, rgba(11, 27, 51, .25) 100%); }
  .hero-photo .hero-in { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 40px; gap: 22px; }
  .hero-photo .hero-copy { max-width: 640px; }
  .hero-photo .search { grid-template-columns: 1fr 1fr 1fr 240px; padding: 14px; }
  .hero-photo .s-btn { grid-column: auto; }
}

/* Wyszukiwarka w naglowku */
.hsearch { grid-area: search; }
.hsearch input { min-height: 40px; border-radius: 999px; padding: 0 16px 0 38px; background: var(--bg) no-repeat 14px 50% / 16px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }

/* Porownywarka: przycisk na karcie, pasek na dole, tabela */
.card { position: relative; }
.card-cmp { position: absolute; right: 10px; top: 10px; margin: 0; }
.cmp-btn { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.cmp-btn.is-on { background: var(--ink); color: #fff; }
.cmp-bar { position: sticky; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(11, 27, 51, .08); }
.cmp-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.cmp-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cmp { width: 100%; border-collapse: collapse; min-width: calc(160px + var(--n) * 200px); table-layout: fixed; }
.cmp th, .cmp td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 15px; }
.cmp thead th { vertical-align: bottom; }
.cmp tbody th { color: var(--muted); font-weight: 600; width: 160px; font-size: 14px; }
.cmp td.is-best { background: #ecfdf3; color: var(--good); font-weight: 700; }
.cmp-car { display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.cmp-car img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.cmp-title { font-weight: 700; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.cmp-clear { margin-top: 12px; }

/* Karta auta: zakladki */
.tabs { display: grid; gap: 16px; }
.tab-list { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 14px; text-decoration: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel { display: grid; gap: 16px; }
.js .tab-panel[hidden] { display: none; }
.panel-sub { color: var(--ink-2); margin: -4px 0 14px; }
.form-grid { display: grid; gap: 12px; }
.form-grid .btn { justify-self: start; }
.f-trio { display: grid; gap: 10px; }
.days { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.days legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-s); font-weight: 600; font-size: 14px; cursor: pointer; background: var(--surface); }
.day input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.day input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.days[aria-invalid="true"] .day span { border-color: var(--warn); }
.buy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.buy-actions form { margin: 0; }
.buy-actions .btn { width: 100%; }

/* Opinie */
.rating { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: 15px; }
.rating-sm { font-size: 14px; }
.stars { color: #f5a524; letter-spacing: 1px; }
.stars-lg { font-size: 22px; }
.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review p { margin: 6px 0 0; color: var(--ink-2); }
.review-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.dealer-tab { display: grid; gap: 14px; }
.dealer-tab-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dealer-tab-head p { margin: 4px 0 0; }
.rev-layout { display: grid; gap: 16px; }
.rev-summary { display: grid; gap: 4px; justify-items: start; align-content: start; }
.rev-avg { font-size: 44px; line-height: 1; }
.reviews-grid { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .f-trio { grid-template-columns: repeat(3, 1fr); }
  .days { grid-template-columns: repeat(6, 1fr); }
  .days-3 { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .rev-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1400px) {
  .region-name { display: inline; margin-left: 6px; font-weight: 500; }
}

/* Asystent AI „Describe the car you want” */
.ask { display: grid; gap: 8px; }
.ask-label { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.ask-spark { color: var(--accent); }
.ask-row { display: grid; gap: 8px; }
.ask-row input { min-height: 52px; font-size: 17px; border-radius: 12px; }
.ask-row .btn { min-height: 52px; }
.ask-hero { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.ask-hero .ask-spark { color: var(--accent); }
.or-search { margin: -4px 0 -6px; color: #c9d4ea; font-size: 13px; font-weight: 600; }
.ask-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.understood { margin: 6px 0 18px; display: grid; gap: 6px; }
.understood-h { margin: 0; font-size: 18px; font-weight: 700; }
.understood-meta { margin: 0; font-size: 14px; }
.find-h { font-size: 22px; margin-bottom: 12px; }
.best-item { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.best-item .card { border: 0; border-radius: 0; }
.why { padding: 12px 14px 14px; border-top: 1px dashed var(--line); background: #f8fafc; }
.why-h { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--good); }
.why ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.why li { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
@media (min-width: 768px) {
  .ask-row { grid-template-columns: 1fr 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .card:hover, .tile:hover, .dcard:hover, .chat-fab:hover { transform: none; }
}

/* ---- Czat „Help me find a car” (Robert 18.11): chmurka w prawym dolnym rogu + okno rozmowy ---------------------
   Telefon: okno na caly ekran. Komputer: panel 400 px w rogu. Ruch: tylko opacity/transform, wylaczany przez Reduce Motion. */
.chat-fab { position: fixed; right: var(--gutter); bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(29, 92, 255, .35), 0 2px 6px rgba(11, 27, 51, .18);
  transition: transform var(--dur-fast) var(--ease-out); animation: chat-in 240ms var(--ease-out); }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.has-cmp .chat-fab { bottom: 80px; }
.chat-panel { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--surface);
  animation: chat-in 180ms var(--ease-out); }
.chat-panel[hidden], .chat-fab[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chat-hdr { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--ink); color: #fff; }
.chat-avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.chat-hdr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.chat-hdr-txt strong { font-size: 16px; }
.chat-hdr-txt span { font-size: 12.5px; opacity: .75; }
.chat-icon { flex: 0 0 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer;
  display: grid; place-items: center; }
.chat-icon:hover { background: rgba(255, 255, 255, .12); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg);
  overscroll-behavior: contain; }
.chat-msg { display: flex; }
.chat-me { justify-content: flex-end; }
.chat-bubble { margin: 0; max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-ai .chat-bubble { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-me .chat-bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat-error .chat-bubble { border-color: #f3c7c3; background: #fff5f4; color: var(--warn); }
.chat-done .chat-bubble { border-color: #b7e2cd; background: #f0faf5; color: var(--good); font-weight: 600; }
.chat-note { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.chat-typing { display: inline-flex; gap: 5px; align-items: center; min-height: 22px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chat-dot 1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-chip { border: 1px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 999px; padding: 7px 13px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chat-chip:hover { background: var(--accent-soft); }
.chat-cards { display: flex; flex-direction: column; gap: 8px; }
.chat-car { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.chat-car-link { display: flex; gap: 12px; padding: 10px; color: inherit; text-decoration: none; }
.chat-car-img { flex: 0 0 104px; height: 78px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.chat-car-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-car-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--muted); }
.chat-car-title { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-car-variant, .chat-car-where, .chat-car-facts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-car-price { font-size: 16px; font-weight: 800; color: var(--ink); }
.chat-why { margin: 0; padding: 0 10px 8px; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.chat-why li { font-size: 12px; font-weight: 600; color: var(--good); background: #f0faf5; border-radius: 999px; padding: 2px 8px; }
.chat-car-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px 10px; }
.chat-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.chat-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chat-btn-wide { width: 100%; min-height: 44px; }
.chat-btn:disabled { opacity: .6; cursor: progress; }
.chat-lead { border-top: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; background: #fbfcfe; }
.chat-lead p { margin: 0; }
.chat-lead-head { font-size: 14px; font-weight: 600; }
.chat-lead-extra { font-size: 13px; color: var(--muted); }
.chat-field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; }
.chat-field input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; }
.chat-field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.chat-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.chat-check input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.chat-err { color: var(--warn); font-size: 13px; font-weight: 600; }
.chat-err:empty { display: none; }
.chat-lead-legal { font-size: 12px; color: var(--muted); }
.chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 22px;
  font: inherit; font-size: 16px; line-height: 1.35; resize: none; }
.chat-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.chat-mic, .chat-send { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.chat-send { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chat-mic.is-on { background: var(--warn); border-color: var(--warn); color: #fff; animation: chat-dot 1.2s infinite ease-in-out; }
.chat-foot { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: var(--muted); text-align: center; background: var(--surface); }
html.chat-is-open { overflow: hidden; }
.ftr { padding-bottom: 84px; }   /* chmurka czatu nie zaslania ostatniej linii stopki */
@media (min-width: 768px) {
  .chat-panel { inset: auto var(--gutter) 16px auto; width: 400px; height: min(640px, calc(100vh - 32px)); border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(11, 27, 51, .25), 0 2px 8px rgba(11, 27, 51, .1); overflow: hidden; }
  html.chat-is-open { overflow: auto; }
}
/* Baner zgody na cookies (F6) — tylko gdy skonfigurowane sa kody reklamowe. Nad chmurka czatu, nie zaslania jej przycisku. */
.consent { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 16px; z-index: 45; max-width: 560px; padding: 14px 16px;
  background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(11, 27, 51, .3);
  display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.consent[hidden] { display: none; }
.consent p { margin: 0; line-height: 1.45; }
.consent a { color: #fff; text-decoration: underline; }
.consent-btns { display: flex; gap: 8px; justify-content: flex-end; }
.consent .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .4); background: transparent; }
/* Telefon: dopoki klient nie wybierze, chmurka czatu czeka — inaczej wisi nad formularzem wyszukiwania. */
@media (max-width: 767px) { body:has(.consent:not([hidden])) .chat-fab { display: none; } }
@media (min-width: 768px) { .consent { right: auto; } }

/* Browse by make / town (SEO F6): lista linkow, ktore Google i klient widza na stronie. */
.browse-cols { display: grid; gap: 20px; }
.browse-cols h3 { margin: 0 0 10px; font-size: 15px; }
.browse-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.browse-list a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.browse-list a:hover { border-color: var(--accent); color: var(--accent); }
.browse-list span { color: var(--muted); font-weight: 500; font-size: 12.5px; }
@media (min-width: 1100px) { .browse-cols { grid-template-columns: 2fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  /* Musi stac PO regulach czatu: globalne 1 ms przy „infinite” dawaloby migotanie kropek. */
  .chat-typing span, .chat-mic.is-on, .chat-fab, .chat-panel { animation: none; }
  .chat-typing span { opacity: .7; }
}
