@font-face { font-family: "Marcellus"; src: url(fonts/marcellus-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --velvet: #16213a;     /* ring-box navy */
  --velvet-2: #24335a;
  --ink: #1b2233;
  --muted: #586074;
  --line: #d5d9e2;
  --plate: #ffffff;
  --wash: #f2f3f7;
  --gold: #8a6620;
  --gold-soft: #f3ead6;
  --ok: #1d6a50;
  --ok-soft: #dff0e9;
  --wait: #8a5410;
  --wait-soft: #fbeed8;
  --bad: #a1252e;
  --bad-soft: #fae3e4;
  --display: "Marcellus", Georgia, serif;
  --body: "Albert Sans", system-ui, sans-serif;
  /* hallmark punch: a rectangle with the corners cut */
  --punch: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wash); color: var(--ink); font: 400 16px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0 0 .4em; color: var(--velvet); }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 .8em; }
a { color: var(--velvet-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px 24px; }
.flashes { padding-bottom: 0; }
.flashes + main { padding-top: 16px; }

/* Header */
.top { background: var(--velvet); color: #fff; }
.top-in { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { background: #fff; padding: 6px 12px; display: flex; align-items: center; min-height: 52px; text-decoration: none; color: var(--velvet); clip-path: var(--punch); }
.brand img { max-height: 40px; max-width: 190px; width: auto; }
.brand span { font-family: var(--display); font-size: 1.15rem; }
.search { flex: 1; min-width: 220px; display: flex; }
.search input { flex: 1; min-width: 0; border: 0; padding: 10px 14px; font: inherit; background: #fff; color: var(--ink); }
.search button { border: 0; padding: 0 16px; background: var(--velvet-2); color: #fff; font: 500 15px var(--body); cursor: pointer; }
.search { position: relative; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; list-style: none; margin: 2px 0 0; padding: 0; max-height: 70vh; overflow-y: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(22, 33, 58, .18); }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 7px 12px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a[aria-selected] { background: var(--wash); }
.suggest-photo { flex: 0 0 44px; width: 44px; height: 44px; background: var(--wash); }
.suggest-photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.suggest-text { flex: 1; min-width: 0; }
.suggest-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.suggest-code { display: block; color: var(--muted); font-size: .84rem; }
.suggest-price { flex: 0 0 auto; font-weight: 600; font-size: .95rem; }
.suggest .suggest-all { border-top: 1px solid var(--line); color: var(--velvet-2); font-size: .92rem; font-weight: 500; }
.suggest-none { padding: 12px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a, .nav .link { color: #fff; text-decoration: none; font-weight: 500; }
.nav a:hover, .nav .link:hover { text-decoration: underline; }
.nav form { margin: 0; }
.nav-cart b { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 2px; text-align: center; background: var(--gold-soft); color: var(--velvet); font-weight: 700; clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }

/* Controls */
.btn { display: inline-block; padding: 11px 20px; border: 0; background: var(--velvet); color: #fff; font: 600 15px var(--body); text-decoration: none; text-align: center; cursor: pointer; clip-path: var(--punch); }
.btn:hover { background: var(--velvet-2); }
.btn[disabled] { opacity: .6; cursor: wait; }
/* clip-path cuts off outlines, so cut-corner elements show focus inside the shape */
.btn:focus-visible, .brand:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--gold); }
.btn-quiet { background: var(--line); color: var(--velvet); }
.btn-quiet:hover { background: #c5cbd7; }
.btn-full { display: block; width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--velvet-2); text-decoration: underline; cursor: pointer; }
.link-danger { color: var(--bad); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #aeb5c3; padding: 9px 10px; max-width: 100%; }
input[type=checkbox], input[type=radio] { padding: 0; accent-color: var(--velvet); }
.js .nojs { display: none; }

.flash { padding: 10px 14px; margin: 0 0 8px; border-left: 4px solid; background: #fff; }
.flash-success { border-color: var(--ok); background: var(--ok-soft); }
.flash-error { border-color: var(--bad); background: var(--bad-soft); }
.note { color: var(--muted); font-size: .92rem; }

/* Hallmark punches: stock status and states */
.mark { display: inline-block; padding: 3px 11px; font-size: .84rem; font-weight: 600; clip-path: var(--punch); }
.mark-in { background: var(--ok-soft); color: var(--ok); }
.mark-wait { background: var(--wait-soft); color: var(--wait); }
.mark-out { background: var(--bad-soft); color: var(--bad); }
.code { color: var(--muted); font-size: .86rem; letter-spacing: .02em; margin: 0; }

/* Catalogue */
.catalogue { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.side-box summary { display: none; font-weight: 600; cursor: pointer; padding: 10px 14px; background: #fff; border: 1px solid var(--line); }
.cats { position: relative; font-size: .96rem; margin-bottom: 20px; max-height: 20rem; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.cats ul { list-style: none; margin: 0; padding: 0; }
.cats ul ul { padding-left: 14px; border-left: 1px solid var(--line); margin: 2px 0 4px 2px; }
.cats a { display: block; padding: 4px 0; text-decoration: none; color: var(--ink); }
.cats a:hover { text-decoration: underline; }
.cats a.here { font-weight: 700; color: var(--velvet); }
.filters fieldset { border: 0; border-top: 1px solid var(--line); padding: 12px 0; margin: 0; }
.filters .scrollbox { margin-bottom: 0; }
.filters legend { font-family: var(--display); font-size: 1.05rem; color: var(--velvet); padding: 0; float: left; margin-bottom: 6px; }
.filters label { clear: both; display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .95rem; cursor: pointer; }
.filters label span { flex: 1; }
.filters small { color: var(--muted); }
.ficon { width: 20px; height: 20px; object-fit: contain; }
/* Styled scrollbars stay on screen, including where the system would hide them until scrolling. */
.cats::-webkit-scrollbar, .filter-list::-webkit-scrollbar { -webkit-appearance: none; width: 10px; }
.cats::-webkit-scrollbar-track, .filter-list::-webkit-scrollbar-track { background: var(--line); }
.cats::-webkit-scrollbar-thumb, .filter-list::-webkit-scrollbar-thumb { background: #7d869a; border: 2px solid var(--line); }
.cats::-webkit-scrollbar-thumb:hover, .filter-list::-webkit-scrollbar-thumb:hover { background: var(--velvet-2); }
/* Only where those are unsupported: in Chrome, scrollbar-color would replace the styling above. */
@supports not selector(::-webkit-scrollbar) {
  .cats, .filter-list { scrollbar-width: auto; scrollbar-color: #7d869a var(--line); }
}
/* A scrollbar drawn by the page, because Firefox and touch devices can hide their own whatever the CSS says. */
.scrollbox { position: relative; clear: both; margin-bottom: 20px; }
.scrollbox .cats { margin-bottom: 0; }
.cats.has-sb, .filter-list.has-sb { scrollbar-width: none; padding-right: 0; }
.cats.has-sb::-webkit-scrollbar, .filter-list.has-sb::-webkit-scrollbar { display: none; }
.scrollbox.is-scrollable .has-sb { padding-right: 18px; }
.sb { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: 10px; background: var(--line); cursor: pointer; touch-action: none; }
.scrollbox.is-scrollable .sb { display: block; }
.sb-thumb { position: absolute; left: 2px; right: 2px; top: 0; min-height: 24px; background: #7d869a; cursor: grab; touch-action: none; }
.sb-thumb:hover, .sb.dragging .sb-thumb { background: var(--velvet-2); }
.sb.dragging .sb-thumb { cursor: grabbing; }
.filter-list { clear: both; max-height: 14.5rem; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.group-clear { float: right; font-size: .85rem; line-height: 1.6; }
.active-filters { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.active-filters a { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; background: var(--gold-soft); color: var(--velvet); font-size: .9rem; font-weight: 500; text-decoration: none; clip-path: var(--punch); }
.active-filters a:hover { background: #ead9b6; }
.active-filters a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.active-filters span { color: var(--gold); font-weight: 400; }
.active-filters b { font-size: 1.05rem; line-height: 1; }
.active-filters .active-clear { background: none; text-decoration: underline; clip-path: none; font-weight: 400; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.results-head h1 { margin-bottom: 2px; }
.count { color: var(--muted); margin: 0; font-size: .94rem; }
.tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0; }
.tools label { display: flex; gap: 6px; align-items: center; font-size: .92rem; color: var(--muted); }
.tools select { padding: 6px 8px; color: var(--ink); }

/* The tray: pieces sit in a ruled grid like a jeweller's display tray */
.tray { list-style: none; margin: 0; padding: 1px; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1px; }
.piece { background: var(--plate); display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line); }
.piece-photo { display: block; aspect-ratio: 1; padding: 14px; }
.piece-photo img { width: 100%; height: 100%; object-fit: contain; }
.noimg { display: block; width: 100%; height: 100%; min-height: 60px; background: var(--wash); }
.piece-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; align-items: flex-start; }
.piece-body h2 { font-family: var(--body); font-weight: 500; font-size: .98rem; line-height: 1.35; margin: 0; }
.piece-body h2 a { color: var(--ink); text-decoration: none; }
.piece-body h2 a:hover { text-decoration: underline; }
.piece-price { font-size: 1.2rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; color: var(--velvet); margin: 4px 0 2px; }
.piece-body > .btn, .quick { margin-top: auto; align-self: stretch; }
.piece-body .mark { margin-bottom: 10px; }
.quick { display: flex; gap: 6px; }
.quick input { width: 64px; padding: 8px 6px; }
.quick .btn { flex: 1; padding: 9px 8px; font-size: .92rem; }

.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 24px; justify-content: center; }
.pager a, .pager span { padding: 6px 12px; text-decoration: none; background: #fff; border: 1px solid var(--line); }
.pager a:hover { border-color: var(--velvet); }
.pager .here { background: var(--velvet); color: #fff; border-color: var(--velvet); }
.empty { background: #fff; border: 1px solid var(--line); padding: 40px 24px; text-align: center; }

/* Product page */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gallery-main { background: #fff; border: 1px solid var(--line); aspect-ratio: 1; padding: 24px; display: flex; }
.gallery-main a { display: block; width: 100%; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs button { padding: 3px; background: #fff; border: 1px solid var(--line); cursor: pointer; width: 76px; height: 76px; }
.gallery-thumbs button[aria-current] { border-color: var(--velvet); box-shadow: 0 0 0 1px var(--velvet); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buy h1 { font-size: 2.1rem; }
.price { font-size: 2rem; font-weight: 600; font-variant-numeric: lining-nums; color: var(--velvet); margin: 12px 0 8px; line-height: 1.1; }
.price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.breaks { margin: 16px 0 0; border-collapse: collapse; font-size: .95rem; }
.breaks caption { text-align: left; font-weight: 600; margin-bottom: 4px; }
.breaks th { text-align: left; font-weight: 400; padding: 3px 24px 3px 0; }
.breaks td { padding: 3px 0; font-weight: 600; }
.opt-group { margin-top: 16px; }
.opt-group h2 { font-family: var(--body); font-weight: 500; font-size: 1rem; color: var(--ink); margin-bottom: 6px; }
.opts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-block; min-width: 46px; padding: 7px 12px; text-align: center; background: #fff; color: var(--velvet); font-weight: 500; font-size: .94rem; text-decoration: none; box-shadow: inset 0 0 0 1px #aeb5c3; }
.opt:hover { box-shadow: inset 0 0 0 2px var(--velvet); }
.opt:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--gold); }
.opt[aria-current] { background: var(--velvet); color: #fff; box-shadow: none; }
.field .opts { margin-top: 6px; }
/* Radio options: the real input stays in the form, drawn as a button. */
.opt-radio { position: relative; display: inline-block; cursor: pointer; }
.opt-radio input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt-radio:hover input:not(:checked) + .opt { box-shadow: inset 0 0 0 2px var(--velvet); }
.opt-radio input:checked + .opt { background: var(--velvet); color: #fff; box-shadow: none; }
.opt-radio input:focus-visible + .opt { outline: 2px solid var(--gold); outline-offset: 2px; }
.buy-form { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.field { display: block; margin: 0 0 14px; font-weight: 500; border: 0; padding: 0; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.field legend { padding: 0; font-weight: 500; }
.field .note { display: block; font-weight: 400; margin: 4px 0 0; }
.choice { display: block; font-weight: 400; padding: 2px 0; cursor: pointer; }
.buy-row { display: flex; gap: 12px; align-items: flex-end; }
.buy-row .field { width: 110px; margin: 0; }
.buy-row .btn { flex: 1; padding: 12px 20px; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose { max-width: 68ch; }
.specs table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: #fff; }
.specs caption { text-align: left; font-weight: 600; padding-bottom: 4px; }
.specs th, .specs td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 400; color: var(--muted); width: 45%; }

/* Tables: cart, orders, admin */
.scroll { overflow-x: auto; }
.lines { width: 100%; border-collapse: collapse; background: #fff; min-width: 620px; }
.lines th, .lines td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines thead th { font-size: .88rem; font-weight: 600; color: var(--muted); }
.line-item { display: flex; gap: 12px; align-items: center; }
.line-photo { flex: 0 0 64px; width: 64px; height: 64px; display: block; }
.line-photo img { width: 100%; height: 100%; object-fit: contain; }
.line-opt { margin: 0; font-size: .88rem; color: var(--muted); }
.line-err { margin: 4px 0 0; font-size: .88rem; color: var(--bad); font-weight: 600; }
.line-note { margin: 4px 0 0; font-size: .88rem; color: var(--wait); }
.qty { width: 80px; }
.cart-actions { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.cart-foot { margin: 20px 0 0 auto; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.cart-foot .btn { display: block; }
.totals { width: 100%; border-collapse: collapse; }
.totals th { text-align: left; font-weight: 400; padding: 5px 0; }
.totals td { text-align: right; padding: 5px 0; }
.totals .grand th, .totals .grand td { border-top: 1px solid var(--velvet); padding-top: 10px; font-size: 1.2rem; font-weight: 700; color: var(--velvet); }

/* Checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.addresses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 6px; }
.address { display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid var(--line); padding: 12px; font-weight: 400; cursor: pointer; }
.address:has(input:checked) { border-color: var(--velvet); box-shadow: 0 0 0 1px var(--velvet); }
.methods { display: grid; gap: 6px; margin-top: 6px; }
.method { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); padding: 10px 12px; font-weight: 400; cursor: pointer; }
.method span:first-of-type { flex: 1; }
.method:has(input:checked) { border-color: var(--velvet); box-shadow: 0 0 0 1px var(--velvet); }
.summary { background: #fff; border: 1px solid var(--line); padding: 20px; }
.summary ul { list-style: none; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .95rem; }
.summary small { display: block; color: var(--muted); }
.summary .btn { margin-top: 14px; }
.back { display: block; text-align: center; margin-top: 10px; font-size: .92rem; }
.placed { background: var(--velvet); color: #fff; padding: 28px; margin-bottom: 16px; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.placed h1 { color: #fff; }
.placed p { margin: 0; }
.order-foot { display: flex; justify-content: space-between; gap: 32px; margin-top: 20px; flex-wrap: wrap; }
.order-foot .totals { max-width: 360px; }

/* Account and forms */
.account { max-width: 480px; }
.account dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin: 0 0 8px; }
.account dt { color: var(--muted); }
.account dd { margin: 0; font-weight: 600; }
.account-logo { max-height: 70px; max-width: 240px; width: auto; background: #fff; padding: 6px; border: 1px solid var(--line); margin-bottom: 14px; }
.stack { max-width: 480px; margin-top: 24px; }
.stack-wide { max-width: 640px; margin-top: 8px; }
.with-button { display: flex; gap: 8px; align-items: flex-end; }
.with-button input { flex: 1; }

/* Login */
.login-page { background: var(--velvet); }
.login { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-plate { background: #fff; width: 100%; max-width: 400px; padding: 36px; clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); }
.login-plate img { max-height: 70px; width: auto; margin-bottom: 20px; }
.login-plate label { display: block; font-weight: 500; margin-bottom: 14px; }
.login-plate input { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.login-plate .btn { display: block; width: 100%; }
.checks { list-style: none; padding: 0; font-size: .92rem; }
.checks .bad { color: var(--bad); font-weight: 600; }

/* Footer */
.foot { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; justify-content: flex-end; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.foot form { margin: 0; }

/* Admin */
.brand-text { background: none; clip-path: none; color: #fff; padding: 0; min-height: 0; }
.admin .top-in { justify-content: space-between; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 520px; }
.admin-search input { flex: 1; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin-left: 10px; }
.linked { background: #fff; border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 6px; font-weight: 400; }
.account-results { list-style: none; margin: 4px 0 0; padding: 0; font-weight: 400; }
.account-results button { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-top: 0; padding: 8px 10px; font: inherit; cursor: pointer; }
.account-results li:first-child button { border-top: 1px solid var(--line); }
.account-results button:hover { background: var(--gold-soft); }

@media (max-width: 899px) {
  .catalogue { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side-box summary { display: block; }
  .side-box[open] summary { margin-bottom: 12px; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .tray { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { padding: 16px; }
  .top-in { padding: 10px 16px; gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .nav { margin-left: auto; gap: 14px; }
  h1, .buy h1 { font-size: 1.6rem; }
  .tools { width: 100%; }
  .tools label { flex: 1; }
  .tools select { flex: 1; min-width: 0; }
  .quick { flex-wrap: wrap; }
  .quick input { width: 100%; }
  .piece-photo { padding: 8px; }
  .piece-body { padding: 0 10px 10px; }
  .details { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
