:root {
  --ink: #17212B;
  --tarmac: #E8EBED;
  --paper: #FFFFFF;
  --flag: #F5C400;
  --flag-deep: #D9AB00;
  --kerb: #C8261D;
  --muted: #55626D;
  --line: #C6CED3;
  --ok: #1F6B3A;
  --head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", "Franklin Gothic Medium Cond", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tarmac); color: var(--ink);
  font: 16px/1.5 var(--body);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--flag); padding: 12px 16px; z-index: 50; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--flag); }

/* Header: the kerb stripe is the one memorable element */
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  background: var(--ink); color: var(--flag); font: 700 22px/1 var(--head);
  letter-spacing: .5px; padding: 7px 9px 6px; border-radius: var(--radius);
}
.brand-name { font: 700 20px/1 var(--head); letter-spacing: .2px; }
.cart-btn {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px;
  background: transparent; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.cart-count {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--kerb); color: #fff; border-radius: 11px; font: 700 13px/22px var(--body); text-align: center;
}
.search { display: flex; gap: 8px; margin-top: 10px; }
.search input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; font: inherit;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
}
.search button, .btn {
  height: 46px; padding: 0 18px; font: 700 17px/1 var(--head); letter-spacing: .3px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer;
}
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-primary { background: var(--flag); color: var(--ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--flag-deep); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; text-decoration: none; font: 700 16px/1 var(--head); white-space: nowrap;
}
.chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

