/* ==========================================================================
   Silk Road shop (PRE-LAUNCH): the shop's own parts only.

   The page frame (header, menu, footer, hero band, sections, buttons, notices,
   type, tokens, focus ring) is the website's real styles.css, copied from
   ../site/ at build time and loaded first. Nothing from it is repeated here.
   Everything below reads its custom properties (--green, --line, --space-4,
   --radius, --shadow-md ...): no raw colours or sizes that have a token.
   Phone first. Breakpoints are the website's: 600px and 900px.
   ========================================================================== */

/* ---------- page frame ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }
main { flex: 1; }
main [hidden], .drawer [hidden] { display: none !important; }
.shop-section { padding-block: clamp(var(--space-6), 6vw, var(--space-8)); }
/* The shop's title band: flat signature sage, no photo (owner, Nov 2026). Sage keeps the website's white
   header readable, matches the Book page band and the footer, and leaves product photos as the colour on the page. */
.hero.hero--shop { min-height: 0; padding-bottom: var(--space-6); background: var(--green); }
.hero--shop .hero-title, .hero--shop .hero-sub { text-shadow: none; } /* the shadow is for text over photos */
.hero--shop .hero-title { margin-bottom: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.08; }
.hero--shop .hero-title a { color: inherit; text-decoration: none; }
.hero--shop .hero-sub { margin-top: var(--space-3); margin-bottom: 0; }
/* Inner pages (product, cart, checkout, thanks): a slim band that holds the breadcrumb. Sage keeps the header readable. */
.hero.hero--slim { padding-block: calc(var(--header-h) + var(--space-2)) var(--space-2); }
.hero--slim .hero-content { text-align: left; }
.band-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--white); }
.band-crumbs li { display: inline-flex; align-items: center; min-height: 44px; }
.band-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 var(--space-3) 0 var(--space-2); border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); opacity: .8; }
.band-crumbs a { display: inline-flex; align-items: center; min-height: 44px; margin-left: calc(var(--space-2) * -1); padding: 0 var(--space-2); color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.band-crumbs a:hover { text-decoration-thickness: 2px; }
.band-crumbs [aria-current] { font-weight: 600; overflow-wrap: anywhere; }

/* the cart button sits beside the website's burger (phones) or nav (desktop) */
.header-tools { display: flex; align-items: center; gap: var(--space-2); }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; min-width: 44px; padding: 0 var(--space-3); color: var(--white); text-decoration: none; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--white) 60%, transparent); background: transparent; font-size: var(--text-base); font-weight: 500; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.cart-btn:hover { background: color-mix(in srgb, var(--white) 16%, transparent); border-color: var(--white); }
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cart-label { display: inline; }
.cart-count { min-width: 1.6em; height: 1.6em; padding: 0 .4em; border-radius: var(--radius-pill); background: var(--cream); color: var(--ink); font-size: var(--text-xs); font-weight: 600; line-height: 1.6em; text-align: center; }
.cart-count[data-n="0"] { background: transparent; color: var(--white); border: 1px solid color-mix(in srgb, var(--white) 60%, transparent); line-height: calc(1.6em - 2px); }
body.drawer-open { overflow: hidden; }
/* the phone's sticky Add bar must not hide what keyboard focus scrolls to (the footer's last links) */
html:has(body.has-sticky-buy) { scroll-padding-bottom: 6rem; }

/* the website's notice, sized for a shop column instead of a paragraph */
.shop-section .notice { max-width: none; margin: 0 0 var(--space-4); }
.notice p + p { margin-top: var(--space-2); }
.notice ul { margin: 0; padding-left: 1.2em; }
.notice:focus { outline: none; }
.fine a { display: inline-flex; align-items: center; min-height: 44px; }
/* Links inside a sentence (the Terms line at checkout) stay inline so the lines keep even spacing; the extra padding
   still gives them a taller tap area without pushing the lines apart. */
