/* Layout: the main site's proof-sheet look. Product grid on one column of wraps; product
   detail and cart open as overlays (detail centered, cart sliding from the right). */
:root {
  --paper: #F3F6F6; --ink: #14313A; --muted: #56707A; --line: #D3DEDF; --card: #FFFFFF;
  --teal: #1F4E5F; --mustard: #F2B134; --on-mustard: #1E2A2E; --good-bg: #E3F2E8; --good: #2F7A4F;
  --bad: #A33A2E; --shade: rgba(10, 25, 30, .45);
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0E2127; --ink: #E4EDEE; --muted: #93AAB1; --line: #25424B; --card: #142E36;
  --teal: #8CC3D2; --good-bg: #173A28; --good: #7FD3A0; --bad: #F2948A; --shade: rgba(0, 0, 0, .6); color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #0E2127; --ink: #E4EDEE; --muted: #93AAB1; --line: #25424B; --card: #142E36;
  --teal: #8CC3D2; --good-bg: #173A28; --good: #7FD3A0; --bad: #F2948A; --shade: rgba(0, 0, 0, .6); color-scheme: dark }

* { box-sizing: border-box }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--font-body) }
button, select { font: inherit; color: inherit }
a { color: inherit }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important } }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(16px, 4vw) }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
.loading, .error { padding-block: 24px }
.error { color: var(--bad) }

.top { border-bottom: 1px solid var(--line) }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; flex-wrap: wrap }
.brand { font: 800 1.7rem/1 var(--font-display); text-decoration: none; letter-spacing: .02em }
nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-weight: 600 }
nav a { text-decoration: none }
nav a:hover { color: var(--teal) }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .7em 1.25em; border-radius: 3px;
       font-weight: 600; text-decoration: none; border: 2px solid var(--ink); background: transparent; cursor: pointer }
.btn.primary { background: var(--mustard); border-color: var(--mustard); color: var(--on-mustard) }
.btn:disabled { opacity: .5; cursor: not-allowed }
.btn.wide { width: 100% }
.cart-btn { padding: .45em .9em }
.count { background: var(--ink); color: var(--paper); border-radius: 99px; font: 500 .75rem/1 var(--font-mono); padding: .3em .55em }

.notice { margin-top: 20px; padding: 14px 16px; border-radius: 4px; background: var(--card); border: 1px solid var(--line) }
.notice.good { background: var(--good-bg); border-color: transparent; color: var(--good) }
.notice a { font-weight: 600 }

.intro { padding-block: clamp(28px, 5vw, 56px) 24px }
h1 { font: 800 clamp(2.6rem, 6vw, 4.2rem)/.95 var(--font-display); text-transform: uppercase; margin: 0 0 .2em }
.intro p { color: var(--muted); margin: 0; max-width: 40em }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 28px; padding-bottom: 64px }
.item { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.pic, .detail-pic, .line-pic { background: var(--card); border: 1px solid var(--line); border-radius: 4px; display: grid;
       place-items: center; aspect-ratio: 4 / 5; overflow: hidden; max-width: 100%; color: var(--ink) }
.pic { cursor: pointer; padding: 0; transition: transform .2s }
.pic:hover { transform: translateY(-3px) }
.photo { width: 100%; height: 100%; object-fit: cover }
.tee { width: 78% }
.tee-text { font: 800 7px var(--font-display); letter-spacing: .3px }
.item h3 { margin: 8px 0 0; font-size: 1.05rem }
.meta { font: 500 .78rem/1.4 var(--font-mono); color: var(--muted) }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px }
.price { font-weight: 600; font-variant-numeric: tabular-nums }
.link { background: none; border: 0; padding: 0; color: var(--teal); font-weight: 600; text-decoration: underline;
        text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer }
.empty-shop { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 64px }

.overlay { position: fixed; inset: 0; background: var(--shade); z-index: 20; display: flex; align-items: center;
           justify-content: center; padding: 16px }
.close { position: absolute; top: 10px; right: 10px; background: var(--card); border: 1px solid var(--line); width: 36px;
         height: 36px; border-radius: 50%; cursor: pointer }
.detail { position: relative; background: var(--paper); border-radius: 6px; width: min(100%, 920px); max-height: 100%;
          overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 24px }
.detail h2 { font: 800 clamp(2rem, 4vw, 2.8rem)/1 var(--font-display); text-transform: uppercase; margin: 6px 0 }
.detail .price { font-size: 1.3rem }
.eyebrow { font: 500 .75rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.desc { color: var(--muted) }
.opt-label { margin: 18px 0 8px; font-weight: 600 }
.opt-label span { font-weight: 400; color: var(--muted); margin-left: 6px }
.opt-label .hint { color: var(--teal) }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 8px }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); border: 2px solid var(--line); cursor: pointer }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 3px }
.size { min-width: 52px; padding: .5em .7em; border: 1.5px solid var(--line); background: var(--card); border-radius: 3px; cursor: pointer;
        font-weight: 600 }
.size.on { border-color: var(--ink); background: var(--ink); color: var(--paper) }
.buy-row { display: flex; gap: 10px; margin-top: 22px }
.buy-row select { padding: .6em; border: 1.5px solid var(--line); border-radius: 3px; background: var(--card) }
.buy-row .btn { flex: 1 }
.fine { font-size: .82rem; color: var(--muted); margin: 10px 0 0 }
.center { text-align: center }

.overlay:has(.cart) { justify-content: flex-end; align-items: stretch; padding: 0 }
.cart { position: relative; background: var(--paper); width: min(100%, 420px); height: 100%; overflow-y: auto; padding: 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding-top: env(safe-area-inset-top, 0px) }
.cart-head h2 { font: 800 2rem/1 var(--font-display); text-transform: uppercase; margin: 0 }
.cart-head .close { position: static }
.lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px }
.lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start }
.line-pic { aspect-ratio: 4 / 5 }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px }
.qty button { width: 28px; height: 28px; border: 1.5px solid var(--line); background: var(--card); border-radius: 3px; cursor: pointer }
.line-price { font-variant-numeric: tabular-nums; font-weight: 600 }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 8px 0 0; border-top: 1px solid var(--line); padding-top: 12px }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums }
.totals .total { font-weight: 700; font-size: 1.1rem }

footer { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: .9rem }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap }

@media (max-width: 720px) {
  .detail { grid-template-columns: minmax(0, 1fr); padding: 16px; align-self: flex-end }
  .detail-pic { max-height: 46vh; aspect-ratio: auto }
  .overlay { padding: 0 }
}
