/* ---------- tokens ---------- */

:root {
  color-scheme: light;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --field: #f5f4f0;
  --text: #16181d;
  --muted: #5f6570;
  --line: #e1dfd8;
  --line-strong: #c9c6bd;
  --accent: #ffd23f;
  --accent-hover: #ffc61a;
  --accent-ink: #16181d;
  --focus: #16181d;
  --danger: #b3261e;
  --warn: #8a5a00;
  --olx: #0d9488;
  --autovit: #dc2626;
  --publi24: #2563eb;
  --facebook: #7b818c;
  /* The masthead stays dark in both themes. */
  --mast-bg: #16181d;
  --mast-text: #f6f5f1;
  --mast-muted: #a8adb7;
  --mast-line: rgb(255 255 255 / 14%);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(22 24 29 / 5%), 0 6px 20px rgb(22 24 29 / 6%);
  --shadow-lift: 0 2px 4px rgb(22 24 29 / 6%), 0 14px 34px rgb(22 24 29 / 13%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1114;
    --surface: #191c21;
    --surface-2: #22262d;
    --field: #111317;
    --text: #eef0f2;
    --muted: #9ba2ae;
    --line: #2a2e36;
    --line-strong: #3d424c;
    --focus: #ffd23f;
    --danger: #ff8a80;
    --warn: #f1c26b;
    --olx: #2dd4bf;
    --autovit: #f87171;
    --publi24: #7aa7ff;
    --facebook: #8b919c;
    --mast-bg: #14161a;
    --shadow: none;
    --shadow-lift: 0 14px 34px rgb(0 0 0 / 45%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1114;
  --surface: #191c21;
  --surface-2: #22262d;
  --field: #111317;
  --text: #eef0f2;
  --muted: #9ba2ae;
  --line: #2a2e36;
  --line-strong: #3d424c;
  --focus: #ffd23f;
  --danger: #ff8a80;
  --warn: #f1c26b;
  --olx: #2dd4bf;
  --autovit: #f87171;
  --publi24: #7aa7ff;
  --facebook: #8b919c;
  --mast-bg: #14161a;
  --shadow: none;
  --shadow-lift: 0 14px 34px rgb(0 0 0 / 45%);
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

input,
select,
button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 24px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.75;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgb(0 0 0 / 12%), 0 6px 16px rgb(255 210 63 / 28%);
}

.btn-primary:hover:not([disabled]) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active:not([disabled]) {
  transform: scale(0.97);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.btn-outline:hover:not([disabled]) {
  border-color: var(--text);
  transform: translateY(-1px);
}

.btn-soft {
  background: var(--field);
  border-color: var(--line);
  font-weight: 600;
}

.btn-soft:hover {
  border-color: var(--line-strong);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .spinner {
  display: block;
}

.btn.loading .btn-icon {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--mast-muted);
  border: 1px solid var(--mast-line);
  border-radius: 11px;
  cursor: pointer;
  transition:
    color 0.15s,
    background-color 0.15s;
}

.icon-btn:hover {
  color: var(--mast-text);
  background: rgb(255 255 255 / 8%);
}

.mast :focus-visible {
  outline-color: var(--accent);
}

/* ---------- masthead: header + hero ---------- */

.mast {
  background:
    radial-gradient(900px 380px at 88% -10%, rgb(255 210 63 / 16%), transparent 65%),
    var(--mast-bg);
  color: var(--mast-text);
  padding-bottom: 44px;
}

.has-search .mast {
  padding-bottom: 22px;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo {
  display: block;
  border-radius: 9px;
}

.wordmark {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.wordmark i {
  font-style: normal;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--mast-muted);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--mast-text);
}

.nav a[aria-current="page"] {
  color: var(--mast-text);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.menu-btn {
  display: none;
}

/* Show the icon for the theme you would switch TO. */
.i-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .i-moon {
    display: none;
  }
}

:root[data-theme="dark"] .i-sun {
  display: block;
}

:root[data-theme="dark"] .i-moon {
  display: none;
}

.hero-copy {
  max-width: 820px;
  padding: 34px 0 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--mast-line);
  border-radius: 999px;
  color: var(--mast-muted);
  font-size: 13px;
  font-weight: 600;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(255 210 63 / 22%);
}

h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5.4vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  margin-top: 16px;
  max-width: 600px;
  color: var(--mast-muted);
  font-size: clamp(15.5px, 1.6vw, 18px);
}

/* ---------- search form ---------- */

.search {
  padding: 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 28%);
}