.co-legal a { display: inline; min-height: 0; padding-block: 10px; }
.link-btn { background: none; border: 0; padding: 0 var(--space-2); min-height: 44px; min-width: 44px; color: var(--green); font-family: var(--font-body); font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn--block { width: 100%; }

.shop-note { font-size: var(--text-base); color: var(--green); font-weight: 600; margin: 0 0 var(--space-4); }
.shop-note:empty { display: none; }
.hint { font-size: var(--text-sm); color: var(--muted); margin: var(--space-1) 0 0; }
.hint--good { color: var(--green); font-weight: 600; }

/* ---------- group tabs and option chips: one look, the booking form's chips ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.tab, .chip > span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--field); border-radius: var(--radius-pill); background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.tab:hover, .chip:hover > span { border-color: var(--ink); background: var(--grey-soft); }
.tab[aria-pressed="true"], .chip input:checked ~ span { background: var(--green); border-color: var(--green); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip input:focus-visible ~ span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green); }
.chip input:disabled { cursor: not-allowed; }
.chip > span { flex-direction: column; gap: 0; line-height: 1.25; }
.chip-why { font-size: var(--text-2xs); font-weight: 600; letter-spacing: .02em; }
.chip-why:empty { display: none; }
.chip input:disabled ~ span { color: var(--muted); background: var(--grey-soft); border-color: var(--line); cursor: not-allowed; }
.chip input:disabled ~ span .chip-label { text-decoration: line-through; }
.chip input:disabled:checked ~ span { background: var(--grey); }

/* ---------- product cards: the website's week-card language (white, hairline, 10px corners, lift on hover) ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-3); }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-5) var(--space-4); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.card:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--shadow-md); }
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; border-radius: var(--radius); }
.card-photo { position: relative; aspect-ratio: 1; background: var(--grey-soft); display: grid; place-items: center; overflow: hidden; }
.card-photo img.photo { width: 100%; height: 100%; object-fit: cover; }
/* While a product photo loads, a steaming mug (img/loading-mug.svg) sits behind it; shop.js adds .is-in on load. */
img.photo:not(.is-in) { background: var(--grey-soft) url("/img/loading-mug.svg") center / 52% no-repeat; }
.line-thumb img.photo:not(.is-in) { background-size: 70%; }
/* No photo: a resting mug and "Photo coming soon". */
.no-photo { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-3); text-align: center; color: var(--muted); font-size: var(--text-sm); font-weight: 500; }
.no-photo img { width: 42%; min-width: 56px; max-width: 140px; height: auto; }
/* While a photo loads (steaming mug behind it, see img.photo above): the words, over the lower part of the box. */
.card-photo, .gallery-slide { position: relative; }
.pic-loading { position: absolute; left: 0; right: 0; top: 76%; text-align: center; font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; color: var(--green); pointer-events: none; }
.pic-loading i { font-style: normal; animation: dotpulse 1.2s ease-in-out infinite; }
.pic-loading i:nth-child(2) { animation-delay: .2s; }
.pic-loading i:nth-child(3) { animation-delay: .4s; }
@keyframes dotpulse { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.is-loaded .pic-loading { display: none; }
@media (prefers-reduced-motion: reduce) { .pic-loading i { animation: none; opacity: 1; } }
.card-body { padding: var(--space-3) var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.card-name { font-size: 1.15rem; line-height: 1.2; margin: 0; }
.card-price { font-size: var(--text-base); font-weight: 600; color: var(--green); margin: 0; }
.card-note { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.card--out .card-photo img.photo { opacity: .55; }
/* cards with several photos: two stacked layers that crossfade, arrows over the photo (never inside the link) */
.card-photo .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s var(--ease); }
.card-photo .pic.on { opacity: 1; }
.card--out .card-photo .pic.on { opacity: .55; }
.card--out .card-photo .pic:not(.on) { opacity: 0; }
.card-photo .badge { z-index: 1; }
/* Pre-order: gold, larger than the Sold out badge, so it is the first thing seen on a card and on the product page. */
.badge.badge--pre, .pre-flag { background: var(--gold-soft); border: 1px solid var(--gold); color: var(--ink); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; box-shadow: var(--shadow-md); }
.badge.badge--pre { top: var(--space-3); left: var(--space-3); padding: 8px 14px 6px; font-size: var(--text-xs); line-height: 1; } /* caps sit high in their line box: a little more above than below centres them */
.pre-flag { display: inline-block; margin: 0 0 var(--space-3); padding: 9px 16px 7px; border-radius: var(--radius-pill); font-size: var(--text-sm); line-height: 1; box-shadow: none; }
.card-arrows { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; pointer-events: none; z-index: 2; }
.card-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--black) 58%, transparent); color: var(--white); display: grid; place-items: center; cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity .2s var(--ease), background-color .2s var(--ease); }
.card-nav::before { content: ""; position: absolute; inset: -4px; } /* 44px hit area */
.card-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.card-nav:hover { background: color-mix(in srgb, var(--black) 78%, transparent); }
.card-prev { left: var(--space-2); } .card-next { right: var(--space-2); }
.card-nav:focus-visible { opacity: 1; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--green); }
.card-dots { position: absolute; bottom: var(--space-2); left: 0; right: 0; display: flex; justify-content: center; gap: 5px; opacity: 0; transition: opacity .2s var(--ease); }
.card-dot { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--white) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--black) 30%, transparent); }
.card-dot.is-on { background: var(--white); }
.card:hover .card-nav, .card:focus-within .card-nav, .card:hover .card-dots, .card:focus-within .card-dots { opacity: 1; }
@media (hover: none), (pointer: coarse) { .card-nav, .card-dots { opacity: 1; } } /* no hover on a phone: always shown */
@media (prefers-reduced-motion: reduce) { .card-photo .pic, .card-nav, .card-dots { transition: none; } }
.badge { position: absolute; top: var(--space-2); left: var(--space-2); padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.card--gift { background: var(--cream-soft); }
.card--gift .card-photo { background: var(--cream); }
.card--disabled .card-photo { opacity: .6; }
.card--disabled:hover { box-shadow: none; transform: none; border-color: var(--line); }
.gift-icon { width: 44%; max-width: 120px; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.gift-icon .accent { stroke: var(--gold); }

/* loading */
.skel { background: linear-gradient(90deg, var(--grey-soft), var(--grey), var(--grey-soft)); background-size: 200% 100%; animation: shop-shimmer 1.4s linear infinite; border-radius: var(--radius-sm); }
.skel-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skel-card .skel:first-child { aspect-ratio: 1; border-radius: 0; }
.skel-card div + div { height: 16px; margin: var(--space-3); }
.skel-card div + div + div { width: 50%; }
@keyframes shop-shimmer { to { background-position: -200% 0; } }

/* empty and error states */
.state, .empty { text-align: center; padding: var(--space-7) var(--space-4); max-width: 34rem; margin-inline: auto; }
.state h1, .state h2 { font-size: 1.6rem; margin: 0 0 var(--space-3); }
.empty { padding-block: var(--space-6); }
.empty .btn { margin-top: var(--space-2); }

/* ---------- product page ---------- */
.product { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; } }
.gallery { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); border: 1px solid var(--line); background: var(--grey-soft); }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; display: grid; place-items: center; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gal-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer; display: grid; place-items: center; transition: background-color .3s var(--ease); }
.gal-btn:hover { background: var(--cream); }
.gal-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gal-prev { left: var(--space-2); } .gal-next { right: var(--space-2); }
.gal-btn:disabled, .gal-btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.gal-count { position: absolute; bottom: var(--space-2); right: var(--space-2); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 10px; font-size: var(--text-xs); }
.product h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: .2em; }
.price { font-size: 1.5rem; font-weight: 600; color: var(--green); margin: 0 0 var(--space-1); }
.avail { font-size: var(--text-base); font-weight: 600; margin: 0 0 var(--space-4); min-height: 1.6em; }
.avail--low { color: var(--gold); }
.avail--out { color: var(--alert-dark); }
/* The product story from Square (cleaned in shop.mjs and again in shop.js): paragraphs, bold, lists, two heading sizes. */
.desc { max-width: 60ch; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.desc > :first-child { margin-top: 0; }
.desc > :last-child { margin-bottom: 0; }
.desc p { margin: 0 0 var(--space-3); }
.desc h3 { margin: var(--space-5) 0 var(--space-2); font-size: 1.3rem; }
.desc h4 { margin: var(--space-4) 0 var(--space-1); font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; letter-spacing: 0; text-transform: none; }
.desc ul, .desc ol { margin: 0 0 var(--space-3); padding-left: 1.3em; }
.desc ul { list-style: disc; }
.desc ol { list-style: decimal; }
.desc li { margin-bottom: var(--space-1); padding-left: var(--space-1); }
.desc li::marker { color: var(--green); }
.opt { border: 0; padding: 0; margin: 0 0 var(--space-4); min-width: 0; }
.opt legend { padding: 0; font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--space-2); }
.opt-fact { font-size: var(--text-base); margin: 0 0 var(--space-4); }
.buy { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
.buy .btn { flex: 1 1 200px; }
.reassure { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--muted); }
.reassure-dot { color: var(--field); }
@media (max-width: 480px) { .reassure { flex-direction: column; gap: var(--space-1); } .reassure-dot { display: none; } } /* two short lines, no dangling dot */

