/* Elite ad cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 560px) {
  .card-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.ad-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.ad-card:active {
  transform: scale(0.985);
}

.ad-card .media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: var(--surface-2);
  overflow: hidden;
}

.ad-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-card .media .badges {
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 1;
}

.ad-card .media .fav {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: var(--text);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.ad-card .media .fav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.ad-card .media .fav.on {
  color: var(--danger);
}

.ad-card .media .fav.on svg {
  fill: currentColor;
}

.ad-card .body {
  padding: 0.85rem 0.95rem 1rem;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.18) 0%, #ffffff 100%);
}

.ad-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.ad-card .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.ad-card .price-old {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 600;
}

.ad-card .title {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.45rem;
}

.ad-card .title-mm,
.ad-card .card-year {
  display: none;
}

.ad-card .specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.ad-card .spec-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.55rem;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-2);
}

.ad-card .spec-item i {
  font-style: normal;
  font-size: 0.72rem;
  opacity: 0.85;
}

.ad-card .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
}

.ad-card .meta-row .gear {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.72rem;
}

.ad-card .media-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(18, 18, 20, 0.18));
  pointer-events: none;
}

.ad-card.featured {
  box-shadow: var(--shadow);
}

/* v2 featured — same look on homepage + search results */
.ad-card.v2.featured {
  position: relative;
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
      135deg,
      rgba(var(--primary-rgb), 0.85) 0%,
      rgba(124, 102, 201, 0.7) 38%,
      rgba(48, 36, 98, 0.55) 100%
    )
    border-box;
  box-shadow:
    0 10px 28px rgba(48, 36, 98, 0.16),
    0 0 0 1px rgba(var(--primary-rgb), 0.12);
  overflow: hidden;
}

.ad-card.v2.featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 3;
  background: linear-gradient(90deg, #3d2a9c 0%, var(--primary) 42%, #9b87e8 100%);
  pointer-events: none;
}

.ad-card.v2.featured:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(48, 36, 98, 0.22),
    0 0 0 1px rgba(var(--primary-rgb), 0.18);
}

.ad-card.v2.featured .body {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.22) 0%, #ffffff 100%);
}

.ad-card.v2.featured .title {
  color: var(--dark);
}

.ad-card.v2.featured .price {
  color: var(--primary);
}

.ad-card.v2.featured .price-row.has-discount .price {
  color: #ef4444;
}

.ad-card.v2.featured .card-label-logo,
.ad-card.v2.featured .card-dealer-logo {
  display: none !important;
}

.ad-card .meta {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(18, 18, 20, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
}

.pill.accent {
  background: var(--accent);
}

.pill.good {
  background: #0f8a5f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.75rem 1.15rem;
  border-radius: 16px;
  font-weight: 750;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease);
}

.btn:active {
  transform: scale(0.975);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.28);
  transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--text-on-primary);
}

.btn-primary:active {
  background: var(--primary-active);
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  font-size: 0.86rem;
  border-radius: 12px;
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  background: var(--surface-2);
  color: var(--text-2);
}

.empty {
  text-align: center;
  padding: 2.4rem 1.2rem;
  border-radius: 22px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--muted);
}

.empty strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2), #faf9fc, var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.15s infinite linear;
  border-radius: 10px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.toast-host {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  padding-bottom: max(1rem, calc(var(--nav-h, 0px) + var(--safe-b, 0px) + 1rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: max-content;
  max-width: min(22rem, 100%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: enter 0.28s var(--ease-out);
}

.toast.err {
  background: var(--danger);
}

body.is-waiting {
  cursor: wait;
}

.wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 16, 31, 0.45);
  backdrop-filter: blur(6px);
}

.wait-overlay.on {
  display: flex;
}

.wait-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-width: 10rem;
  max-width: min(20rem, 100%);
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.wait-msg {
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink, #111);
}

.wait-spinner {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 8px solid #8662ff;
  animation: wait-spin-a 0.8s infinite linear alternate, wait-spin-b 1.6s infinite linear;
}

@keyframes wait-spin-a {
  0% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
  }
  12.5% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
  }
  25% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
  }
  62.5% {
    clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
  }
  75% {
    clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0% 100%);
  }
  100% {
    clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%);
  }
}

@keyframes wait-spin-b {
  0% {
    transform: scaleY(1) rotate(0deg);
  }
  49.99% {
    transform: scaleY(1) rotate(135deg);
  }
  50% {
    transform: scaleY(-1) rotate(0deg);
  }
  100% {
    transform: scaleY(-1) rotate(-135deg);
  }
}

