/* ══════════════════════════════════════════════════════════
   WindelDackel Design Tokens — aus Research #36 (Prototype "Klar" Theme)
   ══════════════════════════════════════════════════════════ */
:root {
  /* Markenfarbe */
  --wd-brand:         #0E9F6E;
  --wd-brand-ink:     #0A7A54;
  --wd-brand-tint:    #E4F6EF;

  /* Signal: gut (grüner Deal) */
  --wd-good:          #10A06F;
  --wd-good-ink:      #0A7A54;
  --wd-good-tint:     #E4F6EF;

  /* Signal: ok / neutral (blau) */
  --wd-ok:            #2F7DE1;
  --wd-ok-ink:        #205FB0;
  --wd-ok-tint:       #E7F0FC;

  /* Signal: warn (gelb-orange) */
  --wd-warn:          #E0992F;
  --wd-warn-ink:      #9A6A16;
  --wd-warn-tint:     #FAF0DC;

  /* Flächen + Hintergründe */
  --wd-bg:            #FFFFFF;
  --wd-surface:       #FFFFFF;
  --wd-surface-2:     #F4F6F7;

  /* Linien + Ränder */
  --wd-line:          #E7EAEC;
  --wd-card-line:     #EDF0F1;
  --wd-header-line:   #EEF1F2;

  /* Schatten */
  --wd-card-shadow:   0 1px 2px rgba(15, 20, 25, 0.05);

  /* Navigation */
  --wd-nav-bg:        rgba(255, 255, 255, 0.86);

  /* Schriftfarben */
  --wd-ink:           #0F1419;
  --wd-ink-soft:      #5B6770;
  --wd-ink-faint:     #9AA4AC;

  /* Toggle-Switch aus */
  --wd-switch-off:    #D6DBDE;

  /* Typographie */
  --wd-font-head:     'Poppins', sans-serif;
  --wd-font-body:     'Hanken Grotesk', sans-serif;

  /* Layout */
  --wd-content-max:   1300px;
  --wd-nav-h:         56px;
  --wd-sidebar-w:     248px;
  --wd-pad-mobile:    1rem;
  --wd-pad-page:      1.5rem;

  /* Border-Radii */
  --wd-r-card:        18px;
  --wd-r-card-lg:     22px;
  --wd-r-chip:        999px;
  --wd-r-btn:         10px;
  --wd-r-tag:         7px;
  --wd-r-sm:          8px;

  /* Animationen */
  --wd-ease-overlay:  cubic-bezier(0.32, 0.72, 0, 1);

  /* Cashback-Programme (Erweiterung für Listing- und Detail-Seite) */
  --wd-rossmann:      #C41E3A;
  --wd-rossmann-tint: #FFF1F2;
  --wd-payback:       #1D4ED8;
  --wd-payback-tint:  #EFF6FF;
  --wd-bundle:        #7C3AED;
  --wd-bundle-tint:   #F5F3FF;
  --wd-strike:        #A8B8B0;
}

/* ══════════════════════════════════════════════════════════
   Basis
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 15px;
}

body {
  font-family: var(--wd-font-body);
  color: var(--wd-ink);
  background: var(--wd-bg);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   Topbar
   ══════════════════════════════════════════════════════════ */
.topbar {
  background: var(--wd-nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wd-header-line);
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--wd-nav-h);
}

.topbar__inner {
  max-width: var(--wd-content-max);
  margin: 0 auto;
  padding: 0 var(--wd-pad-page);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Nur die Hoehe vorgeben, die Breite folgt dem Seitenverhaeltnis: Das Logo ist 7:1 breit,
   eine Breitenangabe machte seine Hoehe zur Rechenaufgabe. width/height stehen am img-Tag
   und halten den Platz schon vor dem Laden frei - ohne sie rutschte das Suchfeld beim
   Aufbau der Seite einmal zur Seite. */
.topbar__logo {
  display: block;
  height: 26px;
  width: auto;
}

.topbar__logo-mark {
  display: none;
  height: 24px;
  width: auto;
}

.topbar__search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.topbar__search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wd-ink-faint);
  pointer-events: none;
  display: flex;
}

