/* ============================================================================
   seite-marktplatz  —  aus marktplatz.html des statischen Standes
   Automatisch extrahiert (_work/theme-css-extrakt.mjs), inhaltlich unveraendert.
   Einzige Aenderung: Bildpfade zeigen auf das Theme-Verzeichnis.
   ========================================================================= */


.page-hero {
  position: relative;
  padding: 160px 0 64px;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(225,6,0,.22), transparent 60%),
    linear-gradient(180deg, #050505, var(--bg-base-2));
}
.page-hero h1 {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(64px, 11vw, 168px); line-height: 0.86; letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 24px 0;
}
.page-hero h1 .accent { color: var(--red); }
.page-hero .lede { max-width: 560px; }

.crumbs {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 16px;
}
/* Klickflaeche auf 24px (WCAG 2.2 Zielgroesse) — das negative Margin haelt die
   Zeilenhoehe unveraendert, optisch aendert sich nichts. */
.crumbs a { color: var(--text-secondary); padding: 4px 0; margin: -4px 0; }
.crumbs .sep { color: var(--red-bright); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px;
}
.hero-meta .chip { font-size: 12px; padding: 10px 16px; }
.hero-meta .chip strong { color: var(--text-primary); margin-right: 6px; }

/* Hof-Band — eigenstaendiges Bild UNTER der Headline (Variante b).
   Bewusst nicht als Hero-Hintergrund: das Foto ist im linken Drittel hell
   (Himmel, weisse Fassade, silberner Cayenne). Weisse Anton-Headline darueber
   braeuchte ~75 % Schwarz, um AA zu halten — dann ist vom Hof nichts mehr zu
   sehen. Gerahmt bleibt das Bild ein Bild und die Headline voll lesbar. */
.hof-band { margin: 48px 0 0; }
.hof-band .shot {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
}
.hof-band img {
  display: block; width: 100%; height: auto;
  /* Mobil enger gerahmt auf Urus/BMW — ein 21:9-Streifen waere bei 350px
     Breite nur ~150px hoch und zeigte niemanden mehr. */
  aspect-ratio: 16/10; object-fit: cover; object-position: 70% 50%;
}
@media (min-width: 768px) {
  .hof-band img { aspect-ratio: 21/9; object-position: 50% 50%; }
}
.hof-band .shot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5,5,5,.55));
}
.hof-band figcaption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 14px;
}
.hof-band figcaption .accent { color: var(--red-bright); }

/* Filter bar */
.filters {
  background: linear-gradient(180deg, rgba(5,5,5,0.6), rgba(5,5,5,0));
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
  padding: 24px 0;
  /* Naehe-Gesetz (Review 20/5 B4): das Werkzeug gehoert zu seinem Wirkungsziel.
     Die Leiste klebte am Hero (64 px darueber) und stand 128 px vom Raster weg,
     das sie steuert — beides gedreht: >=96 px Luft nach oben (siehe unten
     .section.markt-liste fuer die Gegenseite). */
  margin-top: 32px;
}
/* Gegenstueck zu .filters — Raster ruecht an die Leiste heran (128/96 -> 56).
   Doppelklasse, damit die Regel die .section-Media-Query ab 1024 px schlaegt. */
