/* ==========================================================================
   css/bestand.css - Fahrzeugliste (fahrzeuge.html), 07.11.2026
   Vorbild: Gebrauchtwagenliste von Autohaus Ritter (Wunsch Inhaber).
   Autos als Zeilen: Bild links, rechts Titel und Preis, Kennwerte als
   Kacheln mit Symbol, unten "Details ansehen". Trefferzahl oben im Filter.
   Nur Farben des Hauses: Gelb, Anthrazit, Beige.
   ========================================================================== */

/* ---------- Trefferzahl ---------- */
#bestand .bestand-zahl{
  margin:0 0 4px; font:800 17px/1.25 var(--schrift-titel); letter-spacing:-.01em; color:#141414;
}
@media (max-width:1023px){
  #bestand .bestand-zahl{ grid-column:1 / -1; }
}

/* ---------- Kennwerte als Kacheln mit Symbol (alle Breiten, auch Startseite #vorschau) ---------- */
#bestand .wagen-werte, #vorschau .wagen-werte{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
#bestand .wagen-werte div, #vorschau .wagen-werte div{
  /* Liste 50 Nr. 35: kein Kasten im Kasten - Kennwerte ohne eigene Flaeche. */
  position:relative; padding:9px 10px 9px 40px;
}
#bestand .wagen-werte div::before, #vorschau .wagen-werte div::before{
  content:""; position:absolute; left:11px; top:50%; width:20px; height:20px; transform:translateY(-50%);
  background:#26272b;
  -webkit-mask:var(--sym) center/contain no-repeat; mask:var(--sym) center/contain no-repeat;
}
#bestand .wagen-werte div:nth-child(1), #vorschau .wagen-werte div:nth-child(1){ --sym:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
#bestand .wagen-werte div:nth-child(2), #vorschau .wagen-werte div:nth-child(2){ --sym:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18a9 9 0 1 1 16 0'/%3E%3Cpath d='m12 14 4-5'/%3E%3Ccircle cx='12' cy='14' r='1.5'/%3E%3C/svg%3E"); }
#bestand .wagen-werte div:nth-child(3), #vorschau .wagen-werte div:nth-child(3){ --sym:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='18' cy='5' r='2'/%3E%3Ccircle cx='6' cy='19' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3Cpath d='M6 7v10M12 7v10M18 7v5H6'/%3E%3C/svg%3E"); }
#bestand .wagen-werte div:nth-child(4), #vorschau .wagen-werte div:nth-child(4){ --sym:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v16M3 21h12M4 10h10'/%3E%3Cpath d='M14 8h2a2 2 0 0 1 2 2v6a1.5 1.5 0 0 0 3 0V9l-3-3'/%3E%3C/svg%3E"); }
#bestand .wagen-werte b, #vorschau .wagen-werte b{ font-size:14px; color:#141414; white-space:normal; overflow-wrap:break-word; hyphens:auto; -webkit-hyphens:auto; }
#bestand .wagen-werte span, #vorschau .wagen-werte span{ font-size:12px; margin-top:1px; }

/* "Details ansehen" als Knopf am Kartenende (die ganze Karte ist der Link) */
#bestand .wagen::after, #vorschau .wagen::after{
  /* Liste 50 Nr. 36: Nebenknopf wie ueberall - Umriss, Ecke 10, Hover nur Farbe. */
  content:"Details ansehen"; display:block; margin:4px 18px 18px; padding:12px 18px; border-radius:var(--radius);
  border:var(--rahmen) solid var(--tinte); background:transparent; color:var(--tinte); text-align:center; font:700 15px/1.2 var(--schrift-titel);
  transition:background .3s cubic-bezier(.32,.72,0,1), color .3s cubic-bezier(.32,.72,0,1);
}
#bestand .wagen:hover::after, #bestand .wagen:focus-visible::after, #vorschau .wagen:hover::after, #vorschau .wagen:focus-visible::after{ background:var(--tinte); color:var(--weiss); }

/* ---------- Zeilen ab 700 px ---------- */
@media (min-width:700px){
  #bestand #bestandRaster{ grid-template-columns:minmax(0,1fr) !important; gap:18px; }
  #bestand .wagen{
    display:grid; grid-template-columns:minmax(230px, 40%) minmax(0,1fr);
    column-gap:22px; padding:14px; align-items:start;
  }
  #bestand .wagen > *{ grid-column:2; }
  /* Bild behaelt das Format 100/61 - nur so faellt der Werbebalken oben
     aus dem Ausschnitt (siehe .foto-beschnitt in bm.css). */
  #bestand .wagen > .wagen-bild{ grid-column:1; grid-row:1 / span 8; margin:0; align-self:start; min-width:0; }
  #bestand .wagen-kopf{ padding:6px 0 12px; }
  #bestand .wagen-titel{ font-size:20px; }
  #bestand .wagen-unter{ font-size:13px; -webkit-line-clamp:2; }
  #bestand .wagen-preis{ font-size:24px; }
  #bestand .wagen-werte{ padding:0; }
  #bestand .wagen-zulauf, #bestand .wagen-senkung{ padding:12px 0 0; margin:0; }
  #bestand .wagen::after{ grid-column:2; justify-self:end; margin:14px 0 4px; padding:11px 26px; }
}
@media (prefers-reduced-motion:reduce){
  #bestand .wagen::after, #vorschau .wagen::after{ transition:none; }
}