.topbar__search-input {
  width: 100%;
  font-family: var(--wd-font-body);
  font-size: 0.875rem;
  background: var(--wd-surface-2);
  border: 1.5px solid var(--wd-line);
  border-radius: var(--wd-r-sm);
  padding: 0.45rem 0.875rem 0.45rem 2.25rem;
  color: var(--wd-ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.topbar__search-input:focus {
  border-color: var(--wd-brand);
  background: var(--wd-surface);
}

.topbar__search-input::placeholder { color: var(--wd-ink-faint); }

/* ══════════════════════════════════════════════════════════
   Seiten-Layout: Sidebar + Hauptbereich
   ══════════════════════════════════════════════════════════ */
.page {
  max-width: var(--wd-content-max);
  margin: 0 auto;
  padding: 1.25rem var(--wd-pad-page) 3rem;
  display: grid;
  grid-template-columns: var(--wd-sidebar-w) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: calc(var(--wd-nav-h) + 0.75rem);
  max-height: calc(100vh - var(--wd-nav-h) - 1.5rem);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.main { min-width: 0; }

/* Ueberschrift der Startseite. Bewusst zurueckhaltend: Die Seite ist ein Werkzeug, kein
   Artikel - ein grosser Titel schoebe das Raster nach unten, ohne etwas zu erklaeren. */
.page-heading {
  font-family: var(--wd-font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--wd-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

/* Sidebar-Cards */
.sidebar__card {
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  overflow: hidden;
  box-shadow: var(--wd-card-shadow);
  flex-shrink: 0;
}

.sidebar__label {
  padding: 0.75rem 1rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--wd-ink-faint);
}

.sidebar__body {
  padding: 0 1rem 0.875rem;
}

/* ══════════════════════════════════════════════════════════
   Cashback-Panel: Programm-Zeilen
   ══════════════════════════════════════════════════════════ */
.program-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--wd-card-line);
}

.program-row:last-child { border-bottom: none; }

.program-row--stacked {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.45rem;
}

.program-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.program-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.program-dot--rossmann { background: var(--wd-rossmann); }
.program-dot--sparabo  { background: #F59E0B; }
.program-dot--payback  { background: var(--wd-payback); }

/* Info-Button je Programm (#109): oeffnet die Erklaerung als natives Popover */
.program-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.25rem 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--wd-ink-faint);
  cursor: pointer;
  flex-shrink: 0;
}

.program-info:hover { color: var(--wd-ink-soft); }

.program-info:focus-visible {
  outline: 2px solid var(--wd-brand);
  outline-offset: 1px;
}

/* Ohne Anker-Positionierung zentriert der Browser das Popover im Viewport - auf dem Handy
   genau richtig, auf dem Desktop unaufdringlich genug. */
.program-help {
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.875rem 1rem;
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-sm);
  background: var(--wd-surface);
  color: var(--wd-ink);
  box-shadow: 0 8px 24px rgba(15, 20, 25, 0.15);
  font-size: 0.85rem;
  line-height: 1.5;
}

.program-help::backdrop { background: rgba(15, 20, 25, 0.12); }

.program-help__title {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.program-rate {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wd-brand);
  background: var(--wd-brand-tint);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ── Toggle-Switch (CSS-only) ── */
.toggle {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--wd-switch-off);
  border-radius: 22px;
  transition: background 0.2s;
}

.toggle__input:checked + .toggle__track { background: var(--wd-brand); }

.toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: transform 0.2s;
  z-index: 1;
  pointer-events: none;
}

.toggle__input:checked ~ .toggle__thumb { transform: translateX(16px); }

.toggle__input:focus-visible + .toggle__track {
  outline: 2px solid var(--wd-brand);
  outline-offset: 2px;
}

/* ── Segment-Control (CSS-only) ── */
.segment {
  display: inline-flex;
  border: 1.5px solid var(--wd-line);
  border-radius: var(--wd-r-sm);
  overflow: hidden;
  background: var(--wd-surface);
}

.segment__input { display: none; }

.segment__label {
  padding: 0.22rem 0.65rem;
  font-family: var(--wd-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--wd-ink-soft);
  border-right: 1.5px solid var(--wd-line);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  user-select: none;
}

.segment__label:last-of-type { border-right: none; }

.segment__input:checked + .segment__label {
  background: var(--wd-brand);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   Detail-Seite (#45)
   ══════════════════════════════════════════════════════════ */
.detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--wd-ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--wd-brand); text-decoration: underline; }

.breadcrumb__sep { color: var(--wd-ink-faint); }

