/* ============================================================
   SaturnShop storefront — AWAKE theme × SHELF TAG mechanism.
   Catalog/PDP carry shelf-tag chrome; checkout goes calm paper.
   ============================================================ */

.announcement {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 7px var(--pad);
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--line);
}

.store-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 9px 14px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.cart-button:hover { box-shadow: 3px 3px 0 var(--mint); }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
}

.store-main { padding: 26px 0 64px; min-height: 55vh; }

/* ---------- hero strip ---------- */

.store-hero {
  border-bottom: var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.store-hero h1 {
  font-size: clamp(38px, 8vw, 72px);
  margin: 6px 0 8px;
}

.store-hero p { color: var(--muted); max-width: 52ch; }

/* ---------- HERO KINDS (per plate) ---------- */

/* editorial — the catalog opens like a magazine: no rule, big air, the
   tagline promoted to a lede rather than demoted to grey small print. */
[data-plate-hero="editorial"] .store-hero {
  border-bottom: none;
  padding: clamp(28px, 7vw, 76px) 0 clamp(24px, 5vw, 52px);
  margin-bottom: clamp(20px, 4vw, 40px);
}
[data-plate-hero="editorial"] .store-hero h1 {
  font-size: clamp(46px, 11vw, 128px);
  /* The measure lives HERE, not on .store-hero. `ch` resolves against the
     font-size of the element carrying it, so 22ch on the container was
     22 × the container's 16px = a 196px column holding a 99px headline —
     "SECOND SHIFT" wrapped to two lines and overflowed its own box by
     176px. Carry a measure on the element that owns the type size. */
  max-width: 14ch;
}
[data-plate-hero="editorial"] .store-hero p {
  color: var(--ink);
  font-size: clamp(16px, 2vw, 21px);
  max-width: 34ch;
}
[data-plate-hero="editorial"] .store-hero .mono-label { opacity: 0.55; }

/* terminal — a machine addressing you. Everything mono, tight, bracketed. */
[data-plate-hero="terminal"] .store-hero {
  border-bottom: none;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin-bottom: 30px;
}
[data-plate-hero="terminal"] .store-hero h1 {
  font-family: var(--mono);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}
[data-plate-hero="terminal"] .store-hero h1::before {
  content: "> ";
  color: var(--accent);
}
[data-plate-hero="terminal"] .store-hero p {
  font-family: var(--mono);
  font-size: 13px;
}

/* dossier — stamped and filed. A boxed record, not a banner. */
[data-plate-hero="dossier"] .store-hero {
  border: var(--line);
  border-radius: var(--edge-r);
  padding: clamp(16px, 3vw, 26px);
  margin-bottom: 28px;
  position: relative;
}
[data-plate-hero="dossier"] .store-hero .mono-label {
  position: absolute;
  top: 0;
  left: clamp(16px, 3vw, 26px);
  transform: translateY(-50%);
  background: var(--paper);
  padding: 0 8px;
}
[data-plate-hero="dossier"] .store-hero h1 {
  font-size: clamp(30px, 5.5vw, 54px);
}

/* ---------- SHELF TAG grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
  gap: var(--grid-gap);
}

.product-card {
  text-decoration: none;
  display: block;
}

.product-card .pc-media {
  aspect-ratio: var(--grid-aspect);
  border: var(--line);
  border-radius: var(--edge-r);
  background: var(--paper-deep);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.product-card .pc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.product-card:hover .pc-media img { transform: scale(1.04); }

/* Restraint reads as confidence when the photography earns it — the
   hover-lift is what makes a grid feel like a template. */
[data-plate-motion="cut"] .product-card .pc-media img { transition: none; }
[data-plate-motion="cut"] .product-card:hover .pc-media img { transform: none; }

[data-plate-motion="kinetic"] .product-card .pc-media img { transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1); }
[data-plate-motion="kinetic"] .product-card:hover .pc-media img { transform: scale(1.08); }

.pc-media-blank {
  font-family: var(--display);
  font-size: 40px;
  color: rgba(20, 19, 18, 0.18);
}

/* ---------- SHELF TREATMENTS (per plate) ----------
   This element used to be "the shelf tag — recurring signature", a single
   hardcoded card carrying a mint inset sticker on every store the engine
   served. It was the single most template-making element on the platform:
   whatever colours a merchant chose, their product card was still izzy's
   product card. It is now four genuinely different objects.
   ------------------------------------------------- */

.shelf-tag {
  background: var(--paper);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: baseline;
}