/* ---------- Schieber Preis / Kilometer (07.11.2026) ---------- */
#bestand .schieber{ display:grid; gap:6px; padding:8px 2px 4px; min-width:0; }
#bestand .schieber-kopf{ display:flex; justify-content:space-between; gap:8px; font-size:13px; font-weight:700; color:#141414; }
#bestand .schieber-kopf output{ font-weight:600; color:#5a5b60; font-variant-numeric:tabular-nums; white-space:nowrap; }
/* Bahn und Griff: gemeinsamer Regler in css/linie.css (07.11.2026) */
/* Unter 1024 px: erst die vier Auswahlfelder, dann die Schieber */
@media (max-width:1023px){
  #bestand .werkzeugleiste .schieber{ order:5; grid-column:span 2; }
}
@media (min-width:600px) and (max-width:1023px){
  #bestand.s-grund .werkzeugleiste{ grid-template-columns:repeat(4, minmax(0,1fr)); column-gap:10px; }
  #bestand .werkzeugleiste .schieber{ padding:8px 6px 0; }
}
@media (max-width:599px){
  #bestand.s-grund .werkzeugleiste{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  #bestand.s-grund .werkzeugleiste > :last-child:nth-child(odd){ grid-column:auto; }
  #bestand .werkzeugleiste .schieber{ grid-column:1 / -1; }
}
/* Englische Fassung (js/sprache.js setzt lang="en") */
html[lang="en"] #bestand .wagen::after, html[lang="en"] #vorschau .wagen::after{ content:"View details"; }

/* Startseite: Knopf "Alle Fahrzeuge ansehen" auf Beige war gelb in gelb-
   nah (1,19:1) - dort anthrazit mit gelber Schrift (07.11.2026). */
/* Startseite am Handy: Karten im Wischband sind schmal (~250 px). Kacheln
   enger, Symbol kleiner, lange Woerter mit Trennstrich statt hartem Bruch. */
@media (max-width:599px){
  #vorschau .wagen-werte{ gap:6px; }
  /* Q112 (11.11.2026): Symbol ueber dem Wert statt daneben - kein "Schaltgetrie-be" mehr, Beschriftung 13 px. */
  #vorschau .wagen-werte div{ padding:32px 10px 9px; }
  #vorschau .wagen-werte div::before{ left:10px; top:10px; width:17px; height:17px; transform:none; }
  #vorschau .wagen-werte b{ font-size:13px; white-space:nowrap; hyphens:manual; -webkit-hyphens:manual; }
  #vorschau .wagen-werte span{ font-size:13px; }
}

/* Q53 (07.11.2026): Filter-Klappe am Handy. Ab 600 px loest sich die
   Huelle auf, alles steht wie vorher. */
.filter-knopf{ display:none; }
@media (min-width:600px){
  #bestand .filter-felder{ display:contents; }
}
@media (max-width:599px){
  #bestand.s-grund .werkzeugleiste{ grid-template-columns:repeat(2, minmax(0,1fr)); align-items:center; }
  #bestand .werkzeugleiste .bestand-zahl{ grid-column:1 / -1; }
  #bestand .filter-knopf{
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    height:48px; padding:0 14px; border-radius:var(--radius);
    background:#26272b; color:#fff; border:0; cursor:pointer;
    font:800 15px/1 var(--schrift-titel);
  }
  #bestand .filter-knopf::before{
    content:""; width:18px; height:18px; flex:none;
    background:#ECD817; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M7 12h10M10 18h4' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18M7 12h10M10 18h4' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #bestand .filter-knopf b{ min-width:22px; height:22px; padding:0 6px; border-radius:var(--rad-rund); background:#ECD817; color:#141414; font-size:13px; display:inline-grid; place-items:center; }
  #bestand .filter-knopf b[hidden]{ display:none; }
  #bestand .werkzeugleiste #fSortierung{ height:48px; }
  #bestand .filter-felder{
    grid-column:1 / -1; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px;
    padding:14px; border-radius:var(--radius); background:#fff;
    box-shadow:var(--ring-linie);
  }
  #bestand .filter-felder[hidden]{ display:none; }
  #bestand .filter-felder .schieber{ grid-column:1 / -1; }
}
@media (max-width:599px){
  .s-lead .s-lead-lang{ display:none; }
}
@media (max-width:599px){
  .s-kopf:has(#bestandTitel){ padding:28px 0 52px; }
  .s-kopf:has(#bestandTitel) + #bestand{ padding-top:28px; }
}
@media (max-width:599px){
  #bestand .werkzeugleiste .filter-felder{ order:9; }
}

/* Q61 (07.11.2026): Schnellwahl Marke / Antrieb unter der Liste */
.schnellwahl{ margin-top:clamp(40px,5vw,64px); padding-top:28px; border-top:1px solid rgba(20,20,20,.1); }
.schnellwahl-titel{ margin:0 0 12px; font:800 17px/1.2 var(--schrift-titel); color:#141414; letter-spacing:-.01em; }
.schnellwahl-titel + .schnellwahl-reihe{ margin-bottom:24px; }
.schnellwahl-reihe{ display:flex; flex-wrap:wrap; gap:8px; }
.schnellwahl-reihe a{
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px; border-radius:var(--rad-rund);
  background:#fff; color:#141414; text-decoration:none; font:700 15px/1 var(--schrift-text);
  box-shadow:var(--ring-linie); transition:box-shadow .2s, transform .2s;
}
.schnellwahl-reihe a span{ min-width:24px; height:24px; padding:0 7px; border-radius:var(--rad-rund); background:#f3f1ec; color:#5a5b60; font-size:13px; display:inline-grid; place-items:center; }
.schnellwahl-reihe a:hover{ box-shadow:var(--ring-auswahl); transform:translateY(-1px); }
.schnellwahl-reihe a:active{ transform:scale(.98); }