/* Phones: the price and Add button stay in reach once the page's own button has scrolled away. */
.sticky-buy { display: none; position: fixed; inset: auto 0 0 0; z-index: var(--z-cta); align-items: center; gap: var(--space-3); padding: var(--space-3) max(var(--space-4), env(safe-area-inset-right)) max(var(--space-3), env(safe-area-inset-bottom)) max(var(--space-4), env(safe-area-inset-left)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px color-mix(in srgb, var(--black) 10%, transparent); animation: shop-rise .25s var(--ease); }
.sticky-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sticky-price { font-size: var(--text-lg); font-weight: 600; color: var(--green); }
.sticky-var { font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-buy .btn { flex: 0 0 auto; min-width: 9.5rem; }
@media (max-width: 720px) {
  .sticky-buy { display: flex; }
  /* room under the footer so the bar never covers its last line (the footer's own sage fills it) */
  body.has-sticky-buy .site-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@keyframes shop-rise { from { transform: translateY(100%); } to { transform: none; } }

/* quantity stepper: the booking form's */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: var(--radius-pill); padding: 2px; background: var(--bg); transition: border-color .15s var(--ease); }
.stepper:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green); }
.step-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s var(--ease), transform .08s; }
.step-btn:hover { background: var(--grey); }
.step-btn:active { transform: scale(.92); }
.step-btn:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.step-btn:focus-visible, .qty-input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--green) !important; border-radius: var(--radius-pill); }
.qty-input { width: 56px; height: 44px; border: 0; background: transparent; font-family: var(--font-body); font-size: var(--text-md); text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-val { min-width: 36px; text-align: center; font-weight: 600; }

/* ---------- cart lines ---------- */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-1) var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.line-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--grey-soft); display: grid; place-items: center; grid-row: span 2; }
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-thumb img.ph { width: 60%; height: auto; }
.line-name { font-weight: 600; text-decoration: none; line-height: 1.3; }
a.line-name { display: inline-block; padding-block: 12px; margin-block: -12px; } /* a 44px hit area without taller rows */
a.line-name:hover { text-decoration: underline; }
.line-var { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.line-total { font-weight: 600; text-align: right; white-space: nowrap; }
.line-ctl { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.line--static { grid-template-columns: 56px 1fr auto; padding: var(--space-3) 0; }
.line--static .line-thumb { width: 56px; height: 56px; grid-row: auto; }
.line--static .line-body { min-width: 0; }
.totals { margin: var(--space-4) 0; }
.totals-row { display: flex; justify-content: space-between; gap: var(--space-4); padding: 3px 0; }
.totals-row--big { font-weight: 600; font-size: var(--text-lg); border-top: 1px solid var(--line); margin-top: var(--space-2); padding-top: var(--space-3); }

/* ---------- free shipping progress and the one add-on ---------- */
.ship-progress { margin: var(--space-3) 0 var(--space-2); padding: var(--space-3) var(--space-4); background: var(--cream-soft); border: 1px solid var(--cream); border-radius: var(--radius-sm); }
.ship-msg { margin: 0 0 var(--space-2); font-size: var(--text-base); font-weight: 600; }
.ship-progress--done .ship-msg { color: var(--green); }
.meter { height: 8px; border-radius: var(--radius-pill); background: var(--grey); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .5s var(--ease); }
.ship-fine { margin: var(--space-2) 0 0; font-size: var(--text-xs); color: var(--muted); }
.suggest { margin: var(--space-4) 0 var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.suggest-title { margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--green); }
.suggest-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; }
.suggest .line-thumb { width: 56px; height: 56px; grid-row: auto; }
.suggest-body .line-name { display: inline-block; }
.suggest-btn { min-height: 44px; padding-inline: var(--space-4); }

/* ---------- cart drawer ---------- */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100vw, 440px); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-overlay); z-index: var(--z-modal); }
.drawer[open] { display: flex; flex-direction: column; animation: shop-slide-in .3s var(--ease); }
.drawer::backdrop { background: color-mix(in srgb, var(--black) 45%, transparent); }
@keyframes shop-slide-in { from { transform: translateX(100%); } to { transform: none; } }
/* Short windows (a phone on its side, 400% zoom, big text): the footer buttons would fill the screen and squeeze the
   item list to a sliver. The whole drawer scrolls instead, with the list at its natural height. */
