/* ============================================================
   abonnements-page.css — Abo-Builder-Landing-Page
   Externalisiert 2026-05-21 aus inline <style> in abonnements.html
   (CSP-Sprint Phase 3.2b.3, Step G).

   Sehr grosse Page-CSS: Hero + Vorteile + 3-Schritt-Abo-Builder mit
   Auswahl-Buttons, Produkt-Suche, Produkt-Karten-Grid, Preis-Panel
   + Dark-Mode-Variante.

   Klassen-Familien:
     .abo-hero / .abo-vorteile*       — Hero + Vorteile-Section
     .abo-builder / .abo-builder-card — Builder-Karte
     .abo-step* / .abo-select-feld    — Schritt-Header + Select
     .abo-option-btn* / .abo-rabatt-pill — Intervall/Laufzeit-Auswahl
     .abo-suche*                       — Produktsuche
     .abo-produkt-grid / .abo-produkt-karte* — Produkt-Auswahl-Karten
     .abo-menge-*                      — +/- Steppers
     .abo-preis-panel / .abo-preis-*  — Preis-Zusammenfassung
     .abo-submit / .abo-hinweis-klein / .abo-fehler — Form-Aktionen

   Dark-Mode: am Ende, alle html.dark-mode .abo-*-Overrides gebuendelt.
   ============================================================ */

/* ── Hero ─────────────────────────────────────────── */
.abo-hero {
  padding: 160px 0 60px;
  background: linear-gradient(135deg, #FDF0F2 0%, #ffffff 100%);
  text-align: center;
}

.abo-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 16px;
}

.abo-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Vorteile-Grid ────────────────────────────────── */
.abo-vorteile {
  padding: 60px 0;
  background: #ffffff;
}

.abo-vorteile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}

.abo-vorteil {
  text-align: center;
  padding: 24px 20px;
}

.abo-vorteil-icon {
  width: 56px;
  height: 56px;
  background: #e8f5f1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.7rem;
}

.abo-vorteil h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
  color: var(--text);
}

.abo-vorteil p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* ── Builder-Card ─────────────────────────────────── */
.abo-builder {
  padding: 70px 0 100px;
  background: #F8FAFA;
}

.abo-builder-card {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 20px);
  padding: 36px 40px;
  box-shadow: 0 8px 40px rgba(131, 14, 37, 0.06);
}

.abo-step {
  margin-bottom: 28px;
}

.abo-step-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 10px;
}

.abo-step-label .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #830e25;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  margin-right: 8px;
}

.abo-select-feld {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

/* ── Auswahl-Buttons (Intervall + Laufzeit) ───────── */
.abo-optionen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.abo-option-btn {
  padding: 16px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--text);
}

.abo-option-btn:hover {
  border-color: #9ed2c0;
}

.abo-option-btn.aktiv {
  border-color: #398e6f;
  background: #e8f5f1;
}

.abo-option-btn .opt-titel {
  font-weight: 800;
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}

.abo-option-btn .opt-sub {
  color: var(--muted);
  font-size: 0.8rem;
  display: block;
}

.abo-option-btn.aktiv .opt-sub {
  color: #398e6f;
}

