/**
 * Auto3 – Fahrzeug-Detailansicht (RNH v2), Plugin-Fallback wenn Theme-Datei fehlt
 */

.rnh-vehicle-v2 {
  --rnhv2-border: #e2e6ee;
  --rnhv2-muted: #5c6578;
  --rnhv2-text: #1a1f2e;
  --rnhv2-accent: #b01c1c;
  --rnhv2-bg: #f4f6f9;
  --rnhv2-card: #fff;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  color: var(--rnhv2-text);
  font-family: var(--auto3-font-sans, "Avenir Next", "Avenir", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  font-size: 15px;
  line-height: 1.45;
}

/* Theme „aside { width: 25% }“ überschreiben: CTA-Spalte volle Breite im Raster */
.rnh-vehicle-v2 aside.rnhv2-cta {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.rnhv2-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.rnhv2-lightbox.is-open {
  display: flex;
}

.rnhv2-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.rnhv2-lightbox__scroller {
  max-width: min(1100px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.rnhv2-lightbox__scroller img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.75rem;
  border-radius: 8px;
}

.rnhv2-top {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  html:has(.rnh-vehicle-v2),
  body:has(.rnh-vehicle-v2) {
    overflow-x: clip;
  }

  .rnh-vehicle-v2 {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }

  .auto3-fahrzeuge-details-wrap .rnh-vehicle-v2 {
    padding-left: 15px;
    padding-right: 15px;
  }

  .rnhv2-top {
    grid-template-columns: 1fr;
  }

  /* Galerie zuerst, dann CTA mit Marke/Modell/Preis (kein order:-1 mehr) */
  .rnhv2-cta {
    position: static;
  }
}

.rnhv2-galleryCard {
  background: var(--rnhv2-card);
  border: 1px solid var(--rnhv2-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rnhv2-gallery__main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--rnhv2-bg);
}

.rnhv2-gallery__main img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.rnhv2-gallery__placeholder {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rnhv2-muted);
}

.rnhv2-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.rnhv2-thumb {
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--rnhv2-bg);
}

.rnhv2-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rnhv2-thumb:hover,
.rnhv2-thumb:focus-visible {
  border-color: #002b5c;
}

.rnhv2-cta {
  position: sticky;
  top: 1rem;
}

.rnhv2-ctaCard {
  background: var(--rnhv2-card);
  border: 1px solid var(--rnhv2-border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.rnhv2-ctaCard h1 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.rnhv2-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rnhv2-muted);
  line-height: 1.35;
}

.rnhv2-priceRow {
  margin-bottom: 1rem;
}

.rnhv2-price p {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--rnhv2-accent);
  letter-spacing: -0.02em;
}

.rnhv2-priceFinanceNote {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #002b5c;
  font-weight: 600;
}

.rnhv2-financeAnchor {
  color: #002b5c;
  text-decoration: underline;
}

.rnhv2-specGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

@media (max-width: 400px) {
  .rnhv2-specGrid {
    grid-template-columns: 1fr;
  }
}

.rnhv2-spec {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--rnhv2-muted);
}

.rnhv2-spec > span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rnhv2-spec strong {
  color: var(--rnhv2-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.rnhv2-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.85;
}

.rnhv2-card {
  background: var(--rnhv2-card);
  border: 1px solid var(--rnhv2-border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.35rem;
  margin: 1rem 0;
}

.rnhv2-h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.rnhv2-h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.rnhv2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rnhv2-chip {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  background: var(--rnhv2-bg);
  border: 1px solid var(--rnhv2-border);
  border-radius: 999px;
  color: var(--rnhv2-text);
}

.rnhv2-card--form .rnhv2-formWrap {
  margin-top: 0.5rem;
}

.rnhv2-kv {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rnhv2-kv > li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rnhv2-border);
  font-size: 0.88rem;
}

.rnhv2-kv > li:last-child {
  border-bottom: 0;
}

.rnhv2-kv span {
  color: var(--rnhv2-muted);
  flex: 1 1 auto;
}

.rnhv2-kv strong {
  text-align: right;
  font-weight: 600;
}

.rnhv2-envCo2Row img.rnhv2-co2img {
  max-width: 120px;
  height: auto;
}

.rnhv2-accordion {
  margin-top: 1.5rem;
  border: 1px solid var(--rnhv2-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rnhv2-card);
}

.rnhv2-accItem + .rnhv2-accItem {
  border-top: 1px solid var(--rnhv2-border);
}

.rnhv2-accBtn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 0;
  background: #fafbfc;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.rnhv2-accBtn:hover {
  background: #f0f2f6;
}

.rnhv2-accIcon {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--rnhv2-muted);
}

.rnhv2-accPanel {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--rnhv2-border);
  background: #fff;
}

.rnhv2-accPanel[hidden] {
  display: none;
}

.rnhv2-muted {
  color: var(--rnhv2-muted);
  font-size: 0.9rem;
}

.rnhv2-rich {
  font-size: 0.92rem;
  line-height: 1.55;
}

.rnhv2-rich h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.rnhv2-rich h3:first-child {
  margin-top: 0;
}

.rnhv2-list {
  margin: 0;
  padding-left: 1.2rem;
}

.rnhv2-subBlock {
  margin-bottom: 1rem;
}

.rnhv2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #002b5c;
  background: #002b5c;
  color: #fff !important;
}

.rnhv2-btn--primary:hover {
  filter: brightness(1.08);
}

#auto3-fahrzeuge-details.auto3-fahrzeuge-details-wrap {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}