/* tag — the press plate. A priced sticker taped under the plate. */
[data-plate-shelf="tag"] .shelf-tag {
  border: 1.5px solid var(--ink);
  border-top: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* plain — no card at all. The photograph is the product; type sits under
   it on bare paper. Gallery grids and strong imagery only. */
[data-plate-shelf="plain"] .shelf-tag {
  border: none;
  background: none;
  padding: 12px 0 0;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
}
[data-plate-shelf="plain"] .shelf-tag .st-sku {
  grid-column: 1 / -1;
  order: -1;
}

/* plaque — a heavy stamped bar. Industrial/workwear. */
[data-plate-shelf="plaque"] .shelf-tag {
  border: none;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 12px;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}
[data-plate-shelf="plaque"] .shelf-tag .st-sku {
  grid-column: 1 / -1;
  order: -1;
  color: var(--accent);
}
[data-plate-shelf="plaque"] .shelf-tag .st-title {
  font-family: var(--display);
  font-size: 17px;
  text-transform: var(--display-case);
  letter-spacing: var(--display-tracking);
}
[data-plate-shelf="plaque"] .st-soldout { color: rgba(255, 255, 255, 0.5); }

/* spec — a drafting caption. Rule above, mono everything, no fill. */
[data-plate-shelf="spec"] .shelf-tag {
  border: none;
  border-top: 1px solid var(--ink);
  background: none;
  padding: 9px 0 0;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
}
[data-plate-shelf="spec"] .shelf-tag .st-sku {
  grid-column: 1 / -1;
  order: -1;
  letter-spacing: 0.14em;
}
[data-plate-shelf="spec"] .shelf-tag .st-title {
  font-weight: 600;
  font-size: 13px;
}
[data-plate-shelf="spec"] .shelf-tag .st-price {
  font-variant-numeric: tabular-nums;
}

.shelf-tag .st-sku {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.shelf-tag .st-title {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-tag .st-price {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.st-soldout { color: var(--muted); text-decoration: line-through; }

/* ---------- PDP ---------- */

.pdp {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
}

.pdp-media {
  border: var(--line);
  background: var(--paper-deep);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pdp-media img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info h1 { font-size: clamp(30px, 5vw, 52px); margin: 8px 0 10px; }

.pdp-price {
  font-family: var(--mono);
  font-size: 20px;
  margin-bottom: 16px;
}

.pdp-desc { color: var(--muted); margin-bottom: 20px; white-space: pre-line; }

.qty-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.qty-row input { width: 84px; text-align: center; }
.qty-row .btn { flex: 1; justify-content: center; }

.back-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
}

/* ---------- cart drawer ---------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 19, 18, 0.45);
}

.cart-drawer {
  position: fixed;
  z-index: 61;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--paper);
  border-left: var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.22s ease;
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: var(--line);
}

.cart-drawer-head h2 { font-size: 26px; }

.drawer-close {
  border: 2px solid var(--ink);
  background: var(--paper);
  width: 38px;
  height: 38px;
  font-size: 20px;
  line-height: 1;
}

.drawer-close:hover { background: var(--ink); color: var(--paper); }

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 14px 18px; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px 0;
  border-bottom: var(--line-soft);
}

.cart-line-title { font-weight: 700; font-size: 14px; }
.cart-line-sku { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.cart-line-price { font-family: var(--mono); font-size: 13px; text-align: right; }

.cart-line-controls { display: flex; gap: 6px; align-items: center; }

.cart-line-controls button {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  width: 26px;
  height: 26px;
  font-weight: 800;
}

.cart-line-controls button:hover { background: var(--ink); color: var(--paper); }
.cart-line-qty { font-family: var(--mono); font-size: 13px; min-width: 2ch; text-align: center; }

.cart-empty { color: var(--muted); padding: 24px 0; }

.cart-drawer-foot { border-top: var(--line); padding: 14px 18px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- checkout (money surface: calm) ---------- */

.checkout { max-width: 640px; }

.checkout h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 4px; }

.checkout .mono-label { display: block; margin-bottom: 20px; }

.checkout-form { display: grid; gap: 14px; }

.checkout-summary { border: var(--line); padding: 14px 16px; margin-bottom: 18px; }

.checkout-summary .cs-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
}

.checkout-summary .cs-total {
  border-top: var(--line-soft);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 800;
}

.pay-methods { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }

.pay-method {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
}

.pay-method small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pay-method[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.pay-method[aria-pressed="true"] small { color: rgba(236, 231, 219, 0.7); }

.pay-method:disabled { opacity: 0.4; }

.checkout-error {
  border: 2px solid var(--ink);
  background: var(--paper-deep);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- thanks / crypto instructions ---------- */

.thanks { max-width: 640px; }
.thanks h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 10px; }

.order-status-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 6px 10px;
  margin: 8px 0 18px;
}

.order-status-chip.paid { box-shadow: inset 0 0 0 2px var(--mint); }

.crypto-box { border: var(--line); padding: 16px; margin: 16px 0; }
.crypto-box h3 { font-size: 20px; margin-bottom: 8px; }
.crypto-box ol { padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.crypto-box ol li { margin-bottom: 6px; }

/* ---------- footer ---------- */

.store-footer {
  border-top: var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 22px 0;
}

.store-footer .mono-label { color: rgba(236, 231, 219, 0.65); }
.store-footer .powered { color: rgba(236, 231, 219, 0.65); }
.store-footer .footer-seal { mix-blend-mode: screen; }

.store-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.store-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: center;
}

/* ---------- misc ---------- */

.notice { color: var(--muted); padding: 30px 0; }

@media (max-width: 720px) {
  .pdp { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
}

/* ---------- platform: search + tag chips ---------- */

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: -6px 0 22px;
}

#catalogSearch {
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
  min-width: 220px;
}

#catalogSearch:focus { outline: none; box-shadow: 3px 3px 0 var(--mint); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-chip {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  cursor: pointer;
}

.tag-chip.on { background: var(--ink); color: var(--paper); }
.tag-chip:hover { box-shadow: 2px 2px 0 var(--mint); }

/* ---------- platform: variant picker ---------- */

.variant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.variant-opt {
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 9px 14px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.variant-opt.on { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--mint); }
.variant-opt[data-out] { opacity: 0.45; text-decoration: line-through; }
.variant-opt small { font-size: 8px; letter-spacing: 0.14em; }

/* ---------- platform: promo code ---------- */

.promo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
}

.promo-row input {
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 12px;
  width: 180px;
}

.promo-msg { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--muted); }

.cs-discount span:last-child { color: var(--ink); font-weight: 800; }
.cs-discount span:first-child { font-family: var(--mono); letter-spacing: 0.1em; }

/* ---------- platform: sandbox preview chrome ---------- */

.sandbox-strip {
  background: repeating-linear-gradient(
    -45deg,
    var(--ink), var(--ink) 14px,
    var(--mint) 14px, var(--mint) 28px
  );
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  padding: 9px 12px;
}

body.sandbox .store-header { border-bottom: 3px dashed var(--ink); }