main { max-width: 1100px; margin: 0 auto; padding: 18px 14px 40px; outline: none; }
h1 { font: 700 30px/1.1 var(--head); margin: 4px 0 14px; }
.sub { color: var(--muted); margin: -6px 0 14px; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card:hover { border-color: var(--ink); }
.card a { display: block; text-decoration: none; height: 100%; }
.card .pic { aspect-ratio: 1; background: #F4F6F7; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; }
.card .meta { padding: 10px 10px 12px; }
.card .vendor { color: var(--muted); font-size: 13px; }
.card .title { font: 700 18px/1.15 var(--head); margin: 2px 0 8px; overflow-wrap: anywhere; }
.price { font: 700 22px/1 var(--head); }
.price s { color: var(--muted); font-weight: 400; font-size: 16px; margin-left: 6px; }
.tag-out { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--kerb); font-weight: 700; }
.more { text-align: center; margin: 22px 0 0; }

/* Product */
.product { display: grid; gap: 18px; }
@media (min-width: 820px) { .product { grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; } }
.gallery .main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: 0 0 64px; height: 64px; padding: 0; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.back { display: inline-block; margin-bottom: 10px; }
.info .vendor { color: var(--muted); }
.info h1 { margin-top: 0; }
.info .price { font-size: 34px; margin: 8px 0 4px; }
.stock { font-weight: 700; margin: 6px 0 14px; }
.stock.ok { color: var(--ok); } .stock.low { color: #8A5A00; } .stock.out { color: var(--kerb); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 0 14px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); font: 600 16px/1 var(--body); cursor: pointer; }
.opt[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt.unavail { text-decoration: line-through; color: var(--muted); }
.opt[aria-pressed="true"].unavail { color: #fff; }
.buy { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; }
.qty button { width: 44px; height: 44px; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.buy .btn-primary { flex: 1; height: 48px; font-size: 19px; }
.desc { margin-top: 22px; max-width: 65ch; line-height: 1.55; }
.note { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* Cart dialog */
dialog#cart {
  width: min(440px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  margin: 0 0 0 auto; padding: 0; border: 0; background: var(--paper); color: var(--ink);
  border-left: 3px solid var(--ink);
}
dialog#cart::backdrop { background: rgba(23, 33, 43, .55); }
dialog#cart[open] { display: flex; flex-direction: column; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0)) 16px 12px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font: 700 24px/1 var(--head); margin: 0; }
.icon-btn { width: 44px; height: 44px; font-size: 30px; line-height: 1; background: transparent; border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer; }
#cart-body { flex: 1; overflow-y: auto; padding: 0 16px; display: flex; flex-direction: column; }
.lines { list-style: none; margin: 0; padding: 0; flex: 1; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line .pic { width: 72px; height: 72px; background: #F4F6F7; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.line .pic img { width: 100%; height: 100%; object-fit: contain; }
.line .t { font: 700 17px/1.15 var(--head); }
.line .v { color: var(--muted); font-size: 14px; }
.line .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.line .qty button { width: 38px; height: 38px; }
.link-btn { background: none; border: 0; padding: 8px 0; text-decoration: underline; cursor: pointer; font: inherit; color: var(--muted); }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0)); background: var(--paper); position: sticky; bottom: 0; }
.subtotal { display: flex; justify-content: space-between; font: 700 22px/1 var(--head); margin-bottom: 6px; }
.cart-foot .btn { width: 100%; height: 50px; font-size: 20px; }
.empty { text-align: center; padding: 40px 10px; }
.empty p { color: var(--muted); }

/* States */
.state { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; max-width: 520px; }
.state h2 { font: 700 22px/1.1 var(--head); margin: 0 0 6px; }
.skeleton { background: linear-gradient(90deg, #dfe3e6, #eef0f2, #dfe3e6); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--radius); aspect-ratio: .8; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } * { scroll-behavior: auto !important; } }

main:focus, main:focus-visible { outline: none; box-shadow: none; }
.card .price { font-size: 20px; }

.actions { display: flex; gap: 10px; }
a.cart-btn { text-decoration: none; }
.cart-count.dot { min-width: 14px; width: 14px; height: 14px; padding: 0; top: -5px; right: -5px; background: var(--ok); border: 2px solid #fff; }
.acct { max-width: 520px; }
.acct .state { max-width: none; margin-bottom: 14px; }
.acct dl { margin: 0 0 16px; } .acct dt { color: var(--muted); font-size: 14px; } .acct dd { margin: 0 0 10px; font-weight: 600; }
.acct .btn { margin-right: 8px; margin-top: 6px; }

.acct { max-width: 640px; }
h2.sec { font: 700 24px/1.1 var(--head); margin: 22px 0 10px; }
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.order[open] { border-color: var(--ink); }
.order summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 48px; }
.order summary::-webkit-details-marker { display: none; }
.order .on { font: 700 20px/1.1 var(--head); }
.order .ot { font: 700 20px/1.1 var(--head); text-align: right; }
.order .od, .order .os { color: var(--muted); font-size: 14px; }
.order .os { text-align: right; color: var(--ink); font-weight: 600; }
.ob { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.ob h3 { font: 700 18px/1.1 var(--head); margin: 16px 0 8px; }
.oitems, .parcels { list-style: none; margin: 10px 0 0; padding: 0; }
.oitems li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; align-items: center; }
.oitems .pic { width: 56px; height: 56px; background: #F4F6F7; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.oitems .pic img { width: 100%; height: 100%; object-fit: contain; }
.oitems .t { font-weight: 600; } .oitems .v { color: var(--muted); font-size: 14px; }
.parcel { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; background: #F8F9FA; }
.parcel .ph { font: 700 17px/1.1 var(--head); } .parcel .pi { color: var(--muted); font-size: 14px; margin: 4px 0; }
.parcel .trk { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; overflow-wrap: anywhere; }
.btn-small { height: 38px; padding: 0 14px; font-size: 16px; background: var(--flag); color: var(--ink); }

/* Garage and build lists */
.badge { display: inline-block; margin-left: 10px; padding: 2px 8px; font: 700 13px/1.4 var(--body); background: var(--flag); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); vertical-align: middle; }
.vlist, .blist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.vcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.vcard:hover { border-color: var(--ink); }
.vcard a { display: block; padding: 12px 14px; text-decoration: none; min-height: 48px; }
.vname { font: 700 22px/1.1 var(--head); } .vsub { color: var(--muted); font-size: 14px; }
.vdl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
.vdl dt { color: var(--muted); font-size: 14px; } .vdl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.row2 { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.row2 .btn { margin: 0; }
.danger { margin-top: 24px; }
.vform { display: grid; gap: 12px; margin-top: 8px; }
.fld label { display: block; font-weight: 700; margin-bottom: 4px; }
.fld input[type=text], .fld select, .fld textarea { width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); }
.fld.chk { display: flex; align-items: center; gap: 10px; } .fld.chk label { margin: 0; } .fld.chk input { width: 24px; height: 24px; }
.bitem { display: grid; grid-template-columns: 64px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.bitem .pic { width: 64px; height: 64px; background: #F4F6F7; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bitem .pic img { width: 100%; height: 100%; object-fit: contain; }
.bitem .t { font: 700 18px/1.15 var(--head); } .bitem .v { color: var(--muted); font-size: 14px; }
.brow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.brow select, .brow2 select { min-height: 44px; padding: 0 10px; font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.bnote { width: 100%; min-height: 40px; margin-top: 8px; padding: 6px 10px; font: inherit; border: 2px solid var(--line); border-radius: var(--radius); }
.bpanel { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.brow2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brow2 select { flex: 1; min-width: 160px; }
.bpanel .btn { height: 46px; font-size: 17px; }

/* Garage v2: purchases, dates, sharing */
.vsub.warn { color: #8A5A00; font-weight: 600; }
.purch { margin-top: 6px; font-weight: 600; color: var(--ok); } .purch .link-btn { margin-left: 8px; color: var(--muted); font-weight: 400; }
.sugg { margin-top: 8px; padding: 8px 10px; background: #FFF8DC; border: 1px solid var(--flag-deep); border-radius: var(--radius); font-size: 15px; }
.linkbox { margin-top: 8px; } .linkbox summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; text-decoration: underline; color: var(--muted); }
.llist { list-style: none; margin: 6px 0; padding: 0; } .lrow { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.exps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.exp { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.exp .t { font-weight: 700; } .exp .stock { margin: 2px 0; }
.addexp { display: grid; gap: 8px; margin: 10px 0; }
.addexp input { min-height: 46px; padding: 8px 12px; font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.share { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); } .share h3 { font: 700 20px/1.1 var(--head); margin: 0 0 6px; }

/* Build diary */
.diary .state { max-width: none; margin-bottom: 12px; } .diary .state p { margin: 0; }
.dform { display: grid; gap: 12px; margin: 10px 0; } .dform input[type=date], .dform input[type=file] { width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.dentries { display: grid; gap: 10px; margin: 14px 0; }
.dentry { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.dentry .dd { font: 700 20px/1.1 var(--head); } .dn { white-space: pre-wrap; margin: 6px 0; overflow-wrap: anywhere; }
.dthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dthumb { width: 84px; height: 84px; padding: 0; background: #F4F6F7; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; overflow: hidden; } .dthumb:hover { border-color: var(--ink); }
.dthumb img { width: 100%; height: 100%; object-fit: cover; }
dialog#lightbox { max-width: 96vw; max-height: 96vh; padding: 8px; border: 3px solid var(--ink); background: #fff; text-align: center; }
dialog#lightbox::backdrop { background: rgba(23, 33, 43, .8); } dialog#lightbox img { max-width: 100%; max-height: 80vh; margin: 0 auto; }
.history .hentry { margin: 14px 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); } .history .hentry h3 { font: 700 20px/1.1 var(--head); margin: 0 0 4px; }
.hphotos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .hphotos img { width: calc(50% - 4px); border: 1px solid var(--line); border-radius: var(--radius); }
.hparts ul { margin: 6px 0; padding-left: 18px; }
@media print {
  .top, .masthead, .no-print, dialog, .skip, #status, .cart-btn { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; }
  .history .hentry { break-inside: avoid; } .hphotos img { width: 48%; }
}

/* Bulk select and recording purchases */
.btool { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.bsel { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; cursor: pointer; }
.bsel input { width: 24px; height: 24px; }
.linecar { margin-top: 8px; } .lc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lc-row select { flex: 1; min-width: 160px; min-height: 44px; padding: 0 10px; font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.lc-done { color: var(--ok); font-weight: 600; font-size: 14px; } .lc-done a { color: inherit; }
.btn.inbasket { background: #fff; color: var(--ok); border-color: var(--ok); }
.btn.inbasket::before { content: "\2713\00a0"; }

.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); width: 100%; margin-top: 10px; height: 46px; }
.btn-outline:hover { background: #F4F6F7; }

.btn-outline { background: #FFF8DC; border-width: 2px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.btn-outline::before { content: "?"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 15px/1 var(--body); }
.btn-outline:hover { background: #FFEFAE; }
.line .t { display: inline-block; padding: 6px 0; min-height: 28px; }

/* Personal welcome strip and bottom menu */
.hello { margin: 0 0 18px; padding: 14px; background: #fff; border: 1px solid var(--line); }
.hello-out { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hello-sub { color: var(--muted); font-size: 14px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; color: var(--muted); text-decoration: none; font: 600 12px/1.1 var(--head); border-top: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-top-color: var(--flag); }
body.has-tabs { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)); }
@media print { .tabs, .hello { display: none !important; } body.has-tabs { padding-bottom: 0; } }

address.addr { font-style: normal; line-height: 1.5; margin: 4px 0 14px; }

/* Sub-categories */
.subnavs { margin: 0 0 12px; display: grid; gap: 8px; }
.subnav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.subnav .chip { flex: 0 0 auto; }
.cat-tiles { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-tiles a { display: flex; align-items: center; min-height: 64px; padding: 12px 14px; background: #F7F7F7; border: 1px solid var(--line); font: 600 15px/1.2 var(--head); text-decoration: none; color: var(--ink); }
.cat-tiles a:hover { border-color: var(--ink); }

/* Quotes and invoices */
.quotes-box { margin: 0 0 22px; }
.quotes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.quote { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--flag); padding: 12px 14px; }
.quote .qh { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; } .quote .qd { color: var(--muted); font-size: 14px; }
.quote .qi { list-style: none; margin: 8px 0; padding: 0; font-size: 15px; } .quote .qt { margin: 6px 0 10px; font: 600 18px/1.2 var(--head); }
.quote .btn { width: 100%; }
.hello-quote { display: block; margin-top: 10px; padding: 10px 12px; background: #FFF4F1; border: 1px solid var(--logo-red, #DB4A2B); color: var(--ink); font-weight: 600; text-decoration: underline; }
[hidden] { display: none !important; } /* anything marked hidden really is hidden, whatever else its style says */

/* Quick links under the logo */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.quick a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font: 700 13px/1 var(--head); }
.quick a svg { width: 20px; height: 20px; flex: 0 0 auto; }
.quick a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media print { .quick { display: none !important; } }

/* The logo area scrolls away; the search box, basket and category tabs stay pinned */
.masthead { background: #fff; padding: calc(8px + env(safe-area-inset-top, 0)) 14px 10px; }
.top { position: sticky; top: env(safe-area-inset-top, 0); z-index: 20; background: #fff; padding: 8px 14px 4px; border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0); background: #fff; z-index: 30; }
.search .cart-btn { flex: 0 0 auto; }
.top .search { margin-top: 0; }
.top .search .cart-btn { background: transparent; color: var(--ink); border: 0; padding: 0; width: 44px; min-width: 44px; height: 46px; text-transform: none; letter-spacing: 0; }

/* Product copy */
.desc > :first-child { margin-top: 0; }
.desc p, .desc blockquote { margin: 0 0 14px; }
.desc h3 { font: 700 18px/1.25 var(--head); margin: 24px 0 8px; }
.desc h4 { font: 700 14px/1.3 var(--head); margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.desc ul, .desc ol { margin: 0 0 14px; padding-left: 22px; } .desc li { margin: 0 0 6px; }
.desc a { color: var(--ink); text-decoration: underline; }
.desc blockquote { padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.desc-table { overflow-x: auto; margin: 0 0 14px; } .desc table { border-collapse: collapse; min-width: 100%; font-size: 14px; }
.desc th, .desc td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; } .desc th { background: #F4F4F4; }

/* Filter and sort */
.listbar { display: flex; gap: 10px; align-items: stretch; margin: 12px 0 10px; }
.listbar select { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: 600 15px/1 var(--head); }
.listbar .fbtn { flex: 0 0 auto; min-width: 110px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fchip { min-height: 38px; padding: 0 12px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: 600 14px/1 var(--head); cursor: pointer; }
.fchip.fclear { border-color: transparent; text-decoration: underline; }
dialog.fpanel { margin: auto 0 0; width: 100%; max-width: 560px; height: 92vh; max-height: 92vh; padding: 0; border: 0; background: #fff; color: var(--ink); }
@media (min-width: 700px) { dialog.fpanel { margin: auto; height: 80vh; } }
dialog.fpanel::backdrop { background: rgba(0,0,0,.5); }
.fform { display: flex; flex-direction: column; height: 100%; }
.fhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fhead h2 { margin: 0; font: 700 20px/1.2 var(--head); }
.fclose { width: 44px; height: 44px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--ink); }
.fbody { flex: 1; overflow-y: auto; padding: 6px 16px 16px; }
.fgroup { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 14px 0; }
.fgroup legend { padding: 0; font: 700 16px/1.2 var(--head); margin-bottom: 8px; }
.fopt { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.fopt input { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--ink); }
.fopt input:disabled + span { color: var(--muted); }
.fcount { margin-left: auto; color: var(--muted); font-size: 14px; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pfield { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.pfield input { min-height: 46px; padding: 0 12px; border: 1px solid var(--ink); font: 600 16px/1 var(--head); }
.ffoot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0)); border-top: 1px solid var(--line); background: #fff; }
.pfield { min-width: 0; } .pfield input { width: 100%; min-width: 0; box-sizing: border-box; }

/* Collection description */
.cwrap { margin: 4px 0 12px; }
.desc.cdesc { margin-top: 4px; color: var(--muted); }
.desc.cdesc.clamped { max-height: 4.9em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.linkbtn { background: none; border: 0; padding: 8px 0; min-height: 44px; font: 700 14px/1 var(--head); color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Optional offers choice in the garage */
fieldset.offers { margin: 24px 0 8px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--logo-red, #DB4A2B); background: #fff; }
fieldset.offers legend { padding: 0 6px; font: 700 17px/1.2 var(--head); }
fieldset.offers .fopt { align-items: flex-start; min-height: 44px; }
fieldset.offers .fopt input { margin-top: 2px; }
