/* Angie print shop — /shop. Speaks the landing page's design language exactly:
   photo-paper white, bordered white cards (8px), Pretendard display + Space Mono
   kickers/serials, ink buttons with the single pink→blue gradient CTA, artifacts
   presented like physical prints (slight rotation, real shadows, mono serials). */

body { background: var(--paper); color: var(--ink); line-height: 1.5; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ============ top bar (mirrors the landing) ============ */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248, 249, 251, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -0.03em;
}
.brand .dots { display: inline-flex; gap: 4px; }
.brand .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.brand .dots i.p { background: var(--pink); }
.brand .dots i.b { background: var(--blue); }
.bar nav { display: flex; align-items: center; gap: 26px; }
.bar nav a { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.bar nav a:hover { color: var(--ink); }

/* ============ type & shared bits ============ */
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-soft);
}
h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.06; letter-spacing: -0.03em;
  margin-top: 10px;
}
.grad {
  background: linear-gradient(100deg, var(--pink), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: 12px; color: var(--ink-soft); font-size: 16.5px; max-width: 52ch; }

.btn-shop-grad, .btn-shop-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-shop-grad { background: linear-gradient(100deg, var(--pink), var(--blue)); color: #fff; }
.btn-shop-grad:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 50px rgba(23, 24, 28, 0.10); }
.btn-shop-grad:disabled { opacity: 0.45; cursor: default; }
.btn-shop-ghost { background: var(--paper-raised); color: var(--ink); border-color: var(--line); }
.btn-shop-ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.shop-loading, .confirm-loading { padding: 120px 0; text-align: center; }

/* ============ product layout ============ */
.pdp {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 56px;
  align-items: start; padding: 56px 0 96px;
}

/* ---------- gallery ---------- */
.gallery { position: sticky; top: 96px; }

.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 460px;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--paper-raised);
}
/* front: quiet studio backdrop + a real contact shadow under the product */
.stage.is-front { background: linear-gradient(180deg, #FDFDFE 0%, #F2F4F7 100%); }
.stage-shadow {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(23, 24, 28, 0.22), transparent);
  filter: blur(6px);
}
.stage.is-front .magnet { transform: rotate(-2.4deg) translateY(-16px); }

/* fridge: brushed steel door */
.stage.is-fridge {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    linear-gradient(105deg, #E8EDF3 0%, #DCE3EB 45%, #E6EBF1 60%, #D4DCE5 100%);
}
.fridge-handle {
  position: absolute; left: 34px; top: 44px; bottom: 44px; width: 9px;
  border-radius: 5px;
  background: linear-gradient(180deg, #C3CEDA, #A6B4C3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 2px 0 6px rgba(23, 24, 28, 0.12);
}
.stage.is-fridge .magnet { transform: rotate(1.6deg); }

/* size guide: spec-sheet look — dashed measures + mono labels */
.stage.is-size { background: var(--paper-raised); }
.stage.is-size .magnet { transform: none; box-shadow: 0 2px 0 rgba(10, 10, 12, 0.5), 0 10px 24px rgba(23, 24, 28, 0.14); }
.measure { position: absolute; inset: 0; pointer-events: none; }
.measure b {
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  color: var(--ink); background: var(--paper-raised); padding: 1px 7px;
  border: 1px solid var(--line); border-radius: 4px; white-space: nowrap;
}
.measure i { flex: 1; border-top: 1px dashed #B9BEC9; }
.m-w, .m-h { position: absolute; display: flex; align-items: center; gap: 8px; }
.m-w { left: 50%; transform: translateX(-50%); bottom: 40px; width: min(228px, 56%); }
.m-h { top: 50%; right: 42px; transform: translateY(-50%) rotate(90deg); transform-origin: center; width: 300px; }

/* ---------- the magnet itself ---------- */
.magnet {
  position: relative; margin: 0;
  background: #fff;
  padding: 9px;
  width: 176px;
  border-radius: 2px;
  /* the hard lower edge is the black backing; the long soft one is the room */
  box-shadow:
    0 2px 0 rgba(10, 10, 12, 0.55),
    0 18px 34px rgba(23, 24, 28, 0.22),
    0 4px 10px rgba(23, 24, 28, 0.10);
}
.magnet img { display: block; width: 100%; border-radius: 1px; }
.magnet.is-grid { width: 236px; aspect-ratio: 2 / 3; padding: 0; overflow: hidden; }
.magnet.is-grid img {
  position: absolute; top: 50%; left: 50%;
  width: 336px; /* = container height, rotated to portrait */
  transform: translate(-50%, -50%) rotate(90deg);
}

/* demo strip (no strips yet) — real booth shots from the landing page */
.demo-strip { width: 100%; background: #fff; }
.demo-strip img { display: block; width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; margin-bottom: 8px; }
.demo-serial {
  display: block; text-align: center; padding: 4px 0 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--ink-soft);
}

.scene-tabs { display: flex; gap: 8px; margin-top: 14px; }
.scene-tab {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  color: var(--ink-soft); background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px; cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.scene-tab:hover { color: var(--ink); }
.scene-tab.is-on { color: var(--ink); border-color: var(--ink); }

.gal-switch { display: flex; gap: 8px; margin-top: 12px; }
.gal-thumb {
  width: 44px; height: 66px; padding: 3px; cursor: pointer;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 4px;
}
.gal-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gal-thumb.is-on { border-color: var(--ink); }

.gallery .serial {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--ink-soft);
}

/* ---------- buy column ---------- */
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.price-size { font-size: 13.5px; color: var(--ink-soft); }
.price-dot { color: var(--line); }
.deal-chip {
  margin-left: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: linear-gradient(100deg, var(--pink), var(--blue));
  padding: 4px 9px; border-radius: 4px; align-self: center;
}

.cancel-note {
  font-size: 14px; color: var(--ink); background: var(--blue-tint);
  border-radius: 4px; padding: 10px 14px; margin-bottom: 18px;
}

/* the numbered boxes */
.box {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px; margin-top: 22px;
}
.box-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.box-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  border: 1px solid var(--ink); color: var(--ink);
}
.box-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }

/* ---------- box 1: strips ---------- */
.strip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 14px; }

.strip-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}
.strip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.strip-card.is-on { border-color: var(--ink); }

