/* Unified public UI — buttons, search, chips, presentation, motion, mobile dock */

:root {
  --btn-height: 44px;
  --btn-radius: 999px;
  --search-radius: 999px;
  --dock-height: 68px;
  --color-price: #a16207;
  --gradient-btn: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  --gradient-btn-gold: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-color-mode="dark"] {
  --color-price: #fbbf24;
}

/* ---------- Buttons ---------- */
.btn,
.finder-btn,
.results-filters-btn,
.header-search-button,
.btn-show-more,
.results-load-more-btn,
.feature-cards-more-btn,
.toggle-filters-btn,
.chargers-expand-btn,
.show-more-button,
.filter-button,
.compare-bar-go,
.compare-add-more,
.compare-bar-clear,
.compare-clear-all,
.results-filters-mobile-toggle,
.utility-page-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-height);
  padding: 0 20px;
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    filter 0.2s ease;
}

.btn:hover,
.finder-btn:hover,
.results-filters-btn:hover,
.header-search-button:hover,
.btn-show-more:hover,
.results-load-more-btn:hover,
.feature-cards-more-btn:hover,
.toggle-filters-btn:hover,
.chargers-expand-btn:hover,
.show-more-button:hover,
.filter-button:hover,
.compare-bar-go:hover,
.compare-add-more:hover,
.utility-page-link:hover {
  transform: translateY(-2px);
}

.btn:active,
.finder-btn:active,
.results-filters-btn:active,
.header-search-button:active,
.btn-show-more:active,
.results-load-more-btn:active,
.feature-cards-more-btn:active,
.toggle-filters-btn:active,
.show-more-button:active,
.compare-bar-go:active {
  transform: translateY(0);
}

.btn--primary,
.finder-btn.primary,
.results-filters-btn.primary,
.header-search-button,
.results-load-more-btn,
.feature-cards-more-btn,
.compare-bar-go,
.compare-add-more,
.auth-card button[type="submit"] {
  background: var(--gradient-btn);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover,
.finder-btn.primary:hover,
.results-filters-btn.primary:hover,
.header-search-button:hover,
.results-load-more-btn:hover,
.feature-cards-more-btn:hover,
.compare-bar-go:hover,
.compare-add-more:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.btn--secondary,
.finder-btn.secondary,
.results-filters-btn.secondary,
.toggle-filters-btn,
.btn-show-more,
.chargers-expand-btn,
.show-more-button,
.filter-button,
.results-filters-mobile-toggle,
.compare-bar-clear,
.utility-page-link {
  background: var(--color-surface);
  color: var(--color-heading);
  border-color: var(--color-border-strong, var(--color-border));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.btn--ghost,
.compare-clear-all {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
  box-shadow: none;
}

.btn--gold,
.btn-register,
.header-mobile-link-accent {
  background: var(--gradient-btn-gold);
  color: #111827 !important;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 16px rgba(185, 152, 88, 0.28);
}

.filter-button.active,
.fuel-tab.active {
  background: var(--gradient-btn) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--shadow-primary);
}

.show-more-button:hover,
.filter-button:hover {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
}

.feature-cards-more-btn {
  position: relative;
  padding-right: 48px;
}

.btn--block,
.show-more-button {
  width: 100%;
}

.finder-btn.primary {
  flex: 1 1 220px;
}

.finder-btn.secondary {
  flex: 1 1 120px;
}

/* ---------- Search fields ---------- */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.search-field-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-subtle);
  pointer-events: none;
  z-index: 1;
}

