/*
  Bento r13 (Phase C-2): shop, collection pages and product page, from the approved preview v7.4
  (shop.html and product.html inline styles, plus the pieces of site.css they use).
  Loaded only on the shop, product category / tag archives, product search and single product pages.
  Scoped ".bento .bx" like tokens.css and shell.css (see the note there).
*/

/* Full width like the homepage: the template prints its own .wrap. */
body.bento.bento-c2 #content > .col-full { max-width: none; padding: 0; margin: 0; }
body.bento.bento-c2 .site-content { padding-bottom: 0; }

/* ---------- Shop and collection pages (preview shop.html) ---------- */
.bento .bx .shop-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; padding: clamp(36px, 6vw, 72px) 0 28px; }
.bento .bx .shop-head h1 { margin: 0 0 12px; }
.bento .bx .shop-head p { margin: 0; color: var(--ink-soft); max-width: 34em; }
.bento .bx .crumbs { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.bento .bx .crumbs a { text-decoration: none; }
.bento .bx .crumbs a:hover { color: var(--ink); }
.bento .bx .filters { display: flex; align-items: center; gap: 18px; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; background: var(--paper); }
.bento .bx .cats { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 10px 0; min-width: 0; }
.bento .bx .cats a { font-size: 14.5px !important; }
.bento .bx .sort .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bento .bx .cats a { white-space: nowrap; text-decoration: none; font-size: 15px; color: var(--ink-soft); padding: 4px 0; }
.bento .bx .cats a sup { font-size: 11px; color: var(--muted); margin-left: 2px; }
.bento .bx .cats a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 9px; text-decoration-thickness: 1.5px; }
.bento .bx .sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.bento .bx .sort select { border: 0; background: none; font-size: 14px; color: var(--ink); padding: 8px 0; cursor: pointer; }
.bento .bx .sort .sort-pill { display: none; } /* r18: phones only, see the 760 px block */
.bento .bx .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 14px; padding: 32px 0 96px; }
.bento .bx .card { position: relative; }
.bento .bx .card .ph { display: block; background: var(--stage); overflow: hidden; }
.bento .bx .card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; transition: transform .6s var(--ease); }
.bento .bx .card a.ph:hover img { transform: scale(1.03); }
.bento .bx .card .meta { padding: 14px 4px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.bento .bx .card h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.1; }
.bento .bx .card h2 a { text-decoration: none; }
.bento .bx .card .sub { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.bento .bx .card .swatches { grid-column: 1; margin-top: 8px; }
.bento .bx .card .ph { border-radius: 6px; }
.bento .bx .card .ph img { transform: scale(1.3); transform-origin: 50% 62%; }
.bento .bx .card a.ph:hover img { transform: scale(1.35); }
.bento .bx .card .plus { position: absolute; top: 6px; right: 6px; z-index: 3; }
.bento .bx .card .oos { position: absolute; top: 14px; right: 14px; font-size: 12px; color: var(--muted); background: rgba(250,248,243,.9); padding: 3px 9px; border-radius: 20px; }
/* Collection intro banner: photo + two lines. */
.bento .bx .banner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; border-radius: 16px; overflow: hidden; background: var(--paper-deep); margin: clamp(8px, 2vw, 20px) 0 28px; }
.bento .bx .banner .txt { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: flex-end; }
.bento .bx .banner h1 { margin: 0 0 14px; }
.bento .bx .banner p { margin: 0; color: var(--ink-soft); max-width: 30em; font-size: 17px; }
.bento .bx .banner p + p { margin-top: 4px; }
.bento .bx .banner .ph { position: relative; background: var(--stage); overflow: hidden; aspect-ratio: 16 / 10; }
.bento .bx .banner .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* v7.3: All chairs, On sale and New arrivals use the Monaco photo (16:9): the chair runs from 12% to 85% of its height and sits at ~60% across.
   The box is 16:10, so only a sliver of height is cropped; if the text makes the row taller, the sides crop around the chair. */
