/* Interactive 3D product render (partials/product_render.html) */
.pr { margin:0; display:flex; flex-direction:column; gap:10px; }
.pr-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.pr-tabs { display:inline-flex; padding:3px; gap:2px; background:var(--chip); border:1px solid var(--line); border-radius:999px; }
.pr-tab { appearance:none; border:0; background:transparent; font:600 13px var(--sans); color:var(--body); padding:7px 16px; min-height:36px; border-radius:999px; cursor:pointer; }
.pr-tab[aria-selected="true"] { background:var(--surface); color:var(--ink); box-shadow:0 1px 3px rgba(16,40,32,.14); }
.pr-hint { display:inline-flex; align-items:center; gap:6px; font:500 12px var(--sans); color:var(--muted); }
.pr-stage { position:relative; border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; background:#F3F4F0; }
.pr-view { position:relative; }
.pr-img { display:block; width:100%; height:auto; aspect-ratio:4 / 3; }
.pr-map { position:absolute; inset:0; width:100%; height:100%; }
.pr-region { fill:transparent; stroke:transparent; stroke-width:2; vector-effect:non-scaling-stroke; cursor:help; transition:fill .15s, stroke .15s; }
.pr-region.is-active { fill:rgba(84,214,140,.16); stroke:#2FBF74; }
.pr-region--ports.is-active { fill:rgba(84,214,140,.26); stroke:#2FBF74; stroke-width:2.5; }
.pr-view:hover .pr-region--ports:not(.is-active) { stroke:rgba(255,255,255,.22); stroke-width:1; }
.pr-dot { position:absolute; width:30px; height:30px; margin:-15px 0 0 -15px; padding:0; border:0; background:transparent; cursor:pointer; display:grid; place-items:center; }
.pr-dot span { width:12px; height:12px; border-radius:50%; background:#fff; box-shadow:0 0 0 3px rgba(24,63,53,.85), 0 2px 8px rgba(0,0,0,.35); position:relative; }
.pr-dot span::after { content:""; position:absolute; inset:-7px; border-radius:50%; border:2px solid rgba(255,255,255,.85); animation:pr-pulse 2.4s ease-out infinite; }
.pr-dot.is-active span, .pr-dot:hover span { background:#54D68C; }
@keyframes pr-pulse { 0% { transform:scale(.5); opacity:.9; } 80%,100% { transform:scale(1.5); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .pr-dot span::after { animation:none; opacity:.5; } }
.pr-stage:not(:hover):not(:focus-within) .pr-dot { opacity:.92; }
.pr-card { position:absolute; z-index:3; width:244px; max-width:calc(100% - 16px); padding:12px 14px 12px; background:rgba(255,255,255,.97); border:1px solid var(--line); border-radius:var(--r-md); box-shadow:0 10px 30px rgba(16,40,32,.18); pointer-events:none; backdrop-filter:blur(6px); }
.pr-card[hidden] { display:none; }
.pr-card-title { margin:0; font:650 15px/1.25 var(--heading); color:var(--ink); }
.pr-card-sub { margin:2px 0 0; font:500 12px/1.35 var(--mono, ui-monospace, monospace); color:var(--muted); }
.pr-card-facts { margin:8px 0 0; padding:0; list-style:none; display:grid; gap:5px; }
.pr-card-facts li { position:relative; padding-left:14px; font:400 13px/1.4 var(--sans); color:var(--body); }
.pr-card-facts li::before { content:""; position:absolute; left:2px; top:.55em; width:5px; height:5px; border-radius:50%; background:#2FBF74; }
.pr-caption { font:400 12px/1.4 var(--sans); color:var(--muted); }
.pr-legend { border:1px solid var(--line); border-radius:var(--r-md); background:var(--surface); margin-top:12px; }
.pr-legend summary { cursor:pointer; padding:12px 14px; font:600 14px var(--sans); color:var(--ink); min-height:44px; }
.pr-legend dl { margin:0; padding:0 14px 12px; display:grid; gap:10px; }
.pr-legend dt { font:600 13px var(--sans); color:var(--ink); }
.pr-legend dt span { font-weight:400; color:var(--muted); }
.pr-legend dd { margin:2px 0 0; font:400 13px/1.45 var(--sans); color:var(--body); }
@media (max-width:520px) {
  .pr-card { position:static; width:auto; max-width:none; border:0; border-top:1px solid var(--line); border-radius:0; box-shadow:none; background:var(--surface); }
  .pr-dot { width:36px; height:36px; margin:-18px 0 0 -18px; }
}
.pr-hint-touch { display:none; }
@media (hover:none) { .pr-hint-mouse { display:none; } .pr-hint-touch { display:inline; } }
.pr-dot--minor { opacity:0; transition:opacity .2s; }
.pr-stage:hover .pr-dot--minor, .pr-dot--minor:focus-visible, .pr-dot--minor.is-active { opacity:1; }
.pr-dot--minor span { width:9px; height:9px; }
.pr-dot--minor span::after { animation:none; opacity:0; }
.pr-loupe { position:absolute; z-index:4; width:130px; height:130px; border-radius:50%; pointer-events:none; opacity:0; transform:scale(.85); transition:opacity .15s, transform .15s;
  background-repeat:no-repeat; border:3px solid #fff; box-shadow:0 12px 32px rgba(16,40,32,.32), inset 0 0 0 1px rgba(0,0,0,.08); }
.pr-loupe.is-on { opacity:1; transform:scale(1); }
@media (hover:none) { .pr-loupe { display:none; } }
@media (hover:none) { .pr-dot--minor { display:none; } }
/* With a mouse only the visible dot is a target, so dots never steal hover from the ports
   beneath them; touch keeps the full 30-36 px button. */
@media (hover:hover) and (pointer:fine) { .pr-dot { pointer-events:none; } .pr-dot span { pointer-events:auto; } .pr-dot span::after { pointer-events:none; } }