.search-field input,
.header-search-input,
.finder-search-input,
.fuel-search input,
.results-filter-field input[type="search"] {
  width: 100%;
  min-height: 46px;
  border-radius: var(--search-radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0 18px 0 44px;
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search-input {
  min-height: 40px;
  height: 40px;
}

.finder-unified-search .search-field {
  width: 100%;
}

.search-field input:focus,
.header-search-input:focus,
.finder-search-input:focus,
.fuel-search input:focus {
  border-color: rgba(107, 33, 168, 0.55);
  box-shadow:
    0 0 0 4px rgba(107, 33, 168, 0.14),
    0 0 22px rgba(168, 85, 247, 0.18);
}

html[data-theme="ocean"] .search-field input:focus,
html[data-theme="ocean"] .header-search-input:focus,
html[data-theme="ocean"] .finder-search-input:focus {
  border-color: rgba(2, 132, 199, 0.6);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.16), 0 0 22px rgba(56, 189, 248, 0.2);
}

html[data-theme="gold"] .search-field input:focus,
html[data-theme="gold"] .header-search-input:focus,
html[data-theme="gold"] .finder-search-input:focus {
  border-color: rgba(180, 134, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(180, 134, 11, 0.16), 0 0 22px rgba(212, 175, 55, 0.22);
}

/* ---------- Presets / chips ---------- */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.18s var(--ease-out), background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.preset-chip:hover,
.preset-chip.is-active {
  transform: translateY(-1px);
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.section-head h2,
.section-head .generation-title,
.section-head .models-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  text-align: center;
}

.section-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.section-head--tight {
  margin: 4px auto 10px;
}

.section-head--tight .section-kicker {
  margin-bottom: 0;
}

.price-from {
  margin: 0;
  color: var(--color-price);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.price-from span {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

/* ---------- Market strip ---------- */
.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: -8px auto 8px;
  padding: 0 16px 8px;
  position: relative;
  z-index: 2;
}

.market-strip--hero {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin: 10px 0 4px 8vw;
  padding: 0 16px 4px;
  grid-template-columns: none;
}

.market-strip--hero .market-stat {
  flex: 1 1 140px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(10px);
  color: #fff;
}

.market-strip--hero .market-stat::after {
  display: none;
}

.market-strip--hero .market-stat-label,
.market-strip--hero .market-stat-sub {
  color: rgba(255, 255, 255, 0.7);
}

.market-strip--hero .market-stat-value {
  font-size: 1.05rem;
  color: #fff;
}

.market-stat {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.market-stat::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-muted);
  pointer-events: none;
}

.market-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.market-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-heading);
  letter-spacing: -0.03em;
}

.market-stat-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-subtle);
}

/* ---------- Smooth reveal (shared by every show more / show less toggle) ---------- */
@keyframes sr-appear {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sr-appear {
  animation: sr-appear 0.42s var(--ease-out, ease) both;
}

/* Toggle buttons: press feedback + chevron that flips with the panel. */
.toggle-filters-btn,
.btn-show-more,
.results-filters-mobile-toggle {
  transition: transform 0.2s var(--ease-out, ease), box-shadow 0.2s ease, background-color 0.2s ease;
}

.toggle-filters-btn:active,
.btn-show-more:active,
.results-filters-mobile-toggle:active {
  transform: scale(0.97);
}

/* ---------- Card shine ---------- */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.38) 50%, transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 3;
}

.card-shine:hover::after {
  animation: shine-sweep 0.85s var(--ease-out);
}

@keyframes shine-sweep {
  to { transform: translateX(130%); }
}

/* ---------- Brand / model presentation ---------- */
.brand-showcase,
.model-showcase,
.page-hero {
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 22px 20px;
  border-radius: 24px;
  background: var(--gradient-panel);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}

.brand-showcase::before,
.model-showcase::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-muted), transparent 70%);
  pointer-events: none;
}

.brand-showcase {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
}

.brand-showcase-copy {
  min-width: 0;
}

.brand-showcase-copy .section-kicker {
  margin-bottom: 8px;
}

.brand-showcase .model-showcase-lead {
  margin: 0;
  max-width: none;
  text-align: left;
}

.brand-showcase-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.brand-showcase-link:hover {
  text-decoration: underline;
}

.brand-showcase-logo {
  width: 160px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
}

.brand-showcase-logo img {
  max-width: 86%;
  max-height: 86%;
  object-fit: contain;
}

.brand-showcase h1,
.model-showcase h1,
.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--color-heading);
}

.brand-showcase-meta,
.model-showcase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-surface-section);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
}

.model-showcase {
  text-align: center;
}

.model-showcase .price-from {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-top: 10px;
}

.model-showcase-lead {
  margin: 0 auto;
  max-width: 640px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.fuel-estimate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.fuel-estimate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  text-align: left;
}

.fuel-estimate-card strong {
  display: block;
  font-size: 1.15rem;
  color: var(--color-heading);
  margin: 4px 0;
}