.section.markt-liste { padding-top: 56px; }
.filters-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 768px) {
  /* minmax(0,…) statt 1fr: sonst koennen die Spalten nicht unter die Inhaltsbreite
     schrumpfen und der Reset-Button wird herausgedrueckt (44px Overflow @1280,
     4px @1320, ab 1340 unauffaellig — genau das Band, das selten getestet wird). */
  /* 7 Felder passen erst ab ~1200px nebeneinander — darunter bewusst zwei Reihen,
     statt sie in zu schmale Spalten zu quetschen. */
  .filters-grid { grid-template-columns: minmax(0,1.4fr) repeat(2, minmax(0,1fr)) auto; }
  .filters-grid > * { min-width: 0; }
  .field select, .field input { width: 100%; min-width: 0; }
}
@media (min-width: 1200px) {
  .filters-grid { grid-template-columns: minmax(0,1.6fr) repeat(5, minmax(0,1fr)) auto; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-muted);
}
.field select,
.field input {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.field select { padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8a8' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }
/* Fokus und Fehler waren am Feld pixelidentisch — beide rot + red-soft (Review
   20/10 Z1). Den Fokus traegt jetzt die weisse Outline aus shared.css (deshalb
   hier KEIN `outline: 0` mehr, das sie bisher tot machte); die Border hellt nur
   dezent auf. Rot + red-soft bleibt exklusiv dem .is-invalid-Zustand. */
.field input:focus, .field select:focus { border-color: rgba(255,255,255,.45); box-shadow: none; }

.filter-reset {
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color .2s, border-color .2s;
}
.filter-reset:hover { color: var(--red-bright); border-color: var(--border-red); }

/* Marketplace grid */
.market {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .market { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .market { grid-template-columns: repeat(3, 1fr); } }

.veh-card {
  position: relative; overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  transition: transform .4s var(--ease-spring), border-color .35s, box-shadow .35s;
  display: flex; flex-direction: column;
}
.veh-card:hover { transform: translateY(-4px); border-color: var(--border-red); box-shadow: var(--shadow-red); }
.veh-img { aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--surface-2); }
.veh-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.veh-card:hover .veh-img img { transform: scale(1.06); }
.veh-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 10px; border-radius: var(--r-sm);
  background: rgba(5,5,5,.7); backdrop-filter: blur(12px);
  border: 1px solid var(--border-2);
  color: var(--text-primary);
  z-index: 2;
}
.veh-tag.tag-red { background: var(--red); border-color: var(--red); }
/* Der Karten-Koerper waechst mit; die Preiszeile wird ans untere Ende geschoben.
   Sonst haengt sie an der Hoehe des Modellnamens: eine zweizeilige Kachel schob
   ihren Preis 26px tiefer als die Nachbarkachel, die Reihe wirkte verrutscht. */
.veh-body { padding: 22px 24px 26px; flex: 1 1 auto; display: flex; flex-direction: column; }
.veh-make { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; color: var(--text-muted); text-transform: uppercase; }
.veh-name {
  font-family: var(--font-display); font-style: italic;
  font-size: 28px; line-height: 1; letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 8px 0 14px;
}
/* Manche Modellnamen aus dem Bestand sind ganze Werbesaetze
   ("Touran 2,0 Benzin / Erdgas / Klima / Navi / Tempomat"). Auf der Kachel
   gekuerzt, damit das Raster ruhig bleibt — im Detail steht der volle Text. */
.veh-name .veh-model,
.veh-name .veh-trim {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
  /* Kursiv-Ueberhang: der schraege Auslauf des letzten Buchstabens lag genau auf
     der overflow-Kante des line-clamp und wurde abgeschnitten. */
  padding-inline-end: .08em;
}
.veh-name .veh-model { -webkit-line-clamp: 2; }
.veh-name .veh-trim {
  -webkit-line-clamp: 1;
  font-size: 0.72em; color: var(--text-secondary); margin-top: 4px;
}
.veh-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-secondary); padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px dashed var(--border-1); }
.veh-meta span { display: inline-flex; align-items: center; gap: 6px; }
.veh-foot { display: flex; justify-content: space-between; align-items: end; margin-top: auto; }
.veh-price { font-family: var(--font-display); font-style: italic; font-size: 26px; letter-spacing: -0.02em; color: var(--text-primary); }
.veh-price .euro { color: var(--red); }

/* Ladeplatzhalter (Review 20/7 R2): auf 3G blieb unter der Filterleiste bis zu
   10 s lang eine STILLE Leere — optisch nicht vom Fehlerfall zu unterscheiden.
   Statisches Markup, kein JS: der erste render()-Lauf ueberschreibt #market
   ohnehin komplett (Erfolg, Leertreffer UND Ladefehler). */
.markt-laden {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border-1);
  border-radius: var(--r-lg);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-muted);
}

