:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.site-glow {
  position: fixed;
  top: -22rem;
  left: 50%;
  width: 70rem;
  height: 42rem;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.08) 0%, rgba(9, 9, 11, 0) 68%);
}

#hero-3d {
  position: relative;
  width: 100%;
  min-height: 420px;
  background:
    radial-gradient(circle at 50% 45%, rgba(63, 63, 70, 0.28), transparent 48%),
    linear-gradient(145deg, rgba(24, 24, 27, 0.55), rgba(9, 9, 11, 0.92));
}

#hero-3d model-viewer {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 500px;
  --poster-color: transparent;
}

.model-fallback {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 320ms ease, visibility 320ms ease;
}

#hero-3d.model-ready .model-fallback {
  opacity: 0;
  visibility: hidden;
}

.render-shell {
  position: relative;
}

.render-shell::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.tab-trigger {
  color: rgb(113 113 122);
}

.tab-trigger:hover {
  color: rgb(228 228 231);
}

.tab-trigger[aria-selected="true"] {
  color: rgb(250 250 250);
  background: rgb(39 39 42);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 255px;
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgb(82 82 91);
  background-color: rgba(24, 24, 27, 0.92);
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: rgb(9 9 11);
  background: rgb(250 250 250);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.buy-button:hover {
  background: white;
  transform: translateY(-1px);
}

.buy-button:focus-visible {
  outline: 2px solid rgb(251 113 133);
  outline-offset: 3px;
}

.buy-button.is-sold-out {
  color: rgb(161 161 170);
  background: rgb(39 39 42);
  cursor: not-allowed;
  transform: none;
}

.product-photo-rotated {
  display: block;
  width: 198.4px;
  max-width: 100%;
  max-height: 351.2px;
  height: auto;
  scale: none;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg) scale(1.15);
}

[data-gallery-swipe] {
  touch-action: pan-y;
}

[data-social-swipe] {
  touch-action: pan-y;
}

.social-media-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 450px);
  height: auto;
  aspect-ratio: 10 / 11;
  max-height: 495px;
  margin-inline: auto;
  overflow: hidden;
  background: rgb(9 9 11);
}

.social-media-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-video-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: 60vh;
  margin-inline: auto;
  overflow: hidden;
  background: rgb(0 0 0);
}

.social-video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.gallery-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: white;
  background: rgba(9, 9, 11, 0.78);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.gallery-arrow:hover {
  background: rgba(39, 39, 42, 0.95);
}

.gallery-arrow-left {
  left: 0.75rem;
}

.gallery-arrow-right {
  right: 0.75rem;
}

.gallery-counter {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgb(228 228 231);
  background: rgba(9, 9, 11, 0.74);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}

.image-lightbox {
  width: min(94vw, 1100px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 1px solid rgb(63 63 70);
  border-radius: 0.875rem;
  color: rgb(250 250 250);
  background: rgb(9 9 11);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.75);
}

.image-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.image-lightbox-content {
  display: flex;
  flex-direction: column;
  max-height: 94vh;
}

.image-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(39 39 42);
  font-size: 0.875rem;
  font-weight: 600;
}

.image-lightbox-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(63 63 70);
  border-radius: 0.5rem;
  color: rgb(228 228 231);
  background: rgb(24 24 27);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover {
  background: rgb(39 39 42);
}

.image-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(94vh - 3.6rem);
  overflow: hidden;
}

.image-lightbox-stage .gallery-counter {
  top: auto;
  right: 1rem;
  bottom: 1rem;
}

.image-lightbox-photo {
  display: block;
  width: min(68vh, 44rem);
  max-width: none;
  height: auto;
  transform: rotate(90deg);
}

[hidden] {
  display: none !important;
}

.form-status[data-state="success"] {
  color: rgb(187 247 208);
  background: rgba(20, 83, 45, 0.35);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.form-status[data-state="error"] {
  color: rgb(254 202 202);
  background: rgba(127, 29, 29, 0.3);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

@media (max-width: 640px) {
  #hero-3d {
    min-height: 340px;
  }

  #hero-3d model-viewer {
    height: 390px;
  }

  .image-lightbox-stage {
    height: min(78vw, 28rem);
  }

  .image-lightbox-photo {
    width: min(72vw, 20rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
