/* =====================================================================
   detail.css — Autohaus Mosig, Fahrzeug-Detailseiten (fahrzeuge/<slug>.html)
   Grundgeruest aus der Vorlage ~/.claude/vorlagen/fahrzeug-detail
   (Back-&-Boldt-Kanon, GESETZ Kap. 10), Haut = bau-brief.md Haut A
   „Der Autopark" (kalkiger Oliv-Grund, Preisschild-Gelb als Akzent-Material,
   Oliv als Handlung). Koenpfe/Fuss themenfest dunkel.
   ===================================================================== */

:root {
  --grund: #f1f2ea;
  --flaeche: #e6e7dc;
  --tinte: #1f221c;
  --meta: #5a5f52;
  --handlung: #4c5338;
  --material: #f4ebb5;
  --kante: rgba(31, 34, 28, 0.16);
  --marke: #4c5338;
  --soul: #4c5338;
  --soul-schrift: #f4f3ea;
  --dunkel-fest: #151612;
  --kalk-fest: #f4f3ea;
  --meta-fest: #b9bcab;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --radius: 6px;
  --schatten: 0 18px 34px -20px rgba(31, 34, 28, 0.35);
  --schrift: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--marke); }

.sr-only, .nurSR {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.sr-only:focus {
  position: fixed;
  top: 0.5rem; left: 0.5rem;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  background: var(--dunkel-fest);
  color: var(--kalk-fest);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 200;
}

.bahn { max-width: 76rem; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.sek { padding-block: 2rem 4rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--meta);
  margin: 0;
}
.h-2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.h-3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.8rem;
}

/* --- Kopf / Navigation (themenfest dunkel) --------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dunkel-fest);
  color: var(--kalk-fest);
}
.nav__inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav__logo { display: block; height: 30px; width: auto; }
.nav nav { margin-left: auto; }
.nav__liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}
.nav__liste a {
  color: var(--kalk-fest);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.3rem 0;
}
.nav__liste a:hover, .nav__liste a[aria-current="page"] { color: var(--material); }
.nav__cta {
  flex-shrink: 0;
  background: var(--material);
  color: var(--tinte);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
@media (max-width: 900px) {
  .nav__inner { flex-wrap: wrap; }
  .nav nav { margin-left: 0; width: 100%; }
  .nav__liste { justify-content: flex-start; }
}

/* --- Knoepfe ---------------------------------------------------------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--handlung);
  color: var(--kalk-fest);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--handlung);
  border-radius: 999px;
  padding: 0.68rem 1.3rem;
  cursor: pointer;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.knopf:hover { transform: translateY(-1px); box-shadow: var(--schatten); }
.knopf--rand {
  background: transparent;
  color: var(--tinte);
  border-color: var(--kante);
}
.knopf--rand:hover { border-color: var(--handlung); color: var(--handlung); box-shadow: none; }
.knopf--voll { width: 100%; }
.knopf:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }

.merk {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--kante);
  border-radius: 999px;
  color: var(--tinte);
  cursor: pointer;
}
.merk svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.merk[aria-pressed="true"] { border-color: var(--handlung); color: var(--handlung); }
.merk[aria-pressed="true"] svg { fill: var(--handlung); }

.resHinweis {
  margin: 0.8rem 0 0;
  padding: 0.7rem 1rem;
  background: var(--material);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
}

/* --- Gestaltete Tafel (Fahrzeuge ohne Fotos) -------------------------- */
.fzg-karte__tafel {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
  background: var(--dunkel-fest);
  color: var(--meta-fest);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
}
.fzg-karte__tafel-praegung { width: 9rem; color: var(--handlung); opacity: 0.9; }
.fzg-karte__tafel-eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--material);
}
.fzg-karte__tafel-text { margin: 0; color: var(--meta-fest); line-height: 1.55; }

/* --- Anfrage-Aside / Formular ----------------------------------------- */
.anfrage-formular {
  background: #fff;
  background: color-mix(in oklch, var(--grund) 55%, #fff);
  border: 1px solid var(--kante);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--schatten);
  padding: 1.6rem 1.5rem;
}
.fakten-wert {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.form { display: grid; gap: 0.8rem; }
.feld label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.feld input, .feld textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--kante);
  border-radius: var(--radius);
  background: var(--grund);
  color: var(--tinte);
}
.feld input:focus, .feld textarea:focus {
  outline: 2px solid var(--handlung);
  outline-offset: 1px;
  border-color: transparent;
}
.einwilligung {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--meta);
}
.einwilligung input { margin-top: 0.2rem; }
.form__meldung { margin: 0; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 0.8rem; border-radius: var(--radius); }
.form__meldung.ist-ok { background: var(--flaeche); color: var(--tinte); }
.form__meldung.ist-fehler { background: var(--material); color: var(--tinte); }
.form__zusage { margin: 0; font-size: 0.82rem; color: var(--meta); }