/* Filter sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  background: rgba(18, 18, 20, 0.48);
  backdrop-filter: blur(5px);
  animation: fade-in 0.2s var(--ease);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  background: linear-gradient(180deg, #f4f0ff 0%, #faf8ff 18%, #ffffff 42%);
  border-radius: 28px 28px 0 0;
  padding: 0.7rem 1.1rem calc(1.1rem + var(--safe-b));
  overflow: auto;
  animation: sheet-up 0.38s var(--ease-out);
  box-shadow: var(--shadow-lg);
}

.sheet::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0.2rem auto 0.95rem;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sheet-head h3 {
  font-size: 1.2rem;
}

.sheet-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.55rem;
  padding-top: 0.85rem;
  background: linear-gradient(180deg, transparent, #fff 30%);
}

.sheet-foot .btn {
  flex: 1;
}

.sheet-foot .inq-send {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  padding: 0;
  display: grid;
  place-items: center;
}

.sheet.sheet-car-adv,
.sheet.adv-sheet {
  width: 100%;
  max-width: none;
  min-width: 100%;
  align-self: stretch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: 100%;
  max-height: none;
  min-height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  height: 100svh;
  max-height: 100svh;
  min-height: 100svh;
  border-radius: 0;
  background: #fff;
  animation: fade-in 0.2s var(--ease);
  box-shadow: none;
  box-sizing: border-box;
}

.sheet-car-adv::before {
  display: none;
}

.sheet-backdrop:has(.sheet-car-adv),
.sheet-backdrop.adv-backdrop {
  z-index: 600;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #fff;
  backdrop-filter: none;
}

.sheet-car-adv .sheet-head {
  flex: 0 0 auto;
  padding: max(0.85rem, env(safe-area-inset-top)) clamp(1rem, 2.5vw, 2rem) 0.4rem;
  margin-bottom: 0;
}

.sheet-car-adv #sheet-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0.15rem clamp(1rem, 2.5vw, 2rem) 0.75rem;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.sheet-car-adv .sheet-foot {
  flex: 0 0 auto;
  position: relative;
  margin: 0;
  padding: 0.75rem clamp(1rem, 2.5vw, 2rem) calc(0.9rem + var(--safe-b));
  border-top: 1px solid var(--border);
  background: #fff;
}

body.adv-lock {
  overflow: hidden;
}

.adv-head {
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.adv-head-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.adv-kicker {
  margin: 0 0 0.08rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #553fae);
}

.adv-head h3 {
  margin: 0;
  font-size: 1.12rem;
}

.adv-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  height: auto;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f6f5fa);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
  font-weight: 650;
  white-space: nowrap;
}

.adv-close:hover,
.adv-close:focus-visible {
  border-color: var(--accent, #553fae);
  color: var(--accent, #553fae);
}

.adv-jump {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0 clamp(1rem, 2.5vw, 2rem) 0.7rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

.adv-jump::-webkit-scrollbar {
  display: none;
}

.adv-jump button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6f5fa;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.adv-jump button:hover,
.adv-jump button:focus-visible {
  border-color: var(--accent, #553fae);
  color: var(--accent, #553fae);
  background: var(--primary-soft, #f0ecfa);
}

.adv-sec {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 0;
  overflow: visible;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
}

.adv-sec[open] {
  background: transparent;
  box-shadow: none;
}

.adv-sec > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 0;
  user-select: none;
  min-height: 52px;
}

.adv-sec > summary::-webkit-details-marker {
  display: none;
}

.adv-sec-mark {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--primary-soft, #f0ecfa);
  position: relative;
}

.adv-sec-mark::before,
.adv-sec-mark::after {
  content: "";
  position: absolute;
  inset: 50%;
  background: var(--accent, #553fae);
  border-radius: 2px;
}

.adv-sec-mark::before {
  width: 10px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.adv-sec-mark::after {
  width: 2px;
  height: 10px;
  transform: translate(-50%, -50%);
  transition: transform 0.16s var(--ease), opacity 0.16s var(--ease);
}

.adv-sec[open] > summary .adv-sec-mark::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0);
}

.adv-sec-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.adv-sec-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.adv-sec-hint {
  font-size: 0.76rem;
  font-weight: 550;
  color: var(--muted);
}

.adv-sec-n {
  flex: 0 0 auto;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--accent, #553fae);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adv-sec-body {
  display: block;
  padding: 0 0 1rem;
}

.sheet.sheet-car-adv .adv-sec .input,
.sheet.sheet-car-adv .adv-sec .select,
.sheet.sheet-car-adv .adv-sec input:not([type="checkbox"]):not([type="radio"]),
.sheet.sheet-car-adv .adv-sec .hf-multi-trigger {
  border: 1px solid var(--border);
  background: #fff;
}

.sheet.sheet-car-adv .adv-sec .input:focus,
.sheet.sheet-car-adv .adv-sec .select:focus,
.sheet.sheet-car-adv .adv-sec .hf-multi-trigger:hover:not(:disabled),
.sheet.sheet-car-adv .adv-sec .hf-multi-trigger[aria-expanded="true"] {
  border: 1px solid rgba(var(--primary-rgb), 0.45);
  background: #fff;
}

.adv-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.adv-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.5rem 0.15rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
  min-width: 0;
}

.adv-toggle span {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.25;
}

.adv-toggle:has(input:checked) {
  border: none;
  background: transparent;
  color: var(--accent-ink, #302462);
}

.adv-toggle input {
  accent-color: var(--primary);
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: start;
}

.adv-range {
  display: grid;
  gap: 0;
  margin-bottom: 0;
}

.sheet-car-adv .adv-grid > .field,
.sheet-car-adv .adv-grid > .adv-range,
.sheet-car-adv .adv-grid > .hf-field {
  margin-bottom: 0;
  min-width: 0;
}

.sheet-car-adv .field {
  gap: 0;
}

.sheet-car-adv .field > label,
.sheet-car-adv .adv-range-lbl,
.sheet-car-adv .hf-field > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sheet-car-adv .field-month {
  position: relative;
}

.sheet-car-adv .field-month > label {
  position: absolute !important;
  left: 0.85rem !important;
  right: 2.2rem !important;
  top: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  clip: auto !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  pointer-events: none !important;
  color: var(--muted) !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  z-index: 1;
}

.sheet-car-adv .field-month.is-filled > label,
.sheet-car-adv .field-month:focus-within > label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: -1px !important;
  clip: rect(0, 0, 0, 0) !important;
  overflow: hidden !important;
}

.sheet-car-adv .field-month:not(.is-filled):not(:focus-within) input[type="month"]::-webkit-datetime-edit {
  color: transparent;
}

.sheet-car-adv .input,
.sheet-car-adv .select,
.sheet-car-adv .adv-range-inputs .input,
.sheet-car-adv input[type="month"] {
  width: 100%;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font-size: 0.9375rem;
  line-height: 1.2;
}

.sheet-car-adv input[type="month"]::-webkit-datetime-edit,
.sheet-car-adv input[type="month"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.sheet-car-adv .hf-field {
  display: grid;
  gap: 0;
  margin: 0;
}

.sheet-car-adv .hf-multi-trigger {
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
}

.sheet-car-adv .hf-multi-trigger:hover:not(:disabled),
.sheet-car-adv .hf-multi-trigger[aria-expanded="true"] {
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
  border-color: rgba(var(--primary-rgb), 0.5);
}

.adv-range-lbl {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-2);
}

.adv-range-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
}

.adv-range-dash {
  color: var(--muted);
  font-weight: 700;
}

.adv-eq {
  display: grid;
  gap: 0.75rem;
}

.adv-eq-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.7rem 0.75rem 0.8rem;
  background: #faf9fd;
}

.adv-eq-head {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.adv-eq-head strong {
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.sheet-car-adv .eq-grid {
  max-height: 200px;
}

.sheet-car-adv .chip-row {
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .adv-grid {
    grid-template-columns: 1fr 1fr;
  }

  .adv-span,
  .adv-grid .field:has(.chip-row) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .sheet-car-adv .sheet-head {
    padding-top: max(1.15rem, env(safe-area-inset-top));
    padding-bottom: 0.55rem;
  }

  .sheet-car-adv .adv-head h3 {
    font-size: 1.05rem;
  }

  .sheet-car-adv .adv-jump {
    padding-bottom: 0.85rem;
  }

  .sheet-car-adv #sheet-body {
    padding-top: 0.85rem;
    padding-bottom: 1rem;
    flex: 1 1 0;
    min-height: 0;
    display: block;
  }

  .sheet-car-adv #sheet-body:not(.adv-body) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.85rem;
    align-content: start;
  }

  .sheet-car-adv #sheet-body:not(.adv-body) > .sheet-sec,
  .sheet-car-adv #sheet-body:not(.adv-body) > .form-row,
  .sheet-car-adv #sheet-body:not(.adv-body) > .sheet-acc,
  .sheet-car-adv #sheet-body:not(.adv-body) > .adv-sec,
  .sheet-car-adv #sheet-body:not(.adv-body) > .adv-toggles,
  .sheet-car-adv #sheet-body:not(.adv-body) > .field:has(.chip-row) {
    grid-column: 1 / -1;
  }

  .sheet-car-adv .sheet-foot {
    padding-top: 0.95rem;
    padding-bottom: 1.15rem;
  }

  .sheet-car-adv .eq-grid {
    grid-template-columns: 1fr 1fr 1fr;
    max-height: 240px;
  }

  .adv-toggles {
    grid-template-columns: repeat(4, minmax(12rem, 1fr));
  }

  .adv-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sheet.sheet-car-adv .adv-kicker {
    font-size: 0.6rem;
  }

  .sheet.sheet-car-adv .adv-head h3 {
    font-size: 1.05rem;
  }

  .sheet.sheet-car-adv .adv-jump button {
    min-height: 30px;
    padding: 0.22rem 0.7rem;
    font-size: 0.72rem;
  }

  .sheet.sheet-car-adv .adv-sec {
    margin-bottom: 0;
  }

  .sheet.sheet-car-adv .adv-sec > summary {
    min-height: 42px;
    padding: 0.55rem 0;
  }

  .sheet.sheet-car-adv .adv-sec-title {
    font-size: 0.88rem;
  }

  .sheet.sheet-car-adv .adv-sec-hint {
    font-size: 0.66rem;
  }

  .sheet.sheet-car-adv .adv-sec-body {
    padding: 0 0 0.75rem;
  }

  .sheet.sheet-car-adv .adv-grid {
    gap: 0.5rem;
  }

  .sheet.sheet-car-adv .adv-toggles {
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }

  .sheet.sheet-car-adv .adv-toggle {
    min-height: 38px;
    padding: 0.3rem 0.6rem;
    font-size: 0.76rem;
  }

  .sheet.sheet-car-adv .eq-opt,
  .sheet.sheet-car-adv .eq-opt span,
  .sheet.sheet-car-adv .adv-eq-head strong {
    font-size: 0.76rem;
  }

  .sheet.sheet-car-adv .adv-foot .btn {
    min-height: 42px;
    font-size: 0.82rem;
  }

  .sheet.sheet-car-adv .field,
  .sheet.sheet-car-adv .adv-range,
  .sheet.sheet-car-adv .hf-field {
    position: relative;
    gap: 0;
  }

  .sheet.sheet-car-adv .field > .input,
  .sheet.sheet-car-adv .field > .select,
  .sheet.sheet-car-adv input[type="month"] {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
  }

  .sheet.sheet-car-adv .hf-multi-trigger {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
  }

  .sheet.sheet-car-adv .hf-multi-summary {
    font-size: 0.8rem;
  }

  .sheet.sheet-car-adv .adv-range {
    background: transparent;
    padding: 0;
    min-height: 0;
  }

  .sheet.sheet-car-adv .adv-range-inputs .input {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .sheet.sheet-car-adv .field-month > label {
    font-size: 0.8rem !important;
  }

  .sheet.sheet-car-adv .eq-filter {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    font-size: 0.78rem;
  }
}

@media (min-width: 1200px) {
  .sheet.sheet-car-adv .adv-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.sheet-sec {
  margin: 0.1rem 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.sheet-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.sheet-check input {
  accent-color: var(--primary);
  width: 1.05rem;
  height: 1.05rem;
}

.sheet-acc {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0.55rem 0.75rem 0.7rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.sheet-acc > summary {
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  padding: 0.25rem 0 0.45rem;
}

.sheet-acc > summary::-webkit-details-marker {
  display: none;
}

.eq-filter {
  margin-bottom: 0.45rem;
  min-height: 42px !important;
}

.eq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem 0.65rem;
  max-height: 260px;
  overflow: auto;
}

.eq-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.25;
  cursor: pointer;
}

.eq-opt input {
  margin-top: 0.12rem;
  accent-color: var(--primary);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.is-placeholder-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.field:has(> .is-placeholder-label),
.field:has(> label.is-placeholder-label),
label.field:has(> .is-placeholder-label),
.dlg-field:has(> .is-placeholder-label) {
  gap: 0;
  margin-bottom: 0.55rem;
}

.input,
.select {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 16px;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  min-height: 42px;
  padding: 0.45rem 0.9rem;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 750;
  font-size: 0.86rem;
  color: var(--text-2);
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}

.filter-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 1rem 0.85rem;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
}

.filter-chip.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.filter-chip.clear {
  color: var(--danger);
}

/* Detail */
.detail-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ink);
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .back {
  position: absolute;
  left: 0.85rem;
  top: calc(0.85rem + var(--safe-t));
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  z-index: 2;
}

