/* "Personalise your own" page — layout adapted from the reference build in
   renders/shop html/shock_shop_personaliser_reference_build.html, retokenised
   onto this site's real CSS variables (--ink/--brand/--accent/--line/--radius
   from style.css) instead of that file's own standalone palette. */

.pz-shell{max-width:var(--maxw);margin:0 auto;padding:32px}
/* Customiser (title + steps) now sits left, stage right — same two sizes,
   just swapped sides, so the stage keeps its own real proportions. */
.pz-grid{display:grid;grid-template-columns:minmax(340px,.75fr) minmax(0,1.25fr);gap:20px}
@media(max-width:1000px){.pz-grid{grid-template-columns:1fr}}

.pz-panel{background:var(--paper-2);border:1px solid var(--line);border-radius:14px}

/* ---- Left: live preview stage ---- */
.pz-stage-wrap{padding:20px}
.pz-stage{
  min-height:460px;border-radius:10px;position:relative;display:grid;place-items:center;
  overflow:hidden;background:radial-gradient(circle at 50% 40%,#eaf3fb 0,#d7e9f7 45%,#bcdaef 100%);
}
.pz-artwork{position:relative;overflow:hidden;background:#f2f0ea;box-shadow:0 18px 30px rgba(0,0,0,.16)}
/* Product photo fills the box behind the artboard. */
.pz-artwork img.pz-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pz-artboard{position:absolute;inset:0;overflow:hidden}

/* Per-product shape — real ones (coaster/mug corner rounding, dog-tag notch)
   where we know it; flat placeholders elsewhere (see PRODUCTS.bgReal in the
   page script for which is which). */
.pz-shape-square-coaster{border-radius:10%;background:#fbfbf9}
.pz-shape-circle{border-radius:50%}
.pz-shape-mug{border-radius:8px;background:#f4f4f2}
.pz-shape-metal{border-radius:2px;background:linear-gradient(135deg,#d7dade,#c3c7cc 45%,#eef0f2 55%,#b8bcc1)}
.pz-shape-dogtag{
  border-radius:0;background:linear-gradient(135deg,#dcdfe3,#c7cbd0 50%,#e9ebee);
  clip-path:polygon(12% 0,100% 0,100% 100%,12% 100%,0 50%);
}
.pz-shape-dogtag::after{
  content:"";position:absolute;left:9%;top:50%;width:10%;aspect-ratio:1;border-radius:50%;
  background:#f4f5f6;transform:translateY(-50%);box-shadow:0 0 0 3px rgba(0,0,0,.18);z-index:1
}
/* Key Ring's real template (3573 - New Rect Keyring.psd) is a plain
   rounded rectangle, not the notched dog-tag shape above. */
.pz-shape-rect-keyring{border-radius:8%;background:linear-gradient(135deg,#dde0e4,#c9cdd2 50%,#eaecee)}
/* -webkit-user-drag:none backs up the draggable="false" attribute on the
   <img> itself - without both, the browser's native image drag-and-drop
   (a ghost image following the cursor) fights the custom pointer-based
   dragging below, which is why only the photo (not the text layer, a plain
   div) was reported as buggy to drag. */
.pz-user-image{position:absolute;left:50%;top:50%;width:70%;transform:translate(-50%,-50%);display:none;user-select:none;-webkit-user-drag:none;touch-action:none;cursor:grab}
.pz-user-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#fff;font-size:34px;line-height:1.05;font-weight:800;text-align:center;white-space:pre-line;text-shadow:0 2px 8px rgba(0,0,0,.4);padding:4px 8px;cursor:grab;touch-action:none;user-select:none;max-width:92%}
.pz-selected{outline:2px solid var(--accent);outline-offset:3px}
.pz-safe{position:absolute;border:2px dashed rgba(0,0,0,.4);pointer-events:none;display:none}
.pz-centerline{position:absolute;background:rgba(49,135,210,.9);pointer-events:none;display:none}
.pz-center-v{top:0;bottom:0;left:50%;width:1px}.pz-center-h{left:0;right:0;top:50%;height:1px}

.pz-stage-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:14px}
.pz-stage-controls button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:9px 14px;font-weight:600;font-size:12px}
.pz-stage-controls button:hover{border-color:var(--ink)}
.pz-template-note{margin-top:12px;font-size:12px;color:var(--muted);text-align:center}
.pz-adjust-block{margin-top:20px;padding-top:20px;border-top:1px solid var(--line);max-width:420px;margin-left:auto;margin-right:auto}

.pz-benefits{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line)}
.pz-benefits div{padding:14px 10px;text-align:center;font-size:11px;font-weight:800}
.pz-benefits span{display:block;color:var(--muted);font-weight:500;margin-top:4px}
@media(max-width:700px){.pz-benefits{grid-template-columns:repeat(2,1fr)}}

/* ---- Right: customiser ---- */
.pz-customiser{padding:20px}
.pz-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.pz-title-row p{color:var(--muted);font-size:14px;margin-top:4px}
.pz-price{font-size:28px;font-weight:800;color:var(--brand)}
.pz-step{margin-top:18px}
.pz-step-title{display:flex;align-items:center;gap:10px;font-weight:800;margin-bottom:10px;font-size:14px}
.pz-num{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--brand);color:#fff;font-size:12px;flex:none}

.pz-product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pz-product-card{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px;text-align:center;font-size:11px;font-weight:700;cursor:pointer}
.pz-product-card.active{border:2px solid var(--brand);background:#fff8f4}
.pz-product-card .pz-thumb{height:86px;border-radius:6px;margin-bottom:6px;display:grid;place-items:center;overflow:hidden;background:#f1f2f4;padding:2px}
.pz-product-card .pz-thumb img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.pz-product-card small{display:block;color:var(--brand);font-size:12px;margin-top:3px}

/* Stacked, not side-by-side: the customiser column (minmax(340px,.75fr) in
   .pz-grid) is too narrow for two columns here — "Upload a photo (optional)"
   wrapped word-by-word at that width, and it squeezed the text input bar. */
.pz-row2{display:grid;grid-template-columns:1fr;gap:16px}
.pz-upload{min-height:100px;border:2px dashed var(--line);border-radius:10px;background:#fafafa;display:grid;place-items:center;text-align:center;padding:14px;cursor:pointer}
.pz-upload input{display:none}
.pz-upload label{font-weight:800;display:block;margin-bottom:4px;cursor:pointer}
.pz-upload small{color:var(--muted);display:block;line-height:1.35}
.pz-text-input{width:100%;height:40px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font:inherit}
.pz-text-controls{display:grid;grid-template-columns:1fr 42px 42px 42px;gap:6px;margin-top:8px}
.pz-text-controls select,.pz-text-controls button,.pz-text-controls input{height:38px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit}
.pz-text-controls input[type=color]{padding:3px}
.pz-text-controls button.pz-active{background:var(--ink);color:#fff;border-color:var(--ink)}

.pz-adjust-grid{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:start}
@media(max-width:480px){.pz-adjust-grid{grid-template-columns:1fr}}
.pz-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}
.pz-tabs button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px;font-size:12px;font-weight:700}
.pz-tabs button.pz-active{background:var(--brand);border-color:var(--brand);color:#fff}
.pz-dpad{display:grid;grid-template-columns:38px 38px 38px;grid-template-rows:38px 38px 38px;gap:4px;justify-content:center}
.pz-dpad button{border:1px solid var(--line);background:#fff;border-radius:8px;font-size:16px;font-weight:800}
.pz-dpad .pz-up{grid-column:2}.pz-dpad .pz-left{grid-column:1;grid-row:2}.pz-dpad .pz-center{grid-column:2;grid-row:2;color:var(--brand)}.pz-dpad .pz-right{grid-column:3;grid-row:2}.pz-dpad .pz-down{grid-column:2;grid-row:3}
.pz-control{margin-bottom:12px}
.pz-control label{display:flex;justify-content:space-between;font-size:12px;font-weight:700;margin-bottom:5px}
.pz-control input[type=range]{width:100%;accent-color:var(--brand)}
.pz-utility{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.pz-utility button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px;font-size:11px;font-weight:700}

.pz-qty-row{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center}
.pz-qty{display:grid;grid-template-columns:36px 46px 36px;height:44px;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.pz-qty button,.pz-qty span{border:0;background:#fff;display:grid;place-items:center;font-weight:800}
.pz-add{height:48px;border:0;border-radius:9px;background:var(--brand);color:#fff;font-size:15px;font-weight:800;cursor:pointer}
.pz-add:disabled{opacity:.55;cursor:not-allowed}
.pz-error{margin-top:10px;padding:10px 12px;border-radius:9px;background:#fdecea;color:#8a1f11;font-size:13px}
