/* Black Week: Aktions-Hero der Startseite.
   Sichtbar nur im bestaetigten Aktionszeitraum (js/black-week-hero.js) und
   ersetzt dann den Produktauftritt ganz oben. Mobil zuerst gebaut (390 px).

   Zwei Zustaende am selben Markup: "standard" und "creator" (aktiver Rabatt
   aus einem Creator-Link). Die Saetze stehen einzeln nebeneinander, nie
   zusammengerechnet.

   Farben nur aus der CI: Graphit als Grund, Papierweiss als Schrift,
   Black-Week-Gold #C2A878 fuer die Aktion (wie /shop), helles Blau fuer Knopf und Haekchen,
   Liniengrau fuer Konturen. Das dunkle Blau kommt auf diesem Grund nicht
   als Schrift vor. */
.bw-hero {
  --bw-sand: #c2a878;
  --bw-line: #565b63;
  --bw-dim: rgba(246, 246, 244, 0.76);
  --bw-plate: rgba(246, 246, 244, 0.05);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 20px 24px 24px;
  border-radius: 0 0 24px 24px;
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  text-align: center;
  /* Der ganze Hero fuehrt zum Shop (js/black-week-hero.js). */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bw-hero[hidden], .bw-hero [hidden] { display: none; }

/* Waehrend der Aktion weicht der bisherige Produktauftritt. Den Hero zeichnet
   schon das erste Bild ("on"); nur wenn der Creator-Zustand noch unbekannt ist,
   steht die dunkle Flaeche ("pending"), damit kein Satz ohne Beleg erscheint. */
html[data-bw] .home-featured { display: none; }
html[data-bw="pending"] .bw-hero { min-height: 560px; }
html[data-bw="pending"] .bw-hero > * { visibility: hidden; }
/* Das Laufband haengt cart-ui.js erst nach der Server-Antwort in den Kopf.
   Sein Platz steht vorher schon da, damit der Hero nicht nach unten springt. */
html[data-bw] .site-header:not(:has(.sale-notice))::after { content: ""; display: block; height: 36px; background: var(--color-accent-dark); }

.bw-v { position: relative; }
.bw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bw-eyebrow {
  margin: 0 0 8px;
  /* Der Sperrsatz haengt rechts ueber; der Ausgleich haelt die Zeile mittig. */
  padding-left: 0.3em;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bw-sand);
}

/* ------------------------------- Die Zahl, in beiden Zustaenden dieselbe */
.bw-figure { position: relative; width: fit-content; margin-inline: auto; }
.bw-number {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.84;
  color: var(--color-text-inverse);
}
.bw-number__value {
  position: relative;
  font-size: clamp(118px, 34.8vw, 150px);
  letter-spacing: -0.045em;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
/* "bis zu" klein vor der Zahl: Es steht im freien Raum ueber dem Minus,
   damit die Zahl auf 390 px ihre Groesse behaelt. */
.bw-number__pre {
  position: absolute;
  left: 0.05em;
  top: 0.13em;
  font-family: var(--font-base);
  font-size: 0.125em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--bw-dim);
}
.bw-number__pct {
  margin-top: 0.14em;
  font-size: clamp(50px, 14.4vw, 64px);
  letter-spacing: 0;
}
.bw-tag {
  display: inline-block;
  margin: 0;
  padding: 3px 12px;
  border: 2px solid var(--bw-sand);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-inverse);
  font-size: 16px;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.35;
}
.bw-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text-inverse);
}

/* ------------------------------------ Zustand Creator: runder Sticker
   Goldener Kreis mit Graphit-Schrift, leicht schraeg, rechts oben an der
   Zahl, unter dem Prozentzeichen. Er beruehrt die Zahl hoechstens und
   verdeckt weder eine Ziffer noch das Prozentzeichen; dafuer rueckt die Zahl in diesem Zustand nach links. */
.bw-v[data-bw-state="creator"] .bw-offer { text-align: left; }
.bw-v[data-bw-state="creator"] .bw-figure { margin-left: -12px; margin-right: auto; }
/* Der Sticker reicht bis neben das Etikett; es steht deshalb linksbuendig. */
.bw-v[data-bw-state="creator"] .bw-tag { display: block; width: fit-content; }
.bw-v[data-bw-state="creator"] .bw-sub { display: block; width: fit-content; margin-inline: auto; text-align: center; }
/* Mobil: 94 px, weit unter das Prozentzeichen gerueckt, damit auf 360 bis
   430 px mindestens 12 px zum Bildschirmrand bleiben. Die Hoehe waechst mit
   dem Prozentzeichen (14,4vw), damit der Kreis es nie beruehrt. */