.bento .bx .banner .ph img.is-monaco { object-position: 60% 50%; }
.bento .bx .banner-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 4px; }
/* Help choosing strip between rows. */
.bento .bx .help { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 3fr) repeat(3, minmax(0, 3fr)); gap: 2px; border-radius: 16px; overflow: hidden; margin: 8px 0; }
.bento .bx .help > * { background: var(--paper-deep); padding: 26px 24px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.bento .bx .help .h { background: var(--forest); color: #fff; justify-content: center; }
.bento .bx .help .h b { font-family: var(--serif); font-weight: 300; font-size: 30px; line-height: 1.05; }
.bento .bx .help a { transition: background .3s var(--ease); }
.bento .bx .help a:hover { background: var(--stage-soft); }
.bento .bx .help a b { font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bento .bx .help a b .arr { transition: transform .45s var(--ease); }
.bento .bx .help a:hover b .arr { transform: translateX(4px); }
.bento .bx .help a span { font-size: 14px; color: var(--ink-soft); }
/* v7.2: on phones the wrapped list of links becomes one Filter button that opens a bottom sheet. */
.bento .bx .filter-btn { display: none; }
@media (max-width: 1100px) {
	.bento .bx .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
	.bento .bx .banner { grid-template-columns: 1fr; min-height: 0; }
	.bento .bx .banner .ph { order: -1; }
	.bento .bx .help { grid-template-columns: 1fr; }
	.bento .bx .card .plus { top: 2px; right: 2px; }
	.bento .bx .shop-head { grid-template-columns: 1fr; gap: 10px; }
	.bento .bx .grid { grid-template-columns: 1fr 1fr; gap: 28px 10px; }
	.bento .bx .card h2 { font-size: 20px; }
	.bento .bx .card .meta { grid-template-columns: 1fr; }
	.bento .bx .filters { flex-wrap: nowrap; gap: 8px; padding: 6px 0; }
	.bento .bx .cats { display: none; }
	.bento .bx .filter-btn { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid rgba(27,27,24,.18); border-radius: 999px; background: rgba(255,255,255,.55); cursor: pointer; text-align: left; font-size: 15px; transition: background .2s ease-out, transform .2s ease-out; }
	.bento .bx .filter-btn:active { transform: scale(.98); background: #fff; }
	.bento .bx .filter-btn svg { width: 18px; height: 18px; flex: none; }
	.bento .bx .filter-btn .k { color: var(--ink-soft); flex: none; }
	.bento .bx .filter-btn b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.bento .bx .filter-btn .n { font-size: 13px; color: var(--ink-soft); flex: none; }
	.bento .bx .sort span { display: none; }
	/* r18: the Sort control reads "Sort" so the Collection pill has room for "All chairs". The real select
	   sits over it, invisible, so the tap and the native picker work as before. */
	.bento .bx .sort { position: relative; flex: none; }
	.bento .bx .sort select { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; cursor: pointer; }
	.bento .bx .sort .sort-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 2px; font-size: 14px; color: var(--ink); pointer-events: none; }
	.bento .bx .sort .sort-pill svg { width: 10px; height: 6px; }
	.bento .bx .sort:has(select:focus-visible) .sort-pill { outline: 2px solid var(--forest); outline-offset: 4px; border-radius: 4px; }
	.bento .bx .card h2 { line-height: 1.2; }
	.bento .bx .card .sub { line-height: 1.4; }
}
/* Shared from the preview's site.css: swatch row, large button, the collection sheet rows, "See all chairs". */
.bento .bx .swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.bento .bx .btn-lg { min-height: 56px; font-size: 16px; padding: 0 28px; }
.bento .bx .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 4px 14px 4px 22px; }
.bento .bx .sheet-head .serif { font-size: 28px; margin: 0; }
.bento .bx .sheet-head small { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink-soft); letter-spacing: 0; }
.bento .bx .sheet-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 14px; }
.bento .bx .fs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid rgba(27,27,24,.1); text-decoration: none; font-size: 17px; line-height: 1.3; color: var(--ink); transition: background .2s ease-out; }
.bento .bx .fs-row:active { background: rgba(27,27,24,.05); }
.bento .bx .fs-row .n { color: var(--ink-soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.bento .bx .fs-row[aria-current="page"] { font-weight: 500; }
.bento .bx .fs-row[aria-current="page"] .n { color: var(--ink); }
.bento .bx .fs-row svg { width: 16px; height: 16px; margin-right: 10px; color: var(--green); flex: none; }
.bento .bx .fs-row .l { display: inline-flex; align-items: center; }
.bento .bx .fs-row .l i { display: inline-block; width: 26px; flex: none; }
.bento .bx .see-all { display: none; grid-column: 1 / -1; justify-content: center; padding: 4px 0 0; }
@media (max-width: 760px) {
	.bento .bx .grid.is-collapsed .later, .bento .bx .grid.is-collapsed .help { display: none; }
	.bento .bx .grid.is-collapsed .see-all { display: flex; }
}
@media (max-width: 900px) {
	.bento .bx .cats a, .bento .bx .card h2 a, .bento .bx .crumbs a, .bento .bx .back, .bento .bx .link { position: relative; }
	.bento .bx .card h2 a::before, .bento .bx .link::before { content: ""; position: absolute; left: -8px; right: -8px; top: -14px; bottom: -14px; }
	.bento .bx .cats a { padding: 10px 7px !important; margin: 0 -7px; }
	.bento .bx .link, .bento .bx .crumbs a { z-index: 1; }
	.bento .bx .crumbs a, .bento .bx nav[aria-label="Breadcrumb"] a { padding: 10px 8px; margin: -10px -8px; }
	.bento .bx .sw-btn::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; }
	.bento .bx .back { min-height: 44px; }
	.bento .bx .filters select, .bento .bx .filters .sort { min-height: 44px; }
	.bento .bx .qty button { min-width: 44px; min-height: 44px; }
}
/* ---------- Product page (preview product.html) ---------- */
/* Layout follows the Next.js demo's ProductDetail: sticky photo left, details right. */
.bento .bx .pd-top { display: flex; align-items: center; gap: 16px; padding: 22px 0 26px; font-size: 14px; color: var(--muted); }
.bento .bx .back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 3px; padding: 8px 12px; cursor: pointer; color: var(--ink); text-decoration: none; }
.bento .bx .back:hover { border-color: var(--ink); }
.bento .bx .back .arr { width: 16px; height: 8px; transform: scaleX(-1); }
.bento .bx .back:hover .arr { transform: scaleX(-1) translateX(4px); }
.bento .bx .pd-top nav a { text-decoration: none; }
.bento .bx .pd-top nav a:hover { color: var(--ink); }
.bento .bx .pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.bento .bx .pd-media { position: sticky; top: 96px; }
.bento .bx .pd-stage { background: var(--stage); overflow: hidden; }
.bento .bx .pd-stage img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: 50% 58%; }
.bento .bx .thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: 2px; }
.bento .bx .thumbs button { padding: 0; border: 0; background: var(--stage); cursor: pointer; position: relative; }
.bento .bx .thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 60%; }
.bento .bx .thumbs button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.bento .bx .pd-info { padding-top: 8px; max-width: 560px; }
.bento .bx .pd-info .collection { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.bento .bx .pd-info .collection a { text-decoration: none; }
.bento .bx .pd-info h1 { margin: 0 0 14px; font-size: clamp(48px, 6vw, 76px); }
/* v7.3: the detail line under the chair name is smaller and greyer. */
.bento .bx .tagline { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 0 0 20px; }
.bento .bx .pd-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 6px; font-size: 26px; }
.bento .bx .pd-price .save { font-size: 14px; color: var(--green); }
.bento .bx .warranty { font-size: 14px; color: var(--muted); margin: 0 0 26px; }
.bento .bx .variant-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.bento .bx .variant-head span:first-child { font-size: 15px; font-weight: 500; }
.bento .bx .variant-head span:last-child { color: var(--ink-soft); }
.bento .bx .sw-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bento .bx .sw-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; transition: transform .2s var(--ease); }
.bento .bx .sw-btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.bento .bx .sw-btn:hover { transform: scale(1.06); }
.bento .bx .sw-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.bento .bx .sw-btn.out::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1.5px; background: rgba(255,255,255,.9); transform: rotate(-45deg); box-shadow: 0 0 0 .5px rgba(0,0,0,.25); }
.bento .bx .stock-line { font-size: 14px; color: var(--green); margin: 0 0 24px; }
.bento .bx .stock-line.out { color: #9a3b2a; }
.bento .bx .buy { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-bottom: 10px; }
.bento .bx .buy .qty { margin: 0; height: 56px; }
.bento .bx .buy .qty button { width: 44px; height: 54px; }
.bento .bx .ask-tg { margin-bottom: 26px; }
.bento .bx .features { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; font-size: 15px; }
.bento .bx .features li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--ink-soft); }
.bento .bx .features li svg { margin-top: 5px; color: var(--green); }
.bento .bx .finder-prompt { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); padding: 16px 18px; text-decoration: none; background: #fff; }
.bento .bx .finder-prompt:hover { border-color: var(--ink-soft); }
.bento .bx .finder-prompt > span:last-child { white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.bento .bx .facts-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 18px; }
.bento .bx .facts-strip div { background: var(--paper-deep); padding: 14px 16px; font-size: 14px; }
.bento .bx .facts-strip b { display: block; font-weight: 500; }
.bento .bx .specs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.bento .bx .specs h2 { margin: 0 0 18px; }
/* v7.3: compact, two columns, the label above its value. */
.bento .bx dl.rows { margin: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.bento .bx dl.rows div { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.bento .bx dl.rows dt { color: var(--muted); font-size: 12.5px; }
.bento .bx dl.rows dd { margin: 0; }
.bento .bx dl.rows .wide { grid-column: 1 / -1; }
@media (max-width: 319px) {
	.bento .bx dl.rows { grid-template-columns: 1fr; }
}
.bento .bx .desc { max-width: 40em; color: var(--ink-soft); }
.bento .bx .trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.bento .bx .trust div { background: var(--paper-deep); padding: 28px; }
.bento .bx .trust p.serif { font-size: 26px; margin: 0 0 8px; }
.bento .bx .trust p:last-child { margin: 0; color: var(--ink-soft); font-size: 15px; }
.bento .bx .related-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.bento .bx .related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 2px; }
.bento .bx .related a { text-decoration: none; }
.bento .bx .related .ph { display: block; background: var(--stage); }
.bento .bx .related img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; }
.bento .bx .related p { margin: 12px 2px 0; }
.bento .bx .related p.serif { font-size: 22px; }
@media (max-width: 900px) {
	.bento .bx .pd { grid-template-columns: 1fr; }
	.bento .bx .pd-media { position: static; }
	.bento .bx .specs, .bento .bx .trust { grid-template-columns: 1fr; }
	.bento .bx .related { grid-template-columns: 1fr 1fr; }
	.bento .bx .facts-strip { grid-template-columns: 1fr; }
	.bento .bx .pd-top nav { display: none; }
	.bento .bx .back { border: 0; padding: 10px 0; margin: -10px 0; font-size: 13px; color: var(--muted); }
	.bento .bx .back:hover { color: var(--ink); }
	.bento .bx .pd-top { padding: 14px 0 16px; }
}