@media (max-height: 640px) {
  .drawer[open] { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .drawer-head { position: sticky; top: 0; z-index: 1; background: var(--bg); }
  .drawer-body { overflow: visible; }
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.6rem; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background-color .15s var(--ease); }
.icon-btn:hover { background: var(--grey); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#drawer-added:empty { display: none; }
.added { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--green-tint); border-bottom: 1px solid var(--line); animation: shop-fade-up .3s var(--ease) both; }
.added-check { flex: none; width: 36px; height: 36px; }
.added-line { margin: 0; font-weight: 600; }
.added-what { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-4); overscroll-behavior: contain; }
.drawer-foot { padding: var(--space-4); border-top: 1px solid var(--line); background: var(--cream-soft); padding-bottom: max(var(--space-4), env(safe-area-inset-bottom)); }
.drawer-foot .totals { margin-top: 0; }
.drawer-foot .btn + .btn { margin-top: var(--space-2); }

/* ---------- cart and checkout pages ---------- */
.two-col { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; } .two-col .panel--sticky { position: sticky; top: calc(var(--header-h) + var(--space-4)); } }
/* the website's form panel (grey-soft, 16px corners) */
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); background: var(--grey-soft); box-shadow: var(--shadow-sm); }
@media (min-width: 600px) { .panel { padding: var(--space-5); } }
.panel h2 { font-size: 1.5rem; }
fieldset.delivery { border: 0; padding: 0; margin: 0 0 var(--space-4); min-width: 0; }
fieldset.delivery > legend { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.12; padding: 0; margin-bottom: var(--space-4); }

