/* ProBus Fahrzeuge – Listen, Fahrzeugseite, Formulare.
   Farben und Schriften über Variablen; das Theme „ProBus“ setzt sie, sonst gelten die Standardwerte (Firmendesign). */
.pb-raster, .pb-fahrzeug, .pb-form, .pb-filter, .pb-leer {
  --_rot: var(--pb-rot, #E30613);
  --_rot-text: var(--pb-rot-text, #B8050F);
  --_schwarz: var(--pb-schwarz, #1D1D1B);
  --_grau: var(--pb-grau-text, #5C5C59);
  --_linie: var(--pb-linie, #D4D4D0);
  --_flaeche: var(--pb-flaeche, #FFFFFF);
  --_hg: var(--pb-hg, #F4F4F2);
  --_band: var(--pb-band, #E8E8E5);
  --_technik: var(--pb-schrift-technik, "Exo 2", system-ui, sans-serif);
  --_titel: var(--pb-schrift, "Archivo", system-ui, sans-serif);
}

/* ---------- Raster und Karten ---------- */
.pb-raster { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 0 0 32px; }
.pb-karte { position: relative; display: flex; flex-direction: column; background: var(--_flaeche); border: 1px solid var(--_linie); border-radius: 4px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.pb-karte:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(29,29,27,.14); }
.pb-karte[hidden] { display: none; }
.pb-karte__bild { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--_band); overflow: hidden; }
.pb-karte__bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pb-karte:hover .pb-karte__bild img { transform: scale(1.04); }
.pb-karte__ohnebild { position: absolute; inset: 0; display: grid; place-items: center; color: var(--_grau); font-family: var(--_technik); }
.pb-karte__text { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 20px; flex: 1; }
.pb-karte__zeile { margin: 0; font-family: var(--_technik); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_grau); }
.pb-karte__titel { margin: 0; font-family: var(--_titel); font-size: 1.2rem; line-height: 1.25; font-weight: 800; }
.pb-karte__titel a { color: var(--_schwarz); text-decoration: none; }
.pb-karte__titel a::after { content: ""; position: absolute; inset: 0; } /* ganze Karte klickbar */
.pb-karte__titel a:focus-visible { outline: none; }
.pb-karte:focus-within { outline: 2px solid var(--_schwarz); outline-offset: 2px; }
.pb-karte__preis { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--_linie); font-family: var(--_technik); font-weight: 700; font-size: 1.15rem; color: var(--_schwarz); }
.pb-karte.ist-verkauft .pb-karte__bild img { filter: grayscale(.7); }

.pb-eck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: .9rem; }
.pb-eck li { display: flex; flex-direction: column; }
.pb-eck span { color: var(--_grau); font-size: .78rem; }
.pb-eck b { font-family: var(--_technik); font-weight: 600; }

.pb-marke { position: absolute; left: 0; top: 16px; padding: 5px 14px 5px 12px; font-family: var(--_technik); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--_schwarz); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.pb-marke--sofort { background: #1E7A3C; }
.pb-marke--zulauf { background: #5E6A71; }
.pb-marke--verkauft { background: var(--_rot); }

/* ---------- Filter ---------- */
.pb-filter { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 16px 20px; margin: 0 0 24px; background: var(--_flaeche); border: 1px solid var(--_linie); border-left: 4px solid var(--_rot); border-radius: 4px; }
.pb-filter label { display: flex; flex-direction: column; gap: 4px; font-family: var(--_technik); font-size: .8rem; color: var(--_grau); min-width: 150px; flex: 1 1 150px; }
.pb-filter select { font: inherit; font-size: 1rem; color: var(--_schwarz); padding: 9px 10px; border: 1px solid var(--_linie); border-radius: 2px; background: #fff; }
.pb-filter__anzahl { margin: 0 0 0 auto; font-family: var(--_technik); white-space: nowrap; padding-bottom: 10px; }
.pb-keine[hidden] { display: none; }
.pb-link { background: none; border: 0; padding: 0; font: inherit; color: var(--_rot-text); text-decoration: underline; cursor: pointer; }
.pb-leer { padding: 32px; background: var(--_flaeche); border: 1px solid var(--_linie); border-radius: 4px; text-align: center; }

/* ---------- Knöpfe ---------- */
.pb-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; font-family: var(--_technik); font-weight: 700; font-size: 1rem; letter-spacing: .02em; text-decoration: none; color: var(--_schwarz); background: transparent; border: 2px solid var(--_schwarz); border-radius: 2px; cursor: pointer; transition: background .15s, color .15s; }
.pb-knopf:hover { background: var(--_schwarz); color: #fff; }
.pb-knopf--rot { background: var(--_rot); border-color: var(--_rot); color: #fff; }
.pb-knopf--rot:hover { background: #B8050F; border-color: #B8050F; }
.pb-knopf:focus-visible { outline: 2px solid var(--_schwarz); outline-offset: 2px; }
.pb-knopf[disabled] { opacity: .6; cursor: wait; }

/* ---------- Fahrzeugseite ---------- */
.pb-fahrzeug { max-width: var(--pb-breite, 1240px); margin: 0 auto; padding: 24px var(--pb-rand, 24px) 64px; }
.pb-krumen ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-family: var(--_technik); font-size: .85rem; color: var(--_grau); }
.pb-krumen li + li::before { content: "/"; margin-right: 6px; color: var(--_linie); }
.pb-krumen a { color: var(--_grau); }
.pb-fahrzeug__kopf { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .pb-fahrzeug__kopf { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); } }

.pb-galerie__gross { position: relative; margin: 0; aspect-ratio: 4 / 3; background: var(--_schwarz); overflow: hidden; }
.pb-galerie__gross img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pb-galerie__gross:fullscreen img { object-fit: contain; }
.pb-galerie__pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; background: rgba(29,29,27,.55); color: #fff; font-size: 2rem; cursor: pointer; }
.pb-galerie__pfeil:hover { background: var(--_rot); }
.pb-galerie__pfeil--zurueck { left: 0; }
.pb-galerie__pfeil--vor { right: 0; }
.pb-galerie__zaehler { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; background: rgba(29,29,27,.7); color: #fff; font-family: var(--_technik); font-size: .85rem; }
.pb-galerie__daumen { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.pb-galerie__daumen button { display: block; width: 100%; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.pb-galerie__daumen button[aria-current="true"] { border-color: var(--_rot); }
.pb-galerie__daumen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-galerie__leer { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--_band); color: var(--_grau); font-family: var(--_technik); }

.pb-kasten { position: sticky; top: calc(var(--pb-kopf-hoehe, 80px) + 16px); display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--_flaeche); border: 1px solid var(--_linie); border-top: 4px solid var(--_rot); border-radius: 4px; }
.pb-kasten__zeile { margin: 0; font-family: var(--_technik); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_grau); }
.pb-kasten__titel { margin: 0; font-family: var(--_titel); font-weight: 900; font-style: italic; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--_schwarz); }
.pb-kasten__preis { margin: 8px 0 0; font-family: var(--_technik); font-weight: 800; font-size: 1.9rem; color: var(--_schwarz); }
.pb-kasten__zusatz, .pb-kasten__nr { margin: 0; color: var(--_grau); font-size: .88rem; }
.pb-kasten__status { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--_technik); font-weight: 600; }
.pb-punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pb-punkt--gruen { background: #1E7A3C; }
.pb-punkt--orange { background: #A85400; }
.pb-eck--kasten { padding: 16px 0; border-top: 1px solid var(--_linie); border-bottom: 1px solid var(--_linie); }
.pb-kasten__aktionen { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; }

.pb-fahrzeug__inhalt { display: grid; gap: 0; margin-top: 48px; max-width: 900px; }
.pb-abschnitt { padding: 32px 0; border-top: 1px solid var(--_linie); }
.pb-abschnitt h2 { margin: 0 0 20px; font-family: var(--_titel); font-weight: 800; font-size: 1.5rem; }
.pb-tabelle { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; margin: 0; }
.pb-tabelle > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--_linie); }
.pb-tabelle dt { color: var(--_grau); }
.pb-tabelle dd { margin: 0; font-family: var(--_technik); font-weight: 600; text-align: right; }
.pb-ausstattung { columns: 2 260px; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.pb-ausstattung li { break-inside: avoid; padding: 6px 0 6px 22px; position: relative; }
.pb-ausstattung li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 2px; background: var(--_rot); }
.pb-aehnlich { margin-top: 32px; }

/* ---------- Formular ---------- */
.pb-form { display: grid; gap: 16px; padding: 28px; background: var(--_flaeche); border: 1px solid var(--_linie); border-radius: 4px; }
.pb-form__titel { margin: 0; font-family: var(--_titel); font-weight: 800; }
.pb-form__raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.pb-form__raster p { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pb-form__breit { grid-column: 1 / -1; }
.pb-form label { font-family: var(--_technik); font-size: .88rem; font-weight: 600; color: var(--_schwarz); }
.pb-form input:not([type=checkbox]), .pb-form textarea, .pb-form select { font: inherit; font-size: 1rem; padding: 12px; border: 1px solid #9a9a96; border-radius: 2px; background: #fff; color: var(--_schwarz); width: 100%; box-sizing: border-box; }
.pb-form input:focus, .pb-form textarea:focus { outline: 2px solid var(--_schwarz); outline-offset: 2px; border-color: var(--_schwarz); }
.pb-form.ist-geprueft :invalid { border-color: #B3000C; background: #fff6f6; }
.pb-form__ds { margin: 0; }
.pb-form__ds label { display: flex; gap: 10px; align-items: flex-start; font-family: inherit; font-weight: 400; font-size: .9rem; line-height: 1.45; }
.pb-form__ds input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--_rot); }
.pb-form__aktion { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.pb-form__hinweis { color: var(--_grau); font-size: .85rem; }
.pb-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pb-form__meldung { margin: 0; padding: 12px 16px; border-left: 4px solid; font-weight: 600; }
.pb-form__meldung.ist-ok { border-color: #1E7A3C; background: #eef7f1; color: #14532a; }
.pb-form__meldung.ist-fehler { border-color: #B3000C; background: #fff1f1; color: #8a0009; }
.pb-adminhinweis { padding: 10px 16px; background: #A85400; color: #fff; text-align: center; font-weight: 600; }
.pb-adminhinweis a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .pb-karte, .pb-karte__bild img { transition: none; }
  .pb-karte:hover { transform: none; }
}
