/* ============================================
   OEM:plus – Konfigurator-Styles
   Ergänzt main.css/premium.css für konfigurator.html
   ============================================ */

/* === Layout-Grundgerüst === */
.kf-main {
  padding: 64px 0 160px; /* extra Bottom-Padding für Sticky-Bar */
  background: #fafafa;
}

.kf-step {
  margin-top: 80px;
  position: relative;
}
.kf-step:first-child {
  margin-top: 0;
}
.kf-step .section-label {
  color: var(--color-primary);
}
.kf-step .section-title {
  margin-bottom: 8px;
  text-align: left;
}
.kf-step .section-sub {
  text-align: left;
  margin-bottom: 0;
  color: #555;
}

/* === Schritt 1: Fahrzeug === */
.kf-hersteller-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 32px;
}
@media (max-width: 860px) {
  .kf-hersteller-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .kf-hersteller-grid { grid-template-columns: repeat(2, 1fr); }
}

.kf-hersteller-card {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 24px 14px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  color: #111;
}
.kf-hersteller-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(12, 208, 255, 0.12);
}
.kf-hersteller-card.is-selected {
  border-color: var(--color-primary);
  background: rgba(12, 208, 255, 0.06);
  box-shadow: 0 4px 14px rgba(12, 208, 255, 0.18);
}

.kf-modell-wrap {
  margin-top: 28px;
  max-width: 460px;
}
.kf-modell-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
  margin-bottom: 10px;
}
.kf-modell-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.18s ease;
}
.kf-modell-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(12, 208, 255, 0.15);
}
.kf-modell-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.01em;
}

