/* ==========================================================
   Clearhold storefront styles
   Layout: display-shelf grid. Products stand on continuous
   shelf ledges; the hero is a measured drawing on a cutting-mat
   grid, copy on the left, case on the right.
   Colors are tokens; change them here to re-skin the whole site.
   ========================================================== */
:root {
  --paper: #E7EDEB;      /* page ground: cool, faintly green like acrylic */
  --shelf: #F5F8F7;      /* raised surfaces */
  --ink: #121B1A;        /* text and primary buttons */
  --ink-2: #4A5856;      /* secondary text */
  --line: #C4D0CD;       /* hairlines */
  --grid: #D3DDDA;       /* cutting-mat grid */
  --edge: #1C7668;       /* acrylic edge teal (accent) */
  --acrylic: #B5E0D7;    /* panel tint in drawings */
  --glare: #FFFFFF;
  --shadow: #0E1A18;
  --warn: #9A5A00;
  --sale: #A9372B;

  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.5rem, 1.5rem + 4.4vw, 5.1rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.7vw, 2.5rem);
  --fs-h3: 1.06rem;
  --fs-small: 0.875rem;
  --fs-label: 0.68rem;

  --r: 3px;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1616; --shelf: #152020; --ink: #E2EBE9; --ink-2: #96A6A3; --line: #2A3938;
    --grid: #1A2626; --edge: #6BCAB7; --acrylic: #4FA394; --glare: #DFF6F0;
    --shadow: #000000; --warn: #E4A33D; --sale: #F18B7D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1616; --shelf: #152020; --ink: #E2EBE9; --ink-2: #96A6A3; --line: #2A3938;
  --grid: #1A2626; --edge: #6BCAB7; --acrylic: #4FA394; --glare: #DFF6F0;
  --shadow: #000000; --warn: #E4A33D; --sale: #F18B7D;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.25rem;
  border-radius: var(--r); border: 1.5px solid var(--ink);
  font-weight: 650; font-stretch: 108%; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--edge); border-color: var(--edge); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* ---------- Notice bars ---------- */