.breadcrumb__current { color: var(--wd-ink); font-weight: 500; }

/* Produkt-Hero */
.product-hero {
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  box-shadow: var(--wd-card-shadow);
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
}

.product-hero__img {
  background: var(--wd-surface-2);
  border-right: 1px solid var(--wd-card-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 160px;
}

.product-hero__info {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

.product-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wd-brand);
}

.product-hero__h1 {
  font-family: var(--wd-font-head);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--wd-ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.product-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-hero__pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--wd-surface-2);
  border: 1px solid var(--wd-line);
  color: var(--wd-ink-soft);
}

.product-hero__offer-count {
  font-size: 0.78rem;
  color: var(--wd-ink-faint);
}

.product-hero__best {
  font-size: 0.88rem;
  color: var(--wd-ink-soft);
}

.product-hero__best strong {
  font-family: var(--wd-font-head);
  font-weight: 800;
  color: var(--wd-good);
}

/* Cashback-Config-Strip */
.config-strip {
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  box-shadow: var(--wd-card-shadow);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.config-strip__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wd-ink-faint);
  white-space: nowrap;
}

.config-strip__programs {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  flex: 1;
}

.config-program {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.config-program__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.config-program__dot--rossmann { background: var(--wd-rossmann); }
.config-program__dot--sparabo  { background: #F59E0B; }
.config-program__dot--payback  { background: var(--wd-payback); }

.config-program__name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Preisverlauf (Preview) */
.price-history {
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  box-shadow: var(--wd-card-shadow);
  padding: 1rem 1.25rem;
}

.price-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.price-history__title {
  margin: 0;
  font-family: var(--wd-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wd-ink);
}

.price-history__verdict {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--wd-r-chip);
  white-space: nowrap;
}

.price-history__verdict--good   { background: var(--wd-good-tint); color: var(--wd-good-ink); }
.price-history__verdict--normal { background: var(--wd-ok-tint);   color: var(--wd-ok-ink); }
.price-history__verdict--high   { background: var(--wd-warn-tint); color: var(--wd-warn-ink); }
.price-history__verdict--none   { background: var(--wd-surface-2); color: var(--wd-ink-soft); }

.price-history__summary {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--wd-ink-soft);
}

.price-history__chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
}

.price-history__grid { stroke: var(--wd-line); stroke-width: 1; }
.price-history__avg  { stroke: var(--wd-ink-faint); stroke-width: 1; stroke-dasharray: 4 4; }

.price-history__line {
  fill: none;
  stroke: var(--wd-brand);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.price-history__hit { fill: transparent; }
.price-history__hit:hover { fill: var(--wd-brand-tint); }

.price-history__current {
  fill: var(--wd-brand);
  stroke: var(--wd-surface);
  stroke-width: 2;
}

.price-history__axis {
  font-size: 11px;
  fill: var(--wd-ink-faint);
}

.price-history__legend {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--wd-ink-soft);
  margin: 0.25rem 0 0.75rem;
}

.price-history__key {
  display: inline-block;
  width: 16px;
  vertical-align: middle;
  margin-right: 0.35rem;
  border-top: 2px solid var(--wd-brand);
}

.price-history__key--avg { border-top: 1px dashed var(--wd-ink-faint); }

.price-history__key--current {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--wd-brand);
}

.price-history__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.price-history__table th,
.price-history__table td {
  padding: 0.3rem 0;
  border-top: 1px solid var(--wd-card-line);
  text-align: left;
}

.price-history__table th { font-weight: 500; color: var(--wd-ink-soft); }
.price-history__table td { font-weight: 700; font-variant-numeric: tabular-nums; }
.price-history__table td.price-history__when { font-weight: 400; color: var(--wd-ink-faint); text-align: right; }

.price-history__note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--wd-ink-faint);
}

/* Angebots-Liste */
.offers__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.offers__title {
  font-family: var(--wd-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wd-ink);
}

.offers__subtitle {
  font-size: 0.8rem;
  color: var(--wd-ink-faint);
}

.offers__affiliate-note {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--wd-ink-faint);
}