.empty {
  grid-column: 1 / -1;
  padding: 64px 32px;
  text-align: center;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-lg);
}
.empty .icon { width: 64px; height: 64px; margin: 0 auto 24px; color: var(--red); }
.empty h3 { font-family: var(--font-display); font-style: italic; font-size: 32px; margin-bottom: 8px; text-transform: uppercase; }

/* Trust bar */
.trust {
  background: linear-gradient(180deg, var(--bg-base), #000);
  border-top: 1px solid var(--border-1);
}
.trust-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust .item { display: flex; gap: 14px; align-items: start; padding: 8px 0; }
.trust .item .icon {
  flex: 0 0 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--red-soft); border: 1px solid var(--border-red);
  display: grid; place-items: center;
  color: var(--red);
}
.trust .item h4 { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 4px; text-transform: uppercase; }
.trust .item p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* Detail dialog */
.veh-card-btn {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; padding: 0; text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer;
  transition: transform .4s var(--ease-spring), border-color .35s, box-shadow .35s;
  font: inherit; color: inherit;
}
.veh-card-btn:hover { transform: translateY(-4px); border-color: var(--border-red); box-shadow: var(--shadow-red); }
.veh-card-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

dialog.veh-detail {
  margin: auto;
  padding: 0;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  color: var(--text-primary);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), 0 0 64px -16px rgba(225,6,0,.3);
  overflow: hidden;
  /* Desktop: 16:9 dialog */
  width: min(1200px, 90vw);
  aspect-ratio: 16 / 9;
  max-height: 90vh;
}
/* Mobile: full viewport */
@media (max-width: 767px) {
  dialog.veh-detail {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
    border: 0;
  }
}

dialog.veh-detail::backdrop {
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: no-preference) {
  dialog.veh-detail { animation: detailIn 320ms var(--ease-out); }
  dialog.veh-detail::backdrop { animation: backdropIn 220ms var(--ease-out); }
}
@keyframes detailIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
/* Exit (Review 20/10 Z4): die Site zelebriert jedes Erscheinen, das Verschwinden
   war ueberall ein harter Schnitt. Die Schliess-Funktion setzt .is-closing,
   wartet ~180 ms und ruft dann close() — Scroll-Freigabe passiert SOFORT, nur
   die Optik fadet. `animation: none` nimmt der noch laufenden Enter-Animation
   den Vorrang, falls jemand innerhalb der ersten 320 ms schliesst.
   Unter `prefers-reduced-motion: reduce` gibt es diese Klasse nie (das JS
   schliesst dort direkt) — deshalb steht der Block hinter no-preference. */
@media (prefers-reduced-motion: no-preference) {
  dialog.veh-detail.is-closing { animation: none; opacity: 0; transition: opacity .18s var(--ease-out); }
  dialog.veh-detail.is-closing::backdrop { animation: none; opacity: 0; transition: opacity .18s var(--ease-out); }
}