.abo-rabatt-pill {
  display: inline-block;
  background: #398e6f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

/* ── Preis-Panel (Zusammenfassung) ────────────────── */
.abo-preis-panel {
  background: linear-gradient(135deg, #e8f5f1 0%, #ffffff 100%);
  border: 1px solid #9ed2c0;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 12px;
}

.abo-preis-zeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.95rem;
}

.abo-preis-zeile + .abo-preis-zeile {
  border-top: 1px solid rgba(57, 142, 111, 0.2);
}

.abo-preis-final {
  padding-top: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.abo-preis-final strong {
  color: #830e25;
  font-size: 1.35rem;
}

.abo-preis-normal {
  text-decoration: line-through;
  color: var(--muted);
}

.abo-preis-ersparnis {
  color: #398e6f;
  font-weight: 700;
}

/* ── Submit + Hinweise ────────────────────────────── */
.abo-submit {
  width: 100%;
  padding: 18px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 22px;
}

.abo-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.abo-hinweis-klein {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

.abo-fehler {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 14px;
  font-size: 0.88rem;
}

/* ── Produktsuche ─────────────────────────────────── */
.abo-suche-wrap {
  position: relative;
  margin-bottom: 14px;
}

.abo-suche-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.abo-suche-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.abo-suche-input:focus {
  border-color: #9ed2c0;
}

.abo-suche-input::placeholder {
  color: var(--muted2, #9BA4B0);
}

/* ── Produktkarten-Grid (Schritt 2) ───────────────── */
.abo-produkt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.abo-produkt-karte {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  user-select: none;
}

.abo-produkt-karte:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.abo-produkt-karte.ausgewaehlt {
  border-color: #9ed2c0;
  box-shadow: 0 0 0 3px rgba(158, 210, 192, 0.25), 0 4px 16px rgba(57, 142, 111, 0.08);
}

.abo-produkt-karte__bild {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f8fafa;
  padding: 16px;
  display: block;
  border-bottom: 1px solid var(--border);
}

.abo-produkt-karte__name {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 10px 10px 6px;
  text-align: center;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  color: var(--text);
}

.abo-produkt-karte__menge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}

/* ── +/- Mengen-Steppers ──────────────────────────── */
.abo-menge-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}

.abo-menge-btn:hover {
  border-color: #830e25;
  color: #830e25;
}

.abo-menge-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.abo-menge-wert {
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 22px;
  text-align: center;
  color: var(--text);
}

.abo-menge-status {
  font-size: 0.82rem;
  font-weight: 600;
  float: right;
  margin-top: 2px;
}

.abo-menge-status.stimmt {
  color: #398e6f;
}

.abo-menge-status.fehlt {
  color: #b91c1c;
}

/* ── Responsive: Grid kompakter + Steppers groesser fuer Touch ── */
@media (max-width: 768px) {
  .abo-produkt-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .abo-produkt-karte__bild {
    padding: 12px;
  }
  .abo-produkt-karte__name {
    font-size: 0.72rem;
    min-height: 36px;
    padding: 8px 6px 4px;
  }
  .abo-menge-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .abo-produkt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .abo-menge-btn {
    width: 40px;
    height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════
   DARK-MODE
   ═══════════════════════════════════════════════════════════
   Die hellen .abo-*-Regeln oben verwenden hartkodierte Helligkeiten
   und Rottoene. Diese Block-Overrides drehen Text + Karten-Hintergruende
   ins Dunkle. Auswahl-Markierung (Mint-Glow) bleibt erhalten.
   ═══════════════════════════════════════════════════════════ */

html.dark-mode .abo-hero {
  background: linear-gradient(135deg, #2a1a1d 0%, #1a1a1a 100%);
}

html.dark-mode .abo-hero h1 {
  color: #f5f5f5;
}

html.dark-mode .abo-hero p {
  color: #bbb;
}

html.dark-mode .abo-vorteile {
  background: #1a1a1a;
}

html.dark-mode .abo-vorteil p {
  color: #bbb;
}

html.dark-mode .abo-builder {
  background: #1a1a1a;
}

html.dark-mode .abo-builder-card {
  background: #1f1f1f;
  border-color: #333;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

html.dark-mode .abo-step-label {
  color: #e0e0e0;
}

html.dark-mode .abo-step-label .step-num {
  background: #c4344a;
}

html.dark-mode .abo-select-feld {
  background: #2a2a2a;
  color: #f0f0f0;
  border-color: #444;
}

html.dark-mode .abo-option-btn {
  background: #2a2a2a;
  border-color: #444;
  color: #f0f0f0;
}

html.dark-mode .abo-option-btn:hover {
  border-color: #9ed2c0;
}

html.dark-mode .abo-option-btn.aktiv {
  background: rgba(57, 142, 111, 0.2);
  border-color: #9ed2c0;
}

html.dark-mode .abo-option-btn .opt-sub {
  color: #aaa;
}

html.dark-mode .abo-option-btn.aktiv .opt-sub {
  color: #9ed2c0;
}

/* Rabatt-Pill: Mint-Gruen bleibt erkennbar, nur Schrift etwas heller */
html.dark-mode .abo-rabatt-pill {
  background: #4ab088;
  color: #ffffff;
}

/* Preis-Panel: dunkler Mint-Glow statt heller Verlauf */
html.dark-mode .abo-preis-panel {
  background: linear-gradient(135deg, rgba(57, 142, 111, 0.15) 0%, rgba(40, 40, 40, 0.4) 100%);
  border-color: rgba(158, 210, 192, 0.4);
}

html.dark-mode .abo-preis-final {
  color: #f0f0f0;
}

html.dark-mode .abo-preis-final strong {
  color: #c4344a;
}

html.dark-mode .abo-preis-normal {
  color: #888;
}

html.dark-mode .abo-preis-ersparnis {
  color: #6ec99f;
}

html.dark-mode .abo-hinweis-klein {
  color: #999;
}

html.dark-mode .abo-fehler {
  background: rgba(185, 28, 28, 0.15);
  border-color: rgba(254, 202, 202, 0.3);
  color: #fca5a5;
}

/* Suchfeld dunkel mit hellem Placeholder */
html.dark-mode .abo-suche-input {
  background: #2a2a2a;
  color: #f0f0f0;
  border-color: #444;
}

html.dark-mode .abo-suche-input::placeholder {
  color: #999;
}

html.dark-mode .abo-suche-icon {
  color: #888;
}

/* Produktkarten im Dark Mode: identisch zur Shop-Karte (.product-card) fuer
   konsistenten Look ueber alle Seiten — Body #1a1a1a, Karte #2d2d2d,
   Bildbereich #333, Border #3d3d3d. Transparente Flaschen-PNGs zeigen
   jetzt den dunklen Karten-Hintergrund durch. */
html.dark-mode .abo-produkt-karte {
  background: #2d2d2d;
  border-color: #3d3d3d;
  color: #e0e0e0;
}

html.dark-mode .abo-produkt-karte:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html.dark-mode .abo-produkt-karte.ausgewaehlt {
  border-color: #9ed2c0;
  box-shadow: 0 0 0 3px rgba(158, 210, 192, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4);
}

html.dark-mode .abo-produkt-karte__bild {
  background: #333;
  border-bottom-color: #3d3d3d;
}

html.dark-mode .abo-produkt-karte__name {
  color: #f0f0f0;
  font-weight: 600;
}

html.dark-mode .abo-produkt-karte__menge {
  border-top-color: #3d3d3d;
}

/* Mengen-Buttons: tieferes Grau zum Karten-BG (#2d2d2d) abgesetzt */
html.dark-mode .abo-menge-btn {
  background: #1a1a1a;
  border-color: #444;
  color: #f0f0f0;
}

html.dark-mode .abo-menge-btn:hover {
  background: #2a2a2a;
  border-color: #c4344a;
  color: #c4344a;
}

html.dark-mode .abo-menge-wert {
  color: #f0f0f0;
}

html.dark-mode .abo-menge-status.stimmt {
  color: #6ec99f;
}

html.dark-mode .abo-menge-status.fehlt {
  color: #fca5a5;
}

/* Schritt-Headlines explizit hell */
html.dark-mode .abo-builder-card h2,
html.dark-mode .abo-builder-card h3 {
  color: #f5f5f5;
}