.notice { background: var(--ink); color: var(--paper); font-size: var(--fs-small); }
.notice .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; padding-block: .6rem; }
.notice a, .notice button { color: var(--paper); }
.notice-ok { background: var(--edge); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-mark { align-self: center; width: 22px; height: 22px; flex: none; position: relative; border: 2px solid var(--ink); border-radius: 2px; }
.brand-mark::after { content: ""; position: absolute; inset: 3px; border: 1.5px solid var(--edge); border-radius: 1px; }
.brand-name { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 1.22rem; letter-spacing: -.01em; }
.brand-sub { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.nav { display: flex; gap: 1.6rem; font-size: .94rem; font-weight: 550; }
.nav a { text-decoration: none; padding-block: .3rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--edge); }
.cart-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 42px; padding: .4rem .55rem .4rem .9rem;
  background: var(--ink); color: var(--paper); border: 0; border-radius: var(--r);
  font-weight: 650; font-stretch: 108%;
}
.cart-count {
  min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem; display: inline-grid; place-items: center;
  background: var(--paper); color: var(--ink); border-radius: 2px;
  font-family: var(--mono); font-size: .72rem; font-variant-numeric: tabular-nums;
}
.cart-btn.bump .cart-count { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }
@media (max-width: 760px) {
  .nav { display: none; }
  .brand-sub { display: none; }
}
@media (max-width: 420px) {
  .top .brand-name { font-size: 1.04rem; font-stretch: 110%; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 4vw, 4rem) 0; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: var(--fs-hero); line-height: .96; letter-spacing: -.035em;
}
.hero h1 em { font-style: normal; color: var(--edge); }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-art {
  margin: 0; position: relative; min-width: 0;
  background-color: var(--shelf);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.hero-art .art-wrap { cursor: pointer; }
.hero-art figcaption {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
  padding: .7rem .9rem; border-top: 1px solid var(--line); background: var(--shelf);
}
.ruler {
  position: absolute; top: 10px; left: 12px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; color: var(--ink-2);
}
.specbar {
  list-style: none; margin: clamp(2rem, 4vw, 3.2rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.specbar li { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1rem 1.1rem 0; }
.specbar li + li { padding-left: 1rem; border-left: 1px solid var(--line); }
.specbar b { font-family: var(--display); font-stretch: 118%; font-weight: 750; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.specbar span { color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; }
  .specbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specbar li:nth-child(3) { padding-left: 0; border-left: 0; }
  .specbar li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Drawings ---------- */
.art .art-shadow { fill: var(--shadow); fill-opacity: .13; }
.art .ac-base { fill: var(--acrylic); fill-opacity: .42; }
.art .ac-face { fill: var(--acrylic); fill-opacity: .14; }
.art .ac-top { fill-opacity: .26; }
.art .ac-side { fill-opacity: .2; }
.art .ac-edge { fill: none; stroke: var(--edge); stroke-width: 1.5; stroke-linejoin: round; }
.art .ac-thin { fill: none; stroke: var(--edge); stroke-width: .8; stroke-opacity: .5; }
.art .ac-back { stroke: var(--edge); stroke-width: .9; stroke-opacity: .3; }
.art .ac-glare { fill: var(--glare); fill-opacity: .34; }
.art .ac-glare-2 { fill-opacity: .2; }
.art .ac-magnet { fill: var(--edge); fill-opacity: .75; }
.art .dim-line { stroke: var(--ink-2); stroke-width: .9; }
.art .dim-text { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; fill: var(--ink-2); }

/* ---------- Section heads ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 2rem; margin-bottom: 1.6rem; }
.section-head h2, .h2 { font-family: var(--display); font-weight: 800; font-stretch: 122%; font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.025em; }
.section-head p { color: var(--ink-2); max-width: 32rem; }

/* ---------- Shop controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.tab {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 38px; padding: .35rem .8rem;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  font-weight: 600; font-size: .92rem;
}
.tab .n { font-family: var(--mono); font-size: .66rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tab:hover { border-color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab[aria-pressed="true"] .n { color: var(--paper); opacity: .7; }
.tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.field-inline { display: flex; align-items: center; gap: .5rem; }
.input, .select {
  min-height: 40px; padding: .45rem .7rem;
  background: var(--shelf); border: 1px solid var(--line); border-radius: var(--r);
  font-size: .94rem;
}
.input:focus, .select:focus { border-color: var(--edge); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--edge) 30%, transparent); }
.search .input { width: min(17rem, 100%); }
@media (max-width: 560px) {
  .tools, .search, .search .input { width: 100%; }
  .tools .field-inline { flex: 1; }
  .tools .select { flex: 1; }
}

/* ---------- Product grid (shelves) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  column-gap: 0;
  row-gap: 3.2rem;
  padding-top: 2.4rem;
}
@media (max-width: 940px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.item { display: flex; flex-direction: column; min-width: 0; position: relative; }
.item-stage {
  position: relative; display: block; width: 100%;
  padding: .4rem 1.2rem 0; background: none; border: 0;
  border-bottom: 3px solid var(--ink);
}
.item-stage::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--shadow) 14%, transparent), transparent);
  pointer-events: none;
}
.item-stage .art, .item-stage .photo { width: 100%; aspect-ratio: 4 / 3; transition: transform .35s var(--ease); }
.item-stage .photo { object-fit: cover; border-radius: 2px 2px 0 0; }
.item-stage:hover .art, .item-stage:hover .photo { transform: translateY(-4px); }
.badges { position: absolute; top: .2rem; left: 1rem; display: flex; flex-wrap: wrap; gap: .3rem; z-index: 1; pointer-events: none; }
.badge {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .4rem; border: 1px solid currentColor; border-radius: 2px; background: var(--paper);
  color: var(--ink);
}
.badge-new { color: var(--edge); }
.badge-low { color: var(--warn); }
.badge-sale { color: var(--sale); }
.badge-out { color: var(--ink-2); }
.item-meta { display: flex; flex-direction: column; gap: .35rem; padding: 1.15rem 1.2rem 0; min-width: 0; flex: 1; }
.item-meta h3 { font-size: var(--fs-h3); font-weight: 700; font-stretch: 110%; line-height: 1.25; }
.item-meta h3 button { background: none; border: 0; padding: 0; text-align: left; font-weight: inherit; }
.item-meta h3 button:hover { color: var(--edge); }
.fits { color: var(--ink-2); font-size: var(--fs-small); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .6rem; }
.price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.price b { font-family: var(--display); font-stretch: 112%; font-weight: 750; font-size: 1.12rem; }
.price s { color: var(--ink-2); font-size: var(--fs-small); }
.price.on-sale b { color: var(--sale); }
.price .ship-note { font-size: .78rem; color: var(--ink-2); font-weight: 400; white-space: nowrap; }
.add-btn {
  min-height: 38px; padding: .35rem .85rem; border-radius: var(--r);
  background: transparent; border: 1.5px solid var(--ink); font-weight: 650; font-size: .9rem;
}
.add-btn:hover { background: var(--ink); color: var(--paper); }
.add-btn[disabled] { border-color: var(--line); color: var(--ink-2); background: transparent; cursor: not-allowed; }
.empty { padding: 3rem 0; color: var(--ink-2); }
@media (max-width: 560px) {
  .item-stage { padding-inline: .5rem; }
  .item-meta { padding-inline: .6rem; }
  .badges { left: .4rem; }
  .cat-part { display: none; }
  .buy { flex-direction: column; align-items: stretch; gap: .5rem; }
  .add-btn { width: 100%; }
  .grid { row-gap: 2.4rem; }
}

/* ---------- Fit chart ---------- */
.table-scroll { position: relative; overflow-x: auto; border-top: 2px solid var(--ink); }
.fit-table { width: 100%; border-collapse: collapse; min-width: 980px; font-size: .94rem; }
.fit-table th { text-align: left; font-family: var(--mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); padding: .9rem .8rem .7rem 0; border-bottom: 1px solid var(--line); }
.fit-table td { padding: .85rem .8rem .85rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fit-table td.dim { font-family: var(--mono); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fit-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fit-table tr:hover td { background: color-mix(in srgb, var(--shelf) 70%, transparent); }
.fit-table .link-btn { font-weight: 650; text-align: left; }
.fit-note { margin-top: 1rem; color: var(--ink-2); font-size: var(--fs-small); max-width: 46rem; }

/* ---------- Build spec ---------- */
.spec { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.spec-intro { display: flex; flex-direction: column; gap: 1rem; }
.spec-intro p { color: var(--ink-2); max-width: 28rem; }
.spec-photo { margin: .6rem 0 0; display: flex; flex-direction: column; gap: .5rem; max-width: 30rem; }
.spec-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.spec-list { margin: 0; display: grid; align-content: start; border-top: 2px solid var(--ink); }
.spec-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.spec-list dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .07em; text-transform: uppercase; color: var(--edge); padding-top: .25rem; }
.spec-list dd { margin: 0; }
.spec-list dd strong { display: block; font-weight: 700; font-stretch: 108%; margin-bottom: .15rem; }
.spec-list dd span { color: var(--ink-2); }
@media (max-width: 820px) { .spec { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: .3rem; } }

/* ---------- Custom size ---------- */
.custom {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  background-color: var(--shelf);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  border-block: 1px solid var(--line);
}
.custom-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 5vw, 4rem); }
.custom-in p { color: var(--ink-2); max-width: 36rem; margin-top: .8rem; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.contact-row .value { font-family: var(--mono); font-size: .86rem; user-select: all; word-break: break-all; }
.small-btn { min-height: 34px; padding: .3rem .7rem; border: 1px solid var(--line); background: var(--shelf); border-radius: 2px; font-size: .84rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.small-btn:hover { border-color: var(--ink); }
@media (max-width: 820px) { .custom-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 5vw, 5rem); }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.05rem 0; font-weight: 650; font-stretch: 106%;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); font-size: 1rem; color: var(--edge); transition: transform .2s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer { padding: 0 0 1.15rem; color: var(--ink-2); max-width: 40rem; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(4rem, 8vw, 7rem); border-top: 2px solid var(--ink); padding-block: 2.6rem 2rem; font-size: var(--fs-small); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.foot h4 { margin: 0 0 .7rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand p { color: var(--ink-2); max-width: 22rem; margin-top: .6rem; }
.fine { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .78rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
@media (max-width: 700px) { .foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(8, 14, 13, .55); }
html:has(dialog[open]) { overflow: hidden; }
.close {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--shelf); border: 1px solid var(--line); border-radius: 2px; font-size: 1.2rem; line-height: 1;
}
.close:hover { border-color: var(--ink); }

.product-dialog { width: min(980px, calc(100% - 32px)); max-height: calc(100% - 32px); border-radius: var(--r); border: 1px solid var(--line); }
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.pd-art {
  background-color: var(--shelf);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  display: flex; align-items: flex-end; justify-content: center; padding: 2rem 1rem 1rem;
  border-right: 1px solid var(--line);
}
.pd-art .art, .pd-art .photo { width: 100%; max-height: 420px; }
.pd-art .photo { object-fit: cover; aspect-ratio: 4 / 3; border-radius: 2px; }
.pd-art.has-photo { align-items: center; padding: 1rem; }
.pd-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.pd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pd-body h2 { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.05; letter-spacing: -.02em; margin-top: .3rem; }
.pd-body .price b { font-size: 1.45rem; }
.pd-desc { color: var(--ink-2); }
.pd-specs { margin: 0; border-top: 1px solid var(--line); }
.pd-specs > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.pd-specs dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); padding-top: .2rem; }
.pd-specs dd { margin: 0; }
.pd-specs dd.mono { font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pd-buy { display: flex; gap: .75rem; flex-wrap: wrap; align-items: stretch; margin-top: .4rem; }
.pd-buy .btn { flex: 1; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); border-radius: var(--r); }
.stepper button { width: 40px; background: none; border: 0; font-size: 1.1rem; }
.stepper button:hover { background: var(--shelf); }
.stepper output, .stepper span { min-width: 2.2rem; display: grid; place-items: center; font-family: var(--mono); font-size: .86rem; font-variant-numeric: tabular-nums; }
.stock-line { font-size: var(--fs-small); display: flex; align-items: center; gap: .45rem; }
.stock-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--edge); }
.stock-line.low::before { background: var(--warn); }
.stock-line.out::before { background: var(--ink-2); }
@media (max-width: 760px) {
  .product-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; }
  .pd { grid-template-columns: minmax(0, 1fr); }
  .pd-art { border-right: 0; border-bottom: 1px solid var(--line); padding-top: calc(3.2rem + env(safe-area-inset-top, 0px)); }
  .pd-body { padding-bottom: calc(1.8rem + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .pd-close-float { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
}
@media (min-width: 761px) { .pd-close-float { display: none; } }
@media (max-width: 760px) { .pd-top .close { display: none; } }

/* Cart drawer */
.drawer {
  margin: 0 0 0 auto; width: min(430px, 100%); height: 100%; max-height: 100%; max-width: 100%;
  border-left: 1px solid var(--line);
}
.drawer[open] { display: flex; flex-direction: column; animation: slidein .28s var(--ease); }
@keyframes slidein { from { transform: translateX(24px); opacity: .4; } }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) max(1.2rem, env(safe-area-inset-right, 0px)) 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--display); font-weight: 800; font-stretch: 120%; font-size: 1.35rem; letter-spacing: -.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: .4rem max(1.2rem, env(safe-area-inset-right, 0px)) .4rem 1.2rem; }
.ship-meter { padding: .9rem 0 1rem; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.meter { height: 5px; background: var(--line); border-radius: 3px; margin-top: .5rem; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--edge); width: 0; transition: width .4s var(--ease); }
.line-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line-thumb { background: var(--shelf); border: 1px solid var(--line); border-radius: 2px; display: grid; place-items: center; overflow: hidden; }
.line-thumb .art, .line-thumb .photo { width: 100%; aspect-ratio: 1; object-fit: contain; }
.line-info { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.line-info .name { font-weight: 650; line-height: 1.3; }
.line-info .unit { color: var(--ink-2); font-size: .84rem; }
.line-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .2rem; }
.line-row .stepper { border-width: 1px; }
.line-row .stepper button { width: 32px; }
.line-row .total { font-variant-numeric: tabular-nums; font-weight: 650; }
.remove { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: .8rem; text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }
.cart-empty { padding: 3rem 0; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; color: var(--ink-2); }
.drawer-foot {
  border-top: 1px solid var(--line); background: var(--shelf);
  padding: 1rem max(1.2rem, env(safe-area-inset-right, 0px)) calc(1.1rem + env(safe-area-inset-bottom, 0px)) 1.2rem;
  display: flex; flex-direction: column; gap: .8rem;
  max-height: 72%; overflow-y: auto;
}
.sums { margin: 0; display: grid; gap: .35rem; font-variant-numeric: tabular-nums; }
.sums > div { display: flex; justify-content: space-between; gap: 1rem; }
.sums dt { color: var(--ink-2); }
.sums dd { margin: 0; }
.sums .grand { padding-top: .45rem; border-top: 1px solid var(--line); font-weight: 750; font-size: 1.08rem; }
.sums .grand dt { color: var(--ink); }
.checkout-note { font-size: .8rem; color: var(--ink-2); }
.order-box { display: flex; flex-direction: column; gap: .6rem; }
.order-box textarea { width: 100%; min-height: 9rem; resize: vertical; padding: .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: .74rem; line-height: 1.5; }
.form-error { color: var(--sale); font-size: .84rem; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 140%); opacity: 0;
  max-width: calc(100% - 32px);
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: var(--r);
  font-size: .92rem; display: flex; gap: 1rem; align-items: center;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast button { background: none; border: 0; color: var(--paper); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-weight: 650; }

/* Product page photo thumbnails */
.pd-art.has-photo { flex-direction: column; align-items: stretch; justify-content: center; gap: .7rem; }
.pd-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-thumb { width: 72px; padding: 0; background: var(--shelf); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.pd-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pd-thumb:hover { border-color: var(--ink-2); }
.pd-thumb[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* Acrylic thickness callout */
.pd-specs .spec-thick { background: var(--shelf); margin-inline: -.6rem; padding-inline: .6rem; border-radius: 2px; }
.pd-specs .spec-thick dt { color: var(--edge); }
.pd-specs .spec-thick dd { font-size: 1rem; }
.spec-thick b, .fit-table td.thick b { font-family: var(--display); font-stretch: 112%; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink); }
.spec-thick b { font-size: 1.12rem; }
.fit-table td.thick { min-width: 11rem; }

/* Every-case feature list on product pages */
.pd-features { display: flex; flex-direction: column; gap: .45rem; }
.pd-features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; font-size: .9rem; }
.pd-features li { display: flex; gap: .5rem; align-items: baseline; }
.pd-features li::before { content: ""; flex: none; width: .5rem; height: .5rem; border: 1.5px solid var(--edge); border-radius: 1px; transform: translateY(-.05rem); }

/* Case-only disclaimer */
.case-only {
  position: absolute; left: calc(1.2rem + 8px); bottom: 8px; z-index: 1; pointer-events: none;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .45rem; border-radius: 2px;
  background: color-mix(in srgb, var(--paper) 90%, transparent); color: var(--ink); border: 1px solid var(--line);
}
.case-note { font-size: .9rem; padding: .7rem .85rem; background: var(--shelf); border: 1px solid var(--line); border-radius: var(--r); }
.case-note b, .cart-disclaimer b, .hero-note b { font-weight: 700; color: var(--ink); }
.cart-disclaimer { font-size: .84rem; color: var(--ink-2); }
.hero-note { font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 560px) {
  .case-only { left: calc(.5rem + 6px); bottom: 6px; }
  .case-only-long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
