/* Layout: Titelbild gross neben Kaufbox, darunter Details und Bestellung; Rechtstexte als eigene Ansichten.
   Farben vom Cover: Himmelblau, Lindgrün, Ziegelrot. Nur Lightmode. */
:root {
  color-scheme: light;
  --bg: #f3f7fa;
  --surface: #ffffff;
  --ink: #121a21;
  --muted: #53636f;
  --line: #d5e0e8;
  --accent: #8fc31f;
  --accent-ink: #121a21;
  --sky: #d3e7f6;
  --roof: #b4532d;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #2e6b1f;
  --ok-bg: #eaf5df;
  --info-bg: #e3f0fa;
  --pp: #ffc439;
  --font-display: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }

/* Kopf */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
html { scroll-padding-top: 84px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; }
.logo { display: block; line-height: 0; }
.logo img { height: 60px; width: auto; display: block; }
.nav-btn { font-size: .95rem; font-weight: 700; text-decoration: none; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
.nav-btn:hover { background: var(--accent); color: var(--accent-ink); }

/* Produkt */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: 36px 56px; }
.cover { margin: 0; }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 994; border-radius: 4px; background: var(--sky); box-shadow: 0 2px 0 var(--line), 0 24px 48px -24px rgba(10, 30, 50, .45); }
.cover figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.buy { min-width: 0; }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--roof); margin: 0 0 8px; }
h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 12px; text-wrap: balance; }
.lead { color: var(--muted); margin: 0 0 22px; max-width: 34ch; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price strong { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small, .taxline { color: var(--muted); font-size: .85rem; }
.taxline { margin: 0 0 14px; }
.stock { margin: 0 0 18px; font-weight: 700; font-size: .92rem; }
.stock.ok { color: var(--ok); }
.stock.low { color: var(--roof); }
.stock.out { color: var(--danger); }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 800; font-size: 1.05rem; padding: 14px 26px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; width: 100%; }
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: var(--surface); border: 2px solid var(--ink); width: auto; padding: 8px 14px; font-size: .92rem; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.facts li::before { content: ""; display: inline-block; width: .55em; height: .55em; background: var(--accent); border-radius: 50%; margin-right: .6em; }

/* Abschnitte */
section.block { padding-block: 48px; border-top: 1px solid var(--line); scroll-margin-top: 8px; }
h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.12; margin: 0 0 18px; text-wrap: balance; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.about p { margin: 0 0 14px; max-width: 62ch; }
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 34%; font-weight: 600; color: var(--muted); padding-right: 12px; }

