/* „Stoff trifft Produkt“ – übernommen aus stoffgalerie-shop/src/components/FabricShowcase.astro. */

.fs {
  position: relative;
  overflow: hidden;
  background: var(--sg-ink);
  isolation: isolate;
}

/* ---------- Hintergrund: Stoff, angeschnitten ---------- */
.fs-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.fs-bg-layer {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 1.1s ease,
    transform 7s ease-out;
  /* Nur rechts als große Fläche stehen lassen, nach links weich auslaufen */
  -webkit-mask-image: linear-gradient(
    100deg,
    transparent 12%,
    rgba(0, 0, 0, 0.45) 38%,
    #000 72%
  );
  mask-image: linear-gradient(
    100deg,
    transparent 12%,
    rgba(0, 0, 0, 0.45) 38%,
    #000 72%
  );
  filter: blur(3px) saturate(0.92);
}
.fs-bg-layer.active {
  opacity: 0.55;
  /* Sehr langsamer Zoom = Tiefe/Bewegung ohne Ablenkung */
  transform: scale(1.13);
}
.fs-bg-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      70% 90% at 22% 50%,
      rgba(20, 19, 21, 0.94) 0%,
      rgba(20, 19, 21, 0.62) 45%,
      rgba(20, 19, 21, 0.1) 100%
    ),
    linear-gradient(180deg, rgba(20, 19, 21, 0.55) 0%, transparent 30%);
}

/* ---------- Layout ---------- */
.fs-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 92px;
  padding-bottom: 92px;
}

/* ---------- Copy ---------- */
.fs-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.fs-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sg-teal);
  flex: none;
}
.fs-eyebrow span:last-child {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: rgba(250, 250, 250, 0.55);
}

/* Slides überlagern sich → keine Sprünge beim Wechsel */
.fs-headline-stack {
  display: grid;
}
.fs-slide-copy {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.fs-slide-copy.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.fs-name,
.et_pb_module .fs-name { /* gegen die Überschriften-Regel im style.css */
  font-family: var(--sg-font-display);
  font-weight: 900;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fafafa;
  margin: 0 0 18px;
  max-width: 12ch;
}
.fs-claim {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(250, 250, 250, 0.62);
  margin: 0 0 26px;
  max-width: 42ch;
}
.fs-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.fs-cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--sg-blush);
}
.fs-sep {
  width: 26px;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--sg-teal) 0px,
    var(--sg-teal) 6px,
    transparent 6px,
    transparent 11px
  );
}
.fs-price {
  font-size: 22px;
  font-weight: 700;
  color: #fafafa;
}
/* Wie die anderen Buttons der Seite (.btn-primary): gefüllter Rosé-Block,
   Versalien, harter Schlagschatten. */
.fs-cta {
  display: inline-block;
  background: var(--sg-rose);
  color: var(--sg-ink);
  padding: 17px 32px;
  font-family: var(--sg-font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: -4px 4px 0 0 rgba(0, 0, 0, 0.15);
}
.fs-cta:hover {
  color: var(--sg-ink);
}

/* ---------- Steuerung ---------- */
.fs-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 46px;
}
.fs-playpause {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(250, 250, 250, 0.3);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.fs-playpause:hover {
  border-color: var(--sg-teal);
}
.fs-icon-pause,
.fs-icon-play {
  position: absolute;
  display: block;
}
.fs-icon-pause {
  width: 8px;
  height: 10px;
  border-left: 2.5px solid #fafafa;
  border-right: 2.5px solid #fafafa;
}
.fs-icon-play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 9px solid #fafafa;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.fs-playpause[data-playing="true"] .fs-icon-play,
.fs-playpause[data-playing="false"] .fs-icon-pause {
  display: none;
}
.fs-dots {
  display: flex;
  gap: 8px;
}
.fs-dot-btn {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: rgba(250, 250, 250, 0.28);
  cursor: pointer;
  transition:
    width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.35s;
}
.fs-dot-btn.active {
  width: 30px;
  background: var(--sg-teal);
}
.fs-playpause:focus-visible,
.fs-dot-btn:focus-visible,
.fs-cta:focus-visible {
  outline: 2px solid var(--sg-teal);
  outline-offset: 3px;
}

/* ---------- Produkt-Bühne ---------- */
.fs-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
}
/* Höhenbasierte Größe: die Höhe ist fix, die Breite folgt aus dem
   Seitenverhältnis (--ratio). So passen quadratische Kissen UND die hohe
   Tasche in dieselbe Bühne, ohne dass eines überläuft. */
