/* WORDSTORE v320 — flat drag-to-tilt poster presentation matching the reference video. */
body.single-product.product_cat-printed-posters .woocommerce-product-gallery {
  opacity: 1 !important;
  visibility: visible !important;
}

body.single-product.product_cat-printed-posters .woocommerce-product-gallery__image.wordstore-poster-gallery-image {
  padding: clamp(14px, 3vw, 34px);
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  perspective: 1400px;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage {
  --poster-aspect: 1447 / 2048;
  position: relative;
  display: grid;
  width: min(100%, 500px);
  height: auto !important;
  aspect-ratio: var(--poster-aspect) !important;
  margin: 0 auto;
  place-items: center;
  perspective: 1400px;
  isolation: isolate;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-3d {
  --poster-rotate-y: 0deg;
  --poster-rotate-x: 0deg;
  --poster-sheen-x: 50%;
  --poster-sheen-opacity: .08;
  position: relative;
  display: block;
  width: 100%;
  height: 100% !important;
  margin: 0;
  transform: perspective(1400px) rotateY(var(--poster-rotate-y)) rotateX(var(--poster-rotate-x));
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 360ms ease;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-3d.is-dragging {
  cursor: grabbing;
  transition: none;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-3d.is-poster-snapping {
  transition: transform 260ms cubic-bezier(.22,.82,.22,1);
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-3d.is-poster-entering {
  opacity: 0;
  transform: perspective(1400px) translateY(18px) rotateY(-12deg) rotateX(8deg) scale(.94);
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3;
  display: block;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box;
  overflow: hidden;
  border: 5px solid #0d0d0d !important;
  background: #0d0d0d;
  box-shadow: 0 22px 42px rgba(0,0,0,.34);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0) !important;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face-front img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  box-sizing: border-box;
  object-fit: contain !important;
  object-position: center;
  background: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face-front::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(112deg, transparent 26%, rgba(255,255,255,.58) 43%, rgba(255,255,255,.12) 49%, transparent 63%);
  background-position: var(--poster-sheen-x) 0;
  background-size: 245% 100%;
  content: '';
  opacity: var(--poster-sheen-opacity);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 160ms ease, background-position 80ms linear;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face-front::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.28);
  content: '';
  pointer-events: none;
}

/* The reference is a flat plane: no back volume or visible side walls. */
body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face-back,
body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-side {
  display: none !important;
}

body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-shadow {
  position: absolute;
  right: 5%;
  bottom: -26px;
  left: 5%;
  z-index: -1;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.48);
  filter: blur(15px);
  opacity: .72;
  pointer-events: none;
  transition: transform 260ms ease, opacity 260ms ease;
}

/* v320 intentionally removes the helper badge from the clean reference look. */
.wordstore-poster-interaction-hint { display: none !important; }

@media (max-width: 900px) {
  body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage { width: min(100%, 440px); }
}

@media (max-width: 520px) {
  body.single-product.product_cat-printed-posters .woocommerce-product-gallery__image.wordstore-poster-gallery-image { padding: 8px; }
  body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage { width: min(100%, 350px); }
  body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face { border-width: 3px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-3d,
  body.single-product.product_cat-printed-posters .wordstore-poster-3d-stage .wordstore-poster-face-front::before {
    transition: none !important;
  }
}