/* Bestellung */
.order { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 28px); }
.card-title { font-family: var(--font-display); margin: 0 0 14px; font-size: 1.1rem; }
.form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; grid-column: span 6; min-width: 0; }
.field.third { grid-column: span 2; }
.field.twothird { grid-column: span 4; }
.field label { font-size: .88rem; font-weight: 600; }
.field input[type="text"], .field input[type="email"] { font: inherit; padding: 11px 12px; border: 2px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); width: 100%; min-width: 0; }
.field input:focus { border-color: var(--ink); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.field input:disabled { color: var(--muted); }
.err { color: var(--danger); font-size: .85rem; margin: 0; }
.err:empty { display: none; }
.check { grid-column: span 6; display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .3em; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.form > .err { grid-column: span 6; margin-top: -6px; }

.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: auto; aspect-ratio: 1400 / 994; border-radius: 3px; background: var(--sky); }
.line .name { font-weight: 700; line-height: 1.25; }
.line small { display: block; color: var(--muted); }
.line .lt { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.line .qty { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; }
.stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--surface); }
.stepper button { width: 38px; border: 0; background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--sky); }
.stepper button:disabled { color: #aab6bf; cursor: not-allowed; }
.stepper output { min-width: 40px; display: grid; place-items: center; font-weight: 800; border-inline: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.stepper input.qty-input { width: 56px; border: 0; border-inline: 2px solid var(--ink); border-radius: 0; text-align: center; font: inherit; font-weight: 800; font-variant-numeric: tabular-nums; background: transparent; color: var(--ink); padding: 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input.qty-input::-webkit-outer-spin-button, .stepper input.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 14px 0 0; font-variant-numeric: tabular-nums; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; text-align: right; padding-left: 12px; }
.sum .total { font-weight: 800; font-size: 1.2rem; color: var(--ink); border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; }
.sum-tax { margin: 8px 0 0; }
.pay { margin-top: 20px; }
.pay-note { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }
#paypal-buttons { min-height: 50px; }

/* Meldungen */
.msg { padding: 12px 14px; border-radius: 8px; font-size: .93rem; margin: 0 0 12px; border-left: 5px solid var(--ink); background: var(--info-bg); }
.msg.bad { background: var(--danger-bg); border-left-color: var(--danger); color: #5c1410; }
.msg.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.msg strong { display: block; margin-bottom: 2px; }
.msg .actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
#load-error { margin-top: 16px; }
.mock-row { display: grid; gap: 8px; }
.pp-test { border: 0; border-radius: 6px; background: var(--pp); color: #111; font: inherit; font-weight: 800; font-size: 1rem; padding: 13px; cursor: pointer; }
.pp-test.fail { background: #fff; border: 2px dashed var(--danger); color: var(--danger); }
.pp-test:disabled { opacity: .6; cursor: wait; }

/* Rechtstexte */
.legal { max-width: 760px; margin: 0 auto; padding-block: 28px 64px; }
.legal h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); }
.legal-body h2 { font-size: 1.2rem; margin: 30px 0 10px; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2em; }
.back { display: inline-block; margin-bottom: 18px; font-weight: 600; }

footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--muted); font-size: .9rem; margin-top: 24px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
footer a { color: var(--ink); font-weight: 600; }
footer p { margin: 0 0 6px; max-width: 80ch; }

@media (max-width: 820px) {
  .hero, .about, .order { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 20px; }
  .field.third { grid-column: span 2; }
  .field.twothird { grid-column: span 4; }
  .logo img { height: 48px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav-btn { transition: filter .15s, background .15s; }
}

/* Spendenhinweis und Zusatztext */
.charity { display: flex; align-items: center; gap: 16px; margin-block: 8px 28px; padding: 16px 20px; background: #f3f9e4; border: 1px solid #cfe6a0; border-left: 6px solid var(--accent); border-radius: 10px; }
.charity[hidden] { display: none; }
.charity p { margin: 0; font-weight: 700; max-width: 70ch; }
.charity-ico { flex: none; color: #5f8a0c; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.4rem; margin: 0 0 12px; }
.prose h2:not(:first-child) { margin-top: 28px; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul { padding-left: 1.2em; }

/* Rechnungsadresse */
.billing { display: contents; }
.billing[hidden] { display: none; }
.card-sub { grid-column: 1 / -1; margin: 10px 0 0; font-size: 1rem; }

/* EU-Gewährleistungsmitteilung */
.warranty { margin: 0 0 14px; }
.warranty[hidden] { display: none; }
.warranty a { display: block; }
.warranty img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.warranty-big { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Hinweis Auftrag, Danke-Seite */
.agent-note { margin: 0 0 12px; padding: 10px 12px; background: #eef4f8; border-left: 4px solid #9db3c2; border-radius: 4px; font-size: .88rem; line-height: 1.5; }
.agent-note[hidden] { display: none; }
#foot-agent { font-size: .85rem; }
.thanks .msg { margin: 0 0 18px; }
.thanks .msg.ok { background: #f1f8e3; border-color: #8fc31f; color: #121a21; }
.steps { padding-left: 20px; line-height: 1.6; margin: 0 0 18px; }
.steps li { margin-bottom: 6px; }
.muted { color: var(--muted); }
.warranty { margin: 14px 0 0; }

.overview { margin: 0; }
.overview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.overview figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* Barrierefreiheit: ausreichend große Klickflächen für Links außerhalb von Fließtext (WCAG 2.2, 2.5.8) */
footer a, .legal-links a, .hero-links a { display: inline-block; min-height: 24px; line-height: 24px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.pp-wrap { position: relative; }
.pp-guard { position: absolute; inset: 0; z-index: 5; cursor: pointer; }