.fuel-estimate-card span {
  color: var(--color-text-muted);
  font-size: 12px;
}

/* ---------- Fuel trip calculator ---------- */
.fuel-trip-card {
  background: var(--gradient-panel);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 22px;
  margin: 0 auto 28px;
  max-width: 1240px;
  box-shadow: var(--shadow-sm);
}

.fuel-trip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.fuel-trip-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

.fuel-trip-field {
  min-width: 0;
}

.fuel-trip-field input,
.fuel-trip-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-input);
  color: var(--color-text);
  padding: 0 12px;
  font: inherit;
}

.fuel-trip-result {
  background: var(--color-primary-muted);
  border-radius: 16px;
  padding: 14px 16px;
}

.fuel-trip-result strong {
  display: block;
  font-size: 1.4rem;
  color: var(--color-heading);
}

.fuel-insight {
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.fuel-trip-card--compact {
  padding: 14px 16px;
  margin: 0 0 16px;
  max-width: none;
  border-radius: 16px;
}

.fuel-trip-compact-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fuel-trip-card--compact .fuel-trip-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.9fr) auto;
  gap: 10px;
}

.fuel-trip-card--compact .fuel-trip-field input,
.fuel-trip-card--compact .fuel-trip-field select {
  min-height: 40px;
  border-radius: 12px;
}

.fuel-trip-card--compact .fuel-trip-result {
  padding: 8px 12px;
  min-width: 132px;
}

.fuel-trip-card--compact .fuel-trip-result strong {
  font-size: 1.15rem;
}

.service-estimate {
  background: var(--gradient-panel);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 22px;
  margin: 0 auto 28px;
  max-width: 1240px;
  box-shadow: var(--shadow-sm);
}

.service-estimate--compact {
  padding: 14px 16px;
  margin: 0 0 16px;
  max-width: none;
  border-radius: 16px;
}

.service-estimate-grid {
  align-items: end;
}

.service-estimate-action {
  display: flex;
  align-items: end;
}

.service-estimate-action .btn {
  width: 100%;
  min-height: 46px;
}

.service-estimate-status {
  margin: 12px 0 0;
  color: var(--color-text-muted);
}

.service-estimate-status.is-error {
  color: #b91c1c;
}

.service-estimate-result {
  margin-top: 18px;
}

.service-estimate-vehicle {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--color-heading);
}

.service-estimate-table-wrap {
  overflow-x: auto;
}

.service-estimate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.service-estimate-table th,
.service-estimate-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.service-estimate-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.service-estimate-table tbody th {
  white-space: nowrap;
  color: var(--color-heading);
}

.service-estimate-interval {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
  color: var(--color-text-muted);
}

.service-estimate-meta {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.registration-estimate-total {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-heading);
}

.tool-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.tool-page .page-hero {
  margin-bottom: 22px;
}

.tool-page-alt {
  margin: 12px 0 0;
}

.tool-page-alt a {
  font-weight: 800;
  color: var(--color-primary, #7c3aed);
  text-decoration: none;
}

.service-estimate--compact > .utility-page-link {
  display: inline-block;
  margin: 0 0 14px;
}

@media (max-width: 700px) {
  /* One field per row: a 2×2 grid clipped the longer engine labels. */
  .service-estimate .fuel-trip-grid,
  .service-estimate-grid,
  .registration-estimate .fuel-trip-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .service-estimate-action {
    margin-top: 2px;
  }

  .service-estimate-action .btn {
    min-height: 48px;
  }

  .service-estimate-table thead {
    display: none;
  }
  .service-estimate-table,
  .service-estimate-table tbody,
  .service-estimate-table tr,
  .service-estimate-table th,
  .service-estimate-table td {
    display: block;
    width: 100%;
  }
  .service-estimate-table tr {
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--color-border);
  }
  .service-estimate-table td {
    padding: 4px 0;
  }
}

.compare-value.is-best {
  background: rgba(21, 128, 61, 0.1);
  color: var(--color-success);
  font-weight: 800;
}

.compare-insight {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--color-primary-muted);
  color: var(--color-heading);
  font-weight: 700;
}