/* ---------- r13 additions (theme only) ---------- */
/* No JavaScript: the phone shows the wrapped collection links instead of the sheet button, and all chairs. */
html:not(.bento-js) .bento .bx .filter-btn { display: none; }
@media (max-width: 760px) {
	html:not(.bento-js) .bento .bx .cats { display: flex; }
	html:not(.bento-js) .bento .bx .filters { flex-wrap: wrap; }
}
.bento .bx .sort .sort-go { margin-left: 8px; font-size: 14px; text-decoration: underline; cursor: pointer; }
.bento .bx .card .ph.is-empty { aspect-ratio: 4 / 5; }
.bento .bx .card .price { white-space: nowrap; }
/* Product form: the colour swatches are radio buttons (so Add to cart works without JavaScript). */
.bento .bx .sw-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bento .bx .sw-row label.sw-btn { display: inline-block; }
.bento .bx .sw-row input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 3px; }
.bento .bx .sw-row input:checked + label { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.bento .bx .buy .qty input { width: 40px; height: 54px; border: 0; background: none; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.bento .bx .buy .qty input::-webkit-outer-spin-button, .bento .bx .buy .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bento .bx .pd-stage.is-empty { aspect-ratio: 4 / 4.6; }
.bento .bx .pd-msg { font-size: 14px; color: #9a3b2a; margin: 0 0 12px; }
.bento .bx .pd-msg:empty { display: none; }
.bento .bx .woocommerce-notices-wrapper:empty { display: none; }
.bento .bx .woocommerce-notices-wrapper { margin: 0 0 16px; }
.bento .bx form.sort { margin: 0; }
/* #page has overflow-x: hidden (bento.css), which makes it the scroll box for the sticky photo; clip keeps the
   sideways guard without that, so the photo sticks under the header as in the preview. */
body.bento.bento-c2 #page { overflow-x: clip; }
/* Old related-products and form rules from bento.css / Storefront. */
body.bento.single-product .bx .related { margin: 0; clear: none; }
.bento .bx .thumbs button[aria-pressed="true"]::after { display: block; } /* An older rule hides button ::after. */