.offers__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Angebots-Card */
.offer-card {
  background: var(--wd-surface);
  border: 1.5px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  box-shadow: var(--wd-card-shadow);
  overflow: hidden;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.offer-card:hover {
  box-shadow: 0 4px 12px rgba(15,20,25,0.10);
  border-color: #A7D9C8;
}

.offer-card--best { border-color: var(--wd-brand); border-width: 2px; }

.offer-card__top-ribbon {
  background: var(--wd-brand);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
}

.offer-card__main {
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 190px 1fr 145px;
  gap: 1rem;
  align-items: start;
}

.offer-shop-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wd-ink);
  margin-bottom: 0.375rem;
}

/* Vertriebsweg-Badge (#108): neutral gehalten, damit es nicht mit den farbigen Promo-Chips
   verwechselt wird. "Filiale" ist leicht hervorgehoben, weil es der seltenere Fall ist. */
.channel-badge {
  display: inline-block;
  font-family: var(--wd-font-body);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.1rem 0.4rem;
  border-radius: var(--wd-r-chip);
  border: 1px solid var(--wd-line);
  color: var(--wd-ink-soft);
  background: var(--wd-surface);
  vertical-align: 1px;
  white-space: nowrap;
}

.channel-badge--store {
  border-color: var(--wd-ok-tint);
  color: var(--wd-ok-ink);
  background: var(--wd-ok-tint);
}

.offer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.375rem;
}

.offer-pack-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wd-ink);
  margin-bottom: 0.25rem;
}

.offer-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.offer-shipping {
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: var(--wd-ink-faint);
}

.offer-price-pay {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wd-ink);
}

.offer-price-was {
  font-size: 0.85rem;
  color: var(--wd-strike);
  text-decoration: line-through;
}

/* Beschriftung neben den Betraegen: "im Shop" / "effektiv nach Payback" (#70) */
.offer-price-label {
  font-size: 0.78rem;
  color: var(--wd-ink-soft);
  font-weight: 500;
}

/* Der Effektivpreis steht unter dem Shop-Preis und ist bewusst leiser:
   Anker ist, was an der Kasse faellig wird. */
.offer-price-effective {
  margin-top: 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wd-good-ink);
}

/* Stand der Preisdaten */
.offer-updated {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--wd-ink-soft);
}

.offer-updated--stale {
  color: var(--wd-warn-ink);
  font-weight: 600;
}

.offer-bundle-explain {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--wd-ink-soft);
  line-height: 1.5;
}

.offer-bundle-explain strong { color: var(--wd-bundle); }