.fs-product {
  grid-area: 1 / 1;
  position: relative;
  height: clamp(360px, 44vw, 500px);
  margin: 0;
  opacity: 0;
  transform: translateY(26px) scale(0.94);
  transition:
    opacity 0.75s ease,
    transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
  /* Schatten folgt der maskierten Produktform (mask liegt am Body). */
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}
.fs-product.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Mockup-Container: gibt nur Größe und Drehung vor. */
.fs-mockup {
  position: relative;
  height: 100%;
  aspect-ratio: var(--ratio);
  transform: rotate(-2deg);
}
/* Körper: Stofftextur, in die Produkt-Silhouette maskiert. `isolation` sperrt
   das multiply der Shading-Ebene auf diese Box ein; die mask am Body clippt
   zugleich das Shading-Kind auf die Silhouette. */
.fs-mockup-body {
  position: absolute;
  inset: 0;
  isolation: isolate;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
/* Stoff mit ~14 % Overzoom: die Maske am Body clippt den Überstand, dadurch
   verschwinden randständige Maßbänder/Logos aus den Produktfotos. Ein
   stärkerer Vertikal-Crop scheitert an hohen Produkten (Tasche), bei denen
   `cover` die volle Stoffhöhe zeigt — er würde das Muster überall vergrößern. */
.fs-mockup-fabric {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.14);
}
.fs-mockup-shading {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}
/* Overlay (z. B. Taschenhenkel): freigestelltes RGBA über dem Stoff, NICHT
   maskiert — deckungsgleich, weil im Skript auf dieselbe Box beschnitten. */
.fs-mockup-overlay {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.fs-tag {
  position: absolute;
  left: -14px;
  bottom: 12px;
  background: var(--sg-bg);
  color: var(--sg-ink);
  padding: 9px 15px;
  font-family: var(--sg-font-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  box-shadow: -4px 4px 0 0 rgba(0, 0, 0, 0.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .fs-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 64px;
    padding-bottom: 72px;
  }
  /* Mobil: Produkt zuerst, Text darunter */
  .fs-stage {
    order: -1;
    min-height: 380px;
  }
  .fs-product {
    height: clamp(320px, 68vw, 400px);
  }
  .fs-bg-layer {
    /* Stoff als Streifen oben statt seitlich angeschnitten */
    -webkit-mask-image: linear-gradient(
      180deg,
      #000 0%,
      rgba(0, 0, 0, 0.4) 42%,
      transparent 72%
    );
    mask-image: linear-gradient(
      180deg,
      #000 0%,
      rgba(0, 0, 0, 0.4) 42%,
      transparent 72%
    );
  }
  .fs-bg-veil {
    background: radial-gradient(
      120% 70% at 50% 8%,
      rgba(20, 19, 21, 0.55) 0%,
      rgba(20, 19, 21, 0.9) 60%,
      var(--sg-ink) 100%
    );
  }
  .fs-name {
    max-width: none;
  }
  .fs-tag {
    left: auto;
    right: -6px;
    bottom: -14px;
  }
  .fs-controls {
    margin-top: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-bg-layer,
  .fs-slide-copy,
  .fs-product,
  .fs-dot-btn {
    transition-duration: 0.01ms;
  }
  .fs-bg-layer.active {
    transform: scale(1.06);
  }
}

/* WordPress-Ergänzungen: Breite wie .mx im Entwurf, Divi-Abstände neutralisieren. */
.fs-inner {
  max-width: var(--sg-max);
  margin: 0 auto;
  padding-left: var(--sg-pad);
  padding-right: var(--sg-pad);
}
.fs h2.fs-name { padding: 0; font-style: normal; }
.fs .fs-claim { padding: 0; }
.fs-price .woocommerce-Price-amount { color: inherit; }
/* Rote Knöpfe ohne Hover (DESIGN.md, 04.11.2026): beim Darüberfahren bleibt der Knopf rosé. */
.fs .fs-cta:hover { background: var(--sg-rose); color: var(--sg-ink); }
.et_pb_section.sg-galerie-abschnitt { padding: 0; background: var(--sg-ink); }
/* Doppelte Klasse: schlägt Divis kritisches CSS .et_pb_row:not(...):not(...) { width: var(--content-width) }, das live inline geladen wird. */
.et_pb_section.sg-galerie-abschnitt .et_pb_row.et_pb_row { max-width: none; width: 100%; padding: 0; }