.bw-sticker {
  position: absolute;
  z-index: 2;
  left: 100%;
  top: clamp(51px, calc(14.4vw + 1px), 65px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  margin: 0 0 0 -35px;
  padding-bottom: 4px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--bw-sand);
  color: var(--color-bg-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  transform: rotate(10deg);
  animation: bw-unlock 0.45s 0.15s ease-out both;
}
.bw-sticker strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.bw-sticker > span { display: block; max-width: 84px; }
.bw-sticker > span:last-child { font-weight: 500; }
@keyframes bw-unlock {
  from { opacity: 0; transform: rotate(-8deg) scale(0.6); }
  to { opacity: 1; transform: rotate(10deg) scale(1); }
}
/* Steht der Kreis schon im ersten Bild (data-bw-first, Skript hinter dem
   Hero), ist er sofort da. Die Einblendung bleibt fuer spaeteres Erscheinen. */
.bw-hero[data-bw-first] .bw-sticker { animation: none; }

/* Konturschrift im Hintergrund, reine Dekoration. */
.bw-outline {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 246px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 31vw;
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--bw-line);
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------------------------ Produktbuehne
   Alle drei stehen auf derselben Bodenlinie. Der Pen lehnt von links am
   Retatrutide Vial, steht dahinter und ragt ueber dessen Kappe hinaus. Cagrilintide
   steht kleiner und spiegelbildlich rechts, eng hinter dem Vial, das es
   leicht ueberdeckt. Die drei bilden eine geschlossene Gruppe. Verglichen
   mit dem Pen rechts vom Vial wirkt das Paar so staerker. Das Pen-Bild zeigt den Pen schraeg
   liegend; die Drehung stellt ihn auf (10 Grad Neigung). */
.bw-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 196px;
  margin: 30px 0 22px;
  padding-left: 34px;
}
.bw-stage img { display: block; width: auto; object-fit: contain; }
.bw-stage__main {
  position: relative;
  z-index: 2;
  height: 176px;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.6));
}
.bw-stage__side {
  position: relative;
  z-index: 1;
  height: 124px;
  /* Das Bild hat seitlich transparenten Rand; -41px laesst das Vial
     etwa ein Achtel der Flasche verdecken, das Etikett bleibt frei. */
  margin: 0 0 4px -41px;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.6)) brightness(0.86);
}
.bw-stage .bw-stage__pen {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 12px;
  width: 190px;
  height: 190px;
  margin-left: -150px;
  transform: rotate(-50.5deg);
  /* Derselbe Schatten wie am Vial; der Versatz ist gegen die Drehung gerechnet. */
  filter: drop-shadow(-12px 10px 18px rgba(0, 0, 0, 0.6));
}
/* Dezenter, stehender Lichtkegel von oben. Keine Bewegung. */
.bw-stage--cone::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: -34px;
  width: 340px;
  height: 250px;
  transform: translateX(-50%);
  background: conic-gradient(from 152deg at 50% 0, rgba(246, 246, 244, 0) 0deg, rgba(246, 246, 244, 0.2) 28deg, rgba(246, 246, 244, 0) 56deg);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 96%);
  pointer-events: none;
}

/* ------------------------------------- Datum, Countdown, Knopf, Trust */
/* Die Kaestchen erscheinen nur in den letzten 48 Stunden. */
.bw-countdown__boxes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 440px;
  margin: 0 auto 12px;
}
.bw-countdown__boxes > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 6px;
  border: 1px solid var(--bw-line);
  border-radius: var(--radius-lg);
  background: var(--bw-plate);
}
.bw-countdown__boxes b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums lining-nums;
}
.bw-countdown__boxes small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bw-dim);
}

.bw-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  min-height: 55px;
  margin: 0 auto;
  border-radius: 5px;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.bw-cta:hover { background: var(--color-text-inverse); color: var(--color-bg-dark); }
.bw-cta:focus-visible { outline: 3px solid var(--color-text-inverse); outline-offset: 3px; }

.bw-trust {
  display: flex;
  justify-content: center;
  gap: 4px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(12px, 3.35vw, 13px);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--color-text-inverse);
}
.bw-trust li { display: flex; align-items: center; gap: 5px; }
.bw-trust svg { flex: 0 0 14px; width: 14px; height: 14px; color: var(--color-accent); }
.bw-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--bw-dim); }

/* Letzte 48 Stunden, mobil: Die Kaestchen brauchen Platz. Die Buehne wird
   niedriger, damit der Knopf im ersten Bildschirm bleibt. */
@media (max-width: 900px) {
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-stage { height: 128px; margin: 28px 0 14px; padding-left: 24px; }
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-stage__main { height: 118px; }
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-stage__side { height: 88px; margin-left: -29px; }
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-stage__pen { width: 128px; height: 128px; margin-left: -99px; bottom: 8px; }
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-stage--cone::before { height: 180px; }
  .bw-v:has([data-bw-countdown]:not([hidden])) .bw-outline { top: 244px; font-size: 27vw; }
}

