/* 3D product preview (Vince 2026-10-12 "3d product mock up on the preview/review"). Local CSS 3D only, no paid AI.
   Painting = the customer's proof painting (Lucy, Rembrandt-style dog, in the demo). */
.p3d { margin: 6px 0 16px; text-align: center; }
.p3d-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(43,42,40,.07); margin-bottom: 10px; }
.p3d-seg button { min-height: 40px; min-width: 84px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 16px; color: var(--soft, #6b645c); cursor: pointer; }
.p3d-seg button.on { background: #FFFCFA; color: var(--ink, #2b2a28); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.p3d-stage { position: relative; height: 230px; border-radius: 14px; perspective: 900px; overflow: hidden;
  background: linear-gradient(180deg, #ece4d8 0 74%, #d9cdbb 74% 100%); }
.p3d-stage[data-mode="magnet"] { background: linear-gradient(100deg, #e9ecee, #cfd4d8 45%, #eef0f2 60%, #c9ced2); }
.p3d-obj { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; display: none; }
.p3d-stage[data-mode="canvas"] .p3d-canvas, .p3d-stage[data-mode="magnet"] .p3d-magnet, .p3d-stage[data-mode="wood"] .p3d-wood { display: block; }
.p3d-obj .front { box-shadow: 14px 16px 18px rgba(0,0,0,.28); }
.p3d-obj .f { position: absolute; background-image: var(--p3d-img); background-repeat: no-repeat; }
/* Canvas: 16×12 shown at 200×150px → 1.5in = 18.75px wrap depth; image continues round the edge (gallery wrap). */
.p3d-canvas { --w: 200px; --h: 150px; --d: 18.75px; width: var(--w); height: var(--h); margin: calc(var(--h)/-2) 0 0 calc(var(--w)/-2);
  transform: rotateY(-32deg) rotateX(-10deg); }
.p3d-canvas .front { inset: 0; width: var(--w); height: var(--h); background-size: calc(var(--w) + 2*var(--d)) calc(var(--h) + 2*var(--d)); background-position: center; }
.p3d-canvas .right { top: 0; left: var(--w); width: var(--d); height: var(--h); transform-origin: left center; transform: rotateY(90deg);
  background-size: calc(var(--w) + 2*var(--d)) calc(var(--h) + 2*var(--d)); background-position: right center; filter: brightness(.72); }
.p3d-canvas .top { left: 0; top: calc(-1*var(--d)); width: var(--w); height: var(--d); transform-origin: center bottom; transform: rotateX(90deg);
  background-size: calc(var(--w) + 2*var(--d)) calc(var(--h) + 2*var(--d)); background-position: center top; filter: brightness(1.1); }
/* Magnet: square by default; 2×3 rectangle sets --w/--h via JS (2:3 portrait or 3:2 landscape, follows the crop). Thin flexible edge. */
.p3d-magnet { --w: 120px; --h: 120px; --d: 3px; width: var(--w); height: var(--h); margin: calc(var(--h)/-2) 0 0 calc(var(--w)/-2);
  transform: rotateY(-22deg) rotateX(4deg) rotateZ(-3deg); }
.p3d-magnet .front { inset: 0; width: var(--w); height: var(--h); background-size: cover; background-position: center; border-radius: 6px; }
.p3d-magnet .right { top: 0; left: var(--w); width: var(--d); height: var(--h); transform-origin: left center; transform: rotateY(90deg); background: #222; }
.p3d-magnet .bottom { left: 0; top: var(--h); width: var(--w); height: var(--d); transform-origin: center top; transform: rotateX(-90deg); background: #222; }
.p3d-magnet[data-shape="2x3"] .front, .p3d-magnet[data-shape="3x2"] .front { border-radius: 8px; }
/* Wood: maple print, image printed on the face, raw maple edge (edge depth illustrative). */
.p3d-wood { --w: 190px; --h: 141px; --d: 10px; width: var(--w); height: var(--h); margin: calc(var(--h)/-2) 0 0 calc(var(--w)/-2);
  transform: rotateY(-26deg) rotateX(5deg); }
.p3d-wood .front { inset: 0; width: var(--w); height: var(--h); background-size: cover; background-position: center; }
.p3d-wood .front::after { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .35;
  background: repeating-linear-gradient(92deg, #e8cfa4 0 3px, #d6b682 3px 5px, #ecd6ae 5px 9px); }
.p3d-wood .right { top: 0; left: var(--w); width: var(--d); height: var(--h); transform-origin: left center; transform: rotateY(90deg);
  background: repeating-linear-gradient(0deg, #d9b98a 0 2px, #c9a370 2px 3px); }
.p3d-wood .bottom { left: 0; top: var(--h); width: var(--w); height: var(--d); transform-origin: center top; transform: rotateX(-90deg); background: #b8915e; }
.p3d-cap { margin: 8px 0 0; font-size: 14px; color: var(--soft, #6b645c); }