/* --- Raten-Badge (Branchen-Fingerabdruck „Preis und Rate") ------------- */
.det-kopf__rate {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
  padding: 0.45rem 0.9rem;
  background: var(--material);
  color: var(--tinte);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.det-kopf__rate b { font-family: var(--display); font-weight: 800; }
.det-kopf__rate small { color: var(--meta); font-size: 0.75rem; }

/* --- Fuss (themenfest dunkel) ------------------------------------------ */
.fuss {
  background: var(--dunkel-fest);
  color: var(--meta-fest);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.fuss__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.fuss__logo { height: 30px; width: auto; display: block; margin-bottom: 0.8rem; }
.fuss__block h3 {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kalk-fest);
  margin: 0 0 0.7rem;
}
.fuss__block a {
  display: block;
  color: var(--meta-fest);
  text-decoration: none;
  margin-bottom: 0.4rem;
  font-size: 0.94rem;
}
.fuss__block a:hover { color: var(--material); }
.fuss__unten {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(244, 243, 234, 0.14);
  font-size: 0.82rem;
}
.fuss__unten a { color: var(--meta-fest); text-decoration: none; }
.fuss__unten a:hover { color: var(--material); }
@media (max-width: 760px) { .fuss__grid { grid-template-columns: 1fr; } }

/* --- Feste Ruf-Pille (GESETZ Kap. 10, dauerhaft sichtbar) -------------- */
.ruf-fix {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--handlung);
  color: var(--kalk-fest);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  box-shadow: var(--schatten);
}
.ruf-fix svg { width: 18px; height: 18px; }

/* =====================================================================
   Ab hier: Vorlagen-Regeln (Detailseiten-Layout, Galerie) — Struktur
   unveraendert aus vorlagen/fahrzeug-detail/assets/css/detail.css
   ===================================================================== */
.det { padding-block: 1.75rem 4.5rem; }
.det-pfad { display: flex; gap: 0.6rem; align-items: center; font-size: 0.86rem; color: var(--meta); margin: 0 0 1.4rem; }
.det-pfad a { color: var(--marke); text-decoration: none; }
.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: 0.35rem; }
.det-kopf__unter { color: var(--meta); margin: 0.5rem 0 0; max-width: 42rem; }
.det-kopf__preis { display: flex; align-items: baseline; gap: 0.8rem; margin: 1rem 0 0; flex-wrap: wrap; }
.det-kopf__preis b { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.4rem); letter-spacing: -0.02em; color: var(--tinte); line-height: 1; }
.det-kopf__preis span { color: var(--meta); font-size: 0.86rem; }
.det-kopf__eck { margin: 0.55rem 0 0; color: var(--meta); font-size: 0.95rem; }
.det-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0; padding: 0; }
.det-chips li { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; padding: 0.32rem 0.7rem; border-radius: 999px; border: 1px solid var(--kante); background: var(--flaeche); color: var(--tinte); }
.det-kopf__knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: flex-end; }
.det-kopf__knoepfe .knopf { white-space: nowrap; }
.det-expose svg { margin-right: 0.45rem; vertical-align: -3px; }
.merk--text { position: static; width: auto; height: 44px; padding: 0 0.9rem; gap: 0.45rem; font: inherit; font-weight: 600; font-size: 0.9rem; border-radius: 999px; }
.merk--text svg { width: 18px; height: 18px; }

.gal { margin: 0 0 2.5rem; }
.gal__buehne { position: relative; margin: 0; aspect-ratio: 16/10; border-radius: 0.75rem; 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: 0.85; }
.gal__pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(21, 22, 18, 0.55); 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(--soul); }
.gal__pfeil:active { transform: translateY(-50%) scale(0.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: 0.3rem 0.7rem; border-radius: 999px; background: rgba(21, 22, 18, 0.6); color: #fff; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; z-index: 2; }
.gal__thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.5rem; margin-top: 0.6rem; }
.gal__thumb { position: relative; padding: 0; border: 2px solid transparent; border-radius: 0.45rem; overflow: clip; background: var(--flaeche); cursor: pointer; aspect-ratio: 16/10; transition: border-color 150ms var(--ease), opacity 150ms var(--ease); opacity: 0.82; }
.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(--soul); }
.gal__thumb:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }
.gal__voll { position: fixed; inset: 0; z-index: 100; background: rgba(10, 11, 9, 0.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: 0.4rem; }
.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 rgba(255, 255, 255, 0.35); background: rgba(21, 22, 18, 0.55); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 3; padding: 0; }
.gal__zu:hover { background: var(--soul); }
.gal--leer .fzg-karte__tafel-text { max-width: 36rem; font-size: 1rem; }