/* ---------- Sticky model bar + mobile dock ---------- */
.model-sticky-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 850;
  display: none;
  background: var(--gradient-header);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  padding: 10px 12px;
}

.model-sticky-bar.is-visible {
  display: block;
  animation: dock-in 0.35s var(--ease-out);
}

.model-sticky-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-sticky-name {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.mobile-dock {
  display: none;
}

body.header-menu-body-lock .mobile-dock,
body.has-fullscreen-map .mobile-dock {
  display: none !important;
}

.site-footer {
  margin-top: 48px;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.site-footer-links a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--color-primary);
}

@keyframes dock-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 33, 168, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(107, 33, 168, 0); }
}

.finder-card .search-field input:focus {
  animation: none;
}

/* ---------- Finder presentation ---------- */
.finder-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.finder-intro-text {
  margin: 10px 0 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  font-size: 1rem;
  line-height: 1.55;
}

.results-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  align-items: flex-end;
  margin: 0 0 14px;
  padding: 0 0 16px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
}

.results-hero-copy {
  min-width: 0;
  flex: 1 1 220px;
}

.results-hero .section-kicker {
  margin: 0 0 6px;
  letter-spacing: 0.16em;
}

.results-hero h1,
.results-section .results-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--color-heading);
}

.results-hero-count {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-surface-section);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.results-hero-count strong {
  color: var(--color-heading);
  font-size: 1.05rem;
  font-weight: 800;
}

.results-section .preset-row {
  margin-top: 0;
  margin-bottom: 16px;
}

/* ---------- Header polish ---------- */
.header-logo a {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-gold-dark) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.header-all-cars-link {
  position: relative;
}

.header-all-cars-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease-out);
}

.header-all-cars-link:hover::after {
  transform: scaleX(1);
}

.header-menu-open .header-mobile-link {
  animation: dock-in 0.35s var(--ease-out) both;
}

.header-menu-open .header-mobile-link:nth-child(1) { animation-delay: 0.02s; }
.header-menu-open .header-mobile-link:nth-child(2) { animation-delay: 0.05s; }
.header-menu-open .header-mobile-link:nth-child(3) { animation-delay: 0.08s; }
.header-menu-open .header-mobile-link:nth-child(4) { animation-delay: 0.11s; }
.header-menu-open .header-mobile-link:nth-child(5) { animation-delay: 0.14s; }
.header-menu-open .header-mobile-link:nth-child(6) { animation-delay: 0.17s; }
.header-menu-open .header-mobile-link:nth-child(7) { animation-delay: 0.2s; }

html[data-theme="ocean"] .btn--primary,
html[data-theme="ocean"] .finder-btn.primary,
html[data-theme="ocean"] .results-filters-btn.primary,
html[data-theme="ocean"] .header-search-button,
html[data-theme="ocean"] .results-load-more-btn,
html[data-theme="ocean"] .feature-cards-more-btn,
html[data-theme="ocean"] .compare-bar-go,
html[data-theme="ocean"] .filter-button.active,
html[data-theme="ocean"] .fuel-tab.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

