/* =====================================================================
   detail.css — S.A.S Automobile (Autohaus 17), Fahrzeug-Detailseite
   Vorlage ~/.claude/vorlagen/fahrzeug-detail (GESETZ Kap. 10): Exposé-Knopf
   OBEN, Galerie mit Pfeilen über ALLE Bilder, Daten-Liste, Ausstattung nach
   Kategorien, Beschreibung, EnVKV, Sticky-Anfrage. Aufbau unverändert —
   angepasst sind nur Farbwelt/Typo (Haut A „Der Lichtkasten", tokens.css)
   und die Zusätze aus bau-brief §3: Scheibenzettel am Preis (6-px-Rotband),
   Preisbewertung mit Quelle, Rundum-Paket im Anfrageformular.
   Generator: tools/generate-fahrzeugseiten.mjs · lädt nach tokens/rahmen.css.
   ===================================================================== */
.det { padding-block: 1.75rem 4.5rem; }
.det-pfad { display: flex; gap: .6rem; align-items: center; font-size: .86rem; color: var(--meta); margin: 0 0 1.4rem; }
.det-pfad a { color: var(--navy); text-decoration: none; font-weight: 700; }
.det-pfad a:hover { text-decoration: underline; }

.det-kopf { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2.5rem; align-items: end; margin-bottom: 1.6rem; }
.det-kopf .h-2 { margin-top: .35rem; }
.det-kopf__unter { color: var(--meta); margin: .5rem 0 0; max-width: 42rem; }

/* Scheibenzettel am Preis (Device A): weiße Karte, oben 6 px Kennzeichen-Rot */
.det-zettel {
  display: inline-grid; gap: .45rem; margin: 1.1rem 0 0; min-width: min(22rem, 100%);
  background: var(--zettel); color: var(--zettel-text);
  border: 1px solid var(--kante); border-radius: var(--radius); box-shadow: var(--schatten);
  overflow: hidden; padding: 0 1.3rem 1rem;
}
.det-zettel::before { content: ""; display: block; height: 6px; margin: 0 -1.3rem .55rem; background: var(--rot); }
.det-kopf__preis { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin: 0; }
.det-kopf__preis b {
  font-family: var(--disp); font-stretch: 125%; font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.25rem); line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: proportional-nums;
}
.det-kopf__preis span { color: var(--meta); font-size: .86rem; }
.det-zettel__bewertung { justify-self: start; font-size: .8rem; font-weight: 700; color: var(--navy); background: var(--flaeche); padding: .25rem .55rem; border-radius: 4px; }
.det-zettel__bewertung small { font-weight: 400; color: var(--meta); font-size: inherit; }

.det-kopf__eck { margin: .8rem 0 0; color: var(--meta); font-size: .95rem; }
.det-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 0; padding: 0; }
.det-chips li { font-size: .8rem; font-weight: 700; padding: .32rem .7rem; border-radius: 999px; border: 1px solid var(--kante-stark); background: var(--flaeche); color: var(--text); }
.det-kopf__knoepfe { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: flex-end; }
.det-kopf__knoepfe .knopf { white-space: nowrap; }
.det-expose svg { margin-right: .1rem; }
.merk { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--kante-stark); background: transparent; color: var(--navy); cursor: pointer; }
.merk svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.merk--text { position: static; width: auto; height: 48px; padding: 0 1rem; gap: .45rem; font: inherit; font-weight: 700; font-size: .95rem; border-radius: var(--radius); }
.merk--text:hover { background: var(--flaeche); border-color: var(--navy); }
.merk--text svg { width: 18px; height: 18px; }
.merk--text[aria-pressed="true"] { border-color: var(--rot); color: var(--rot-text); }
.merk--text[aria-pressed="true"] svg { fill: currentColor; }
.resHinweis { margin-top: .8rem; font-weight: 700; color: var(--rot-text); }

