.commerce { padding-block: clamp(2rem,6vw,6rem); max-width: 76rem; }
.commerce h1 { margin-bottom: 1rem; }
.commerce h2 { margin: .4rem 0; }
.commerce #message { margin-block: .75rem; }
.commerce a { text-underline-offset: .2em; }
.commerce button,.commerce input,.commerce select,.commerce textarea { font: inherit; border: 1px solid var(--rule); border-radius: 0; padding: .65rem; }
.commerce button { background: var(--ink); color: var(--paper); min-height: 44px; cursor: pointer; }
.commerce button:disabled { opacity: .5; cursor: default; }
.commerce label { display: grid; gap: .35rem; min-width: 0; }
.commerce label:has(input[type=checkbox]) { display: flex; align-items: start; }
.commerce input,.commerce select,.commerce textarea { background: #fff; max-width: 100%; min-width: 0; }
.commerce form,.commerce .stack,.commerce fieldset { display: grid; gap: .9rem; min-width: 0; }
.commerce fieldset { border: 1px solid var(--rule); }
.commerce .columns { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: clamp(1.25rem,5vw,4rem); align-items:start; }
.commerce .row { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.commerce .rule { padding-block: .8rem; border-block-end: 1px solid var(--rule); }
.commerce .gallery-image { width: 100%; aspect-ratio: 1; object-fit: contain; background:#e8e8e6; }
.commerce dialog { max-width: min(92vw,48rem); max-height: 92vh; border: 1px solid var(--rule); padding: .5rem; }
.commerce dialog img { max-height: 75vh; max-width:100%; width:auto; margin:auto; }
.commerce .qr { max-width: 320px; width: 100%; }
.commerce [hidden] { display: none !important; }
@media(max-width:43rem) { .commerce .columns { grid-template-columns: 1fr; } }


.product-swatch img { width:3.6rem; margin-inline:auto; }
.cart-summary { position:sticky; top:6rem; padding:1.25rem; border:1px solid var(--rule); background:var(--paper); }
.cart-thumb { width:5.2rem; aspect-ratio:1; object-fit:contain; }
@media(max-width:43rem) { .cart-summary { position:static; } }

/* TRACE Business Proposal p.26, shared charcoal artwork. */
.trace-product-background,.trace-timeline-background {
  min-height:100vh;
  background:#303030 url("/assets/bp-timeline.webp") top center / 94px auto repeat fixed;
  color:var(--paper);
}
.product-page .commerce { max-width:74rem; }
.product-page .commerce > h1 { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.product-page .item-layout { grid-template-columns:minmax(0, 1.95fr) minmax(0,1fr); gap:clamp(1rem,3vw,2.8rem); }
.commerce #zoom { display:block; width:100%; padding:0; }
.item-details { position:sticky; top:1rem; padding:clamp(1rem,2vw,1.75rem); background:#efefe5df; box-shadow:0 10px 40px #15151518; }
.item-details .item-name { font-size:clamp(1.65rem,3.2vw,2.7rem); line-height:1; }
.commerce .product-swatch { background:#e2e2d9; color:#161616; }
.commerce .product-swatch[aria-pressed="true"] { outline:2px solid #161616; outline-offset:2px; }
.checkout-page .commerce { max-width:76rem; }
.checkout-page .commerce > h1 { text-align:center; color:var(--paper); font-size:clamp(2rem,4vw,3.4rem); margin-bottom:1.8rem; }
.checkout-page #message { color:var(--paper); }
.checkout-page .columns { grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:clamp(1rem,2.8vw,2rem); }
.checkout-page #checkout, .checkout-items, .checkout-page .cart-summary {
  background:#efefe5; border:1px solid #ffffff45; padding:clamp(1rem,2.6vw,1.75rem); box-shadow:0 8px 24px #0003;
}
.checkout-page .cart-summary { top:1rem; }
.checkout-page .cart-summary > p,.checkout-page #payable { border-bottom:1px solid var(--rule); padding-bottom:.7rem; }
.checkout-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.8rem; align-items:center; padding:.7rem 0; border-top:1px solid var(--rule); }
.checkout-item p { margin-top:.25rem; font-size:.875rem; }
.checkout-item > :last-child { justify-self:end; }
.checkout-item .cart-thumb { width:3.8rem; }
@media(max-width:43rem) {
  .product-page .item-layout,.checkout-page .columns { grid-template-columns:1fr; }
  .item-details { position:static; }
  .checkout-item { grid-template-columns:auto minmax(0,1fr); }
  .checkout-item > :last-child { grid-column:2; justify-self:start; }
}

.commerce {
  --trace-editorial-rule:#9a9a8d65;
  --trace-control-ink:#161616;
  --trace-control-paper:#efefe5;
  --trace-heading-weight:830;
  padding-bottom:6rem;
}
.commerce :is(h1,h2) { font-weight:var(--trace-heading-weight); font-stretch:76%; }
.commerce :is(button,input,select,textarea) { font-family:Archivo,sans-serif; }
.commerce :is(button,input,select,textarea,a):focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.commerce button { font-weight:720; }
.commerce .pixel { font-family:"Geist Pixel",monospace; font-weight:400; }
.trace-timeline-background .commerce > h1 { font-family:"Geist Pixel",monospace; font-weight:400; letter-spacing:-.045em; }
.trace-timeline-background :is(.cart-summary,.checkout-items),
.trace-timeline-background #checkout {
  background:#1a1a1ad9; color:var(--paper); border:1px solid var(--trace-editorial-rule); box-shadow:none;
}
.trace-timeline-background :is(fieldset,.checkout-item,#payable,.cart-summary > p,.rule) { border-color:var(--trace-editorial-rule); }
.trace-timeline-background :is(input,select,textarea) { color:var(--trace-control-ink); background:var(--trace-control-paper); }
.trace-timeline-background :is(#place-order,#review) { color:var(--ink); background:var(--paper); }
.trace-timeline-background .cart-summary { overflow-wrap:anywhere; }
.product-page .commerce > #message:not(:empty) { background:var(--paper); color:var(--ink); padding:.6rem; }
@media(max-width:43rem) {
  .trace-product-background,.trace-timeline-background { background-attachment:scroll; }
}
.product-page .item-details { border-radius:1rem; border:1px solid #ffffff38; background:#242424e8; color:var(--paper); }
.product-page .product-swatch[aria-pressed="true"] { outline-color:var(--paper); }
.item-spec { display:grid; grid-template-columns:auto 1fr; gap:.6rem 1rem; border-block-start:1px solid #ffffff38; padding-top:1rem; }
.item-spec dd { margin:0; }

/* Shipping groups are separated by rules over the existing Timeline texture. */
.checkout-page .commerce > h1 {text-align:left}
.checkout-page .checkout-progress {font-family:"Geist Pixel",monospace;justify-content:flex-end}
.checkout-page .checkout-progress span {color:#cecec3}
.checkout-page #checkout {
  background:transparent;
  border:0;
  color:var(--paper);
  padding:0;
  gap:clamp(1.5rem,4vw,2.5rem);
}
.checkout-page #checkout h2 {
  margin:0;
  font-size:clamp(1.05rem,2.25vw,1.45rem);
  text-transform:uppercase;
  line-height:1.15;
}
.shipping-section {
  display:grid;
  gap:1rem;
  padding-block-start:clamp(1.25rem,3vw,2rem);
  border-block-start:1px solid var(--trace-editorial-rule);
}
.shipping-section fieldset { margin:0; padding:0; border:0; }
.shipping-section .shipping-choices { gap:.2rem; }
.shipping-section .delivery-choices { display:flex; flex-wrap:wrap; column-gap:clamp(.65rem,3vw,1.75rem); }
.shipping-section .shipping-choices label {
  display:flex;
  align-items:center;
  gap:.6rem;
  min-height:44px;
  width:fit-content;
  cursor:pointer;
}
.delivery-choices label,.pickup-notice strong,#pickup-details > strong { text-transform:uppercase; }
.shipping-choices label:has(:disabled) { cursor:default; color:#c2c2b9; }
.shipping-choices label:not(:has(:disabled)):hover { text-decoration:underline; text-underline-offset:.24em; }
.checkout-page #checkout .shipping-choices input[type=radio] {
  appearance:none;
  inline-size:1.15rem;
  block-size:1.15rem;
  flex:none;
  padding:0;
  margin:0;
  border:1px solid currentColor;
  border-radius:50%;
  color:inherit;
  background:transparent;
}
.checkout-page #checkout .shipping-choices input:checked { background:radial-gradient(circle,currentColor 0 42%,transparent 47%); }
.pickup-notice { display:grid; gap:.3rem; }
.pickup-notice time { font-weight:700; }
.pickup-notice p { max-width:52ch; }
.checkout-page #checkout .form-note {margin:0;color:#d4d4c9}
.checkout-page .shipping-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1.2rem 1.4rem;
}
.checkout-page #checkout :is(.field-wide,.delivery-actions) {grid-column:1 / -1}
.checkout-page #checkout :is(input:not([type=checkbox],[type=radio]),select,textarea) {
  width:100%;
  background:#16161642;
  border-bottom:1px solid #b3b3ab;
  color:var(--paper);
  color-scheme:dark;
  padding-inline:.35rem;
  min-height:44px;
}
.checkout-page #checkout select option {background:#242424;color:var(--paper)}
.checkout-page #checkout :is(input,textarea)::placeholder {color:#c8c8bd}
.checkout-page #region-info:empty {display:none}
.checkout-page.trace-timeline-background .cart-summary {border-width:1px 0 0;border-radius:0;background:#16161664;top:6rem}
.checkout-page #review-order {background:var(--paper);color:var(--ink)}

/* Product gallery rail and selection controls use existing TRACE assets. */
.product-page .item-media {grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.75rem}
.product-page #media-thumbs {flex-direction:column;align-items:stretch}
.product-page #media-thumbs .product-swatch {font-size:.7rem;padding:.3rem}
.product-page .item-details {border-radius:0;box-shadow:none;top:6rem}
.product-page .item-back {text-decoration:underline;text-underline-offset:.2em}
.product-page #item-price {font-size:1.35rem}
.product-page .native-size {position:absolute;inline-size:1px;block-size:1px;clip-path:inset(50%);overflow:hidden}
.product-page .native-size:focus-within {position:static;inline-size:auto;block-size:auto;clip-path:none}
.product-page #size-options button {
  display:grid; place-items:center; flex:0 0 48px; inline-size:48px; block-size:48px;
  padding:0; border:1px solid #a6a69b; border-radius:8px; background:transparent;
  transition:border-color .15s,background-color .15s;
}
.product-page #size-options button:not(:disabled):hover {border-color:var(--paper)}
.product-page #size-options button:disabled {text-decoration:line-through}
.product-page #size-options button:focus-visible {outline-color:var(--paper)}
.product-page #size-options button[aria-pressed=true] {background:var(--paper);color:var(--ink)}
.product-page #add > button {background:var(--paper);color:var(--ink)}
@media(max-width:43rem) {
  .checkout-page .checkout-progress {justify-content:flex-start}
  .checkout-page .shipping-fields {grid-template-columns:1fr}
  .product-page .item-media {grid-template-columns:1fr}
  .product-page #media-thumbs {grid-row:2;flex-direction:row}
}

/* The bag uses the TRACE Timeline texture as the backdrop for a white editorial sheet. */
.bag-page .commerce { max-width:70rem; padding-block:clamp(1rem,3vw,2.5rem) 3rem; }
.bag-page .masthead { display:none; }
.bag-page #message { color:var(--paper); }
.bag-page #message:empty { display:none; }
.bag-sheet { background:#fff; color:var(--ink); --bag-rule:#dcdcd7; --bag-muted:#575753; }
.bag-header,.bag-main,.bag-summary,.bag-empty { padding-inline:clamp(1rem,3vw,2.1rem); }
.bag-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding-block:.85rem; border-bottom:1px solid var(--bag-rule); }
.bag-header h1 { margin:0; font-size:clamp(1.5rem,3.5vw,2.45rem); line-height:1; text-transform:uppercase; }
.bag-header-actions,.bag-count,.bag-close { display:flex; align-items:center; }
.bag-header-actions { gap:.35rem; }
.bag-count { gap:.45rem; min-height:44px; border:1px solid var(--bag-rule); padding:.35rem .6rem; white-space:nowrap; }
.bag-close { justify-content:center; min-width:44px; min-height:44px; font-size:2rem; line-height:1; text-decoration:none; }
.bag-content { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(0,1fr); }
.bag-main,.bag-summary { padding-block:clamp(1.2rem,3vw,2rem); }
.bag-main h2,.bag-summary h2 { margin:0 0 .65rem; font-size:clamp(1.1rem,2.8vw,1.55rem); text-transform:uppercase; }
.bag-preorder { padding-bottom:1.2rem; border-bottom:1px solid var(--bag-rule); }
.bag-preorder p { color:var(--bag-muted); max-width:57ch; }
.bag-preorder p+p { margin-top:.45rem; }
.bag-line { display:grid; grid-template-columns:clamp(4.15rem,13vw,6rem) minmax(0,1fr) auto; align-items:start; gap:.55rem .85rem; padding-block:1rem; border-bottom:1px solid var(--bag-rule); }
.bag-thumbnail { width:100%; aspect-ratio:4/5; object-fit:contain; background:#efefe9; }
.bag-description h3 { margin:.25rem 0; font-size:1rem; line-height:1.15; text-transform:uppercase; }
.bag-description p { color:var(--bag-muted); font-size:.87rem; }
.bag-description strong { display:block; margin-top:.45rem; }
.bag-description .bag-collection { font-size:.7rem; }
.bag-controls { display:grid; justify-items:end; align-self:end; }
.bag-stepper { display:flex; align-items:center; justify-content:end; text-align:center; font-variant-numeric:tabular-nums; max-width:100%; }
.bag-stepper span { min-width:1.25rem; overflow-wrap:anywhere; }
.commerce .bag-controls button { background:transparent; color:var(--ink); border:0; }
.bag-stepper button { min-width:44px; padding:.3rem; font-size:1.15rem; }
.commerce .bag-controls .bag-remove { padding-inline:.4rem; font-weight:400; font-size:.8rem; text-decoration:underline; }
.bag-extras { background:#f1f1ee; margin-top:1.2rem; padding:.9rem; }
.bag-suggestions { display:grid; gap:.5rem; }
.bag-suggestion { background:#fff; display:grid; grid-template-columns:3.25rem minmax(0,1fr) auto; align-items:center; gap:.65rem; padding:.5rem; }
.bag-suggestion img { width:100%; aspect-ratio:1; object-fit:contain; }
.bag-suggestion a { display:inline-flex; align-items:center; min-height:44px; padding-inline:.3rem; white-space:nowrap; }
.bag-summary { border-left:1px solid var(--bag-rule); }
.bag-totals { margin:0; }
.bag-totals > div { display:flex; justify-content:space-between; align-items:baseline; gap:.7rem; padding-block:.38rem; }
.bag-totals dd { margin:0; text-align:right; }
.bag-totals .bag-total { margin-top:.45rem; padding-top:.8rem; border-top:1px solid currentColor; font-weight:800; }
.bag-action { position:sticky; bottom:0; z-index:2; padding:.75rem clamp(.65rem,3vw,2.1rem) max(.75rem,env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--bag-rule); }
.bag-action a { display:flex; align-items:center; justify-content:center; gap:.65rem; min-height:54px; background:var(--ink); color:#fff; text-transform:uppercase; font-weight:770; text-decoration:none; }
.bag-action a:hover { background:#343434; }
.bag-empty { padding-block:1.5rem; }
.bag-page { scroll-padding-bottom:6rem; }
.checkout-page #checkout h1 { margin:0; text-transform:uppercase; font-size:clamp(1.65rem,4vw,3.25rem); }
.checkout-page .checkout-progress a { color:inherit; }
.checkout-page #review-panel .bag-totals { margin-bottom:.5rem; }
@media(max-width:43rem) {
  .bag-page .commerce { width:calc(100% - 1rem); }
  .bag-content { grid-template-columns:minmax(0,1fr); }
  .bag-main { padding-bottom:0; }
  .bag-summary { border-left:0; }
  .bag-line { grid-template-columns:4.15rem minmax(0,1fr); }
  .bag-thumbnail { grid-row:span 2; }
  .bag-controls { grid-column:2; display:flex; flex-wrap:wrap; justify-content:space-between; }
  .bag-count-label { display:none; }
  .bag-page .bag-action { position:fixed; inset-inline:.5rem; bottom:0; }
  .bag-page:has(.bag-action) .commerce { padding-bottom:calc(6rem + env(safe-area-inset-bottom)); }
}

.payment-page #order-title {display:none}
.checkout-page .payment-main {display:grid;gap:1.25rem;min-width:0;}
.payment-main h1 {font-size:clamp(1.65rem,4vw,3.25rem);line-height:1;margin:0;text-transform:uppercase}
.payment-main .sim-payment {border-block:1px solid var(--trace-editorial-rule)}
.payment-main .sim-payment img {margin-bottom:.55rem}
.payment-main .sim-payment .pixel {margin:0}
.payment-main #report {padding-top:1rem;border-top:1px solid var(--trace-editorial-rule)}
.payment-main input[type=file] {width:100%;min-height:44px;border:0;border-bottom:1px solid #b3b3ab;border-radius:0;background:#16161642;color:var(--paper)}
.payment-main button {border-radius:0}
.payment-main #submit-payment {background:var(--paper);color:var(--ink)}
.payment-page .payment-summary h2 {font-size:clamp(1.2rem,2.5vw,1.65rem)}
.payment-summary .checkout-item {grid-template-columns:auto minmax(0,1fr)}
.payment-summary .checkout-item > :last-child {grid-column:auto;justify-self:start;min-width:0;overflow-wrap:anywhere}

.order-code-reminder {
  display:grid;
  gap:.7rem;
  border-block:1px solid var(--trace-editorial-rule);
  padding:clamp(1rem,3vw,1.55rem) 0;
  margin-bottom:1.25rem;
}
.order-code-reminder h2 { margin:0; font-size:1rem; text-transform:uppercase; }
.order-code-reminder strong { font-size:clamp(1.3rem,5vw,2.65rem); overflow-wrap:anywhere; line-height:1.1; }
.order-code-reminder.compact strong { font-size:1.2rem; }
.order-code-reminder #copy-reminder,.receipt-choose { background:var(--paper); color:var(--ink); }
.order-code-reminder #dismiss-reminder { border:1px solid var(--trace-editorial-rule); }
.receipt-drop {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border:1px solid var(--trace-editorial-rule);
  background:#16161678;
}
.receipt-drop::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:url("/assets/trace-primary.svg") center / 88% auto no-repeat;
  filter:brightness(0) invert(1) blur(7px);
  opacity:.15;
  pointer-events:none;
}
.receipt-drop:is(:hover,:focus-within,.is-dragover) { border-color:var(--paper); }
.receipt-drop:focus-within { outline:2px solid var(--paper); outline-offset:3px; }
.receipt-drop .receipt-drop-label {
  display:flex; align-items:center; justify-content:center; flex-direction:column;
  gap:.7rem; min-height:260px; padding:1rem; text-align:center; cursor:pointer;
}
.receipt-drop-label strong,.receipt-choose { text-transform:uppercase; }
.receipt-choose { padding:.65rem 1.1rem; font-weight:720; min-height:44px; display:grid; place-items:center; }
.receipt-drop[aria-busy=true] .receipt-drop-label { cursor:wait; }
.receipt-file { position:absolute; width:1px; height:1px; clip-path:inset(50%); }
#selected-receipt { overflow-wrap:anywhere; }
@media(max-width:43rem) { .receipt-drop .receipt-drop-label { min-height:205px; } }

.catalog-preview-item .catalog-missing {
  min-height: 15rem; display: grid; place-items: center; border: 1px solid #ffffff45;
}

.product-order-form {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  width: fit-content;
  min-height: 48px;
  padding: .7rem 1.1rem;
  border: 1px solid #a9cbe0;
  background: #b6d4e7;
  color: #141414;
  text-decoration: none;
  font-weight: 750;
}
.product-order-form:is(:hover,:focus-visible) { background: #d0e5f0; color: #141414; }
.product-order-form:focus-visible { outline: 2px solid #5790b2; outline-offset: 3px; }