.kf-fahrzeug-bar {
  margin-top: 28px;
  background: #0d0d0d;
  color: #fff;
  border-radius: 12px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.kf-fahrzeug-label { opacity: 0.55; font-size: 0.82rem; }
.kf-fahrzeug-text {
  font-weight: 800;
  flex: 1;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.kf-fahrzeug-aendern {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.kf-fahrzeug-aendern:hover {
  background: rgba(12, 208, 255, 0.12);
  border-color: var(--color-primary);
}

/* === Schritt 2: Produkte (Long-Page-Sektionen) === */
.kf-produkte-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.kf-produkt {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  min-height: 460px; /* Alle Karten mind. so hoch — sorgt für einheitliches Raster */
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  scroll-margin-top: 100px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.kf-produkt:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}
.kf-produkt.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 8px 28px rgba(12, 208, 255, 0.15);
}
@media (max-width: 860px) {
  .kf-produkt { grid-template-columns: 1fr; }
}

.kf-produkt-image {
  position: relative;
  background: #111;
  /* Default-Grid-Verhalten: stretcht zur Karten-Höhe → identisch hoch wie Body */
}
@media (max-width: 860px) {
  .kf-produkt-image {
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 600px) {
  .kf-produkt-image { aspect-ratio: 16 / 9; }
}
.kf-produkt-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kf-produkt-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #fff;
  color: #111;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.kf-produkt-badge.kategorie-sicherheit { background: var(--color-primary); color: #000; }
.kf-produkt-badge.kategorie-codierung  { background: #fbbf24; color: #000; }
.kf-produkt-badge.kategorie-optik      { background: #c084fc; color: #000; }
.kf-produkt-badge.kategorie-komfort    { background: #34d399; color: #000; }

.kf-produkt-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.kf-produkt-body .kf-produkt-summary {
  margin-top: auto; /* Preis + CTA bleiben unten — einheitlich über alle Karten */
}
.kf-produkt-name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.kf-produkt-kurz {
  margin: -10px 0 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.55;
}

.kf-produkt-hinweis {
  margin: 0;
  font-size: 0.82rem;
  color: #777;
  line-height: 1.55;
  background: #f6f6f6;
  border-left: 3px solid var(--color-primary);
  padding: 10px 14px;
  border-radius: 6px;
}

.kf-optionen {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kf-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kf-option-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #777;
}
.kf-option-werte {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kf-option-wert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fafafa;
  border: 1.5px solid #ececec;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.kf-option-wert:hover {
  border-color: var(--color-primary);
  background: #fff;
}
.kf-option-wert input {
  margin: 2px 0 0 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
}
.kf-option-wert.is-selected {
  background: rgba(12, 208, 255, 0.06);
  border-color: var(--color-primary);
}
.kf-option-wert { position: relative; }

.kf-option-wert-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.kf-option-wert-text {
  font-weight: 700;
  color: #111;
  line-height: 1.35;
}
.kf-option-wert-desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

.kf-option-wert-preis {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 0.92rem;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.kf-option-wert-preis.inkl {
  background: var(--color-primary);
  color: #000;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.kf-option-inkl-hinweis {
  font-size: 0.82rem;
  color: var(--color-primary);
  margin: -2px 0 0;
  font-weight: 600;
}

/* Optionen die erst nach Pflicht-Auswahl freigeschaltet werden */
.kf-option.is-locked .kf-option-werte { opacity: 0.45; }
.kf-option.is-locked .kf-option-wert {
  cursor: not-allowed;
  background: #f5f5f5;
}
.kf-option.is-locked .kf-option-wert:hover {
  border-color: #ececec;
  background: #f5f5f5;
  transform: none;
}
.kf-option.is-locked input { cursor: not-allowed; }
.kf-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kf-option-lock-hinweis {
  font-size: 0.7rem;
  font-weight: 700;
  color: #b08000;
  background: rgba(255, 184, 0, 0.12);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Foto-Upload als <details> – dezent, aufklappbar */
.kf-produkt-foto-upload {
  border: 1px dashed #d4d4d4;
  border-radius: 10px;
  padding: 0;
  background: #fafafa;
}
.kf-produkt-foto-upload summary {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #555;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
.kf-produkt-foto-upload summary::-webkit-details-marker { display: none; }
.kf-produkt-foto-upload summary:hover { color: var(--color-primary); }
.kf-produkt-foto-upload[open] summary {
  color: #111;
  border-bottom: 1px solid #e8e8e8;
}
.kf-produkt-foto-upload input[type=file] {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 0.88rem;
  background: #fff;
}
.kf-produkt-foto-upload .kf-bilder-preview {
  padding: 0 16px 12px;
}

.kf-produkt-summary {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.kf-produkt-preis-label {
  display: block;
  color: #888;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 4px;
}
.kf-produkt-preis {
  display: block;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.kf-produkt-toggle {
  background: #0d0d0d;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 14px 24px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.12s ease;
}
.kf-produkt-toggle:hover {
  background: var(--color-primary);
  color: #000;
  transform: translateY(-1px);
}
.kf-produkt-toggle.is-active {
  background: var(--color-primary);
  color: #000;
}
.kf-produkt-toggle.is-active:hover {
  background: #0d0d0d;
  color: #fff;
}

/* === Schritt 3: Anfrage-Formular === */
.kf-summary {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 28px 0;
}
.kf-summary-empty {
  color: #999;
  font-style: italic;
  margin: 0;
}
.kf-summary-position {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  gap: 16px;
}
.kf-summary-position:last-of-type { border-bottom: none; }
.kf-summary-position-info { flex: 1; min-width: 0; }
.kf-summary-position-name {
  font-weight: 800;
  color: #111;
  display: block;
}
.kf-summary-position-detail {
  color: #666;
  font-size: 0.82rem;
  margin-top: 4px;
  line-height: 1.5;
}
.kf-summary-position-preis {
  color: var(--color-primary);
  font-weight: 800;
  white-space: nowrap;
}
.kf-summary-position-remove {
  background: #f4f4f4;
  border: 1px solid #e4e4e4;
  width: 30px;
  height: 30px;
  border-radius: 99px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
  font-family: inherit;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.kf-summary-position-remove:hover {
  background: #e53e3e;
  color: #fff;
  border-color: #e53e3e;
  transform: scale(1.05);
}
.kf-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 0;
  margin-top: 14px;
  border-top: 2px solid #0d0d0d;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.kf-summary-total-preis { color: var(--color-primary); }

.kf-form { margin-top: 20px; }
.kf-form input[readonly] {
  background: #f4f4f4;
  color: #555;
  cursor: not-allowed;
}
.kf-datenschutz {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.55;
  margin: 16px 0 4px;
}
.kf-datenschutz a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kf-submit {
  width: 100%;
  margin-top: 14px;
  padding: 16px 24px;
  font-size: 1rem;
}
.kf-reset-wrap {
  text-align: center;
  margin-top: 40px;
}
.kf-reset {
  background: transparent;
  border: none;
  color: #999;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
  transition: color 0.15s ease;
}
.kf-reset:hover { color: #555; }

/* === Dimm-Overlay === */
.kf-step.kf-dimmed { position: relative; }
.kf-step.kf-dimmed > *:not(.kf-dimm-overlay) {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.3);
}
.kf-dimm-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}
.kf-dimm-overlay p {
  background: #0d0d0d;
  color: #fff;
  padding: 14px 24px;
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.kf-step:not(.kf-dimmed) .kf-dimm-overlay { display: none; }

/* === Sticky Cart-Bar (dunkel, schlank, full-width) === */
/* ============================================
   FLOATING CART – rechts unten, bleibt vor Footer stehen
   ============================================ */
.kf-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  transition: transform 0.35s ease, opacity 0.3s ease;
}
.kf-cart[hidden],
.kf-cart-positionen[hidden] { display: none !important; }

/* Vor Footer verstecken */
body.near-footer .kf-cart {
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

/* Badge: Zähler + Preis */
.kf-cart-body {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d0d0d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.kf-cart-body:hover {
  box-shadow: 0 6px 28px rgba(12,208,255,0.2);
  transform: translateY(-1px);
}
.kf-cart-count {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--color-primary);
  flex-shrink: 0;
}
.kf-cart-count-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.65;
}
.kf-cart-summe {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}
.kf-cart-summe::before {
  content: '·';
  margin-right: 8px;
  opacity: 0.25;
  font-weight: 400;
}

/* CTA-Button */
.kf-cart-cta {
  background: var(--color-primary);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(12,208,255,0.25);
  transition: transform 0.12s ease, background 0.15s ease;
}
.kf-cart-cta:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Popover Positionen-Liste (über dem Badge) */
.kf-cart-positionen {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 0.88rem;
  min-width: 240px;
  max-width: 360px;
  max-height: 50vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  margin-bottom: 4px;
}
.kf-cart-position {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
}
.kf-cart-position:last-child { border-bottom: none; }
.kf-cart-position-name {
  flex: 1;
  font-weight: 600;
  color: #fff;
}
.kf-cart-position-remove {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kf-cart-position-remove:hover {
  background: var(--color-primary);
  color: #000;
}

/* Mobile: kompakter */
@media (max-width: 600px) {
  .kf-cart { bottom: 14px; right: 14px; gap: 8px; }
  .kf-cart-body { padding: 8px 14px; gap: 8px; }
  .kf-cart-count { font-size: 1.2rem; }
  .kf-cart-count-label { display: none; }
  .kf-cart-summe { font-size: 0.85rem; }
  .kf-cart-summe::before { margin-right: 6px; }
  .kf-cart-cta { padding: 9px 16px; font-size: 0.82rem; }
  .kf-cart-positionen { min-width: 200px; max-width: 300px; }
}

/* === Bilder-Vorschau === */
.kf-bilder-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.kf-bilder-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* === Erfolgs-Banner === */
#kf-form-success {
  display: none;
  padding: 18px 22px;
  background: #d4f8e8;
  border-radius: 12px;
  color: #047857;
  margin-top: 16px;
  font-weight: 700;
  border-left: 4px solid #047857;
}
#kf-form-success.visible { display: block; }

/* === Focus-States für Tastatur-Navigation === */
.kf-hersteller-card:focus-visible,
.kf-option-wert:focus-visible,
.kf-produkt-toggle:focus-visible,
.kf-cart-body:focus-visible,
.kf-cart-cta:focus-visible,
.kf-cart-position-remove:focus-visible,
.kf-fahrzeug-aendern:focus-visible,
.kf-reset:focus-visible,
.kf-produkt-foto-upload summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

