.vitrine-page {
  position: relative;
}

.vitrine-page.is-embed {
  min-height: 0;
  padding: 0 0 1rem;
}

.vitrine-mute {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 22;
}

.vitrine-page.is-embed .vitrine-scene {
  width: 100%;
  /* svh, not dvh: dvh tracks the mobile browser's address bar live, so the
     scene's own height (and everything below it on the page) visibly
     jumped as the bar showed/hid mid-swipe. svh is pinned to the
     address-bar-visible size and doesn't move underneath the page. */
  height: min(62svh, 37rem);
  min-height: 24rem;
}

.vitrine-page.is-embed .vitrine-hint {
  display: none;
}

.vitrine-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
}

.vitrine-copy h1 {
  margin: 0;
}

.vitrine-copy p {
  margin: 0.35rem 0 0;
  max-width: 38rem;
}

.vitrine-scene {
  position: relative;
  z-index: 1;
  width: min(100%, 71rem);
  /* svh, not dvh — see the .is-embed rule above for why. */
  height: min(72svh, 44rem);
  min-height: 31rem;
  margin: 0.5rem auto 0;
  touch-action: none;
  cursor: grab;
  user-select: none;
  overflow: visible;
}

.vitrine-scene:active,
.vitrine-scene[data-dragging="true"] {
  cursor: grabbing;
}

.vitrine-scene:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.vitrine-track {
  position: absolute;
  left: 50%;
  top: 62%;
  width: min(88%, 51rem);
  height: 42%;
  border: 2px solid rgb(255 255 255 / 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 2.5rem rgb(0 0 0 / 0.18);
  pointer-events: none;
}

html.theme-light .vitrine-track {
  border-color: rgb(18 24 28 / 0.16);
}

.vitrine-podium {
  position: absolute;
  left: 50%;
  top: 62%;
  width: min(49vw, 24.5rem);
  height: 5.6rem;
  transform: translate(-50%, -18%);
  z-index: 8;
  pointer-events: none;
}

.vitrine-podium-shadow {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 2.4rem;
  height: 5.2rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / 0.42), transparent 72%);
}

.vitrine-podium-wall {
  position: absolute;
  left: 0;
  right: 0;
  top: 2.15rem;
  height: 3.35rem;
  background: linear-gradient(
    90deg,
    #2f3432 0%,
    #7c8480 28%,
    #d5ddd7 50%,
    #7a827e 74%,
    #2f3432 100%
  );
  border-radius: 0 0 50% 50% / 0 0 1.7rem 1.7rem;
  box-shadow: 0 1.1rem 1.8rem rgb(0 0 0 / 0.28);
}

.vitrine-podium-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4.85rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgb(255 255 255 / 0.55), transparent 42%),
    radial-gradient(circle at 50% 48%, #f3f6f3 0%, #b7c0ba 46%, #6f7873 100%);
  box-shadow:
    inset 0 0.7rem 1.1rem rgb(255 255 255 / 0.38),
    inset 0 -0.9rem 1.3rem rgb(18 24 28 / 0.3);
}

html.theme-light .vitrine-podium-wall {
  background: linear-gradient(
    90deg,
    #6d7571 0%,
    #c5ccc7 30%,
    #f4f7f4 50%,
    #b8c0ba 74%,
    #6d7571 100%
  );
}

html.theme-light .vitrine-podium-top {
  background:
    radial-gradient(circle at 34% 30%, rgb(255 255 255 / 0.85), transparent 42%),
    radial-gradient(circle at 50% 48%, #ffffff 0%, #d5ddd7 48%, #8b948f 100%);
}

.vitrine-orbit {
  position: absolute;
  left: 50%;
  top: 62%;
  width: clamp(6.2rem, 16.5vw, 9.4rem);
  height: calc(clamp(6.2rem, 16.5vw, 9.4rem) * 1.22);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 88%;
  text-decoration: none;
  color: inherit;
}

.vitrine-scene:not([data-dragging="true"]) .vitrine-orbit,
.vitrine-scene:not([data-dragging="true"]) .vitrine-hero {
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.32, 1),
    filter 480ms ease,
    opacity 280ms ease;
}

.vitrine-orbit img,
.vitrine-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.vitrine-orbit img {
  filter: drop-shadow(0 1rem 0.55rem rgb(0 0 0 / 0.34));
}

.vitrine-orbit.is-selected {
  opacity: 0;
  pointer-events: none;
}

.vitrine-fallback {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  font-family: var(--font-display), var(--font-sans), sans-serif;
  font-size: var(--text-md);
  color: var(--color-cta);
  pointer-events: none;
}