.has-search .search {
  margin-top: 6px;
}

/* Vehicle category pills above the search box; one scrollable row. */
.cats {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cats::-webkit-scrollbar {
  display: none;
}

.cat {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.cat:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.cat[aria-checked="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.chip.off {
  opacity: 0.65;
  cursor: default;
}

.search-main {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.field {
  position: relative;
  min-width: 0;
}

.field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.field input,
.field select {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 44px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.field input::placeholder,
.range input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%237b818c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.field input:hover,
.field select:hover,
.range input:hover,
.sort select:hover {
  border-color: var(--line-strong);
}

.field input:focus-visible,
.field select:focus-visible,
.range input:focus-visible,
.sort select:focus-visible {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgb(255 210 63 / 55%);
}

.filters-toggle {
  display: none;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 22px;
  padding: 14px 6px 6px;
}

.filter {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

/* Direct children only: the source toggles below are labels too. */
.filter > label,
.filter > legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.range {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.range input {
  width: 104px;
  height: 40px;
  padding: 0 11px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.range input::-webkit-outer-spin-button,
.range input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.filter-sources {
  margin-left: auto;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Source checkboxes drawn as toggle pills. */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px 0 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    color 0.15s;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle .dot {
  opacity: 0.35;
}

.toggle:has(input:checked) {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.toggle:has(input:checked) .dot {
  opacity: 1;
}

.toggle:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.src-olx {
  color: var(--olx);
}
.src-autovit {
  color: var(--autovit);
}
.src-publi24 {
  color: var(--publi24);
}
.src-facebook {
  color: var(--facebook);
}

/* ---------- search suggestions ---------- */

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgb(0 0 0 / 28%);
}

.sg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sg-clear {
  padding: 2px 6px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sg-clear:hover {
  color: var(--text);
  background: var(--surface-2);
}

.sg {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 15.5px;
  cursor: pointer;
}

.sg:hover,
.sg[aria-selected="true"] {
  background: var(--surface-2);
}

.sg-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-make,
.sg-hint {
  color: var(--muted);
}

.sg-hint {
  margin-left: auto;
  font-size: 13px;
}

.sg b {
  font-weight: 700;
}

.sg-icon {
  flex: none;
  width: 17px;
  height: 17px;
  background: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.sg-recent .sg-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--mast-muted);
  font-size: 14px;
}

.examples a {
  padding: 6px 13px;
  border: 1px solid var(--mast-line);
  border-radius: 999px;
  color: var(--mast-text);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.examples a:hover {
  background: rgb(255 255 255 / 9%);
  border-color: rgb(255 255 255 / 32%);
}

/* Landing-only blocks disappear once a search is on screen. */
.has-search [data-landing] {
  display: none;
}

/* ---------- results ---------- */

.results-area {
  padding-top: 20px;
}

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color 0.15s;
}

a.chip:hover {
  border-color: var(--line-strong);
}

.chip b {
  color: var(--text);
  font-weight: 700;
}

.chip small {
  color: var(--muted);
  font-size: 13px;
}

.chip.bad {
  border-color: var(--danger);
}

.chip.bad small {
  color: var(--danger);
}

.chip.warn small {
  color: var(--warn);
}

.facets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.facet {
  flex: none;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.facet:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.facet span {
  margin-left: 5px;
  color: var(--muted);
}

.facet[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.facet[aria-pressed="true"] span {
  color: inherit;
  opacity: 0.7;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.summary {
  color: var(--muted);
  font-size: 14px;
}

.summary b {
  color: var(--text);
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.sort select {
  height: 40px;
  padding: 0 12px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    border-color 0.18s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.card:has(.title a:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

/* Absolutely positioned so a portrait photo cannot stretch the 4:3 frame. */
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.card:hover .thumb img {
  transform: scale(1.04);
}

.thumb .noimg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
  font-size: 12px;
  font-weight: 700;
}

.badge b {
  color: var(--text);
  font-weight: 700;
}

.promo {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  background: rgb(22 24 29 / 72%);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 14px 15px 14px;
}

.price {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.price small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.title a {
  text-decoration: none;
  outline: none;
}

/* The whole card is clickable through the title link. */
.title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.specs span {
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.also {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12.5px;
}

.also a {
  color: var(--text);
  font-weight: 700;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.meta .loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.meta .loc span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta .loc::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s-7-6-7-12a7 7 0 0 1 14 0c0 6-7 12-7 12Zm0-9.500a2.500 2.500 0 1 0 0-5 2.500 2.500 0 0 0 0 5Z' fill-rule='evenodd'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.meta .when {
  flex: none;
}

.skeleton {
  height: 330px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty {
  margin: 56px auto;
  max-width: 460px;
  text-align: center;
  color: var(--muted);
}

.empty h2 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 20px;
}

.more-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 8px;
}

.more {
  min-width: 240px;
}

/* ---------- landing sections ---------- */

.info {
  padding-top: 56px;
  scroll-margin-top: 12px;
}

.info h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.steps,
.source-list {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.steps {
  grid-template-columns: repeat(3, 1fr);
}

.source-list {
  grid-template-columns: repeat(4, 1fr);
}

.steps li,
.source-list li {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps h3,
.source-list h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.steps p,
.source-list p {
  margin-top: 6px;
  color: var(--muted);
}

.num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 11px;
  font-weight: 800;
}

.source-list .dot {
  width: 12px;
  height: 12px;
  margin-bottom: 14px;
}

/* ---------- loading more results ---------- */

.batch-sep {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  animation: rise 0.4s ease-out both;
}

.batch-sep::before,
.batch-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.batch-sep span {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.card.enter {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- landing sections (shared) ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info h2 span:empty {
  display: none;
}

/* ---------- near you ---------- */

.near-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.select-pill {
  height: 44px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b818c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    right 13px center / 16px no-repeat;
  color: var(--text);
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.locate {
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
}

.near-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.near-note:empty {
  display: none;
}

.near-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.15s,
    background-color 0.15s;
}

.pill b {
  color: var(--text);
}

.pill:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.near-cats {
  margin-top: 8px;
}

.near-cats .pill {
  background: transparent;
  border-style: dashed;
}

.near-results {
  margin-top: 18px;
}

.near-results .skeleton {
  height: 320px;
}

.near-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.near-foot {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* ---------- popular makes ---------- */

.makes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.make {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

.make:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.make-mono {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mast-bg);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.make b {
  font-size: 15.5px;
}

.make small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- buying tips ---------- */

.tips-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: tip;
}

.tips-list li {
  position: relative;
  padding: 20px 20px 20px 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  counter-increment: tip;
}

.tips-list li::before {
  content: counter(tip);
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.tips-list h3 {
  font-size: 16px;
  font-weight: 700;
}

.tips-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin-top: 20px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--field);
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding: 0 18px 16px;
  color: var(--muted);
}

/* ---------- "is this your county?" bar ---------- */

.geo-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgb(255 210 63 / 35%);
  border-radius: 14px;
  background: rgb(255 210 63 / 9%);
  color: var(--mast-text);
  font-size: 14.5px;
  animation: rise 0.35s ease-out both;
}

.geo-ask[hidden] {
  display: none;
}

.geo-ask-icon {
  flex: none;
  color: var(--accent);
}

.geo-ask-text {
  flex: 1 1 260px;
}

.geo-ask-text b {
  color: var(--accent);
}

.geo-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ga-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--mast-line);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: var(--mast-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.ga-btn:hover {
  background: rgb(255 255 255 / 12%);
  border-color: rgb(255 255 255 / 30%);
}

.ga-btn[hidden] {
  display: none;
}

.ga-btn.loading .spinner {
  display: block;
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.ga-yes {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.ga-yes:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---------- hero facts ---------- */

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--mast-muted);
  font-size: 14px;
}

.hero-facts b {
  margin-right: 6px;
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 900px) {
  .tips-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  /* One swipeable row instead of a stack of pills. */
  .examples {
    flex-wrap: nowrap;
    margin-inline: -16px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .examples::-webkit-scrollbar {
    display: none;
  }
  .examples > * {
    flex: none;
  }
  .hero-facts {
    display: none;
  }
  .tips-list {
    grid-template-columns: 1fr;
  }
  .near-tools,
  .select-pill {
    flex: 1;
  }
  .makes {
    grid-template-columns: 1fr 1fr;
  }
  .make {
    padding: 12px;
    column-gap: 10px;
  }
  .make-mono {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 72px;
  padding: 44px 0 30px;
  background: var(--mast-bg);
  color: var(--mast-muted);
  font-size: 14px;
}

.site-footer :focus-visible {
  outline-color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand {
  color: var(--mast-text);
}

.footer-brand p {
  margin-top: 12px;
  max-width: 300px;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer h4 {
  margin-bottom: 4px;
  color: var(--mast-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer nav a {
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer nav a:hover {
  color: var(--mast-text);
}

.footer-note {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--mast-line);
  font-size: 12.5px;
}

.footer-note p:first-child {
  max-width: 760px;
}

.footer-note p:last-child {
  flex: none;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .source-list {
    grid-template-columns: 1fr 1fr;
  }
  .filter-sources {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding-inline: 16px;
  }

  .site-header {
    height: 62px;
    gap: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-btn {
    display: inline-grid;
  }

  /* The nav becomes a dropdown panel under the header. */
  .nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    z-index: 5;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px;
    background: #1f2228;
    border: 1px solid var(--mast-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgb(0 0 0 / 45%);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
    font-size: 16px;
  }

  .nav a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 3px;
    height: auto;
  }

  .mast {
    padding-bottom: 28px;
  }

  .hero-copy {
    padding: 20px 0 22px;
  }

  .search {
    padding: 8px;
    border-radius: 18px;
  }

  .search-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .field-q,
  .go {
    grid-column: 1 / -1;
  }

  .filters-toggle {
    display: inline-flex;
    padding: 0 16px;
  }

  /* Filters collapse behind the "Filtre" button on small screens. */
  .filters {
    display: none;
    flex-direction: column;
    /* nowrap: a wrapping column would size each filter to its content width. */
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    padding: 14px 4px 6px;
  }

  .filters-open .filters {
    display: flex;
  }

  .range input {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 46px;
    font-size: 16px;
  }

  .toggle {
    height: 44px;
  }

  /* County chips scroll sideways instead of stacking into many rows. */
  .facets {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 2px 16px 6px;
    scrollbar-width: none;
  }

  .facets::-webkit-scrollbar {
    display: none;
  }

  .toolbar {
    align-items: flex-end;
  }

  .sort span {
    display: none;
  }

  /* One listing per row: photo on the left, details on the right. */
  .results {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    flex-direction: row;
  }

  .card:hover {
    transform: none;
  }

  .thumb {
    flex: none;
    width: 38%;
    max-width: 170px;
    aspect-ratio: auto;
    min-height: 132px;
  }

  .badge {
    top: 7px;
    left: 7px;
    padding: 3px 8px 3px 6px;
    font-size: 11px;
  }

  .promo {
    top: auto;
    bottom: 7px;
    left: 7px;
    right: auto;
  }

  .body {
    min-width: 0;
    gap: 6px;
    padding: 11px 12px;
  }

  .price {
    font-size: 18px;
  }

  .title {
    font-size: 14px;
  }

  .meta {
    padding-top: 7px;
  }

  .skeleton {
    height: 134px;
  }

  .more {
    width: 100%;
  }

  .info {
    padding-top: 40px;
  }

  .site-footer {
    margin-top: 48px;
    padding-top: 34px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 460px) {
  .source-list {
    grid-template-columns: 1fr;
  }

  .chip small {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .card:hover .thumb img,
  .btn:hover,
  .btn:active {
    transform: none !important;
  }
}