/* radio cards: the booking form's package cards (hairline, 10px corners, tick mark on the right) */
.choice { position: relative; display: flex; gap: var(--space-3); align-items: center; padding: var(--space-4); margin-bottom: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.choice:hover { border-color: var(--field); background: var(--grey-soft); }
.choice:has(input:checked) { border-color: var(--green); background: color-mix(in srgb, var(--green) 4%, var(--bg)); box-shadow: 0 0 0 1px var(--green); }
.choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { flex: none; align-self: flex-start; width: 56px; height: 56px; padding: 3px; border-radius: 50%; background: var(--cream-soft); border: 1px solid var(--cream); color: var(--ink); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.choice:has(input:checked) .choice-icon { background: var(--cream); border-color: var(--line); }
.choice-icon .accent { stroke: var(--gold); }
@media (max-width: 480px) { .choice { padding: 14px var(--space-3); } .choice-icon { width: 40px; height: 40px; padding: 2px; } }
.choice-text { flex: 1; min-width: 0; }
.choice-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); font-weight: 600; font-size: var(--text-md); }
.choice-title > :last-child { color: var(--green); font-size: var(--text-base); white-space: nowrap; }
.choice-desc { display: block; font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-1); line-height: 1.45; }
.choice-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--field); background: var(--bg); position: relative; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.choice input:checked ~ .choice-mark { border-color: var(--green); background: var(--green); }
.choice input:checked ~ .choice-mark::after { content: ""; position: absolute; top: 3px; left: 7px; width: 4px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.pickups { margin: calc(var(--space-2) * -1) 0 var(--space-3) var(--space-5); padding: 0; border: 0; min-width: 0; }
.pickups > legend { font-weight: 600; font-size: var(--text-sm); padding: 0; margin-bottom: var(--space-2); }
.pickups .choice { padding: var(--space-3); margin-bottom: var(--space-2); align-items: center; }
.field-error { margin: 0 0 var(--space-2); color: var(--alert-dark); font-size: var(--text-sm); font-weight: 600; }
.pickups[aria-invalid="true"] .choice { border-color: var(--alert); }
.pickup-when { font-weight: 600; }
.tag { display: inline-block; margin-left: var(--space-2); padding: 1px 8px; border-radius: var(--radius-pill); background: var(--gold-tint); color: var(--gold); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }
.more-btn { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--space-2); padding: 0 var(--space-4); border: 1.5px solid var(--green); border-radius: var(--radius-pill); background: transparent; color: var(--green); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: background-color .15s var(--ease); }
.more-btn:hover { background: var(--green-tint); }
.pickup-where { font-size: var(--text-sm); }
.pickup-addr { font-size: var(--text-sm); color: var(--muted); }
.fine { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-3); }

