/* ============================================================
   Lagertechnik Direkt — Promotions (Paket P32)
   Sets/Bundles-Block + Gutschein-Widget. Nutzt die Design-Tokens
   aus assets/css/site.css (P3). Dark-Industrie-Look wie der Rest.
   ============================================================ */

/* ---------- Sets / Bundles ---------- */
.promo-bundles { margin: var(--s-7) 0; }

.promo-bundles-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-5);
}
.promo-bundles-head .ph-text { flex: 1 1 18rem; }
.promo-bundles-head h2 {
  font-family: 'Sora', system-ui, sans-serif; font-weight: var(--fw-bold);
  font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.1; margin: 0;
}
.promo-bundles-head .ph-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); line-height: var(--lh-caps); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--steel-2); margin-bottom: .5rem; /* Design-Refresh 2026-07-16 P6: Deko-Rot → steel-2 */
}
.promo-bundles-head .ph-eyebrow svg { width: 16px; height: 16px; }
.promo-bundles-head .ph-sub { color: var(--muted); margin: .4rem 0 0; max-width: 56ch; font-size: var(--fs-base); }
.promo-bundles-head .ph-link {
  color: var(--muted-2); font-weight: var(--fw-semibold); font-size: var(--fs-base); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .35rem;
}
.promo-bundles-head .ph-link:hover { color: var(--text); }
.promo-bundles-head .ph-link svg { width: 16px; height: 16px; }

.bundle-grid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  /* Audit #75: Karten auf eigene Inhaltshöhe (kein erzwungenes stretch),
     damit das inhaltsärmste Set (CLIP) keinen Leerraum zeigt. Die
     Preis-/CTA-Zeile bleibt via .bundle-pricing{margin-top:auto} unten. */
  align-items: start;
}

.bundle-card {
  position: relative; display: flex; flex-direction: column;
  /* Design-Refresh 2026-07-16 P6: flaches Panel statt Gradient */
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-1);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
/* Design-Refresh 2026-07-16 P6: Hover ortsfest (translateY entfernt); border/sh-Wechsel bleibt */
.bundle-card:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }

.bundle-badge {
  position: absolute; top: -1px; right: var(--s-5);
  background: var(--red); color: var(--white);
  font-size: var(--fs-2xs); line-height: var(--lh-caps); font-weight: var(--fw-black); letter-spacing: var(--ls-caps); text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 0 0 var(--r-sm) var(--r-sm); box-shadow: var(--sh-red);
}
/* Audit #76: monochromes System-Glyph im Kartenkopf. Sitzt links über dem
   System-Label, kollidiert nicht mit dem rechts angedockten .bundle-badge. */
.bundle-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: var(--s-3);
  color: var(--steel-2);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
}
.bundle-icon svg { display: block; }
.bundle-system {
  font-size: var(--fs-xs); line-height: var(--lh-caps); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--steel-2); margin-bottom: .35rem;
}
.bundle-name {
  font-family: 'Sora', system-ui, sans-serif; font-weight: var(--fw-bold);
  font-size: var(--fs-xl); line-height: 1.2; margin: 0 0 .25rem;
}
.bundle-tagline { color: var(--muted-2); font-size: var(--fs-base); margin: 0 0 var(--s-4); }

.bundle-items { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: .5rem; }
.bundle-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: .55rem;
  font-size: var(--fs-ms); color: var(--muted-2);
  padding-bottom: .5rem; border-bottom: 1px dashed var(--line);
}
.bundle-item:last-child { border-bottom: 0; padding-bottom: 0; }
.bundle-item .bi-qty {
  min-width: 1.9rem; text-align: center; font-weight: var(--fw-bold); color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .1rem .25rem; font-size: var(--fs-sm);
}
.bundle-item .bi-name { color: var(--text); line-height: 1.3; }
.bundle-item .bi-unit { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }

.bundle-pricing {
  margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: .3rem var(--s-4);
}
.bundle-pricing .bp-main { display: flex; flex-direction: column; }
.bundle-sum {
  font-size: var(--fs-sm); color: var(--muted); text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.bundle-price {
  font-family: 'Sora', system-ui, sans-serif; font-weight: var(--fw-black);
  font-size: var(--fs-3xl); line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums;
}
.bundle-price small { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--muted); display: block; margin-top: .15rem; }
.bundle-save {
  align-self: center; margin-left: auto;
  /* Audit #77: Ersparnis-Pill in die Marken-Palette (grau/rot/schwarz/weiß)
     statt des einzigen Grün-Tons. Neutraler Chip mit kräftigem Text, damit
     das Spar-Signal legibel bleibt. Rabattzeilen in Warenkorb/Kasse bleiben grün. */
  background: var(--panel-2); color: var(--muted-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .3rem .7rem; font-weight: var(--fw-black); font-size: var(--fs-sm);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.bundle-cta {
  margin-top: var(--s-4); width: 100%; justify-content: center;
}
.bundle-cta[disabled] { opacity: .6; cursor: progress; }
.bundle-cta.is-done { background: var(--good); border-color: var(--good); }
.bundle-note { margin: .7rem 0 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }

/* ---------- Gutschein-Widget (Warenkorb-Summary + Kasse) ---------- */
.promo-coupon { margin: var(--s-4) 0; }
.promo-coupon-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: 0; color: var(--muted-2); cursor: pointer;
  font: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-base); padding: .2rem 0;
}
.promo-coupon-toggle svg { width: 16px; height: 16px; transition: transform var(--t); }
.promo-coupon-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.promo-coupon-toggle:hover { color: var(--text); }

.promo-coupon-body { margin-top: var(--s-3); }
.promo-coupon-body[hidden] { display: none; }

.promo-coupon-row { display: flex; gap: .5rem; }
.promo-coupon-row input {
  flex: 1 1 auto; min-width: 0;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: .6rem .7rem; font: inherit; font-size: var(--fs-base);
  text-transform: uppercase; letter-spacing: .04em;
}
.promo-coupon-row input::placeholder { color: var(--muted); letter-spacing: normal; text-transform: none; }
.promo-coupon-row input:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--red); }
.promo-coupon-row .btn { flex: 0 0 auto; }

.promo-coupon-msg { margin: .55rem 0 0; font-size: var(--fs-ms); min-height: 1em; }
.promo-coupon-msg.is-err { color: var(--red); }
.promo-coupon-msg.is-ok { color: var(--good-text); }

.promo-coupon-hints { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.promo-coupon-hints .ch-label { font-size: var(--fs-xs); color: var(--muted); }
.promo-coupon-chip {
  background: var(--panel-2); border: 1px dashed var(--line-2); color: var(--muted-2);
  border-radius: 999px; padding: .22rem .6rem; font-size: var(--fs-sm); font-weight: var(--fw-bold);
  cursor: pointer; transition: color var(--t), border-color var(--t);
}
.promo-coupon-chip:hover { color: var(--text); border-color: var(--steel); }

.promo-coupon-applied {
  display: flex; align-items: center; gap: .6rem;
  background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-sm);
  padding: .55rem .7rem;
}
.promo-coupon-applied svg.tick { width: 18px; height: 18px; color: var(--ok); flex: 0 0 auto; }
.promo-coupon-applied .pca-text { flex: 1 1 auto; line-height: 1.25; }
.promo-coupon-applied .pca-code { font-weight: var(--fw-black); color: var(--text); }
.promo-coupon-applied .pca-label { display: block; font-size: var(--fs-sm); color: var(--muted-2); }
.promo-coupon-remove {
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: .2rem;
  display: inline-flex; border-radius: var(--r-sm);
}
.promo-coupon-remove:hover { color: var(--red); }
.promo-coupon-remove svg { width: 16px; height: 16px; }

/* Rabattzeile in den vorhandenen Summen-Listen (Warenkorb-DL + Kasse) */
.cart-summary .sum .coupon-row dt,
.cart-summary .sum .coupon-row dd { color: var(--good-text); }
.co-summary .sum-row.discount span:last-child { color: var(--good-text); }
.co-summary .sum-row.discount { color: var(--good-text); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .bundle-grid { grid-template-columns: 1fr; }
  .bundle-badge { right: var(--s-4); }
  .promo-coupon-row { flex-wrap: wrap; }
  .promo-coupon-row .btn { width: 100%; }
}