.strip-pic {
  position: relative; border: none; cursor: pointer;
  background: var(--paper); border-radius: 4px;
  height: 148px; display: grid; place-items: center; padding: 10px; overflow: hidden;
}
.strip-pic img { max-width: 100%; max-height: 100%; box-shadow: 0 3px 10px rgba(23, 24, 28, 0.16); }
.strip-tick {
  position: absolute; top: 7px; right: 7px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--paper-raised); border: 1px solid var(--line); color: transparent;
  transition: all 0.12s ease;
}
.strip-card.is-on .strip-tick { background: var(--ink); border-color: var(--ink); color: #fff; }

.strip-meta { display: flex; flex-direction: column; gap: 1px; }
.strip-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--ink-soft); }
.strip-price { font-weight: 700; font-size: 13.5px; margin-top: 3px; }

.strip-qty { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 28px; height: 28px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper-raised);
  font-size: 15px; line-height: 1; color: var(--ink);
}
.qty-btn:hover { border-color: var(--ink); }
.qty-num { font-family: var(--font-mono); font-weight: 700; min-width: 16px; text-align: center; }

.strip-dest { display: flex; gap: 5px; }
.dest-pill {
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper-raised);
  color: var(--ink-soft); padding: 3px 8px;
}
.dest-pill.is-on { border-color: var(--ink); color: var(--ink); background: var(--paper); }