/* ---------- thanks: the booking form's success screen ---------- */
.shop-card { max-width: 620px; margin-inline: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(var(--space-5), 4vw, var(--space-7)) clamp(var(--space-4), 4vw, var(--space-6)); text-align: center; }
.check-wrap, .check-svg { width: 80px; height: 80px; }
.check-wrap { margin: 0 auto var(--space-5); animation: shop-pop .5s var(--ease) both; }
.check-svg { display: block; }
.check-circle, .check-tick { stroke: var(--green); }
.check-circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: shop-draw .6s .1s var(--ease) forwards; }
.check-tick { stroke-dasharray: 48; stroke-dashoffset: 48; animation: shop-tick .4s .65s ease forwards; }
@keyframes shop-pop { 0% { opacity: 0; transform: scale(.5); } 70% { transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes shop-draw { to { stroke-dashoffset: 0; } }
@keyframes shop-tick { to { stroke-dashoffset: 0; } }
@keyframes shop-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.done-title { font-size: clamp(1.9rem, 5vw, 2.4rem); margin-bottom: var(--space-2); }
.done-title:focus { outline: none; box-shadow: none !important; }
.done-sub { color: var(--muted); margin-bottom: var(--space-4); }
.next-steps { list-style: none; margin: 0 auto var(--space-5); padding: var(--space-4); max-width: 440px; text-align: left; background: var(--cream-soft); border: 1px solid var(--cream); border-radius: var(--radius-sm); font-size: var(--text-base); }
.order-ref { max-width: 440px; margin: 0 auto var(--space-4); padding: var(--space-4); text-align: center; background: var(--cream-soft); border: 1px solid var(--cream); border-radius: var(--radius-sm); }
.order-ref-label { margin: 0 0 var(--space-2); font-size: var(--text-base); color: var(--muted); }
.order-ref-row { margin: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-3); }
.order-ref-num { font-family: var(--font-display); font-size: clamp(1.7rem, 7vw, 2.1rem); font-weight: 500; letter-spacing: .08em; color: var(--green); user-select: all; }
.next-steps li + li { margin-top: var(--space-2); }
.cal-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); max-width: 440px; margin: calc(var(--space-2) * -1) auto var(--space-5); }
.cal-actions .btn { flex: 1 1 200px; }
.next-links { margin: var(--space-5) auto 0; max-width: 440px; padding-top: var(--space-5); border-top: 1px solid var(--line); }
.next-note { margin: var(--space-4) auto 0; max-width: 34ch; font-size: var(--text-base); color: var(--muted); }
.next-note a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.next-title { margin: 0 0 var(--space-4); font-size: var(--text-base); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.next-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.next-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--green); border-radius: var(--radius-sm); color: var(--green); font-size: var(--text-base); font-weight: 600; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.next-list a:hover, .next-list a:focus-visible { background: var(--green); color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .skel, .check-wrap, .added, .sticky-buy, .drawer[open] { animation: none; }
  .check-circle, .check-tick { animation: none; stroke-dashoffset: 0; }
  .meter-fill { transition: none; }
  .card:hover { transform: none; }
}
@media print { .site-header, .site-footer, .drawer, .nav-mobile { display: none !important; } }

/* the pop-up they chose, repeated in the order summary */
.pickup-sum { margin: var(--space-3) 0 0; padding: var(--space-3); background: var(--cream-soft); border: 1px solid var(--cream-deep); border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.4; }

/* the first row of a totals box needs no rule above it (the box has its own edge) */
.totals > .totals-row--big:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
/* the shipping meter sits in the drawer's footer, above the subtotal */
.drawer-foot .ship-progress { margin: 0 0 var(--space-3); }

/* home: the next pop-up above the products */
.pickup-strip { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); background: var(--cream-soft); border: 1px solid var(--cream-deep); border-radius: var(--radius); }
.pickup-strip[hidden] { display: none; }
.pickup-strip .choice-icon { align-self: center; width: 48px; height: 48px; }
.pickup-strip-text { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); line-height: 1.35; }
.pickup-strip-text strong { font-size: var(--text-md); }
.pickup-strip-text span:last-child { color: var(--muted); }

