*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.6 'Nolan Next',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
a{color:var(--blue)}
.shop-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:var(--blue);padding:14px max(5vw,20px)}
.shop-logo img{height:38px;display:block}
.shop-back{color:#fff;text-decoration:none;font-weight:600;font-size:14.5px;opacity:.9}
.shop-back:hover{opacity:1;text-decoration:underline}
.shop-wrap{max-width:860px;margin:0 auto;padding:30px 20px 70px}
.shop-h1{font-family:'Daykids','Marker Felt',cursive;font-weight:400;
  font-size:clamp(32px,5.6vw,52px);line-height:.98;color:var(--blue);margin:0 0 10px}
.shop-lead{color:var(--muted);margin:0 0 26px;max-width:62ch}
h2{font-size:20px;margin:30px 0 12px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:18px}
label{display:block;font-weight:700;font-size:13.5px;margin:14px 0 5px}
input[type=text],input[type=email],input[type=tel],input[type=number],textarea,select{
  width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}
textarea{min-height:84px;resize:vertical}
input:focus,textarea:focus,select:focus{outline:2px solid rgba(7,51,216,.35);border-color:var(--blue)}
.btn{background:var(--blue);color:#fff;border:0;border-radius:999px;padding:14px 28px;
  font:inherit;font-weight:700;cursor:pointer;min-height:48px}
.btn:hover{background:#0629ad}
.btn.ghost{background:#eef0f8;color:var(--ink)}
.btn.wide{width:100%}
.note{padding:12px 16px;border-radius:12px;font-weight:600;margin:0 0 16px}
.note.ok{background:#e4f6ec;color:#0a6336;border:1px solid #b9e6cd}
.note.err{background:#fdeceb;color:#8e2b22;border:1px solid #f6c9c4}
.note.warn{background:#fff6e2;color:#8a5d00;border:1px solid #f3dfae}
.muted{color:var(--muted)}
.small{font-size:13.5px}
.drop{border:2px dashed #c3cae4;border-radius:14px;padding:26px;text-align:center;background:#fbfcff}
.drop.hot{border-color:var(--blue);background:#eef2ff}
.picks{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.pick{border:2px solid var(--line);border-radius:14px;padding:16px;background:#fff;cursor:pointer;display:block}
.pick:has(input:checked){border-color:var(--blue);box-shadow:0 0 0 3px rgba(7,51,216,.12)}
.pick input{width:auto;margin-right:8px}
.pick img{width:100%;border-radius:10px;margin-bottom:10px;display:block}
.pick .nm{font-weight:800}
.pick .pr{color:var(--blue);font-weight:800;font-size:18px;margin-top:4px}
.qty{display:flex;align-items:center;gap:10px;margin-top:10px}
.qty input{width:84px}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px;margin-top:14px}
.thumbs figure{margin:0;position:relative}
.thumbs img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;border:1px solid var(--line);display:block}
.thumbs button{position:absolute;top:4px;right:4px;border:0;background:rgba(20,25,55,.72);color:#fff;
  width:26px;height:26px;border-radius:50%;cursor:pointer;font-size:15px;line-height:1}
.total{display:flex;justify-content:space-between;align-items:baseline;
  border-top:2px solid var(--line);margin-top:18px;padding-top:14px;font-weight:800;font-size:20px}
.pay{border:2px solid var(--line);border-radius:14px;padding:18px;margin-bottom:14px;background:#fff}
.pay.on{border-color:var(--blue)}
.lipa{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eef2ff;border-radius:12px;padding:14px 16px;margin:12px 0}
.lipa b{font-size:26px;letter-spacing:.04em;font-variant-numeric:tabular-nums}
.copy{background:var(--blue);color:#fff;border:0;border-radius:999px;padding:10px 18px;font:inherit;font-weight:700;cursor:pointer;min-height:44px}
.copy.done{background:#0c8f4a}
.steps{margin:10px 0 0;padding-left:20px}
.steps li{margin-bottom:5px}
.qr{width:170px;border-radius:12px;border:1px solid var(--line);display:block;margin-top:10px}
.state{display:inline-block;border-radius:999px;padding:5px 14px;font-weight:700;font-size:13.5px}
.state.wait{background:#fff6e2;color:#8a5d00}
.state.check{background:#e7eeff;color:var(--blue)}
.state.paid{background:#e4f6ec;color:#0a6336}
.state.no{background:#fdeceb;color:#8e2b22}
table.sum{width:100%;border-collapse:collapse}
table.sum td{padding:7px 0;border-bottom:1px solid var(--line)}
table.sum td:last-child{text-align:right;font-weight:700;white-space:nowrap}
.shop-foot{text-align:center;color:var(--muted);font-size:13.5px;padding:0 20px 40px}
.shop-foot a{color:var(--muted)}
@media(max-width:560px){.shop-wrap{padding:22px 14px 60px}.card{padding:17px}.lipa b{font-size:22px}}

/* ---- magnet crop preview ---- */
.cropcard{border:1px solid var(--line);border-radius:14px;padding:14px;margin-top:14px;background:#fff}
.crophead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.crophead .muted{flex:1;min-width:140px}
.orient{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.orient button{border:0;background:#fff;color:var(--muted);font:inherit;font-size:13px;font-weight:700;
  padding:8px 14px;cursor:pointer;min-height:40px}
.orient button.on{background:var(--blue);color:#fff}
.rmphoto{border:0;background:#fdeceb;color:#c0392b;font:inherit;font-size:13px;font-weight:700;
  border-radius:999px;padding:8px 14px;cursor:pointer;min-height:40px}
.rmphoto:hover{background:#c0392b;color:#fff}
.stage{display:flex;justify-content:center;background:
  linear-gradient(45deg,#eef0f6 25%,transparent 25%,transparent 75%,#eef0f6 75%),
  linear-gradient(45deg,#eef0f6 25%,transparent 25%,transparent 75%,#eef0f6 75%);
  background-size:18px 18px;background-position:0 0,9px 9px;background-color:#f8f9fd;
  border-radius:12px;padding:18px}
.magnet{position:relative;overflow:hidden;width:min(260px,70vw);
  border-radius:10px;background:#dfe3ef;cursor:grab;
  box-shadow:0 10px 26px rgba(16,24,64,.22),0 0 0 1px rgba(16,24,64,.08)}
.magnet.grabbing{cursor:grabbing}
.magnet img{position:absolute;max-width:none;user-select:none;-webkit-user-drag:none;pointer-events:none}
.cropctl{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.cropctl input[type=range]{flex:1;min-width:140px;width:auto;padding:0;accent-color:var(--blue)}
@media(max-width:560px){.magnet{width:min(220px,66vw)}.stage{padding:12px}}

/* ================= ORDERING FLOW ================= */
/* One job per screen. The upload is the centre of gravity: everything else
   is either the choice that precedes it or the details that follow it. */

.steps-bar{display:flex;gap:6px;margin:0 0 24px;list-style:none;padding:0;flex-wrap:wrap}
.steps-bar li{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;
  color:var(--muted);padding:8px 14px;border-radius:999px;background:#eef0f8}
.steps-bar li .n{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;
  background:#fff;color:var(--muted);font-size:12.5px}
.steps-bar li.on{background:var(--blue);color:#fff}
.steps-bar li.on .n{background:rgba(255,255,255,.22);color:#fff}
.steps-bar li.done{background:#e4f6ec;color:#0a6336}
.steps-bar li.done .n{background:#0c8f4a;color:#fff}

.step{display:none}
.step.on{display:block}
.step-nav{display:flex;gap:12px;align-items:center;margin-top:20px;flex-wrap:wrap}
.step-nav .btn{flex:1;min-width:150px}
.step-nav .btn.ghost{flex:0 0 auto;min-width:110px}

/* ---- the drop zone ---- */
.upzone{border:2px dashed #c7ceea;border-radius:18px;background:#fbfcff;
  padding:46px 24px;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}
.upzone:hover,.upzone.hot{border-color:var(--blue);background:#eef2ff}
.upzone .ico{width:58px;height:58px;border-radius:16px;background:#fff;display:grid;place-items:center;
  margin:0 auto 14px;box-shadow:0 2px 10px rgba(16,24,64,.08)}
.upzone .ico svg{width:28px;height:28px;stroke:var(--blue);fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.upzone b{display:block;font-size:17px;margin-bottom:5px}
.upzone .sub{color:var(--muted);font-size:13.5px}
.upzone input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

/* ---- the chosen files ---- */
.filelist{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.filerow{display:flex;align-items:center;gap:13px;border:1px solid var(--line);
  border-radius:14px;padding:11px 13px;background:#fff}
.filerow .fthumb{width:46px;height:46px;border-radius:10px;object-fit:cover;flex:none;
  background:#eef0f8;border:1px solid var(--line)}
.filerow .fmeta{flex:1;min-width:0}
.filerow .fname{font-weight:700;font-size:14.5px;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.filerow .fsize{color:var(--muted);font-size:12.5px}
.filerow .fx{border:0;background:#f1f3fa;color:var(--muted);width:32px;height:32px;flex:none;
  border-radius:50%;cursor:pointer;font-size:17px;line-height:1}
.filerow .fx:hover{background:#fdeceb;color:#c0392b}
.filerow.bad{border-color:#f6c9c4;background:#fffaf9}
.filerow.bad .fsize{color:#8e2b22}

/* ---- previews ---- */
.prevtabs{display:inline-flex;border:1px solid var(--line);border-radius:999px;
  overflow:hidden;margin:0 0 14px}
.prevtabs button{border:0;background:#fff;color:var(--muted);font:inherit;font-size:13.5px;
  font-weight:700;padding:9px 18px;cursor:pointer;min-height:42px}
.prevtabs button.on{background:var(--blue);color:#fff}

/* The product photograph, with the customer's picture warped onto the magnet
   inside it. The scene is just an image; everything laid over it is positioned
   as a percentage of that image, so it holds at any width. */
.fridge{position:relative;border-radius:18px;padding:0;overflow:hidden;background:#f3f4f9;
  box-shadow:inset 0 0 0 1px rgba(16,24,64,.07)}
.fridge .mags{display:block;padding:0}
.scene{position:relative;width:100%;line-height:0}
.scene-bg{display:block;width:100%;height:auto}
.scene-panel{position:absolute;backface-visibility:hidden}
.scene-panel img{position:absolute;max-width:none}
.fridge .empty{color:#5a6079;font-size:13.5px;text-align:center;margin:0;
  padding:10px 12px 14px;line-height:1.5}

/* the A4 sheet, scaled to fit whatever width it is given */
.sheetbox{background:#f3f4f9;border-radius:14px;padding:16px;overflow:hidden}
.sheetscale{transform-origin:top left}
.sheetcap{color:var(--muted);font-size:13px;margin:10px 0 0}

@media(max-width:560px){
  .upzone{padding:34px 16px}
  .steps-bar li{padding:7px 11px;font-size:12.5px}
  .fridge{padding:18px 14px 22px}
}

/* the magnet shown on a real photograph, once the mockups are uploaded */
.mockup{position:relative;width:100%;max-width:420px;border-radius:14px;overflow:hidden;
  box-shadow:0 10px 26px rgba(16,24,64,.16)}
.mockup-bg{display:block;width:100%;height:auto}
.mockup-slot{position:absolute;overflow:hidden;border-radius:2px;
  box-shadow:0 2px 6px rgba(0,0,0,.28)}
.mockup-slot img{position:absolute;max-width:none}
.fridge .mags .mockup{flex:1 1 300px}

/* ---- realistic magnet preview (magnet-preview.js) ---- */
.mockstage{position:relative;width:100%;aspect-ratio:4/3;border-radius:14px;overflow:hidden;
  background:#d9d9d9 url(../assets/magnets/plate-rect.jpg) center/cover no-repeat}
.mockcanvas{display:block;width:100%;height:100%;animation:mockin .35s ease-out}
@keyframes mockin{from{opacity:.4}to{opacity:1}}
.mockstrip{display:flex;gap:8px;overflow-x:auto;padding:12px 2px 2px;scrollbar-width:thin}
.mockthumb{position:relative;flex:none;width:56px;height:56px;border-radius:10px;padding:0;cursor:pointer;
  border:2px solid transparent;background:#eef0f8;overflow:hidden}
.mockthumb img{width:100%;height:100%;object-fit:cover;display:block}
.mockthumb span{position:absolute;right:3px;bottom:3px;min-width:18px;height:18px;border-radius:9px;padding:0 5px;
  background:rgba(20,25,55,.75);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.mockthumb.on{border-color:var(--blue);box-shadow:0 0 0 3px rgba(7,51,216,.15)}
@media(max-width:560px){.fridge:has(.mockstage){padding:0}}