.strips-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 16px 22px;
}
.strips-empty .empty-strip {
  width: 92px; margin-bottom: 16px; border-radius: 2px; overflow: hidden;
  transform: rotate(-3deg);
  box-shadow: 0 2px 0 rgba(10, 10, 12, 0.5), 0 12px 26px rgba(23, 24, 28, 0.16);
}
.strips-empty h3 { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.strips-empty p { color: var(--ink-soft); font-size: 14.5px; margin: 6px 0 20px; max-width: 34ch; }

/* "Show more" — spans the strip grid, styled like a ghost button */
.strips-more {
  grid-column: 1 / -1;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  color: var(--ink); background: var(--paper-raised);
  border: 1px dashed var(--line); border-radius: 8px; padding: 13px; cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.strips-more:hover { border-color: var(--ink); }

.deal-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.deal-note.is-hit { color: var(--ink); font-weight: 600; }
.deal-note.is-hit::before { content: "✓ "; }

/* ---------- box 2: delivery (the Shopify-smooth form) ---------- */
.addr { display: flex; flex-direction: column; gap: 12px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow-3 { grid-template-columns: 1.2fr 1fr 0.9fr; }

.fld { display: flex; flex-direction: column; gap: 5px; }
.fld-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.in {
  width: 100%; height: 46px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--paper-raised); color: var(--ink);
  font: inherit; font-size: 14.5px; padding: 0 13px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.in:hover { border-color: #C9CDD6; }
.in:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.in.is-bad { border-color: #D6455D; box-shadow: 0 0 0 1px #D6455D; }
select.in { appearance: auto; }
.fld-note { font-size: 13px; color: #D6455D; }

/* address search dropdown */
.addr-search { position: relative; }
.suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 18px 50px rgba(23, 24, 28, 0.12);
  overflow: hidden;
}
.suggest-row {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 9px; align-items: baseline; text-align: left;
  width: 100%; padding: 10px 13px; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--line);
  font: inherit; color: var(--ink);
}
.suggest-row:last-child { border-bottom: none; }
.suggest-row:hover, .suggest-row.is-active { background: var(--paper); }
.suggest-pin { grid-row: 1 / 3; color: var(--ink-soft); }
.suggest-main { font-weight: 600; font-size: 14px; }
.suggest-rest { grid-column: 2; font-size: 12.5px; color: var(--ink-soft); }

/* partner toggle — a proper choice card */
.partner-toggle {
  display: flex; align-items: center; gap: 13px; cursor: pointer;
  border: 1px dashed var(--line); border-radius: 8px;
  padding: 15px 16px; margin-top: 18px;
  transition: border-color 0.12s ease;
}
.partner-toggle:hover { border-color: var(--ink-soft); }
.partner-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.partner-box {
  width: 22px; height: 22px; flex: none; border-radius: 4px;
  border: 1px solid var(--line); background: var(--paper-raised);
  display: grid; place-items: center;
  transition: all 0.12s ease;
}
.partner-toggle input:checked ~ .partner-box { background: var(--ink); border-color: var(--ink); }
.partner-toggle input:checked ~ .partner-box::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 700; }
.partner-toggle input:checked ~ .partner-text b { color: var(--ink); }
.partner-toggle:has(input:checked) { border: 1px solid var(--ink); }
.partner-text { display: flex; flex-direction: column; }
.partner-text b { font-size: 14.5px; font-weight: 700; }
.partner-text i { font-style: normal; font-size: 13px; color: var(--ink-soft); }

.partner-wrap { margin-top: 16px; }
.partner-head { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }

/* ---------- box 3: summary ---------- */
.sum-lines { display: flex; flex-direction: column; }
.sum-line {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.sum-thumb { width: 26px; height: 48px; object-fit: contain; flex: none; }
.sum-name { flex: 1; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; }
.sum-dest { font-style: normal; font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.sum-amt { font-family: var(--font-mono); font-size: 13.5px; }

.sum-rows { padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.sum-row span:last-child { font-family: var(--font-mono); color: var(--ink); }
.sum-row.is-deal, .sum-row.is-deal span:last-child { color: #0a7d4d; font-weight: 600; }
.sum-row.is-total {
  border-top: 1px solid var(--line); margin-top: 6px; padding-top: 13px;
  color: var(--ink); font-weight: 700; font-size: 16px;
}
.sum-row.is-total span:last-child { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.sum-empty { color: var(--ink-soft); font-size: 14px; }

.pay-btn { width: 100%; margin-top: 18px; padding: 15px 22px; font-size: 16px; }
.pay-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); text-align: center; }
.pay-note.is-err { color: #D6455D; }

.assure-row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 0 4px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-soft);
}

/* ---------- confirmation page ---------- */
.timeline { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.tstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.tstep::before {
  content: ""; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px;
  background: var(--line);
}
.tstep:first-child::before { display: none; }
.tstep.is-done::before { background: linear-gradient(90deg, var(--pink), var(--blue)); }
.tdot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); position: relative; z-index: 1; }
.tstep.is-done .tdot { background: linear-gradient(100deg, var(--pink), var(--blue)); }
.tlabel { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.tstep.is-done .tlabel { color: var(--ink); }

.confirm-lines .sum-line:last-child { border-bottom: none; }

.addr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.addr-card {
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink-soft);
}
.addr-card b { color: var(--ink); font-size: 14.5px; }

.confirm-ctas { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- orders ---------- */
.orders { padding: 0 0 96px; max-width: 720px; }
.orders-h { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; margin: 8px 0 22px; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px;
}
.order-thumb { width: 34px; height: 60px; object-fit: contain; flex: none; background: var(--paper); border-radius: 2px; }
.order-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.order-meta b { font-size: 14.5px; }
.order-sub { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink-soft); }
.order-tracks { display: flex; gap: 12px; }
.order-tracks a { font-size: 13px; color: var(--blue); font-weight: 600; }
.order-tracks a:hover { text-decoration: underline; }

.order-status {
  flex: none; font-size: 11.5px; font-weight: 700; border-radius: 4px; padding: 5px 11px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft);
}
.order-status.is-live { background: var(--blue-tint); border-color: transparent; color: #2d6bcc; }
.order-status.is-ship { background: #FFF3D6; border-color: transparent; color: #a96b00; }
.order-status.is-done { background: #eafaf1; border-color: #bfe6d2; color: #0a7d4d; }
.order-status.is-bad { background: #fde3e8; border-color: transparent; color: #c0344e; }

/* confetti canvas (shared launchConfetti from the SPA's paySuccess.js) */
.pay-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- empty / misc ---------- */
.shop-empty { padding: 110px 0 140px; max-width: 560px; }
.shop-empty h1 { margin: 12px 0 0; }
.shop-empty .lede { margin: 14px 0 26px; }

/* ============ footer ============ */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; padding: 26px 28px; flex-wrap: wrap; gap: 14px; }
footer .brand { font-size: 18px; }
footer .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0.1em; }

/* ============ responsive ============ */
@media (max-width: 920px) {
  .pdp { grid-template-columns: 1fr; gap: 34px; padding-top: 34px; }
  .gallery { position: static; }
  .stage { min-height: 380px; }
  .frow-3 { grid-template-columns: 1fr 1fr; }
  .frow-3 .fld:first-child { grid-column: 1 / -1; }
  .addr-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .frow { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .bar nav a:not(#nav-orders) { display: none; }

  /* preview: bigger, fully in-frame, with room around it so tall strips aren't clipped */
  .stage { min-height: 0; padding: 30px 0; }
  .magnet { width: min(56vw, 220px); padding: 8px; }
  .stage.is-front .magnet { transform: rotate(-2.4deg); } /* drop the upward shift that clipped the top */
  .stage-shadow { display: none; }
  .m-h { right: 24px; width: 240px; }
  .m-w { width: min(200px, 60%); }
}