.vitrine-hero {
  position: absolute;
  left: 50%;
  top: 62%;
  width: clamp(12.2rem, 35vw, 19rem);
  height: calc(clamp(12.2rem, 35vw, 19rem) * 1.18);
  transform: translate(-50%, -86%);
  z-index: 24;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.vitrine-hero-spin {
  width: 100%;
  height: 100%;
  transform-origin: 50% 88%;
  animation: vitrine-turn 7.5s ease-in-out infinite;
  filter: drop-shadow(0 1.6rem 0.9rem rgb(0 0 0 / 0.4));
}

/* Pinned to the scene's own edges (see the JSX) instead of flanking the
   caption in a flex row — their position depends only on the scene's box,
   never on how wide or tall the caption text happens to render. */
.vitrine-arrow {
  position: absolute;
  top: 50%;
  /* Above the hero model (z-index 24) and every orbit item, so a wide
     centered garment image can never sit on top of the tap target. */
  z-index: 30;
  display: inline-flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-glass-pill, rgb(255 255 255 / 0.72));
  color: var(--color-text);
  cursor: pointer;
  transform: translateY(-50%);
}

.vitrine-arrow--prev {
  left: 0.5rem;
}

.vitrine-arrow--next {
  right: 0.5rem;
}

.vitrine-caption {
  position: relative;
  z-index: 2;
  min-width: 12rem;
  max-width: var(--container);
  margin: 0.75rem auto 0;
  text-align: center;
}

/* Always exactly one line, whatever the item's name/SKU length — otherwise
   a longer name wraps to a second line and the caption block gets taller,
   which pushes the arrows and dots below it up or down depending on which
   item is centered. */
.vitrine-caption strong,
.vitrine-caption span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vitrine-caption strong {
  font-size: var(--text-xl);
}

.vitrine-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vitrine-dots button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.vitrine-dots button::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-border);
}

.vitrine-dots button[aria-current="true"]::after {
  background: var(--color-cta);
}

/* Color-variant mode: this strip becomes the actual color picker (same
 * swatch-plus-pointer look used elsewhere on the product page) instead of
 * a plain position marker — no separate picker box needed below the
 * vitrine, this row already does that job. */
.vitrine-dots button.vitrine-dot--swatch {
  width: auto;
  height: auto;
  min-height: var(--touch-min);
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.25rem 0.2rem;
}

.vitrine-dots button.vitrine-dot--swatch::after {
  display: none;
}

.vitrine-dot-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--color-text);
  opacity: 0;
}

.vitrine-dots button.vitrine-dot--swatch[aria-current="true"] .vitrine-dot-arrow {
  opacity: 1;
}

.vitrine-dot-fill {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
}

.vitrine-dots button.vitrine-dot--swatch[aria-current="true"] .vitrine-dot-fill {
  border-color: var(--color-cta);
}

@keyframes vitrine-turn {
  0% {
    transform: rotateY(-16deg);
  }
  50% {
    transform: rotateY(16deg);
  }
  100% {
    transform: rotateY(-16deg);
  }
}

@media (max-width: 720px) {
  .vitrine-page {
    padding-top: 0;
    padding-bottom: 6.25rem;
  }

  .vitrine-copy {
    gap: 0.35rem;
  }

  .vitrine-copy p {
    font-size: var(--text-sm);
  }

  .vitrine-copy > p {
    display: none;
  }

  .vitrine-scene {
    height: min(53svh, 30rem);
    min-height: 22rem;
    margin-top: 0.15rem;
  }

  .vitrine-podium {
    width: min(67vw, 18rem);
    height: 4.6rem;
  }

  .vitrine-arrow {
    height: 2.75rem;
    width: 2.75rem;
  }

  /* Paired with VitrineScrollLock: the page is pinned to exactly the
     viewport, so instead of the scene claiming a fixed vh/rem height that
     may not actually fit, it stretches/shrinks to whatever space is left
     after the heading and the caption/dots below it. */
  .vitrine-page.vitrine-page--fit {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding-bottom: 0.5rem;
  }

  .vitrine-page.vitrine-page--fit .vitrine-copy {
    flex: 0 0 auto;
  }

  .vitrine-page.vitrine-page--fit .vitrine-scene {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 12rem;
    margin-top: 0.15rem;
  }

  .vitrine-page.vitrine-page--fit .vitrine-caption {
    flex: 0 0 auto;
    margin-top: 0.5rem;
  }

  .vitrine-page.vitrine-page--fit .vitrine-dots {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vitrine-hero-spin,
  .vitrine-scene:not([data-dragging="true"]) .vitrine-orbit,
  .vitrine-scene:not([data-dragging="true"]) .vitrine-hero {
    animation: none;
    transition: none;
  }
}
