/*
 * Produkt-Hero, zweispaltig.
 * Links: Positionierungstext. Rechts: Angebots-Karte mit Versand-Badge,
 * davor die Flasche, die die Karte überlappt.
 * Die Bewegung entsteht komplett per CSS (kein Video, kein JS).
 */

.hero-vial {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0 var(--space-2xl);
  background: var(--color-bg-dark);
  padding: var(--space-xl) var(--space-lg);
}

/* Lichtschein im rechten Bereich, gibt der Szene Tiefe */
.hero-vial::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 8%;
  width: 460px;
  height: 460px;
  transform: translate(0, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 183, 156, 0.3) 0%,
    rgba(201, 183, 156, 0.1) 45%,
    transparent 72%
  );
  z-index: 0;
  pointer-events: none;
  animation: hero-vial-glow 7s ease-in-out infinite alternate;
}

.hero-vial__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ------------------------------------------------- Textspalte */

.hero-vial__inner {
  color: var(--color-text-inverse);
}

.hero-vial__eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.hero-vial__inner h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  margin-bottom: var(--space-md);
  color: var(--color-text-inverse);
}

.hero-vial__rule {
  width: 74px;
  height: 2px;
  background: var(--color-accent);
  border: none;
  margin: 0 0 var(--space-md);
}

.hero-vial__lead {
  font-size: var(--fs-base);
  color: #cfc9be;
  margin-bottom: var(--space-lg);
  max-width: 44ch;
}

.hero-vial__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Beide Links zurückhaltend als Umriss - der Kauf-CTA in der Angebots-Karte
   soll der einzige dominante Handlungsaufruf im Hero bleiben. */
.hero-vial__cta .btn {
  background: transparent;
  border-color: rgba(250, 248, 245, 0.4);
  color: var(--color-text-inverse);
}

.hero-vial__cta .btn:hover {
  background: var(--color-text-inverse);
  border-color: var(--color-text-inverse);
  color: var(--color-bg-dark);
}

/* ------------------------------- Produktspalte: Karte + Flasche */

.hero-vial__showcase {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
}

/* Angebots-Karte - liegt hinter der Flasche.
   Die Breite ergibt sich aus der Spaltenbreite minus Flaschenbreite plus
   20px: So bleibt die Überlappung bei jeder Viewport-Breite konstant bei
   20px, statt mit der Spalte zu schwanken.
   Flaschenbreite = Höhe × 0,536 (Seitenverhältnis des Bildes):
   480px hoch -> 258px breit -> 258 - 20 = 238px Abzug. */
.hero-vial__offer {
  position: relative;
  z-index: 1;
  /* 480px hoch / Seitenverhältnis 2.374 -> 202px breit
     -> 202 - 20px Sollüberlappung = 182px Abzug */
  width: calc(100% - 182px);
  min-width: 235px;
  max-width: 320px;
}

.hero-vial__ship {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: -16px;
  margin-left: var(--space-sm);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.hero-vial__ship svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero-vial__offer-body {
  background: rgba(250, 248, 245, 0.11);
  border: 1px solid rgba(250, 248, 245, 0.22);
  border-radius: var(--radius-md);
  padding: calc(var(--space-md) + 8px) var(--space-md) var(--space-md);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero-vial__product {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-bottom: var(--space-md);
}

.hero-vial__product strong {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-inverse);
}

.hero-vial__price {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--color-accent);
}

.hero-vial__variant {
  font-size: var(--fs-sm);
  color: #b8b0a0;
}

/* Der Kauf-CTA ist die einzige Aktion in Akzentfarbe - die Links in der
   Textspalte bleiben bewusst zurückhaltend, damit sie ihn nicht überstrahlen. */
.hero-vial__offer .btn {
  width: 100%;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  border-color: var(--color-accent);
}

.hero-vial__offer .btn:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.hero-vial__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  /* etwas kleiner als --fs-xs, damit die Zeile in der schmalen Karte
     nicht umbricht */
  font-size: 0.7rem;
  letter-spacing: -0.01em;
  text-align: center;
  color: #b8b0a0;
}

.hero-vial__secure svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Produktname in der Angebotsbox - erbt die Farbe, damit die
   Gestaltung unverändert bleibt. */
.hero-vial__name {
  color: inherit;
  text-decoration: none;
}

.hero-vial__name:hover,
.hero-vial__name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Merkmalsliste unter dem Einleitungstext. */
.hero-vial__checks {
  list-style: none;
  margin: 0 0 var(--space-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-vial__checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--color-text-inverse);
  line-height: 1.5;
}

.hero-vial__checks svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.12em;
  color: var(--color-accent);
}

/* Der Link um die Flasche verschwindet als Box: Das Bild ist absolut
   positioniert und animiert - ein Link mit eigener Box hätte die Größe
   null und wäre nicht anklickbar. Mit display:contents bleibt das Bild
   exakt wie es ist, der Klick landet trotzdem auf dem Link. */
