/*
 * Landingpage /deals/<begriff> und Infozeile – gemeinsam für alle 6 Layouts.
 * Farben kommen aus den Layout-Variablen (--accent, --disc, --price, --ok,
 * --line, --muted …); jedes Layout kann am Ende seiner CSS die --lp-*-Werte
 * überschreiben (Rundung, Kartenfarbe). Black-Week-Version: body.bw.
 */
:root {
  --lp-r: 14px;
  --lp-card: #fff;
  --lp-ink: var(--text, #1b1b1f);
  --lp-muted: var(--muted, #6b6f78);
  --lp-line: var(--line, #e3e5ea);
  --lp-soft: var(--soft, #f4f5f7);
  --lp-disc: var(--disc, #c0262d);
  --lp-price: var(--price, var(--lp-ink));
  --lp-ok: var(--ok, #0b6b42);
  --lp-btn: var(--accent, #1b1b1f);
  --lp-btn-fg: var(--accent-fg, #fff);
}
body.bw {
  --lp-card: rgba(255,255,255,.05);
  --lp-ink: inherit;
  --lp-soft: rgba(255,255,255,.07);
  --lp-line: rgba(255,255,255,.14);
  --lp-muted: rgba(255,255,255,.66);
}

/* ---------- Infozeile über dem Kopf ---------- */
.topbar { background: var(--lp-topbar-bg, var(--header-bg, #111318)); color: var(--lp-topbar-fg, var(--header-fg, #fff)); font-size: 13.5px; line-height: 1.35; }
.topbar-in { display: flex; justify-content: center; align-items: center; min-height: 34px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
.topbar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.topbar a:hover { text-decoration-thickness: 2px; }

/* ---------- Grundgerüst ---------- */
.lp { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; color: var(--lp-ink); }
.lp h2 { margin: 0; }
.lp-kick { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lp-muted); margin: 0 0 10px; }

/* Vertrauenszeile */
.lp-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; color: var(--lp-muted); }
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust span:first-child { color: var(--lp-ok); font-weight: 600; }
.lp-trust span:first-child::before { content: "✓"; font-weight: 800; }

/* ---------- Bester Deal + Top 3 ---------- */
.lp-head { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.lp-head.solo { grid-template-columns: minmax(0, 1fr); }
.lp-best, .lp-top { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: var(--lp-r); padding: 18px; min-width: 0; }
.lp-best-in { display: grid; grid-template-columns: minmax(150px, 260px) minmax(0, 1fr); gap: 20px; align-items: start; }
.lp-best-img, .lpc-img { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: calc(var(--lp-r) - 4px); aspect-ratio: 1 / 1; overflow: hidden; }
.lp-best-img img, .lpc-img img { max-width: 88%; max-height: 88%; object-fit: contain; }
.lp-best-txt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lp-best-title { font-size: 19px; font-weight: 700; line-height: 1.3; color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-best-title:hover, .lpc-title:hover { text-decoration: underline; }
.lp-best-feat { margin: 2px 0 0; padding-left: 18px; font-size: 14px; color: var(--lp-muted); display: flex; flex-direction: column; gap: 3px; }
.lp-saved { color: var(--lp-ok); font-weight: 700; font-size: 14px; }

/* Rabatt-Schild im Bild */
.lp-disc { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--lp-disc); color: #fff; font-weight: 800; font-size: 13px; line-height: 1; padding: 6px 8px; border-radius: 6px; }
.lp-disc.big { font-size: 17px; padding: 8px 11px; }

.lpc-brand { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lp-muted); }
.lp-badge { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--lp-soft); color: var(--lp-ink); }
.lp-badge.hot { background: var(--lp-disc); color: #fff; }
.lp-rate { font-size: 13.5px; color: var(--lp-muted); }
.lp-stars { color: var(--star, #f2a100); letter-spacing: 1px; }

.lp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.lp-price strong { font-size: 22px; font-weight: 800; color: var(--lp-price); }
.lp-price.big strong { font-size: 30px; }
.lp-old { font-size: 13.5px; color: var(--lp-muted); }
.lp-pct { font-weight: 800; color: var(--lp-disc); }
.lp-save { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--lp-ok); font-weight: 700; }
.lp-prime { font-size: 12.5px; color: var(--lp-muted); }

.lpc-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lp-btn, .lp-btn2, .lp-fav { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: calc(var(--lp-r) - 4px); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.lp-btn { background: var(--lp-btn); color: var(--lp-btn-fg); border: 0; }
.lp-btn:hover { filter: brightness(.93); }
.lp-btn2, .lp-fav { background: transparent; color: inherit; border: 1.5px solid var(--lp-line); }
.lp-btn2:hover, .lp-fav:hover { border-color: currentColor; }
.lp-fav svg { fill: none; }
.lp-fav[aria-pressed="true"] { color: var(--lp-disc); }
.lp-fav[aria-pressed="true"] svg { fill: currentColor; }

/* Top 3 */
.lp-top { display: flex; flex-direction: column; gap: 4px; }
.lp-top-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--lp-line); color: inherit; text-decoration: none; border-radius: 8px; }
.lp-top-row:first-of-type { border-top: 0; }
.lp-top-row:hover { background: var(--lp-soft); }
.lp-top-img { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; overflow: hidden; }
.lp-top-img img { max-width: 90%; max-height: 90%; object-fit: contain; }
.lp-top-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-top-lbl { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-disc); }
.lp-top-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-top-price { font-size: 13px; color: var(--lp-muted); }
.lp-top-price strong { font-size: 16px; color: var(--lp-price); margin-right: 4px; }
.lp-top-price em { font-style: normal; font-weight: 700; color: var(--lp-ok); margin-left: 4px; }

/* ---------- Schnellfilter ---------- */
.lp-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.lp-chips::-webkit-scrollbar { display: none; }
.lp-chips a { flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1.5px solid var(--lp-line); border-radius: 999px; font-size: 14px; font-weight: 600; color: inherit; text-decoration: none; background: var(--lp-card); white-space: nowrap; }
.lp-chips a:hover { border-color: currentColor; }
.lp-chips a[aria-current] { background: var(--lp-btn); border-color: var(--lp-btn); color: var(--lp-btn-fg); }

/* ---------- Werkzeugleiste ---------- */
.lp-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lp-sorts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.lp-sorts span { color: var(--lp-muted); margin-right: 4px; }
.lp-sorts a { padding: 7px 12px; border-radius: 999px; color: inherit; text-decoration: none; font-weight: 600; }
.lp-sorts a[aria-current] { background: var(--lp-soft); outline: 1.5px solid var(--lp-line); }
.lp-grow { flex: 1; }
.lp-ftoggle { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--lp-line); background: var(--lp-card); color: inherit; font-weight: 700; cursor: pointer; }
.lp-ftoggle[aria-expanded="true"] { border-color: currentColor; }
.lp-vt { display: inline-flex; border: 1.5px solid var(--lp-line); border-radius: 10px; overflow: hidden; }
.lp-vt button { width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--lp-muted); cursor: pointer; }
.lp-vt button[aria-pressed="true"] { background: var(--lp-btn); color: var(--lp-btn-fg); }
.lp-vt svg { fill: none; }

/* ---------- Liste: Kacheln (4 je Reihe) ---------- */
.lpgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lpc { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: var(--lp-r); padding: 12px; min-width: 0; }
.lpc-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lpc-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lpc-feat, .lpc-ai { display: none; }
.lpc-buy { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.lpc .lpc-cta { flex-direction: column; }
.lpc .lp-btn, .lpc .lp-btn2 { width: 100%; }
.lpc .lp-fav { position: absolute; top: 18px; right: 18px; z-index: 2; width: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--lp-line); color: #333; }
.lpc .lp-fav span { display: none; }
.lpgrid .card, .lpgrid .missed { min-width: 0; }

/* ---------- Liste: eine Zeile je Deal ---------- */
.lpgrid.is-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lpgrid.is-list .lpc { display: grid; grid-template-columns: 200px minmax(0, 1fr) 230px; gap: 20px; padding: 16px; align-items: start; }
.lpgrid.is-list .lpc-title { font-size: 17px; -webkit-line-clamp: 2; }
.lpgrid.is-list .lpc-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--lp-muted); }
.lpgrid.is-list .lpc-ai { display: block; margin: 4px 0 0; padding: 10px 12px; background: var(--lp-soft); border-radius: 8px; font-size: 13.5px; line-height: 1.45; }
.lpgrid.is-list .lpc-buy { border-left: 1px solid var(--lp-line); padding-left: 20px; margin-top: 0; height: 100%; }
.lpgrid.is-list .lp-price strong { font-size: 26px; }
.lpgrid.is-list .lp-fav { position: static; width: 100%; min-height: 40px; padding: 0 14px; border-radius: calc(var(--lp-r) - 4px); background: transparent; color: inherit; }
.lpgrid.is-list .lp-fav span { display: inline; }

/* ---------- Ratgeber + FAQ ---------- */
.lp-guide, .lp-faq { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: var(--lp-r); padding: 22px 24px; }
.lp-guide h2, .lp-faq h2 { font-size: 21px; margin-bottom: 10px; }
.lp-guide p { margin: 0 0 12px; line-height: 1.65; max-width: 78ch; }
.lp-guide p:last-child { margin-bottom: 0; }
.lp-faq details { border-top: 1px solid var(--lp-line); padding: 12px 0; }
.lp-faq details:first-of-type { border-top: 0; }
.lp-faq summary { cursor: pointer; font-weight: 700; line-height: 1.4; list-style-position: outside; }
.lp-faq details p { margin: 8px 0 0; line-height: 1.6; color: var(--lp-muted); max-width: 78ch; }

/* ---------- Bildschirmbreiten ---------- */
@media (max-width: 1180px) {
  .lpgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lpgrid.is-list .lpc { grid-template-columns: 160px minmax(0, 1fr) 210px; }
}
@media (max-width: 900px) {
  .lp-head { grid-template-columns: minmax(0, 1fr); }
  .lpgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lpgrid.is-list .lpc { grid-template-columns: 130px minmax(0, 1fr); gap: 14px; }
  /* Preisspalte rutscht unter Bild und Text */
  .lpgrid.is-list .lpc-buy { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--lp-line); padding-top: 12px; }
  .lpgrid.is-list .lpc-cta { display: grid; grid-template-columns: 1fr 1fr auto; }
  .lpgrid.is-list .lp-fav { width: 44px; padding: 0; }
  .lpgrid.is-list .lp-fav span { display: none; }
  .lpgrid.is-list .lpc-feat { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .lp-best { padding: 14px; }
  .lp-best-in { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .lp-best-title { font-size: 16px; }
  .lp-price.big strong { font-size: 24px; }
  .lp-best-feat { display: none; }
  .lp-best .lpc-cta { grid-column: 1 / -1; }
  .lp-tools { justify-content: flex-end; }
  .lpgrid.is-list .lpc-ai { display: none; }
  .lp-guide, .lp-faq { padding: 18px; }
}
@media (max-width: 420px) {
  .lpgrid.is-list .lpc { grid-template-columns: 96px minmax(0, 1fr); padding: 12px; }
  .lpc .lpc-cta .lp-btn2 { display: none; }
}