.offer-col-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.offer-ct {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.offer-ct__num {
  font-family: var(--wd-font-head);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--wd-good);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.offer-ct__unit {
  font-family: var(--wd-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wd-good);
}

.offer-ct__per {
  font-size: 0.72rem;
  color: var(--wd-ink-faint);
  font-weight: 500;
  margin-top: 1px;
}

.btn-shop {
  display: inline-block;
  background: var(--wd-brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 0.875rem;
  border-radius: var(--wd-r-sm);
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-shop:hover { background: var(--wd-brand-ink); color: #fff; }

/* Breakdown — Variante für Offer-Cards (mit Hintergrund + Padding) */
.offer-card .breakdown {
  border-top: 1px solid var(--wd-card-line);
  background: var(--wd-surface-2);
  padding-top: 0;
  margin-top: 0;
}

.offer-card .breakdown summary {
  padding: 0.6rem 1.25rem;
}

.breakdown__inner {
  padding: 0 1.25rem 0.875rem;
}

.breakdown__table {
  width: 100%;
  max-width: 400px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.breakdown__table td {
  padding: 0.2rem 0.5rem 0.2rem 0;
  vertical-align: top;
  color: var(--wd-ink-soft);
}

.breakdown__table td:last-child { text-align: right; white-space: nowrap; }

.breakdown__table .breakdown__row--savings td { color: var(--wd-good); }

.breakdown__table .breakdown__row--total td {
  font-weight: 700;
  color: var(--wd-ink);
  border-top: 1px solid var(--wd-card-line);
  padding-top: 0.4rem;
}

.breakdown__table .breakdown__row--total td:last-child { color: var(--wd-good); }

/* Bundle-Badge (lila, für Detail-Seite und #47) */
.bundle-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--wd-bundle);
  background: var(--wd-bundle-tint);
  border: 1px solid #DDD6FE;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    padding: 1rem var(--wd-pad-mobile) 2rem;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow-y: visible;
  }

  .sidebar__card { flex: 1; min-width: 200px; }
}

@media (max-width: 560px) {
  .topbar__inner { padding: 0 var(--wd-pad-mobile); }

  /* Ab hier nur noch der Dackel: Die Wortmarke braucht 187px, und die fehlten dem
     Suchfeld - dem wichtigsten Element der Startseite. */
  .topbar__logo { display: none; }
  .topbar__logo-mark { display: block; }
}

@media (max-width: 640px) {
  .detail-page {
    padding: 1rem var(--wd-pad-mobile) 2rem;
  }

  .product-hero {
    grid-template-columns: 1fr;
  }

  .product-hero__img {
    border-right: none;
    border-bottom: 1px solid var(--wd-card-line);
  }

  .offer-card__main {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .offer-col-price {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ══════════════════════════════════════════════════════════
   Filter-Sidebar: Radioliste + Größen-Chips
   ══════════════════════════════════════════════════════════ */
.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list__item + .filter-list__item { border-top: 1px solid var(--wd-card-line); }

.filter-list__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.875rem;
}

.filter-list__radio {
  accent-color: var(--wd-brand);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.filter-list__radio:focus-visible { outline: 2px solid var(--wd-brand); outline-offset: 2px; }

.filter-list__name { flex: 1; }

.filter-list__count {
  font-size: 0.72rem;
  color: var(--wd-ink-faint);
}

/* ── Größen-Slider ── */
.sidebar__label--with-action {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.range-slider__reset {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--wd-brand);
  text-decoration: none;
}

.range-slider__reset:hover { text-decoration: underline; }

.range-slider__value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wd-ink);
  text-align: center;
  margin-bottom: 0.6rem;
}

.range-slider__track {
  position: relative;
  height: 20px;
}

.range-slider__track::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--wd-line);
  transform: translateY(-50%);
}

.range-slider__fill {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: var(--wd-brand);
  transform: translateY(-50%);
}

.range-slider__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.range-slider__input::-webkit-slider-runnable-track { -webkit-appearance: none; height: 20px; background: transparent; }
.range-slider__input::-moz-range-track { height: 20px; background: transparent; border: none; }

.range-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--wd-brand);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.25);
  cursor: pointer;
}

.range-slider__input::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wd-brand);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.25);
  cursor: pointer;
}

.range-slider__input:focus-visible::-webkit-slider-thumb,
.range-slider__input:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--wd-brand-ink);
  outline-offset: 2px;
}

.range-slider__ticks {
  display: flex;
  margin-top: 2px;
}

/* Jede Zahl ist eine Schaltflaeche (#89). Gleich breite Spalten statt space-between: Bei
   zehn Groessen bliebe sonst zwischen den Flaechen kein Platz, und die Mitte einer Zahl
   liegt so ausserdem naeher an der Position ihres Griffs auf dem Regler. */
.range-slider__tick {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  color: var(--wd-ink-faint);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.range-slider__tick:hover { background: var(--wd-line); }

.range-slider__tick--active {
  background: var(--wd-brand-tint);
  color: var(--wd-brand-ink);
}

.range-slider__tick:focus-visible {
  outline: 2px solid var(--wd-brand-ink);
  outline-offset: 1px;
}

/* Der Tipp-Hinweis erklaert die zweistufige Auswahl genau dann, wenn sie ansteht - der
   Text wechselt, sobald ein Startpunkt gesetzt ist. */
.range-slider__hint {
  margin: 0.35rem 0 0;
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--wd-ink-faint);
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   Produkt-Card-Grid (#46)
   ══════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--wd-surface);
  border: 1.5px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--wd-card-shadow);
  transition: box-shadow 0.2s, transform 0.18s, border-color 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(15,20,25,0.10);
  transform: translateY(-2px);
  border-color: #A7D9C8;
}

.product-card--best {
  border-color: var(--wd-brand);
  border-width: 2px;
}

.product-card__img {
  position: relative;
  height: 148px;
  background: var(--wd-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.product-card__img svg { max-height: 128px; max-width: 100%; }

.product-card__best-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--wd-brand);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-card__body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.product-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 1.4rem;
}

.chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.chip--sparabo  { background: var(--wd-warn-tint);     color: var(--wd-warn); }
.chip--rossmann { background: var(--wd-rossmann-tint); color: var(--wd-rossmann); }
.chip--payback  { background: var(--wd-payback-tint);  color: var(--wd-payback); }