.hero-vial__img-link {
  display: contents;
}

/* Flasche - liegt vor der Karte und überlappt sie */
.hero-vial__img {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 50%;
  height: 480px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(-16px 24px 44px rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transform-origin: center center;
  animation:
    hero-vial-enter 1.1s cubic-bezier(0.22, 1, 0.36, 1) both,
    hero-vial-float 6.5s ease-in-out 1.1s infinite alternate;
}

/* -------------------------------------------------- Keyframes
 * translateY(-50%) steckt in jedem Keyframe, weil die Flasche über
 * top:50% vertikal zentriert wird.
 */

@keyframes hero-vial-enter {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 26px)) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@keyframes hero-vial-float {
  from {
    transform: translateY(calc(-50% + 9px)) rotate(-0.5deg);
  }
  to {
    transform: translateY(calc(-50% - 9px)) rotate(0.5deg);
  }
}

@keyframes hero-vial-glow {
  from {
    opacity: 0.6;
    transform: translate(0, -50%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%) scale(1.06);
  }
}

/* ------------------------------------------------- Responsive */

/* Zwischenbereich: die Spalte wird schmaler, deshalb müssen Flasche und
   Karte mitschrumpfen - sonst verdeckt die Flasche den Karteninhalt. */
@media (max-width: 1200px) {
  .hero-vial__grid {
    gap: var(--space-lg);
  }
  .hero-vial__img {
    height: 380px;
    right: 0;
  }
  .hero-vial__showcase {
    min-height: 380px;
  }
  /* 380px hoch -> 160px breit -> 160 - 20 = 140px Abzug */
  .hero-vial__offer {
    width: calc(100% - 140px);
    min-width: 215px;
    max-width: 320px;
  }
}

/*
 * Unter 900px wird gestapelt: Text, dann Flasche mittig, darunter die
 * Angebots-Karte über die volle Breite.
 */
@media (max-width: 900px) {
  .hero-vial {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
  }

  .hero-vial::before {
    top: auto;
    bottom: 34%;
    right: 50%;
    transform: translate(50%, 0);
    width: 320px;
    height: 320px;
    animation: none;
    opacity: 0.75;
  }

  /* Auf schmalen Geräten steht das Produkt oben und der Text darunter:
     Der erste Bildschirm gehört dem Vial mit Preis und Kaufbutton, nicht
     der Überschrift. Auf Desktop bleibt die Leserichtung Text -> Produkt. */
  .hero-vial__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .hero-vial__showcase {
    order: 1;
  }

  .hero-vial__inner {
    order: 2;
  }

  .hero-vial__showcase {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .hero-vial__offer {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  /* Flasche zurück in den Fluss, mittig über der Karte.
     order:-1, weil sie im HTML nach der Karte steht (Desktop braucht
     sie dort, damit sie ohne z-index-Tricks davor liegt). */
  .hero-vial__img {
    position: relative;
    order: -1;
    right: auto;
    top: auto;
    align-self: center;
    height: auto;
    width: 68%;
    max-width: 250px;
    margin-bottom: var(--space-md);
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.55));
    animation:
      hero-vial-enter-static 1s cubic-bezier(0.22, 1, 0.36, 1) both,
      hero-vial-float-static 6.5s ease-in-out 1s infinite alternate;
  }

  .hero-vial__cta .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Keyframes ohne die -50%-Zentrierung, für den gestapelten Zustand */
@keyframes hero-vial-enter-static {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hero-vial-float-static {
  from { transform: translateY(7px) rotate(-0.5deg); }
  to   { transform: translateY(-7px) rotate(0.5deg); }
}

@media (max-width: 480px) {
  .hero-vial__img {
    width: 64%;
    max-width: 220px;
  }
  .hero-vial__cta .btn {
    flex: 1 1 100%;
  }
  .hero-vial__ship {
    white-space: normal;
  }
}

/* Bewegung respektiert die Systemeinstellung */
@media (prefers-reduced-motion: reduce) {
  .hero-vial__img,
  .hero-vial::before {
    animation: none !important;
  }
  .hero-vial__img {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  .hero-vial__img {
    transform: none;
  }
}

/* ---------------------------------------- Trust-Zeile unter dem Hero
   Vier kurze Punkte, die die haeufigsten Fragen vor dem ersten Klick
   beantworten. Auf schmalen Geraeten zweispaltig statt gequetscht in
   einer Reihe. */
.trust-strip-flat {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 0.6rem var(--space-md);
  list-style: none;
  margin: 0 0 var(--space-lg);
  padding: 0.9rem var(--space-sm);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-strip-flat li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.trust-strip-flat svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--color-accent-dark);
}

@media (max-width: 860px) {
  .trust-strip-flat {
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
  }
  /* Die Zahlungszeile ist die laengste - sie bekommt die volle Breite. */
  .trust-strip-flat__pay {
    grid-column: 1 / -1;
  }
}