/* Inner: desktop = side-by-side, mobile = stacked */
.veh-detail-inner {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
}
@media (min-width: 768px) {
  .veh-detail-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

.veh-detail-img {
  position: relative;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  overflow: hidden;
  /* Horizontales Wischen gehoert der Galerie, vertikales dem Dialog-Body.
     Ohne diese Zeile uebernahm der Browser die horizontale Geste selbst
     (Scroll-Chaining nach aussen) und feuerte pointercancel — der Swipe kam
     nie am pointerup an und blaetterte deshalb nie. */
  touch-action: pan-y;
}
@media (max-width: 767px) {
  .veh-detail-img {
    height: 280px;
    padding-top: env(safe-area-inset-top, 0);
    background-clip: content-box;
  }
}
.veh-detail-img img { width: 100%; height: 100%; object-fit: contain; background: #0a0a0a; display: block; }

/* Body: scrollable on desktop right column, scrollable on mobile under image */
.veh-detail-body {
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 96px;
  /* Am Ende des Dialog-Bodys weiterwischen darf NICHT die Seite dahinter
     mitziehen (Scroll-Chaining). */
  overscroll-behavior: contain;
}
.veh-detail-body-content {
  padding: 24px 26px 16px;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) {
  .veh-detail-body-content { padding: 28px 32px 16px; }
}

/* Sticky action footer */
.veh-detail-actions {
  position: sticky;
  bottom: 0;
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 14px 26px calc(14px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, rgba(15,15,15,.85), var(--surface-2) 30%);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-1);
  z-index: 5;
}
.veh-detail-actions .btn { flex: 1 1 160px; justify-content: center; }
/* Mobil kompakter: mit der Standard-Groesse (14px/0.14em/28px Polster) brauchte
   "Anfrage senden" 230px, verfuegbar waren 163 — der Text brach um und beide
   Knoepfe wurden 82px hoch. Gekuerztes Polster + nowrap haelt beide einzeilig
   nebeneinander; wird es doch zu eng (sehr schmale Geraete), umbricht die Zeile
   und jeder Knopf nimmt die volle Breite. */
@media (max-width: 767px) {
  .veh-detail-actions .btn {
    flex: 1 1 auto; white-space: nowrap;
    font-size: 12px; letter-spacing: 0.08em; gap: 8px; padding: 14px 14px;
  }
}
@media (min-width: 768px) { .veh-detail-actions { padding: 14px 32px; } }

/* Close button — sticky inside header, safe-area aware on mobile */
.veh-detail-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0));
  right: 14px;
  z-index: 10;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(5,5,5,0.7); backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); border-radius: 999px;
  color: var(--text-primary); cursor: pointer;
  /* Review 20/10 Z6: die Overlay-Steuerelemente sprangen als einzige der Site
     ohne Uebergang in den Hover — gleiche Familie wie Tabs/Links (.2s). */
  transition: background-color .2s, border-color .2s, color .2s;
}
.veh-detail-close:hover { background: var(--red); border-color: var(--red); }
.veh-detail-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.veh-detail-body h2 {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 26px; line-height: 1; letter-spacing: -0.02em;
  text-transform: uppercase; margin: 4px 0;
}
@media (min-width: 768px) { .veh-detail-body h2 { font-size: 32px; } }

.veh-detail-body .meta-line { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; color: var(--text-muted); text-transform: uppercase; }
.veh-detail-body .trim { color: var(--text-secondary); font-size: 14px; }
.veh-detail-body .price-big { font-family: var(--font-display); font-style: italic; font-size: 30px; letter-spacing: -0.02em; color: var(--text-primary); margin: 4px 0 4px; }
@media (min-width: 768px) { .veh-detail-body .price-big { font-size: 36px; } }
.veh-detail-body .price-big .euro { color: var(--red); }

.veh-spec {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0 16px;
  grid-template-columns: 1fr 1fr;
  font-size: 13px;
}
/* Mobil EINE Spalte: bei zwei Spalten a 161px brach die Haelfte der Werte um
   ("118.565 / km", "187 kW · 254 / PS") — die Zeile war dann 2x so hoch wie
   noetig und der Block wirkte zerfranst. Volle Breite = Label links, Wert rechts. */
@media (max-width: 599px) { .veh-spec { grid-template-columns: 1fr; } }
.veh-spec > div {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border-1);
}
/* 11 statt 10.5 px: 10.5 px Mono mit 0.14em Sperrung lag unter der eigenen
   Lesbarkeitsgrenze fuer Informationstext (Review 20/9 §7 + §2). */
.veh-spec dt { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; align-self: center; }
/* Die Werte stehen rechtsbuendig untereinander ("118.565 km" / "1.969 cm³") —
   Tabellenziffern halten die Ziffernspalte ruhig. */