.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: 0.8rem; margin-bottom: 1.1rem; }
.kapitel__nr { font-family: var(--schrift); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.14em; color: var(--soul-schrift); background: var(--soul); padding: 0.15rem 0.45rem; border-radius: 0.25rem; }
.kapitel .h-3 { margin: 0; }
.kapitel small { font-weight: 500; font-size: 0.8rem; color: var(--meta); margin-left: 0.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: 0.62rem 0; border-bottom: 1px solid var(--kante); font-size: 0.94rem; }
.det-daten__zeile dt { color: var(--meta); }
.det-daten__zeile dd { margin: 0; font-weight: 600; text-align: right; }
.det-envkv { margin-top: 1.4rem; padding: 1.1rem 1.4rem; background: var(--flaeche); border-radius: 0.5rem; font-size: 0.9rem; color: var(--meta); line-height: 1.55; }
.det-envkv b { color: var(--tinte); display: block; margin-bottom: 0.35rem; }
.det-envkv__fn { margin: 0.7rem 0 0; font-size: 0.74rem; line-height: 1.45; }
.det-hinweis { margin: 1rem 0 0; color: var(--meta); font-size: 0.88rem; }
.det-hinweis--rot { color: #8a3a22; font-weight: 600; }
.det-hl { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; padding: 0; margin: 0 0 1.2rem; }
.det-hl li { font-size: 0.84rem; font-weight: 600; padding: 0.5rem 0.7rem; border-left: 3px solid var(--soul); background: var(--flaeche); border-radius: 0.3rem; }
.det-aus { columns: 2; column-gap: 2rem; }
.det-aus__gruppe { break-inside: avoid; margin-bottom: 1.2rem; }
.det-aus__gruppe h3 { font-family: var(--schrift); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--marke); margin: 0 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: 0.9rem; line-height: 1.5; }
.det-aus__gruppe li::before { content: ""; position: absolute; left: 0; top: 0.62rem; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--soul); }
.det-text p { margin: 0 0 0.8rem; line-height: 1.6; }
.det-text ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.det-text li { margin-bottom: 0.3rem; }
.det-fuss { margin-top: 2.5rem; color: var(--meta); font-size: 0.78rem; line-height: 1.5; }
.det-fuss a { color: var(--marke); }
.det-aside { position: sticky; top: 88px; margin-top: 0; }
.det-aside__meta { color: var(--meta); margin: 0.3rem 0 0; font-size: 0.9rem; }
.det-aside__rate { display: inline-block; margin-top: 0.6rem; padding: 0.3rem 0.7rem; background: var(--material); color: var(--tinte); border-radius: var(--radius); font-size: 0.86rem; font-weight: 700; }
.det-aside__expose { display: block; text-align: center; margin-top: 0.9rem; color: var(--marke); font-size: 0.9rem; font-weight: 600; }

@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; }
  .det-kopf__knoepfe .knopf { flex: 1 1 auto; text-align: center; }
  .gal__thumbs { grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
  .gal__pfeil { width: 42px; height: 42px; }
  .det-daten { grid-template-columns: 1fr; }
  .det-hl { grid-template-columns: 1fr 1fr; }
  .det-aus { columns: 1; }
}
@media (max-width: 480px) {
  .det-hl { grid-template-columns: 1fr; }
  .gal__thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* Fremd-Blick Runde 3, FAIL 2: waagerechter Ueberhang bei 390 */
.det-kopf .h-2 { overflow-wrap: anywhere; }
.det-kopf__knoepfe .knopf, .det-kopf__knoepfe .merk--text { min-width: 0; }
@media (max-width: 760px) {
  .det-kopf { padding-bottom: 1rem; }
  .det-kopf__knoepfe .knopf, .det-kopf__knoepfe .merk { height: 100%; align-items: center; }
  .det-kopf__knoepfe { margin-bottom: 4.2rem; }
  .ruf-fix { width: 52px; height: 52px; padding: 0; border-radius: 50%; justify-content: center; right: .7rem; bottom: .7rem; font-size: 0; gap: 0; }
  .ruf-fix svg { width: 22px; height: 22px; }
  .det-kopf__knoepfe .knopf { white-space: normal; }
  .det-kopf__knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .det-kopf__eck { overflow-wrap: anywhere; }
}

/* F6 (Vorlage): feste Ruf-Pille auf Detailseiten ab 1101 px unten LINKS,
   damit sie den Anruf-Knopf der Sticky-Anfrage nicht deckt. */
@media (min-width: 1101px) {
  .ruf-fix { left: 1.1rem; right: auto; }
  .fuss__unten { padding-left: 11rem; padding-right: 0; }
}
