/* ------------------------------------------------------------
   SevenApp 3D · página de produto
   Palco escuro fixo à esquerda (a peça se imprime ali) e painel
   claro rolando à direita, no estilo do site SevenApp.
   Temas de páginas exclusivas: .s3x[data-theme="..."]
------------------------------------------------------------ */

.s3x {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
  background-color: rgb(255, 255, 255);
}

/* ---------- palco ---------- */
.s3x-stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(ellipse 65% 55% at 50% 52%, rgb(44, 44, 44) 0%, rgb(14, 14, 14) 55%, rgb(0, 0, 0) 100%);
  color: rgb(255, 255, 255);
}
.s3x-view {
  --inset: 13vh 7% 15vh;
  position: relative;
  flex: 1;
  min-height: 0;
  perspective: 1600px;
}
.s3x-view::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 12vh;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}
.s3x-layer {
  position: absolute;
  inset: var(--inset);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0;
  visibility: hidden;
}
.s3x-layer.is-under {
  z-index: 2;
  opacity: 1;
  visibility: visible;
}
.s3x-layer.is-active {
  z-index: 3;
  opacity: 1;
  visibility: visible;
}
.s3x-photo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  clip-path: inset(var(--cut, 0%) 0 0 0);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0, 0, 0.3642, 1);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.s3x-empty {
  font-size: 120px;
  font-weight: 200;
  letter-spacing: 10px;
  color: rgba(255, 255, 255, 0.12);
}

/* modelo 3D ocupa o palco todo */
.s3x-3d {
  inset: 0;
}
.s3x-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.8s;
  touch-action: pan-y;
}
.s3x-3d.is-ready .s3x-canvas {
  opacity: 1;
}
.s3x-canvas:active {
  cursor: grabbing;
}
.s3x-ref {
  position: absolute;
  right: 7%;
  bottom: 10vh;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.6s;
}
.s3x-ref::before {
  content: "Ao lado: celular de 14,7 cm";
}
.s3x-3d.is-ready .s3x-ref {
  opacity: 1;
}

/* laser da impressão (fotos) */
.s3x-laser {
  position: absolute;
  inset: var(--inset);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.s3x-view.is-printing .s3x-laser {
  opacity: 1;
}
.s3x-laser::before {
  content: "";
  position: absolute;
  left: -24px;
  right: -24px;
  top: var(--y, 100%);
  height: 2px;
  background: rgb(255, 42, 42);
  box-shadow: 0 0 14px 3px rgba(255, 42, 42, 0.7), 0 0 60px 10px rgba(204, 5, 5, 0.35);
}
.s3x-laser::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--y, 100%);
  height: 90px;
  transform: translateY(-100%);
  background: linear-gradient(to top, rgba(204, 5, 5, 0.18), transparent);
}

/* luz que segue o mouse */
.s3x-light {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--lx, 50%) var(--ly, 40%), rgba(255, 255, 255, 0.07), transparent 70%);
}

/* HUD da impressora */
.s3x-hud {
  position: absolute;
  left: 7%;
  bottom: 4vh;
  z-index: 6;
  display: flex;
  gap: 36px;
}
.s3x-hud small,
.s3x-status {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.s3x-hud strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: rgb(255, 255, 255);
}
.s3x-status {
  position: absolute;
  right: 7%;
  bottom: 4vh;
  z-index: 6;
  margin: 0;
  text-align: right;
}
.s3x-view.is-printing .s3x-status::before,
.s3x-view.is-printing-3d .s3x-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgb(255, 42, 42);
  animation: s3x-blink 1s infinite;
}
@keyframes s3x-blink {
  50% {
    opacity: 0.2;
  }
}

/* miniaturas */
.s3x-thumbs {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  z-index: 7;
  display: flex;
  gap: 8px;
  max-width: 46%;
  overflow-x: auto;
  transform: translateX(-50%);
  scrollbar-width: none;
}
.s3x-thumb {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  color: rgb(255, 255, 255);
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0, 0, 0.3642, 1);
}
.s3x-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.3s;
}
.s3x-thumb:hover img,
.s3x-thumb.is-active img {
  opacity: 1;
}
.s3x-thumb.is-active {
  border-color: rgb(204, 5, 5);
  box-shadow: 0 0 0 2px rgb(204, 5, 5);
}
.s3x-thumb:focus-visible {
  outline: 2px solid rgb(255, 255, 255);
  outline-offset: 3px;
}