/* Galerie */
.gal { margin: 0 0 2.5rem; }
.gal__buehne { position: relative; margin: 0; aspect-ratio: 16/10; border-radius: var(--radius); overflow: clip; background: var(--flaeche); }
.gal__buehne img[data-gal-haupt] { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: opacity 180ms var(--ease); }
.gal__buehne img.ist-wechsel { opacity: .85; }
.gal__pfeil {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .35); background: rgb(14 20 40 / .58); color: #fff;
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px);
  transition: background 150ms var(--ease), transform 150ms var(--ease); z-index: 2; padding: 0;
}
.gal__pfeil:hover { background: var(--navy-fest); }
.gal__pfeil:active { transform: translateY(-50%) scale(.96); }
.gal__pfeil:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gal__pfeil--l { left: 1rem; }
.gal__pfeil--r { right: 1rem; }
.gal__zaehler {
  position: absolute; left: 1rem; bottom: 1rem; margin: 0; padding: .3rem .7rem; border-radius: 999px;
  background: rgb(14 20 40 / .62); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em; z-index: 2;
}
.gal__thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: .5rem; margin-top: .6rem; }
.gal__thumb {
  position: relative; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: clip;
  background: var(--flaeche); cursor: pointer; aspect-ratio: 16/10; opacity: .82;
  transition: border-color 150ms var(--ease), opacity 150ms var(--ease);
}
.gal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal__thumb:hover, .gal__thumb[aria-current="true"] { opacity: 1; border-color: var(--navy); }
.gal__thumb:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.gal__voll { position: fixed; inset: 0; z-index: 100; background: rgb(6 9 20 / .96); display: grid; place-items: center; padding: 3rem 1rem; }
.gal__voll[hidden] { display: none; }
.gal__voll img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.gal__voll .gal__pfeil--l { left: 1.2rem; }
.gal__voll .gal__pfeil--r { right: 1.2rem; }
.gal__voll .gal__zaehler { left: 50%; transform: translateX(-50%); bottom: 1.2rem; }
.gal__zu {
  position: absolute; top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .35); background: rgb(14 20 40 / .58); color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 3; padding: 0;
}
.gal__zu:hover { background: var(--navy-fest); }
/* Ohne Foto: ehrliche Tafel statt Bild */
.fzg-karte__tafel { display: grid; place-items: center; align-content: center; gap: .6rem; text-align: center; padding: 2rem; background: var(--flaeche); color: var(--meta); border: 1px solid var(--kante); }
.fzg-karte__tafel-praegung { width: 128px; height: 60px; color: var(--kante-stark); }
.fzg-karte__tafel-eyebrow { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8125rem; color: var(--navy); }
.gal--leer .fzg-karte__tafel-text { max-width: 36rem; font-size: 1rem; }

/* Raster: Inhalt links, Anfrage rechts sticky */
.det-raster { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 1fr); gap: 3rem; align-items: start; }
.det-block { margin-top: 2.75rem; }
.det-block:first-child { margin-top: 0; }
.kapitel { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.1rem; }
.kapitel__nr { font-family: var(--body); font-weight: 700; font-size: .78rem; letter-spacing: .1em; color: var(--auf-navy); background: var(--navy); padding: .15rem .45rem; border-radius: 4px; }
.kapitel .h-3 { margin: 0; }
.kapitel small { font-family: var(--body); font-weight: 400; font-size: .85rem; color: var(--meta); margin-left: .5rem; letter-spacing: 0; }

.det-daten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; margin: 0; }
.det-daten__zeile { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-bottom: 1px solid var(--kante); font-size: .97rem; }
.det-daten__zeile dt { color: var(--meta); }
.det-daten__zeile dd { margin: 0; font-weight: 700; text-align: right; }
.det-envkv { margin-top: 1.4rem; padding: 1.1rem 1.4rem; background: var(--flaeche); border-radius: var(--radius); font-size: .92rem; color: var(--meta); line-height: 1.55; }
.det-envkv b { color: var(--text); display: block; margin-bottom: .35rem; }
.det-envkv__fn { margin: .7rem 0 0; font-size: .78rem; line-height: 1.45; }
.det-hinweis { margin: 1rem 0 0; color: var(--meta); font-size: .92rem; }
.det-hinweis a { color: var(--navy); font-weight: 700; }
.det-hinweis--rot { color: var(--rot-text); font-weight: 700; }
.det-hl { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; padding: 0; margin: 0 0 1.2rem; }
.det-hl li { font-size: .88rem; font-weight: 700; padding: .5rem .7rem; border-left: 3px solid var(--rot); background: var(--flaeche); border-radius: 4px; }
.det-aus { columns: 2; column-gap: 2rem; }
.det-aus__gruppe { break-inside: avoid; margin-bottom: 1.2rem; }
.det-aus__gruppe h3 { font-family: var(--body); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin: 0 0 .4rem; }
.det-aus__gruppe ul { list-style: none; margin: 0; padding: 0; }
.det-aus__gruppe li { position: relative; padding-left: 1rem; font-size: .94rem; line-height: 1.5; }
.det-aus__gruppe li::before { content: ""; position: absolute; left: 0; top: .62rem; width: .35rem; height: .35rem; border-radius: 50%; background: var(--rot); }
.det-text p { margin: 0 0 .8rem; line-height: 1.6; }
.det-text ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.det-text li { margin-bottom: .3rem; }
.det-text__quelle { font-size: .84rem; color: var(--meta); }
.det-fuss { margin-top: 2.5rem; color: var(--meta); font-size: .82rem; line-height: 1.5; }
.det-fuss a { color: var(--navy); }