.product-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wd-ink);
  line-height: 1.3;
}

.product-card__meta {
  font-size: 0.78rem;
  color: var(--wd-ink-soft);
}

.product-card__shipping {
  font-size: 0.72rem;
  color: var(--wd-ink-faint);
  margin-top: 0.15rem;
}

.product-price {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 0.125rem;
}

.product-price__orig {
  font-size: 0.82rem;
  color: var(--wd-strike);
  text-decoration: line-through;
  line-height: 1;
  padding-bottom: 2px;
}

.product-price__main {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.product-price__ct {
  font-family: var(--wd-font-head);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--wd-good);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.product-price__ct-unit {
  font-family: var(--wd-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wd-good);
}

.product-price__per {
  font-size: 0.72rem;
  color: var(--wd-ink-faint);
  font-weight: 500;
  padding-left: 1px;
}

.breakdown {
  border-top: 1px solid var(--wd-card-line);
  padding-top: 0.5rem;
  margin-top: 0.125rem;
}

.breakdown summary {
  font-size: 0.76rem;
  color: var(--wd-ink-soft);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  user-select: none;
}

.breakdown summary::-webkit-details-marker { display: none; }

.breakdown__arrow {
  font-size: 0.55rem;
  color: var(--wd-ink-faint);
  display: inline-block;
  transition: transform 0.18s;
}

.breakdown[open] .breakdown__arrow { transform: rotate(90deg); }

.breakdown__rows {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--wd-ink-soft);
}

.breakdown__row--savings { color: var(--wd-good); }

.breakdown__row--total {
  font-weight: 700;
  color: var(--wd-ink);
  border-top: 1px solid var(--wd-card-line);
  padding-top: 4px;
  margin-top: 2px;
}

.breakdown__row--total span:last-child { color: var(--wd-good); }

.btn-detail {
  display: block;
  text-align: center;
  background: transparent;
  color: var(--wd-brand);
  border: 1.5px solid var(--wd-brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--wd-r-sm);
  margin-top: auto;
  transition: background 0.15s, color 0.15s;
}

.btn-detail:hover {
  background: var(--wd-brand-tint);
  color: var(--wd-brand-ink);
}

/* ══════════════════════════════════════════════════════════
   Bestehende Preisvergleichs-Utilities (migriert auf Tokens)
   ══════════════════════════════════════════════════════════ */

/* Vergleichstabelle (Fallback bis _PriceTable migriert ist) */
.comparison-table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.comparison-table td {
  font-size: .88rem;
}

.price-eff {
  font-family: var(--wd-font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wd-good);
}

/* Promotion-Chips (Bootstrap-Badge-Erweiterungen) */
.badge.bg-promo {
  background-color: var(--wd-good-tint);
  color: var(--wd-good-ink);
  font-weight: 600;
}

.badge.bg-payback {
  background-color: var(--wd-payback-tint);
  color: var(--wd-payback);
  font-weight: 600;
}

/* Aufklappbare Detailzeile */
.detail-inner {
  background: var(--wd-surface-2);
  border-bottom: 2px solid var(--wd-line);
  padding: .75rem 1rem;
  font-size: .85rem;
}

.clickable-row:hover td {
  background-color: var(--wd-brand-tint) !important;
}

.clickable-row.expanded td:first-child::before {
  content: '\25BC ';
  font-size: .7rem;
  color: var(--wd-ink-soft);
}

/* Filter-Chip-Gruppe (Fallback) */
.filter-group-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--wd-ink-soft);
}

/* Best-Preis-Banner */
.best-price-banner {
  background: var(--wd-good-tint);
  border: 1px solid #A7F3D0;
  border-radius: var(--wd-r-sm);
}

/* Focus-Outline (Accessibility) */
:focus-visible {
  outline: 2px solid var(--wd-brand);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Tabelle auf schmalen Viewports scrollbar */
@media (max-width: 575px) {
  .comparison-table td, .comparison-table th {
    font-size: .8rem;
    padding: .4rem .5rem;
  }
  .price-eff { font-size: 1rem; }
}

/* Detail-Seite ohne aktuelle Angebote (#70) */
.offers__empty {
  padding: 1.25rem;
  border: 1px dashed var(--wd-line);
  border-radius: var(--wd-r-card, 12px);
  background: var(--wd-surface-2);
}

.offers__empty-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--wd-ink);
}