/* ---------- painel ---------- */
.s3x-panel {
  min-width: 0;
  padding: 150px 7% 90px 6%;
}
.s3x-title {
  margin-bottom: 20px;
  font-size: clamp(40px, 4vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  color: rgb(0, 0, 0);
}
.s3x-lead {
  margin-bottom: 40px;
  font-size: 20px;
  line-height: 1.5;
}
.s3x-price {
  margin-bottom: 30px;
}
.s3x-price small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.s3x-price strong {
  display: block;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.2;
  color: rgb(0, 0, 0);
}
.s3x-price span {
  font-size: 15px;
}
.s3x-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 50px;
  border-top: solid 1px rgba(0, 0, 0, 0.1);
  border-bottom: solid 1px rgba(0, 0, 0, 0.1);
}
.s3x-specs div {
  padding: 18px 10px 18px 0;
}
.s3x-specs dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}
.s3x-specs dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: rgb(0, 0, 0);
}
.s3-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ---------- história ---------- */
.s3x-words {
  max-width: 1100px;
  margin: 40px 0 90px;
  font-size: clamp(28px, 3.3vw, 50px);
  font-weight: 400;
  line-height: 1.3;
  color: rgb(255, 255, 255);
}
.s3x-words .w {
  opacity: 0.16;
  transition: opacity 0.35s, color 0.35s;
}
.s3x-words .w.is-on {
  opacity: 1;
}
.s3x-words .w.is-hl.is-on {
  color: rgb(255, 59, 59);
}

/* ---------- faixa de fotos ---------- */
.s3x-strip {
  display: flex;
  gap: 30px;
  padding: 0 max(20px, calc((100vw - 1200px) / 2)) 120px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}
.s3x-strip::-webkit-scrollbar {
  display: none;
}
.s3x-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.s3x-shot {
  flex: 0 0 clamp(260px, 30vw, 440px);
  margin: 0;
  scroll-snap-align: start;
}
.s3x-shot button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  overflow: hidden;
  background: rgb(0, 0, 0);
  cursor: zoom-in;
}
.s3x-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0, 0, 0.3642, 1);
}
.s3x-shot button:hover img {
  transform: scale(1.04);
}
.s3x-shot figcaption {
  margin-top: 18px;
  font-size: 15px;
  color: rgb(0, 0, 0);
}
.s3x-shot figcaption span {
  margin-right: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgb(204, 5, 5);
}

/* ---------- tela cheia ---------- */
.s3x-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
}
.s3x-lightbox[hidden] {
  display: none;
}
.s3x-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
}
.s3x-lightbox button {
  position: absolute;
  top: 24px;
  right: 30px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.s3x-locked {
  overflow: hidden;
}

/* ---------- celular e tablet ---------- */
@media screen and (max-width: 1200px) {
  .s3x-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media screen and (max-width: 992px) {
  .s3x {
    grid-template-columns: minmax(0, 1fr);
  }
  .s3x-stage {
    position: relative;
    height: 82vh;
    min-height: 520px;
  }
  .s3x-view {
    --inset: 110px 6% 130px;
  }
  .s3x-view::after {
    bottom: 110px;
  }
  .s3x-hud {
    left: 20px;
    bottom: 64px;
    gap: 24px;
  }
  .s3x-status {
    left: 20px;
    right: auto;
    bottom: 30px;
    text-align: left;
  }
  .s3x-thumbs {
    left: auto;
    right: 20px;
    bottom: 60px;
    max-width: 50%;
    transform: none;
  }
  .s3x-ref {
    right: 20px;
    bottom: 120px;
  }
  .s3x-panel {
    padding: 60px 20px 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .s3x-photo img {
    transition: none;
  }
}
