/*
 * Fahrzeugbestand – Liste & Detail (AET Fahrzeuge Plugin).
 * Farben, Schriften und Buttons kommen aus dem Theme (Blocksy-Variablen);
 * die Werte nach dem Komma sind nur Ersatz, falls ein anderes Theme aktiv ist.
 * Hier steht nur Layout – keine eigenen Schriftarten.
 */
.aet-fz {
  --aet-accent: var(--theme-button-background-initial-color, #6cab00);
  --aet-accent-hover: var(--theme-button-background-hover-color, #4fae32);
  --aet-badge: var(--theme-palette-color-1, #03a9f4);
  --aet-line: var(--theme-palette-color-6, #e6e6e6);
  --aet-text: var(--theme-text-color, #495868);
  --aet-strong: var(--theme-headings-color, #423939);
  --aet-radius: var(--theme-button-border-radius, 5px);
  color: var(--aet-text);
}
.aet-fz { overflow-wrap: break-word; }
.aet-fz *, .aet-fz *::before, .aet-fz *::after { box-sizing: border-box; }
.aet-fz img { max-width: 100%; display: block; }
.aet-fz h1, .aet-fz h2, .aet-fz h3 { color: var(--aet-strong); margin: 0; }

/* ---------- Liste: 4 Spalten, bricht je nach Breite um ---------- */
.aet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1150px) { .aet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .aet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 560px)  { .aet-grid { grid-template-columns: minmax(0, 1fr); } }

/* Karte: Radius aus dem Theme (Blocksy: 10px) */
.aet-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--theme-palette-color-10, #fff); border: 1px solid var(--aet-line);
  border-radius: var(--theme-border-radius, 10px); box-shadow: 0 6px 18px -8px rgba(34, 56, 101, .12);
}
.aet-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--aet-line); }
.aet-card__img img { width: 100%; height: 100%; object-fit: cover; }
.aet-card__body { display: flex; flex-direction: column; flex: 1; padding: 4px 18px 20px; }
.aet-card__make { margin: 14px 0 2px !important; font-size: 20px !important; line-height: 1.3 !important; }
.aet-card__title { margin: 0 0 8px; font-size: 15px; line-height: 1.4; text-transform: uppercase; }
.aet-card__title a { color: inherit; text-decoration: none; }
.aet-card__title a:hover { color: var(--aet-badge); }
.aet-card .aet-facts { margin: 14px 0; }
.aet-card__bottom { margin-top: auto; }
.aet-card .aet-rating-slot { min-height: 34px; }

.aet-badge { display: inline-block; background: var(--aet-badge); color: #fff; font-size: 12px; line-height: 1.6; padding: 1px 6px; border-radius: 2px; }

.aet-facts { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
.aet-facts th, .aet-facts td { text-align: left; padding: 5px 0; border: 0; border-bottom: 1px solid var(--aet-line); vertical-align: top; background: none; }
.aet-facts th { font-weight: 600; color: var(--aet-strong); width: 50%; padding-right: 10px; }

.aet-price { font-size: 22px; font-weight: 700; color: var(--aet-strong); margin: 0; line-height: 1.3; }
.aet-vat { font-size: 13px; margin: 0 0 8px; }

.aet-rating { display: flex; gap: 3px; margin: 8px 0 3px; }
.aet-rating span { width: 16px; height: 5px; border-radius: 2px; background: var(--aet-line); }
.aet-rating span.on { background: var(--aet-accent); }
.aet-rating-label { font-size: 12px; font-weight: 600; color: var(--aet-strong); margin: 0 0 8px; }

.aet-env { font-size: 12px; line-height: 1.5; margin: 10px 0 14px; }

.aet-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--aet-accent); color: var(--theme-button-text-initial-color, #fff) !important;
  font-weight: var(--theme-button-font-weight, 700); font-size: 14px; text-decoration: none;
  min-height: 40px; padding: 5px 20px; border: 0; border-radius: var(--aet-radius); cursor: pointer; transition: background .2s;
}
.aet-btn:hover { background: var(--aet-accent-hover); color: var(--theme-button-text-hover-color, #fff) !important; }
.aet-btn--block { display: flex; width: 100%; min-height: var(--theme-button-min-height, 50px); font-size: var(--theme-button-font-size, 15px); }

/* ---------- Detail ---------- */
/* Seitentitel kommt aus Blocksy (.hero-section .page-title), hier nur der Link darunter. */
.aet-back { display: inline-block; font-size: 14px; margin-bottom: 20px; color: inherit; text-decoration: none; }
.aet-back:hover { color: var(--aet-badge); }

.aet-d__top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
@media (max-width: 960px) { .aet-d__top { grid-template-columns: minmax(0, 1fr); } }

.aet-d__box { border: 1px solid var(--aet-line); border-radius: var(--theme-border-radius, 10px); padding: 22px; position: sticky; top: 100px; }
.aet-d__box .aet-price { font-size: 30px; }
.aet-d__box .aet-facts { margin: 16px 0 20px; font-size: 15px; }
.aet-d__cond { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--aet-strong); }
.aet-d__cond::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--aet-badge); margin-right: 7px; vertical-align: 1px; }
.aet-d__phone { display: flex; flex-direction: column; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--aet-line); font-size: 13px; }
.aet-d__phone a { font-size: 22px; font-weight: 700; color: var(--aet-strong); text-decoration: none; }
.aet-d__phone a:hover { color: var(--aet-badge); }
@media (max-width: 960px) { .aet-d__box { position: static; } }

/* Galerie: Wischen per scroll-snap (mobil), Pfeile + Thumbnails (Desktop) */
.aet-gal { min-width: 0; }
.aet-gal__stage { position: relative; }
.aet-gal__main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; aspect-ratio: 4 / 3; background: #111; scrollbar-width: none; border-radius: var(--theme-border-radius, 10px); }
.aet-gal__main::-webkit-scrollbar { display: none; }
.aet-gal__main img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.aet-gal__nav { position: absolute; top: 0; height: 100%; width: 56px; border: 0; background: none; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.aet-gal__nav::before { content: ""; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.85) center / 14px no-repeat; }
.aet-gal__nav--prev { left: 0; } .aet-gal__nav--next { right: 0; }
.aet-gal__nav--prev::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath d='M8 1 1 8l7 7' fill='none' stroke='%23222' stroke-width='2'/%3E%3C/svg%3E"); }
.aet-gal__nav--next::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath d='m2 1 7 7-7 7' fill='none' stroke='%23222' stroke-width='2'/%3E%3C/svg%3E"); }
.aet-gal__count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 10px; }
.aet-gal__thumbs { position: relative; display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.aet-gal__thumbs img { flex: 0 0 auto; width: 88px; height: 66px; object-fit: cover; cursor: pointer; opacity: .55; transition: opacity .2s; border-radius: 6px; }
.aet-gal__thumbs img:hover, .aet-gal__thumbs img.on { opacity: 1; }
@media (max-width: 600px) { .aet-gal__nav { display: none; } .aet-gal__thumbs img { width: 64px; height: 48px; } }

.aet-sec { margin-top: 44px; }
.aet-sec h2 { font-size: 24px !important; line-height: 1.3 !important; margin: 0 0 14px !important; padding-bottom: 8px; border-bottom: 2px solid var(--aet-accent); }

.aet-spec { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
.aet-spec .aet-facts { font-size: 15px; }
.aet-spec .aet-facts th, .aet-spec .aet-facts td { padding: 8px 0; }
@media (max-width: 700px) { .aet-spec { grid-template-columns: minmax(0, 1fr); } }

.aet-feat { columns: 3 210px; column-gap: 32px; list-style: none; padding: 0; margin: 0; font-size: 15px; }
.aet-feat li { padding: 4px 0 4px 24px; position: relative; break-inside: avoid; margin: 0; }
.aet-feat li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 11px; height: 6px; border: solid var(--aet-accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

/* Ausklappbare Beschreibung (natives <details>, kein JS) */

.aet-more > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 0 0 8px; border-bottom: 2px solid var(--aet-accent); color: var(--aet-strong);
}
.aet-more > summary::-webkit-details-marker { display: none; }
.aet-more > summary h2 { border: 0 !important; padding: 0 !important; margin: 0 !important; }
.aet-more > summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-top: -4px;
  border: solid var(--aet-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s;
}
.aet-more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.aet-more > .aet-desc { padding-top: 14px; }
.aet-desc { font-size: 15px; max-width: 900px; overflow-wrap: anywhere; }
.aet-desc ul { padding-left: 20px; margin: 4px 0 10px; }
.aet-desc li, .aet-desc p { margin: 0 0 4px; }

.aet-envbox { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.aet-envbox .aet-facts { font-size: 15px; }
@media (max-width: 700px) { .aet-envbox { grid-template-columns: minmax(0, 1fr); } }
.aet-co2 { font-size: 13px; }
.aet-co2__title { font-weight: 600; color: var(--aet-strong); margin-bottom: 8px; }
.aet-co2__row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.aet-co2__bar { height: 22px; line-height: 22px; color: #fff; font-weight: 700; padding-left: 8px; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); }
.aet-co2__mark { height: 22px; line-height: 22px; background: #222; color: #fff; font-weight: 700; padding: 0 10px 0 16px; clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%); }

/* Anfrage: links Formular (WPForms, Optik kommt vom Theme), rechts Kontakt */
.aet-contact { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 860px) { .aet-contact { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.aet-contact__info { background: var(--theme-palette-color-4, #f3f3f3); border-radius: var(--theme-border-radius, 10px); padding: 22px; font-size: 15px; }
.aet-contact__info p { margin: 0 0 10px; }
.aet-contact__info .aet-d__phone { margin: 0 0 16px; padding: 0; border: 0; align-items: flex-start; }
.aet-contact__ref { font-size: 13px; }

/* Mobil: feste Leiste unten mit Anrufen + Anfragen */
.aet-mbar { display: none; }
@media (max-width: 960px) {
  .aet-mbar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px;
    background: var(--theme-palette-color-10, #fff); box-shadow: 0 -4px 14px rgba(0, 0, 0, .1);
  }
  .aet-mbar .aet-btn { flex: 1; min-height: 46px; }
  .aet-btn--ghost { background: transparent; color: var(--aet-strong) !important; border: 2px solid var(--aet-accent); }
  .aet-btn--ghost:hover { color: #fff !important; }
  .aet-fz--detail { padding-bottom: 70px; }
}
