/* Home buy bar (website improver 2026-10-27): four variants in site/lib/homebuy.mjs, swapped in dev by site/js/devswap.js.
   Tokens from base.css; Fraunces for names and the promise, system UI for the rest. */
.hb { padding: var(--s7) 0; }
.hb .nowrap { white-space: nowrap; }
.hb-h { font-size: clamp(26px, 3vw, 40px); max-width: 24em; text-wrap: balance; }
.hb-h-sm { font-size: clamp(22px, 2.4vw, 32px); }
.hb-sub { margin-top: var(--s3); color: var(--fg-dim); font-size: 15px; }
.hb-proof { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s4) var(--s6); grid-template-columns: repeat(3, minmax(0, 1fr));
  font-size: 15px; line-height: 1.5; color: var(--fg-dim); }
.hb-proof strong { display: block; color: var(--fg); font-weight: 500; }
@media (max-width: 720px) { .hb-proof { grid-template-columns: 1fr; gap: var(--s3); } .hb-proof strong { display: inline; margin-right: .3em; } }

/* the buy row: name · wood · price · Add. One line on desktop; stacks on phones. */
.hb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); margin-top: var(--s6); padding: var(--s5) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hb-line .hb-row { margin-top: 0; }
.hb-id { display: grid; line-height: 1.2; min-width: 0; }
.hb-name { font-family: var(--font-display); font-size: 24px; }
.hb-dims { color: var(--fg-dim); font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.hb-buy { display: flex; align-items: center; gap: var(--s5); margin-left: auto; }
.hb-price { font-family: var(--font-display); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums lining-nums; min-width: 3.2ch; text-align: right; }
.hb-price-sm { font-size: 22px; }
.hb-fine { margin-top: var(--s4); color: var(--fg-dim); font-size: 13px; }
.hb-fine a { text-decoration: underline; text-underline-offset: 3px; }
.hb-fine a:hover { color: var(--fg); }
@media (max-width: 640px) { .hb-buy { width: 100%; justify-content: space-between; } .hb-buy .btn { flex: 1; max-width: 240px; } }

/* wood radios: real wood swatches (site/static/wood), same look as the product page chips */
.hb-wood { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; border: 0; min-width: 0; }
.hb-chip { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 var(--s2);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.hb-chip:hover { border-color: rgba(239,230,216,.3); }
.hb-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.hb-chip small { color: var(--fg-dim); font-size: inherit; font-variant-numeric: tabular-nums; margin-left: .2em; }
.hb-chip:has(input:checked) { border-color: var(--fg); background: rgba(239,230,216,.06); }
.hb-chip:has(input:checked) small { color: var(--fg); }
.hb-chip:has(input:focus-visible) { outline: 1.5px solid var(--accent); outline-offset: 3px; }
.hb-disc { position: relative; overflow: hidden; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--c) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.hb-disc[data-disc="maple"] { background-image: url(/wood/maple-mid-g.webp); }
.hb-disc[data-disc="walnut"] { background-image: url(/wood/walnut-mid-g.webp); }
.hb-disc[data-disc="mahogany"] { background-image: url(/wood/mahogany-mid-g.webp); }
.hb-disc::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 28% 18%, rgba(255,255,255,.26), rgba(255,255,255,.05) 42%, rgba(0,0,0,.2) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -2px 4px rgba(0,0,0,.35); }
/* xs: discs only (the name is read by screen readers and shown in the item's wood-name slot) */
.hb-wood-xs { gap: 6px; }
.hb-wood-xs .hb-chip, .hb-wood-xs .hb-chip:has(input:checked) { padding: 0; border: 0; background: none; border-radius: 50%; min-height: 0; }
.hb-wood-xs .hb-chip-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hb-wood-xs .hb-disc { width: 34px; height: 34px; margin: 5px; }
.hb-wood-xs .hb-chip:has(input:checked) .hb-disc { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }

/* 3 cards */
.hb-cards-head { margin-bottom: var(--s6); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.hb-card-row { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s6) var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.hb-card { display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.hb-card-pic .pic, .hb-card-pic .img-ph { aspect-ratio: 4 / 5; }
.hb-card .hb-name { font-size: 22px; margin-top: var(--s2); }
.hb-card .hb-dims { margin-top: 0; }
.hb-card .hb-wood { margin-top: var(--s2); }
.hb-card-buy { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
.hb-card .hb-add { padding: 0 var(--s4); }
@media (max-width: 480px) { .hb-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s4); }
  .hb-card .hb-name { font-size: 19px; } .hb-card-buy { flex-wrap: wrap; } .hb-card .hb-add { width: 100%; } .hb-wood-xs .hb-disc { width: 28px; height: 28px; } }

/* 4 sticky bottom bar (shows once the hero has scrolled past; home-buy.js toggles .is-shown) */
.hb-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: var(--s4) var(--s5);
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom));
  background: rgba(20,17,16,.78); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line); transform: translateY(100%); transition: transform var(--dur) var(--ease); }
.hb-sticky.is-shown { transform: none; }
.hb-sticky .hb-name { font-size: 18px; }
.hb-sticky .hb-dims { margin-top: 1px; }
.hb-sticky .hb-price { font-size: 22px; }
.hb-sticky .hb-buy { gap: var(--s4); }
.hb-sticky .hb-wood { margin-left: auto; }
.hb-sticky .hb-buy { margin-left: 0; }
.hb-sticky .hb-wood { flex-wrap: nowrap; }
.hb-sticky-price, .hb-add-short { display: none; }
@media (max-width: 640px) {
  .hb-sticky { gap: var(--s3); }
  .hb-sticky .hb-dims { display: none; } .hb-sticky .hb-sticky-price { display: block; }
  .hb-sticky .hb-wood { margin-left: auto; gap: 2px; } .hb-sticky .hb-wood-xs .hb-disc { width: 28px; height: 28px; margin: 4px; }
  .hb-sticky .hb-buy { margin-left: 0; width: auto; } .hb-sticky .hb-buy .hb-price { display: none; }
  .hb-sticky .hb-add { padding: 0 var(--s4); white-space: nowrap; } .hb-sticky .hb-add-long { display: none; } .hb-sticky .hb-add-short { display: inline; }
}