.detail-hero .back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 2;
}

.gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.gallery-dots span.on {
  background: #fff;
  width: 16px;
  border-radius: 999px;
}

.detail-body {
  margin-top: -1.25rem;
  position: relative;
  z-index: 1;
  background: var(--canvas);
  border-radius: 28px 28px 0 0;
  padding: 1.25rem 1.1rem 7rem;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.detail-title {
  font-size: 1.35rem;
  margin: 0.35rem 0 0.55rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1rem 0;
}

.spec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
}

.spec .k {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.spec .v {
  font-family: var(--font-display);
  font-weight: 750;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.cta-bar {
  position: fixed;
  left: var(--dock-pad);
  right: var(--dock-pad);
  bottom: calc(var(--dock-pad) + var(--safe-b));
  z-index: var(--z-cta);
  display: flex;
  gap: 0.55rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.cta-bar .btn {
  flex: 1;
}

.page-head {
  padding: 0.85rem 1rem 0.5rem;
}

.page-head .eyebrow {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.25rem;
}

.page-head h1 {
  font-size: clamp(1.55rem, 6vw, 1.9rem);
}

.results-meta {
  padding: 0 1rem 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.load-more {
  padding: 0.5rem 1rem 1rem;
}

.h-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 1rem 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

.h-scroll .ad-card {
  flex: 0 0 82%;
  max-width: 320px;
  scroll-snap-align: start;
}

@media (min-width: 560px) {
  .h-scroll .ad-card {
    flex-basis: 44%;
  }
}

.section-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.2rem;
}

.body-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 560px) {
  .body-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.body-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0.9rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  min-height: 110px;
  transition: transform 0.18s var(--ease);
}

.body-tile:active {
  transform: scale(0.97);
}

.body-tile .body-ico {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.body-tile strong {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.body-tile span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.map-shell {
  position: relative;
  z-index: var(--z-map);
  isolation: isolate;
  contain: paint;
  height: 280px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

/* Leaflet default panes are 400–1000 — isolate so they can't cover footer/dock */
.map-shell .leaflet-container,
.map-box .leaflet-container {
  z-index: 0 !important;
  max-width: 100%;
}

.map-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 0;
}

.map-hint {
  font-size: 0.86rem;
  margin: -0.35rem 0 0.75rem;
}

.linkish {
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--accent-ink);
}

.place-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 0.75rem;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.place-chips::-webkit-scrollbar {
  display: none;
}

.place-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 110px;
}

.place-chip strong {
  font-size: 0.9rem;
}

.place-chip span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.place-marker {
  background: transparent;
  border: 0;
}

.place-pin {
  width: 40px;
  height: 40px;
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(145deg, var(--primary), var(--primary-active));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  box-shadow: 0 10px 20px rgba(106, 69, 240, 0.35);
  transform: rotate(-8deg);
}

.place-pin span {
  transform: rotate(8deg);
}

.place-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.place-popup .leaflet-popup-content {
  margin: 0;
  width: 230px !important;
}

.map-pop img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.map-pop-body {
  padding: 0.75rem 0.85rem 0.9rem;
}

.map-pop-body strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.map-pop-count,
.map-pop-dist,
.map-pop-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.map-pop-price {
  font-family: var(--font-display);
  font-weight: 800;
  margin-top: 0.35rem;
}

.map-pop-btn {
  margin-top: 0.65rem;
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
}

.hero-market h1 {
  max-width: 14ch;
}

/* Themed dialogs (prompt/confirm) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(18, 18, 20, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: dlg-fade 0.2s ease;
}

@keyframes dlg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface, #fff);
  border-radius: 24px 24px 0 0;
  padding: 0.85rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  max-height: 88dvh;
  overflow: auto;
  box-shadow: 0 -8px 32px rgba(23, 24, 39, 0.12);
}

.modal::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #d7dae3;
  margin: 0.15rem auto 0.9rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.modal-body p,
.dlg-msg {
  margin: 0 0 0.85rem;
  color: var(--text-secondary, #626879);
  line-height: 1.45;
}

.dlg-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.dlg-field span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary, #626879);
}

.dlg-error {
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 650;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

.modal-footer {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.modal-footer .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 1rem;
  }

  .modal {
    border-radius: 20px;
    padding: 1.25rem 1.35rem;
  }

  .modal::before {
    display: none;
  }
}