@media (max-width: 359px) {
  .bw-hero { padding-inline: 16px; }
  .bw-trust { flex-wrap: wrap; }
  /* Sonst reicht das Etikett im Zustand Creator unter den Sticker. */
  .bw-tag { font-size: 14px; padding-inline: 10px; }
}

/* ------------------------------------------------------------ Desktop */
@media (min-width: 901px) {
  .bw-hero {
    width: min(100% - 2 * var(--space-md), var(--max-width));
    margin: var(--space-lg) auto 0;
    padding: 56px 64px;
    border-radius: var(--radius-lg);
    text-align: left;
  }
  html[data-bw="pending"] .bw-hero { min-height: 480px; }
  .bw-v {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    column-gap: 56px;
    align-items: center;
  }
  .bw-v > * { grid-column: 1; }
  .bw-v > .bw-stage { grid-column: 2; grid-row: 1 / span 2; margin: 0; height: 380px; }
  .bw-eyebrow { padding-left: 0; font-size: 18px; }
  .bw-number { justify-content: flex-start; margin-bottom: 18px; }
  .bw-number__value { font-size: 204px; }
  /* "bis zu" klein vor der Zahl: Es steht im freien Raum ueber dem Minus,
   damit die Zahl auf 390 px ihre Groesse behaelt. */
.bw-number__pre {
  position: absolute;
  left: 0.05em;
  top: 0.13em;
  font-family: var(--font-base);
  font-size: 0.125em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--bw-dim);
}
.bw-number__pct { font-size: 84px; }
  .bw-figure, .bw-v[data-bw-state="creator"] .bw-figure { margin-inline: 0; }
  .bw-v[data-bw-state="creator"] .bw-tag,
  .bw-v[data-bw-state="creator"] .bw-sub { margin-inline: 0; text-align: left; }
  .bw-v[data-bw-state="creator"] .bw-tag { display: inline-block; }
  .bw-sticker { top: 92px; width: 132px; height: 132px; margin-left: -22px; font-size: 14px; }
  .bw-sticker strong { font-size: 34px; }
  .bw-sticker > span { max-width: 104px; }
  .bw-tag, .bw-sub { font-size: 17px; }
  .bw-outline { left: auto; right: -40px; top: 50%; transform: translateY(-50%); font-size: 232px; }
  .bw-v > .bw-stage { padding-left: 64px; }
  .bw-stage__main { height: 340px; }
  .bw-stage__side { height: 236px; margin: 0 0 8px -78px; }
  .bw-stage .bw-stage__pen { width: 366px; height: 366px; margin-left: -292px; bottom: 23px; }
  .bw-stage--cone::before { top: -170px; width: 760px; height: 640px; background: conic-gradient(from 148deg at 50% 0, rgba(246, 246, 244, 0) 0deg, rgba(246, 246, 244, 0.16) 32deg, rgba(246, 246, 244, 0) 64deg); }
  .bw-action { margin-top: 28px; }
  .bw-countdown__boxes, .bw-cta { margin-inline: 0; }
  .bw-countdown__boxes b { font-size: 32px; }
  .bw-trust { justify-content: flex-start; font-size: 14px; }

  /* Der Markenhero darunter tritt zurueck: gleicher Aufbau wie mobil,
     Text auf hellem Grund, das Produkt steht bereits im Aktions-Hero. */
  html[data-bw="on"] .hero-vial { margin: var(--space-lg) 0 28px; padding: 0; background: none; overflow: visible; }
  html[data-bw="on"] .hero-vial__grid { display: block; }
  html[data-bw="on"] .hero-vial__showcase { display: none; }
  html[data-bw="on"] .hero-vial__inner,
  html[data-bw="on"] .hero-vial__inner h1,
  html[data-bw="on"] .hero-vial__checks li { color: var(--color-text); }
  html[data-bw="on"] .hero-vial__lead { color: var(--color-text-muted); }
  html[data-bw="on"] .hero-vial__checks svg { color: var(--color-accent-dark); }
  html[data-bw="on"] .hero-vial__rule {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 34'%3E%3Cpath d='M0 28 H62 C68 28 69 4 75 4 C81 4 82 28 88 28 H120 C124 28 125 19 129 19 C133 19 134 28 138 28 H190' fill='none' stroke='%231b3fcb' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  html[data-bw="on"] .hero-vial__cta .btn { background: var(--color-bg-dark); border-color: var(--color-bg-dark); color: var(--color-text-inverse); }
}

@media (prefers-reduced-motion: reduce) {
  .bw-sticker { animation: none; }
}