.offers__empty-hint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--wd-ink-soft);
}

.product-hero__best--none {
  color: var(--wd-ink-soft);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   Preishinweis: Preise sind Momentaufnahmen, verbindlich ist der Shop
   ══════════════════════════════════════════════════════════ */
.price-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-sm);
  background: var(--wd-surface-2);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--wd-ink-soft);
}

.price-note__icon {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: var(--wd-ink-faint);
}


/* Preview-Badge: nur fuer den freigeschalteten Betreiber sichtbar. Unten links, damit es
   keinen Shop-Button verdeckt; pausiert ausgegraut, aber weiter da. */
.preview-badge {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 1080;
  margin: 0;
}

.preview-badge__button {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--wd-warn-ink);
  border-radius: 999px;
  background: var(--wd-warn-tint);
  color: var(--wd-warn-ink);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--wd-card-shadow);
}

.preview-badge__button--paused {
  border-color: var(--wd-line);
  background: var(--wd-surface-2);
  color: var(--wd-ink-faint);
}

/* Kontaktformular (#118). Schmaler als die Spalte: Eine Nachrichtenzeile ueber die volle
   Breite liest sich schlecht. */
.contact-form { max-width: 36rem; }

/* Honeypot: ausserhalb des sichtbaren Bereichs statt display:none, siehe Kontakt.cshtml. */
.contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   Uebersichten je Linie und Groesse, Querverweise zwischen den Seiten
   ══════════════════════════════════════════════════════════ */
.catalog-page__h1 {
  font-family: var(--wd-font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--wd-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.catalog-page__intro,
.catalog-page__empty {
  margin: 0;
  max-width: 62ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--wd-ink-soft);
}

/* Linienseite: eine Zeile je Groesse. Links Groesse und Shop, rechts der Preis pro Windel -
   dieselbe Leserichtung wie die Angebotsliste der Detail-Seite. */
.size-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 0.6rem;
}

.size-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "size  price"
    "shop  price";
  align-items: center;
  gap: 0.1rem 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
  box-shadow: var(--wd-card-shadow);
  color: var(--wd-ink);
  text-decoration: none;
}

.size-list__item:hover,
.size-list__item:focus-visible { border-color: var(--wd-brand); }

.size-list__size {
  grid-area: size;
  font-family: var(--wd-font-head);
  font-size: 1.05rem;
  font-weight: 800;
}

.size-list__shop {
  grid-area: shop;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--wd-ink-soft);
}

.size-list__price {
  grid-area: price;
  text-align: right;
  font-size: 0.75rem;
  color: var(--wd-ink-soft);
  white-space: nowrap;
}

.size-list__ct {
  display: block;
  font-family: var(--wd-font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--wd-brand-ink);
}

/* Querverweise: Nachbargroessen auf der Detail-Seite, Groessen und Linien unter den Listen. */
.related-links,
.catalog-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--wd-surface);
  border: 1px solid var(--wd-card-line);
  border-radius: var(--wd-r-card);
}

/* Ueberschrift und Chips stehen hier direkt im Flex-Container, der Abstand kommt vom gap. */
.related-links { gap: 0.6rem; }

/* Auf der Startseite steht die Navigation unter dem Preishinweis in der Hauptspalte. */
.main > .catalog-nav { margin-top: 1.25rem; }

.related-links__heading,
.catalog-nav__heading {
  font-family: var(--wd-font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wd-ink);
  margin: 0 0 0.5rem;
}

.related-links__heading { margin: 0; }

.size-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.size-chip {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--wd-line);
  border-radius: var(--wd-r-chip);
  background: var(--wd-surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wd-ink);
  text-decoration: none;
  white-space: nowrap;
}

a.size-chip:hover,
a.size-chip:focus-visible {
  border-color: var(--wd-brand);
  color: var(--wd-brand-ink);
}

.size-chip--current {
  background: var(--wd-brand);
  border-color: var(--wd-brand);
  color: #fff;
}

.related-links__more,
.catalog-nav__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.88rem;
}

.related-links__more a,
.catalog-nav__lines a { color: var(--wd-brand-ink); }

.catalog-nav__lines [aria-current] {
  font-weight: 600;
  color: var(--wd-ink);
}