/* Sticky-Anfrage */
.anfrage-formular { background: var(--flaeche); border: 1px solid var(--kante); border-radius: var(--radius); padding: 1.5rem; }
.det-aside { position: sticky; top: calc(var(--kopf-h) + 16px); margin-top: 0; }
.det-aside__preis { font-family: var(--disp); font-stretch: 125%; font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: -.02em; }
.det-aside__meta { color: var(--meta); margin: .35rem 0 0; font-size: .92rem; }
.det-aside__expose { display: block; text-align: center; margin-top: .9rem; color: var(--navy); font-size: .95rem; font-weight: 700; }
.det-aside .knopf { margin-top: .6rem; }
.det-aside .form .knopf { margin-top: 0; }
.rundum { border: 1px solid var(--kante-stark); border-radius: var(--radius); padding: .8rem .9rem .9rem; margin: 0; display: grid; gap: .45rem; background: var(--grund); }
.rundum legend { padding: 0 .3rem; font-size: .9rem; font-weight: 700; }
.rundum label { display: flex; gap: .6rem; align-items: center; font-size: .95rem; min-height: 32px; cursor: pointer; }
.rundum input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.rundum p { font-size: .84rem; color: var(--meta); margin-top: .1rem; }
.form__meldung[data-art="ok"] { border-color: var(--navy); }
.form__meldung[data-art="fehler"] { border-color: var(--rot); }

@media (max-width: 1100px) {
  .gal__thumbs { grid-template-columns: repeat(6, 1fr); }
  .det-raster { grid-template-columns: 1fr; }
  .det-aside { position: static; }
}
@media (max-width: 760px) {
  .det-kopf { grid-template-columns: 1fr; align-items: start; }
  .det-kopf__knoepfe { justify-content: flex-start; }
  .gal__thumbs { grid-template-columns: repeat(4, 1fr); gap: .35rem; }
  .gal__pfeil { width: 42px; height: 42px; }
  .det-daten { grid-template-columns: 1fr; }
  .det-hl { grid-template-columns: 1fr 1fr; }
  .det-aus { columns: 1; }
  .det-zettel { display: grid; }
}
@media (max-width: 480px) {
  .det-hl { grid-template-columns: 1fr; }
  .gal__thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* 390 px: kein waagerechter Überhang (nowrap-Knöpfe + lange Modellnamen) */
.det-kopf .h-2 { overflow-wrap: break-word; }
.det-kopf__knoepfe .knopf, .det-kopf__knoepfe .merk--text { min-width: 0; }
@media (max-width: 760px) {
  .det-kopf__knoepfe .knopf { white-space: normal; text-align: center; }
  .det-kopf__knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .det-kopf__eck { overflow-wrap: break-word; }
}

/* Feste Ecke auf Detailseiten: solange die Anfrage-Spalte rechts sticky steht
   (ab 1101 px), wandert Anrufen/WhatsApp nach unten LINKS — rechts lägen sonst
   die Knöpfe der Anfrage darunter (Vorlage F6, 15.09.2026). Der Fuß reserviert
   dann links statt rechts Platz. */
@media (min-width: 1101px) {
  .ecke { left: 1.1rem; right: auto; }
  .fuss__unten { padding-left: 20rem; padding-right: var(--rand); }
}