html[data-theme="gold"] .btn--primary,
html[data-theme="gold"] .finder-btn.primary,
html[data-theme="gold"] .results-filters-btn.primary,
html[data-theme="gold"] .header-search-button,
html[data-theme="gold"] .results-load-more-btn,
html[data-theme="gold"] .feature-cards-more-btn,
html[data-theme="gold"] .compare-bar-go,
html[data-theme="gold"] .filter-button.active,
html[data-theme="gold"] .fuel-tab.active {
  background: linear-gradient(135deg, #b8860b 0%, #92400e 100%);
  box-shadow: 0 14px 28px rgba(180, 134, 11, 0.3);
}

html[data-theme="slate"] .btn--primary,
html[data-theme="slate"] .finder-btn.primary,
html[data-theme="slate"] .results-filters-btn.primary,
html[data-theme="slate"] .header-search-button,
html[data-theme="slate"] .results-load-more-btn,
html[data-theme="slate"] .feature-cards-more-btn,
html[data-theme="slate"] .compare-bar-go,
html[data-theme="slate"] .filter-button.active,
html[data-theme="slate"] .fuel-tab.active {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 14px 28px rgba(51, 65, 85, 0.25);
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .market-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }

  /* Two rows of two — nothing gets clipped and no hidden horizontal scroll. */
  .market-strip--hero {
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 12px 0;
    padding: 0;
    max-width: none;
    overflow: visible;
  }

  .market-strip--hero .market-stat {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .market-strip--hero .market-stat-label,
  .market-strip--hero .market-stat-sub {
    font-size: 11px;
  }

  .market-strip--hero .market-stat-value {
    font-size: 1rem;
  }

  .finder-intro-text {
    color: rgba(255, 255, 255, 0.86);
    text-shadow: none;
  }

  .finder-kicker {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .preset-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .preset-row::-webkit-scrollbar { display: none; }

  .preset-chip {
    flex: 0 0 auto;
  }

  .fuel-trip-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .fuel-trip-card--compact .fuel-trip-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .brand-showcase {
    grid-template-columns: 96px 1fr;
    text-align: left;
    justify-items: stretch;
    padding: 20px 18px;
    gap: 16px;
  }

  .brand-showcase-logo {
    width: 96px;
    height: 96px;
  }

  /* One full-width card per row instead of a hidden-scroll carousel. */
  .premium-brands-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px !important;
    padding: 10px !important;
    max-width: 100%;
    overflow: visible;
  }

  .premium-brands-grid .brand-card.premium {
    width: 100%;
    animation: none;
  }

  .premium-brands-grid .brand-card.premium::before {
    animation-duration: 18s;
  }

  .premium-brands-grid .brand-card.premium .brand-card-image {
    height: 150px;
    padding: 4px;
  }

  .premium-brands-grid .brand-card.premium .brand-card-image img {
    padding: 16px;
  }

  .brand-card-premium-star {
    top: 8px;
    right: 10px;
    font-size: 22px;
  }

  .featured-generations-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding: 4px 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .featured-generations-grid::-webkit-scrollbar { display: none; }

  .featured-generation-card {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
  }

  .model-card,
  .variant-card,
  .fuel-city-card {
    transition: transform 0.18s var(--ease-out);
  }

  .model-card:active,
  .variant-card:active,
  .fuel-city-card:active,
  .featured-generation-card:active {
    transform: scale(0.98);
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--dock-height) + 12px);
  }

  .site-footer {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 900;
    background: var(--gradient-header);
    border: 1px solid var(--color-border);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(16px);
    padding: 6px;
    animation: dock-in 0.4s var(--ease-out);
  }

  .mobile-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    border-radius: 16px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .mobile-dock-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-dock-item.is-active {
    background: var(--color-primary-muted);
    color: var(--color-primary);
  }

  .compare-bar {
    bottom: calc(var(--dock-height) + 16px + env(safe-area-inset-bottom));
  }

  .model-sticky-bar {
    bottom: calc(var(--dock-height) + 14px + env(safe-area-inset-bottom));
  }

  .model-sticky-bar .btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  .header-search-form .search-field-icon {
    left: 12px;
  }

  .header-search-input {
    padding-left: 38px;
  }
}

@media (min-width: 1025px) {
  .header-search-input {
    height: 46px;
    min-height: 46px;
    border-radius: var(--search-radius);
    padding-left: 44px;
  }

  .header-search-button {
    min-height: 46px;
    border-radius: var(--search-radius);
  }
}

@media (max-width: 520px) {
  .fuel-trip-grid,
  .fuel-trip-card--compact .fuel-trip-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .market-strip {
    gap: 10px;
  }

  .market-stat-value {
    font-size: 1.15rem;
  }

  .brand-showcase {
    grid-template-columns: 72px 1fr;
    padding: 16px 14px;
    gap: 12px;
  }

  .brand-showcase-logo {
    width: 72px;
    height: 72px;
  }

  .results-hero {
    align-items: flex-start;
  }
}

@media (hover: none) {
  .card-shine::after {
    display: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .chassis-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chassis-filter-row::-webkit-scrollbar { display: none; }
  .chassis-filter-row .filter-button {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-shine:hover::after,
  .header-menu-open .header-mobile-link,
  .mobile-dock,
  .sr-appear,
  .premium-brands-grid,
  .premium-brands-grid .brand-card.premium,
  .premium-brands-grid .brand-card.premium::before {
    animation: none !important;
  }
}
