/* Shop page: builds on /assets/css/site.css tokens */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-row { justify-content: space-between; }
.cart-btn { gap: 8px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: 700 12px/22px var(--font-sans); text-align: center; }
@media (max-width: 1060px) { .hide-sm { display: none !important; } }
.fine { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* product */
.shop-top { padding-block: clamp(24px, 5vw, 56px); }
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .product { grid-template-columns: minmax(0, 1fr); } }
.product-img { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-sunk); box-shadow: var(--shadow-lift); }
.product-img img { width: 100%; height: auto; }
.product-3d { position: absolute; right: 12px; bottom: 12px; }
@media (min-width: 901px) { .product-img { position: sticky; top: 92px; } }
.product-info { display: grid; gap: 18px; }
.product-info h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.specs div { background: var(--surface-raised); padding: 10px 12px; }
.specs dt { font: 700 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.specs dd { margin: 2px 0 0; font-size: 15px; }
@media (max-width: 520px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kit-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.kit-choice legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.kit-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface-raised); border: 1.5px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.kit-opt.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.kit-opt input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.kit-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.kit-top { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.kit-price { font-weight: 600; }
.kit-blurb { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.kit-body ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.kit-body li::before { content: "✓ "; color: var(--success); font-weight: 700; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check span { display: grid; gap: 2px; }
.check small { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.check b { font-weight: 600; margin-left: 4px; }

.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.price-block { display: grid; }
.price { font: 700 32px/40px var(--font-mono); }
.price-note { font-size: 13px; color: var(--ink-muted); }

/* parts */
.parts-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.parts-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.parts-filter { display: grid; gap: 10px; margin-bottom: 14px; }
.parts-filter input[type=search] { font: 400 16px/24px var(--font-sans); padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); max-width: 420px; width: 100%; }
.colour-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/18px var(--font-sans); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.cchip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cchip i, .pt-colour i, .pt-name .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); flex: none; display: inline-block; }
.parts-table { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.pt-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 132px 72px 84px; align-items: center; gap: 8px; padding: 6px 14px; border-top: 1px solid var(--line); }
.pt-headrow { border-top: 0; font: 700 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-sunk); padding-block: 10px; }
.pt-colour { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--surface-sunk) 55%, transparent); border-top: 1px solid var(--line); }
.pt-num { text-align: right; justify-self: end; }
.pt-inc { text-align: center; }
.pt-inc input { width: 18px; height: 18px; accent-color: var(--brand); }
.pt-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-name span { display: grid; min-width: 0; }
.pt-name b { font-weight: 600; font-size: 15px; }
.pt-name small { color: var(--ink-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-qty { display: inline-flex; align-items: center; gap: 4px; }
.pt-qty input { width: 52px; text-align: center; font: 500 14px/20px var(--font-mono); padding: 5px 2px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); -moz-appearance: textfield; }
.pt-qty input::-webkit-inner-spin-button, .pt-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); font: 600 16px/1 var(--font-sans); cursor: pointer; }
.step:disabled { opacity: .35; cursor: default; }
.pt-each { color: var(--ink-muted); font-size: 13px; }
.pt-total { font-size: 14px; font-weight: 500; }
.pt-row.off .pt-name, .pt-row.off .pt-total, .pt-row.off .pt-each { opacity: .45; }
.pt-row.off .pt-name b { text-decoration: line-through; }
.locked .pt-qty input { border-color: transparent; background: transparent; }
.locked .step, .locked .pt-inc input { visibility: hidden; }
@media (max-width: 640px) {
  .pt-row { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "inc name name" "inc qty total"; row-gap: 6px; padding-inline: 10px; }
  .pt-headrow { display: none; }
  .pt-inc { grid-area: inc; } .pt-name { grid-area: name; } .pt-qty { grid-area: qty; justify-self: start; } .pt-total { grid-area: total; } .pt-each { display: none; }
}

/* shipping table */
.ship-table { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; max-width: 640px; margin-bottom: 12px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.st-row span:not(:first-child) { text-align: right; }
.st-head { border-top: 0; background: var(--surface-sunk); font: 700 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }

/* cart drawer */
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); border: 0; padding: 0; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-lift); }
.drawer::backdrop { background: rgba(20, 26, 42, .55); }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 24px; }
.drawer .x, .checkout .x { width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 22px; }
.checkout .x { position: absolute; top: 12px; right: 12px; }
.cart-items { flex: 1; overflow: auto; padding: 8px 20px; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info price" "img qty rm"; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { grid-area: img; width: 72px; height: 46px; object-fit: cover; border-radius: 6px; align-self: start; }
.ci-info { grid-area: info; display: grid; } .ci-info small { color: var(--ink-muted); font-size: 13px; }
.ci-price { grid-area: price; font-weight: 600; }
.ci-qty { grid-area: qty; display: inline-flex; align-items: center; gap: 8px; }
.ci-rm { grid-area: rm; justify-self: end; background: none; border: 0; color: var(--brand-text); font: 600 13px/18px var(--font-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cart-empty { padding: 32px 20px; display: grid; gap: 12px; justify-items: start; color: var(--ink-muted); }
.cart-foot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--surface-raised); }
.field select { font: 400 15px/22px var(--font-sans); padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%; }
.field .lbl { font-weight: 600; font-size: 14px; }
.totals { margin: 0; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.totals dt { color: var(--ink-muted); } .totals dd { margin: 0; }
.totals .grand { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; font-size: 18px; }
.totals .grand dt { color: var(--ink); }
.totals .gst { font-size: 13px; }
.totals.small div { font-size: 14px; } .totals.small .grand { font-size: 16px; }

/* checkout */
.checkout { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.checkout form { padding: 28px; display: grid; gap: 14px; }
.co-step { display: grid; gap: 14px; }
.co-step[hidden] { display: none; }
.co-step p { color: var(--ink-muted); }
.co-step p b { color: var(--ink); }
.steps { display: flex; gap: 8px; font: 700 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.steps span { padding: 4px 10px; border-radius: 999px; background: var(--surface-sunk); }
.steps span.on { background: var(--ink); color: var(--surface); }
.checkout .field-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr); gap: 10px; }
@media (max-width: 480px) { .checkout .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .checkout .field-row .field:first-child { grid-column: 1 / -1; } .checkout form { padding: 22px 18px; } }
.checkout .field input { width: 100%; min-width: 0; }
.opt { color: var(--ink-muted); font-weight: 400; }
.checkout .err { color: var(--danger); font-weight: 600; }
.step { display: inline-grid; place-items: center; padding: 0; min-height: 0; line-height: 1; box-shadow: none; }
.check span { display: block; }
.check small { display: block; margin-top: 2px; }
.specs dd { white-space: nowrap; }