/* a card photo layer that failed to load is hidden, the other layer stays */
.card-photo .pic.is-broken { display: none; }

/* Pre-order pick-up: the mobile number for the "ready" text. */
.co-phone { margin-top: var(--space-4); }
.co-phone label { display: block; margin-bottom: var(--space-1); font-weight: 600; font-size: var(--text-sm); }
.co-phone input { width: 100%; max-width: 20rem; min-height: 44px; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm); font: inherit; background: var(--bg); color: var(--ink); }
.co-phone input[aria-invalid="true"] { border-color: #8A2A1A; }

/* The shop's header also carries the Cart button, so the seven nav links only fit from 1200px:
   below that the shop keeps the menu button (the website switches at 900px). shop.js closes the menu at 1200px. */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .site-header .nav-desktop { display: none; }
  .site-header .hamburger { display: grid; }
  .nav-mobile { display: flex !important; }
}

/* ---- Getting around the shop (Nov 27 2026 design review) ---- */
/* "More from Silk Road" under a product, then a way back to its group or everything. */
.related { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.related-title { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 var(--space-4); }
@media (min-width: 1100px) { .grid--related { grid-template-columns: repeat(4, 1fr); } }
.related-all { margin: var(--space-5) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.related-every { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
/* Cart page: a way back above the items. */
.back-link { margin: 0 0 var(--space-4); }
.back-link a { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; color: var(--ink); font-weight: 600; }
/* A bigger tap area for the cart's Remove link. */
.link-btn[data-act="remove"] { min-height: 44px; padding-inline: var(--space-2); }
/* The shop's footer has a fifth column (Shop). */
@media (min-width: 900px) { .footer-grid--shop { grid-template-columns: 1.1fr .75fr .75fr .85fr 1fr; } }

/* The category bar in the green band (product, cart, checkout, thank-you): pills like the front page's filters, on green. */
.shop-cats ul { display: flex; gap: var(--space-2); margin: 0; padding: 2px 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.shop-cats ul::-webkit-scrollbar { display: none; }
.shop-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--white) 55%, transparent); color: var(--white); font-size: var(--text-sm); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.shop-cats a:hover { background: color-mix(in srgb, var(--white) 16%, transparent); border-color: var(--white); }
.shop-cats a.is-on { background: var(--cream); border-color: var(--cream); color: var(--green); font-weight: 600; }
.shop-cats a:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* Smooth page changes inside the shop (owners, Nov 28 2026): browsers that support cross-page view transitions (Chrome,
   Edge, Safari 18.2+) fade the content between shop pages; the header holds still through the website's own rule
   (styles.css, copied in at build). Others change pages as before.
   The front page's filters fade the grid the same way (shop.js, pickSmooth). Off for people who ask for less motion. */
@view-transition { navigation: auto; }
#grid { view-transition-name: shop-grid; }
::view-transition-old(root), ::view-transition-new(root),
::view-transition-old(shop-grid), ::view-transition-new(shop-grid) { animation-duration: .3s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Home page top (Nov 28 2026 review): a tighter pick-up box on phones, so the products start higher. */
@media (max-width: 599px) {
  .pickup-strip { gap: var(--space-3); padding: 10px var(--space-3); margin-bottom: var(--space-3); }
  .pickup-strip .choice-icon { width: 36px; height: 36px; }
  .pickup-strip-text { gap: 1px; }
  .pickup-strip-text strong { font-size: var(--text-base); }
}
.shop-note[hidden] { display: none; }
/* Gift cards: a slim banner under the products. */
.gift-banner { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); padding: var(--space-3) var(--space-4); min-height: 64px; background: var(--cream-soft); border: 1px solid var(--cream-deep); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.gift-banner:hover { border-color: var(--ink); }
.gift-banner:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.gift-banner .gift-icon { width: 36px; height: 36px; flex: none; }
.gift-banner-text { display: flex; flex-direction: column; gap: 1px; flex: 1; font-size: var(--text-sm); color: var(--muted); }
.gift-banner-text strong { font-size: var(--text-md); color: var(--ink); }
.gift-banner-go { display: inline-flex; flex: none; width: 20px; height: 20px; }
.gift-banner-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gift-banner--solo { margin-top: var(--space-4); }