.veh-spec dd { color: var(--text-primary); margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

.specs-heading {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 6px;
}

.veh-highlights {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: grid; gap: 4px;
  font-size: 13px;
}
.veh-highlights li {
  position: relative; padding-left: 22px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.veh-highlights li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 12px; height: 1px; background: var(--red);
}

.veh-status-chip {
  /* Im Flex-Spalten-Container wuerde inline-flex sonst auf volle Breite gedehnt
     und liefe unter den Schliessen-Knopf. */
  display: inline-flex; align-self: flex-start; max-width: calc(100% - 52px);
  align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(0,217,107,0.12); border: 1px solid rgba(0,217,107,0.4); color: #80f0b6;
}
.veh-status-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #00d96b; box-shadow: 0 0 8px #00d96b; }

@media (prefers-reduced-motion: reduce) {
  .veh-card-btn { transition: none; }
  .veh-card-btn:hover { transform: none; }
}

.vehicle-desc {
  font-size: 13.5px; line-height: 1.65; color: var(--text-secondary);
  margin: 4px 0 8px; white-space: pre-line;
}
.veh-gallery-thumbs {
  position: absolute; bottom: 10px; left: 10px; right: 10px;
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.veh-gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb-btn {
  flex: 0 0 56px; height: 42px; padding: 0;
  border-radius: var(--r-sm);
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(5,5,5,.5);
  overflow: hidden; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;   /* Z6 */
}
.gallery-thumb-btn:hover,
.gallery-thumb-btn.is-active { border-color: #fff; }
.gallery-thumb-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.gallery-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Bestand / Verkauft — Umschalter ===== */
.status-tabs {
  display: flex; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--border-2); border-radius: var(--r-md);
  overflow: hidden; width: fit-content; max-width: 100%;
}
.status-tabs button {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 12px 18px; background: var(--surface-2); color: var(--text-secondary);
  border: 0; border-right: 1px solid var(--border-2); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.status-tabs button:last-child { border-right: 0; }
.status-tabs button:hover { color: var(--text-primary); background: var(--surface-3); }
.status-tabs button[aria-selected="true"] { background: var(--red); color: #fff; }
.status-tabs button:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
/* Mobil: nebeneinander passen 146px + 212px nicht in 342px — der zweite Knopf
   rutschte in eine zweite Zeile und liess rechts eine tote Flaeche stehen
   (der rote Reiter fuellte seine Zeile nicht). Zwei gleiche Spalten statt
   Umbruch: beide Reiter gleich breit, gleich hoch, kein Loch. */
@media (max-width: 599px) {
  .status-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .status-tabs button { padding: 11px 8px; font-size: 10px; letter-spacing: 0.1em; line-height: 1.35; }
}

.market-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.market-count {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted);
}
.market-count strong { color: var(--text-primary); }

/* Verkaufte Karten: sichtbar, aber erkennbar nicht mehr im Angebot */
.veh-card-btn.is-sold .veh-img img { filter: grayscale(0.75) brightness(0.72); }
.veh-card-btn.is-sold:hover .veh-img img { filter: grayscale(0.4) brightness(0.85); }
.veh-card-btn.is-sold .veh-price { color: var(--text-muted); }
.veh-card-btn.is-sold .veh-price .euro { color: var(--text-muted); }
.veh-tag.tag-sold { background: var(--red); border-color: var(--red); color: #fff; }
/* Reserviert war bisher nur im Detail sichtbar — auf der Kachel sah ein
   reserviertes Fahrzeug aus wie ein frei verfuegbares. */
.veh-tag.tag-reserved { background: rgba(255,176,32,.92); border-color: #ffb020; color: #1a1000; }

.veh-status-chip.is-sold { background: rgba(225,6,0,0.14); border-color: var(--border-red); color: #ff9a9a; }
.veh-status-chip.is-sold::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.veh-status-chip.is-reserved { background: rgba(255,176,32,0.13); border-color: rgba(255,176,32,0.42); color: #ffd48a; }
.veh-status-chip.is-reserved::before { background: #ffb020; box-shadow: 0 0 8px #ffb020; }

.sold-note {
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(225,6,0,0.1); border: 1px solid var(--border-red);
  font-size: 13px; color: #ffb3b3; line-height: 1.5;
}

/* ===== Detail: Galerie mit Blättern ===== */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(5,5,5,.66); backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); border-radius: 999px;
  color: #fff; cursor: pointer; z-index: 3;
  transition: background-color .2s, border-color .2s, color .2s;   /* Z6 */
}
.gallery-nav:hover { background: var(--red); border-color: var(--red); }
.gallery-nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-counter {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  padding: 5px 9px; border-radius: var(--r-sm);
  background: rgba(5,5,5,.7); backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); color: var(--text-primary);
}
@media (max-width: 767px) { .veh-detail-img { min-height: 280px; } }

/* Detail: Ausstattung als Chips */
.veh-extras { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.veh-extras li {
  font-size: 12px; line-height: 1.35; padding: 6px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-secondary);
}
.veh-extras-more {
  margin-top: 8px; padding: 7px 12px; font-size: 11px;
  font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--border-2); border-radius: var(--r-md);
  color: var(--text-secondary); cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;   /* Z6 */
}
.veh-extras-more:hover { color: var(--red-bright); border-color: var(--border-red); }

.veh-legal { margin-top: 10px; }
.veh-legal summary {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-muted); cursor: pointer; padding: 6px 0;
}
.veh-legal summary:hover { color: var(--text-secondary); }
.veh-legal p { font-size: 11.5px; line-height: 1.55; color: var(--text-muted); margin: 6px 0 0; }

/* ===== Lightbox (Vollbild-Galerie, mobile.de-Style) ===== */
/* Das Hauptbild ist ein Knopf, kein blosses img-Element: vorher liess es sich nur mit
   der Maus vergroessern (tabindex -1, kein Tastatur-Zugang), und auf dem Handy
   verriet nichts, dass man es antippen kann. */
.veh-zoom {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in;
}
.veh-zoom:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
#veh-detail-main { cursor: zoom-in; }
.veh-zoom-hint {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(5,5,5,.7); backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); color: var(--text-primary);
  pointer-events: none;
}
/* Ueber die Thumb-Leiste heben, wenn es eine gibt */
.veh-zoom-hint.hoch { bottom: 60px; }
/* height:100dvh als zweite Zeile: aeltere Browser nehmen die erste, moderne die
   zweite — auf dem Handy sonst 100vh gegen die AUSGEFAHRENE Adressleiste
   gerechnet und das Bild lief unter die Leiste. touch-action:none, weil in der
   Lightbox jede Geste uns gehoert (blaettern), nicht dem Browser-Scroll. */
dialog.lb { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #030304; color: #fff; touch-action: none; }
dialog.lb[open] { display: flex; }
dialog.lb::backdrop { background: transparent; }
/* Der Sprung ins Vollbild war hart geschnitten, waehrend der Detail-Dialog
   darunter sanft einblendet — zwei Dialoge, zwei Handschriften. */
@media (prefers-reduced-motion: no-preference) {
  dialog.lb[open] { animation: lbIn 220ms var(--ease-out); }
  dialog.lb[open] img { animation: lbBildIn 260ms var(--ease-out); }
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbBildIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
/* Exit-Fade der Lightbox — gleiche Familie/Dauer wie der Detail-Dialog (Z4) */
@media (prefers-reduced-motion: no-preference) {
  dialog.lb.is-closing, dialog.lb[open].is-closing { animation: none; opacity: 0; transition: opacity .18s var(--ease-out); }
  dialog.lb.is-closing img { animation: none; }
}
.lb img { max-width: 94vw; max-height: 86vh; object-fit: contain; display: block; }
.lb-zaehler { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; color: #fff; background: rgba(5,5,5,.6); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2); }
/* transition: Z6 — siehe .gallery-nav */
.lb-schliessen { position: fixed; top: 14px; right: 14px; width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: rgba(5,5,5,.6); border: 1px solid var(--border-2); border-radius: 999px; transition: background-color .2s, border-color .2s, color .2s; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; display: grid; place-items: center; color: #fff; background: rgba(5,5,5,.6); border: 1px solid var(--border-2); border-radius: 999px; transition: background-color .2s, border-color .2s, color .2s; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-nav:hover, .lb-schliessen:hover { background: var(--red); border-color: var(--red); }
@media (max-width: 767px) { .lb-nav { width: 46px; height: 46px; } .lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; } }
