/* /store/ catalog, toast, cart page and the sub-bar cart link.
 * Uses the site tokens (--card, --border, --text, --accent ...) only. */

/* sub-bar cart link with count bubble */
.store-subbar .crumb { margin-bottom: 0; min-width: 0; }
.store-subbar .store-cart-link { flex: none; margin-left: auto; }
@media (max-width: 640px) { .store-subbar { flex-wrap: nowrap !important; } .store-subbar .crumb { flex: 1 1 auto; } }
[data-cart-summary][hidden] { display: none; }
.store-cart-link { display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; color: var(--text); font-weight: 600; font-size: 14px; }
.store-cart-link:hover { color: var(--accent-hi); }
.store-cart-icon { position: relative; display: inline-flex; flex: none; width: 18px; height: 18px; }
.store-cart-svg { display: block; }
.store-cart-text { white-space: nowrap; }
[data-store-cart-count] { position: absolute; top: -9px; right: -11px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #0a0b0a; font-size: 11px; font-weight: 700; line-height: 1; }
[data-store-cart-count]:empty { display: none; }

:is(.store-tools, .store-grid, .store-card, .store-cart, .store-toast) :is(a, button, input, select, summary):focus-visible,
.store-cart-link:focus-visible, .store-line-media:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

/* toolbar: a store sub-navigation docked under the site header. In the
 * page flow it is a full-width bar; when it sticks it reads as a second
 * header row (same background, blur and hairline as header.site, content
 * on the header's gutters). Brands are tabs in the nav's type; storage, on
 * sale, sort and currency sit behind "Filters": a dropdown panel under the
 * bar on desktop, a bottom sheet (modal <dialog>) at <= 760px. All real
 * inputs. --store-header-h is the header's measured height (store.js). */
body:has(.store-tools) { overflow-x: clip; }
.store-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.store-tools { position: sticky; top: var(--store-header-h, 68px); z-index: 45; width: 100vw; margin: 0 0 22px calc(50% - 50vw); padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(10, 11, 10, .97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (max-width: 1100px) { .store-tools { padding: 0 20px; } }
.store-tools fieldset { border: 0; min-width: 0; margin: 0; padding: 0; }
.store-tools input[type=checkbox], .store-tools input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.store-tools label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 7px; }
.store-bar { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; min-height: 52px; }

/* brand tabs, in the nav links' type; active = accent underline */
.store-brands { display: flex; gap: 2px; flex: 1 1 0; min-width: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; align-self: stretch; }
.store-brands::-webkit-scrollbar { display: none; }
.store-brands.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.store-brands.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.store-brands.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.store-tab { position: relative; flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 1px; padding: 0 12px; font-size: 14px; font-weight: 600; line-height: 20px; color: #b9c0b9; cursor: pointer; user-select: none; transition: color .15s, box-shadow .2s; }
.store-tab:hover { color: var(--text); }
.store-tab:has(input:checked) { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.store-tab:has(input:checked) sup { color: var(--accent-hi); opacity: 1; }

/* count, active chips, Clear all: inline at the right on desktop */
.store-tools-foot { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
[data-store-count] { display: inline-block; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-store-count].is-bump { animation: store-bump .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes store-bump { from { color: var(--accent-hi); transform: translateY(-3px); } to { color: var(--text-dim); transform: none; } }
.store-active { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.store-active:empty { display: none; }
.store-active-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border: 1px solid var(--border-hi); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; animation: store-in .2s ease-out; }
.store-active-chip:hover { border-color: var(--accent); }
.store-active-x { font-size: 15px; line-height: 1; color: var(--accent-hi); }
@keyframes store-in { from { opacity: 0; transform: scale(.9); } }
[data-store-reset] { background: transparent; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
[data-store-reset]:hover { color: var(--accent-hi); }
[data-store-reset][hidden] { display: none; }

/* Filters: the nav's disclosure button */
.store-filters-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-hi); border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.store-filters-btn:hover, .store-filters-btn[aria-expanded="true"] { background: var(--card-hover); }
.store-filters-btn[hidden] { display: none; }
.store-filters-btn [data-store-filter-count]:not(:empty) { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #0a0b0a; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.store-filters-btn[aria-expanded="true"] .nav-caret { transform: translateY(2px) rotate(225deg); }

/* the Filters panel: one glass sheet, one 20px gutter, a 4/8 spacing grid.
 * Accent only for the selected state and the primary button.
 * Desktop: a dropdown under the bar. Phones: a bottom sheet (below). */
.store-sheet { --g: 20px; --r: 12px; display: none; color: var(--text); }
.store-sheet[open] { display: flex; flex-direction: column; align-items: stretch; padding: 0;
  background: linear-gradient(180deg, rgba(118, 185, 0, .07), rgba(118, 185, 0, 0) 120px), rgba(17, 19, 17, .9);
  -webkit-backdrop-filter: saturate(150%) blur(20px); backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.store-sheet.is-panel[open] { position: absolute; top: calc(100% + 8px); right: 0; left: auto; margin: 0; width: 380px; max-width: calc(100vw - 40px); max-height: calc(100vh - var(--store-header-h, 68px) - 80px); overflow-y: auto; z-index: 60;
  transform-origin: top right; animation: store-drop .32s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes store-drop { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: baseline; gap: 8px; padding: 20px var(--g) 0; }
.sheet-head h3 { font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -.01em; }
.sheet-of { font-size: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sheet-reset { margin-left: auto; align-self: center; background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.sheet-reset:hover { color: var(--accent-hi); }
.sheet-reset:disabled { color: var(--text-dim); opacity: .5; cursor: default; }
/* sections: inside the gutter, 24px apart, hairlines inset to the gutter */
.store-tools .sheet-sec, .sheet-sec { border: 0; margin: 0 var(--g); padding: 24px 0 0; min-width: 0; }
.sheet-head + .sheet-sec { padding-top: 20px; }
.sheet-sec + .sheet-sec { margin-top: 24px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sheet-sec > legend, .sheet-legend { display: block; float: left; width: 100%; padding: 0; margin: 0 0 10px; font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: rgba(236, 239, 234, .7); }
.sheet-sec > legend + * { clear: left; }
.sheet-sec .cur-pick > span { display: block; }

/* storage: a neutral track, equal segments; selected = calm accent fill */
.seg-pill { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r); background: rgba(255, 255, 255, .05); }
.seg-pill::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--pill-w, 0); transform: translateX(var(--pill-x, 0)); border-radius: 8px; background: rgba(255, 255, 255, .06); opacity: 0; transition: transform .25s cubic-bezier(.2, 1, .3, 1), width .25s cubic-bezier(.2, 1, .3, 1), opacity .2s; pointer-events: none; }
.seg-pill.has-pill::before { opacity: 1; }
.seg-pill label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; font-size: 15px; font-weight: 500; color: #c8cec8; cursor: pointer; transition: color .15s, background .2s; }
.seg-pill label:has(input:checked) { color: var(--accent-hi); background: rgba(118, 185, 0, .16); box-shadow: inset 0 0 0 1px rgba(118, 185, 0, .35); }

/* on sale: label and helper left, switch right */
.store-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; font-size: 16px; font-weight: 500; color: var(--text); cursor: pointer; }
.store-switch small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-dim); }
.store-switch-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, .14); transition: background .2s; }
.store-switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #e4e7e2; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .25s cubic-bezier(.2, 1.2, .4, 1); }
.store-switch:has(input:checked) .store-switch-track { background: var(--accent); }
.store-switch:has(input:checked) .store-switch-track::after { transform: translateX(18px); background: #fff; }

/* sort: option rows, check at the right gutter */
.sort-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 16px; font-weight: 500; color: #c8cec8; cursor: pointer; }
.sort-row + .sort-row { border-top: 1px solid rgba(255, 255, 255, .04); }
.sort-row:hover { color: var(--text); }
.sort-row svg { flex: none; color: var(--accent-hi); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.sort-row:has(input:checked) { color: var(--accent-hi); }
.sort-row:has(input:checked) svg { opacity: 1; transform: none; }
.sort-row:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* currency: the shared selector (currency.js), a dropdown */
.cur-pick { display: inline-flex; flex-direction: column; gap: 6px; min-width: 0; }
.cur-select { appearance: none; -webkit-appearance: none; min-height: 40px; min-width: 128px; padding: 0 38px 0 14px; border-radius: 12px; border: 1px solid var(--border-hi); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c8cec8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .02em; cursor: pointer; transition: border-color .15s; }
.cur-select:hover { border-color: var(--text-dim); }
.cur-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cur-select option { color: #111; background: #fff; }

/* sticky footer with the primary button */
.sheet-foot { position: sticky; bottom: 0; margin-top: 24px; padding: 12px var(--g); border-top: 1px solid rgba(255, 255, 255, .07); background: rgba(17, 19, 17, .94); border-radius: 0 0 20px 20px; }
.store-sheet .store-sheet-done { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; min-height: 52px; padding: 0 20px; border-radius: var(--r); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.store-sheet .store-sheet-done:disabled { background: rgba(255, 255, 255, .08); color: var(--text-dim); cursor: not-allowed; }

@media (max-width: 760px) {
  .store-tools { padding: 0 12px 0 16px; }
  .store-bar { min-height: 50px; gap: 0 8px; }
  .store-tab { padding: 0 10px; }
  .store-filters-btn { order: 2; }
  /* the second line: only with filters on (the count stays for screen readers) */
  .store-tools-foot { order: 3; flex: 0 0 100%; flex-wrap: wrap; padding: 0 0 8px; }
  .store-tools-foot:not(.has-active) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
  .store-tools-foot [data-store-reset] { margin-left: auto; }
  .store-sheet.is-sheet[open] { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; border-bottom: 0; border-radius: 20px 20px 0 0;
    animation: store-sheet-up .42s cubic-bezier(.2, 1.1, .35, 1); }
  .store-sheet.is-sheet.is-dragging { user-select: none; }
  .store-sheet::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); animation: store-fade .3s ease-out; }
  .store-sheet.is-sheet .sheet-grip { display: flex; justify-content: center; padding: 8px 0 0; cursor: grab; touch-action: none; }
  .store-sheet.is-sheet .sheet-grip span { width: 36px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
  .store-sheet.is-sheet .sheet-head { padding-top: 12px; touch-action: none; }
  .store-sheet.is-sheet .sheet-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-radius: 0; }
}
@keyframes store-sheet-up { from { transform: translateY(100%); } }
@keyframes store-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  [data-store-count].is-bump, .store-active-chip, .store-sheet[open], .store-sheet::backdrop { animation: none !important; }
  .store-tab, .store-switch-track, .store-switch-track::after, .seg-pill::before, .seg-pill label, .sort-row svg, .cur-select { transition: none; }
}

/* grid */
.store-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .store-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Room between the last card and the hairline on top of the next band (.pgx-band border-top). */
.land-section[data-store-catalog] { padding-bottom: 56px; }
@media (max-width: 560px) { .land-section[data-store-catalog] { padding-bottom: 48px; } }
/* A card in the Apple Store's manner: a lifted surface with no border, the
 * turning machine on top, then centred text: status in colour (an eyebrow,
 * not a pill), the name, the storage options in one quiet line, the price,
 * and one compact action with "Learn more" beside it. Every text row has a
 * fixed height (the name two lines) and the action row sits at the foot, so
 * the rows line up across a grid row whatever the text. */
.store-card { --card-r: 20px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), var(--card);
  border: 0; border-radius: var(--card-r); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); transition: box-shadow .2s; }
.store-card[hidden], [data-store-empty][hidden], .store-card [hidden] { display: none; }
.store-card-link { display: flex; flex-direction: column; align-items: center; color: var(--text); border-radius: var(--card-r) var(--card-r) 0 0; }
.store-card-link .store-stage { align-self: stretch; }
.store-card-link:hover { color: var(--text); }
.store-card .store-card-link:focus-visible { outline-offset: -3px; border-radius: var(--card-r) var(--card-r) 0 0; }
.store-card-eyebrow { margin: 6px 20px 0; min-height: 20px; max-width: calc(100% - 40px); font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .01em; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-card-eyebrow[data-state="on-sale"] { color: var(--accent); }
.store-card-eyebrow[data-state="coming-soon"] { color: var(--amber); }
.store-card-link h3 { display: flex; align-items: flex-start; justify-content: center; margin: 4px 20px 0; min-height: calc(2 * 1.2em); font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.store-card-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 20px 24px; }
.store-card-storage { min-height: 21px; font-size: 14px; line-height: 21px; color: var(--text-dim); }
.store-card-price { margin-top: 14px; font-size: 17px; line-height: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.store-card-vat { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.store-card-actions { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.store-card .store-card-cta { width: auto; height: 36px; min-height: 36px; padding: 7px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: 0; }
/* "Learn more" with a drawn chevron (Apple's pattern): spaced from the text,
 * centred on it, and nudged right on hover */
.store-card-more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 2px; border-radius: 6px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--accent); text-decoration: none; transition: color .2s; }
.store-more-chev { flex: none; width: 7px; height: 11px; margin-top: 1px; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.store-card-more:hover { color: var(--accent-hi); }
.store-card-more:hover .store-more-chev, .store-card-more:focus-visible .store-more-chev { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .store-more-chev { transition: none; } }
@media (max-width: 639px) {
  .store-card-link h3 { min-height: 0; font-size: 21px; }
}
/* Each card's machine as a small turning 3D model, like an item on a lit
 * pedestal (store-3d.js). The box is built from the machine's five face
 * images at its real width and depth (--w, --d, --h in mm, set by
 * build-store.py); --glow is the accent for machines on sale, a muted blue
 * for the rest. The stage keeps the old 4:3 image box, so nothing shifts. */
.store-card { --glow: var(--accent); }
.store-card[data-available="false"] { --glow: #7d8ba3; }
.store-lineup .store-stage { --glow: var(--accent); }
.store-lineup .store-stage[data-available="false"] { --glow: #7d8ba3; }
.store-card .store-stage { background: radial-gradient(70% 55% at 50% 72%, color-mix(in srgb, var(--glow) 8%, transparent), transparent 70%), radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .045), transparent 72%); }
.store-stage { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; container-type: inline-size; perspective: 1100px; perspective-origin: 50% 20%;
  background: radial-gradient(70% 55% at 50% 72%, color-mix(in srgb, var(--glow) 9%, transparent), transparent 70%), radial-gradient(ellipse at 50% 35%, var(--card-hover), var(--bg) 80%); }
.s3-floor { position: absolute; pointer-events: none; }
/* soft overhead glow: no edges, no shape; brightens a little on hover or focus */
.store-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8; transition: opacity .35s;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 255, 255, .07), transparent 70%); }
.s3-floor { left: 50%; top: 77%; width: 74%; height: 26%; transform: translate(-50%, -50%); border-radius: 50%; opacity: .7; transition: opacity .35s;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 30%, transparent), color-mix(in srgb, var(--glow) 8%, transparent) 62%, transparent); }
/* the pedestal disc, with a faint sheen standing in for a reflection */
.s3-floor::before { content: ""; position: absolute; inset: 17% 15%; border-radius: 50%;
  background: radial-gradient(60% 50% at 50% 40%, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 70%, transparent), linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .05));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 38%, transparent), 0 0 14px color-mix(in srgb, var(--glow) 22%, transparent); }
/* contact shadow; shrinks as the machine rises */
.s3-floor::after { content: ""; position: absolute; left: 27%; right: 27%; top: 30%; height: 30%; border-radius: 50%; transform: scale(calc(1 - .18 * var(--lift, 0))); opacity: calc(1 - .3 * var(--lift, 0)); background: radial-gradient(closest-side, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 60%, transparent); }

/* --bob (cqi) and --lift (0..1) come from store-3d.js, one clock for every card */
.s3-model { position: absolute; left: 50%; top: 45%; width: 0; height: 0; transform-style: preserve-3d; transform: translate3d(0, calc(var(--bob, 0) * 1cqi), 0); }
.s3-box { --mm: min(.33cqi, 1.6px); --W: calc(var(--w) * var(--mm)); --D: calc(var(--d) * var(--mm)); --H: calc(var(--h) * var(--mm));
  position: absolute; left: calc(var(--W) / -2); top: calc(var(--H) / -2); width: var(--W); height: var(--H); transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(-34deg); }
.s3-face { position: absolute; left: 0; top: 0; width: var(--W); height: var(--H); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #1c1d1f center / 100% 100% no-repeat; }
.s3-face::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, .2); pointer-events: none; }
.s3-front { background: none; transform: translateZ(calc(var(--D) / 2)); }
.s3-front img { display: block; width: 100%; height: 100%; }
.s3-front::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .10), transparent 35%, rgba(0, 0, 0, .18)); }
.s3-back { transform: rotateY(180deg) translateZ(calc(var(--D) / 2)); }
.s3-right, .s3-left { width: var(--D); left: calc((var(--W) - var(--D)) / 2); }
.s3-right { transform: rotateY(90deg) translateZ(calc(var(--W) / 2)); }
.s3-left { transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.s3-top { height: var(--D); top: calc((var(--H) - var(--D)) / 2); transform: rotateX(90deg) translateZ(calc(var(--H) / 2)); }
.s3-top::after { background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%); opacity: 1; }
.store-stage.is-flat .s3-box, .store-stage.is-flat .s3-front { transform: none; }
.store-stage.is-flat .s3-face:not(.s3-front) { display: none; }

/* WebGL (store-3d.js): one canvas in the page over a band around the
 * viewport (store-3d.js sets its top, width and height in px), under the
 * sticky header; it scrolls with the cards, so it stays on them during iOS
 * momentum scrolling and URL-bar changes. It draws each card's machine over
 * its stage; the stage keeps the light cone, pedestal glow behind it, and
 * the CSS box stays as the placeholder. */
.store-gl { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; pointer-events: none; }
.store-gl[hidden] { display: none; }
.store-stage.is-gl .s3-model { opacity: 0; }
.store-stage.is-gl .s3-floor::after { display: none; }
.s3-still { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* inspecting: the card lifts, its edge and the glow light up, the model
 * turns to face you (store-3d.js). Only with a mouse (hover) or keyboard
 * focus (:focus-visible): on a touch screen a tap would leave :hover and
 * :focus-within stuck on the card, also after coming back from the product. */
@media (prefers-reduced-motion: no-preference) {
  .store-card { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
  .store-card:has(:focus-visible) { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .store-card:hover { transform: translateY(-3px); }
}
.store-card:has(:focus-visible) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 45%, rgba(255, 255, 255, .08)), 0 18px 40px rgba(0, 0, 0, .4); }
.store-card:has(:focus-visible) .s3-floor, .store-card:has(:focus-visible) .store-stage::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .store-card:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 40px rgba(0, 0, 0, .4); }
  .store-card:hover .s3-floor, .store-card:hover .store-stage::before { opacity: 1; }
}
[data-store-empty] { padding: 28px 8px; text-align: center; color: var(--text-dim); }

/* the storage chooser (store.js): the Filters sheet's glass, as a panel
 * over the card on desktop (store.js places it) and a bottom sheet on phones */
.store-chooser.is-panel[open] { position: absolute; right: auto; bottom: auto; margin: 0; max-width: calc(100vw - 32px); max-height: none; overflow: visible; transform-origin: 50% 100%; animation: store-rise .3s cubic-bezier(.2, 1.1, .4, 1); }
@keyframes store-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (min-width: 761px) { .store-chooser::backdrop { background: rgba(0, 0, 0, .35); } }
.store-chooser .sheet-head { align-items: center; }
.store-chooser .sheet-head h3 { font-size: 19px; text-wrap: balance; }
.chooser-x { flex: none; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.chooser-x:hover { background: rgba(255, 255, 255, .14); }
.store-chooser .chooser-sec { padding-top: 16px; }
.chooser-opts { display: grid; gap: 8px; clear: left; }
.chooser-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border-radius: 12px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: box-shadow .15s, background .15s; }
.chooser-opt:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.chooser-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chooser-opt:has(input:checked) { background: rgba(118, 185, 0, .1); box-shadow: inset 0 0 0 2px var(--accent); }
.chooser-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chooser-opt.is-off { cursor: not-allowed; opacity: .55; }
.chooser-opt.is-off:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.chooser-opt-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.chooser-opt-name { font-size: 16px; font-weight: 600; color: var(--text); }
.chooser-opt-meta { font-size: 13px; color: var(--text-dim); }
.chooser-opt-price { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chooser-note { margin: 12px var(--g) 0; font-size: 13px; color: var(--text-dim); }
.store-chooser .chooser-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; }
/* not the Filters sheet's sticky foot: in a panel taller than the window it would sit over the options */
.store-chooser.is-panel .chooser-foot { position: static; background: none; }
/* Large displays: a sidebar from the right, like the cart drawer, with the machine on top */
.chooser-figure { display: none; margin: 0; }
.store-chooser.is-side[open] { position: fixed; inset: 0 0 0 auto; width: 420px; max-width: 100vw; height: 100dvh; max-height: none; margin: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-left: 1px solid rgba(255, 255, 255, .09); border-radius: 0; box-shadow: -24px 0 60px rgba(0, 0, 0, .5); animation: store-side .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes store-side { from { transform: translateX(100%); } }
.store-chooser.is-side::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); animation: store-fade .3s ease-out; }
.store-chooser.is-side .sheet-head { padding-top: 24px; }
.store-chooser.is-side .sheet-head h3 { font-size: 22px; }
.store-chooser.is-side .chooser-figure { display: block; padding: 24px var(--g) 4px; }
.store-chooser.is-side .chooser-figure img { display: block; width: 240px; max-width: 70%; height: auto; margin: 0 auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
.store-chooser.is-side .chooser-figure img:not([src]) { display: none; }
.store-chooser.is-side .chooser-foot { position: sticky; bottom: 0; margin-top: auto; padding-bottom: 20px; }
@media (prefers-reduced-motion: reduce) { .store-chooser[open] { animation: none !important; } .chooser-opt { transition: none; } }


/* toast */
.store-toast { position: fixed; left: 50%; bottom: 20px; z-index: 60; width: max-content; max-width: calc(100vw - 32px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--card-hover); color: var(--text); border: 1px solid var(--border-hi); border-radius: 8px; padding: 12px 16px; font-size: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); transition: opacity .18s, transform .18s; }
.store-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.store-toast-link { font-weight: 650; margin-left: 4px; white-space: nowrap; }

/* cart page */
.store-cart { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .store-cart { grid-template-columns: minmax(0, 1fr) 340px; } }
[data-cart-lines] { list-style: none; display: grid; gap: 12px; }
[data-cart-lines][hidden] { display: none; }
.store-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info total" "img qty rm"; gap: 8px 14px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.store-line-media { grid-area: img; display: block; width: 72px; height: 72px; background: radial-gradient(ellipse at 50% 40%, var(--card-hover), var(--bg) 80%); border-radius: 8px; }
.store-line-media img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.store-line-info { grid-area: info; min-width: 0; }
.store-line-name { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.store-line-name:hover { color: var(--accent-hi); }
.store-line-unit { font-size: 13px; color: var(--text-dim); }
.store-line-total { grid-area: total; font-weight: 650; text-align: right; white-space: nowrap; }
.store-stepper { grid-area: qty; display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--border-hi); border-radius: 6px; }
.store-step { width: 36px; height: 36px; background: transparent; border: 0; color: var(--text); font-size: 18px; cursor: pointer; }
.store-step:hover:not(:disabled) { background: var(--card-hover); }
.store-step:disabled { opacity: .35; cursor: default; }
.store-qty { min-width: 32px; text-align: center; font-weight: 650; }
.store-remove { grid-area: rm; justify-self: end; background: transparent; border: 0; color: var(--text-dim); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.store-remove:hover { color: var(--text); }
@media (max-width: 480px) {
  .store-line { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 12px; gap: 8px 10px; }
  .store-line-media { width: 56px; height: 56px; }
}
.store-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.store-summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-dim); }
.store-summary-row strong { color: var(--text); font-size: 17px; }
.store-summary .btn { width: 100%; }
.store-summary .btn.is-disabled, [data-cart-checkout][aria-disabled="true"] { opacity: .4; pointer-events: none; }
.store-summary label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text); }
.store-summary input[type=checkbox], .store-summary input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 3px; flex: none; }
[data-cart-note] { font-size: 13px; color: var(--amber); }
[data-cart-note]:empty { display: none; }
[data-cart-empty] { padding: 28px 8px; color: var(--text-dim); }
[data-cart-empty][hidden] { display: none; }
/* Back from Stripe (?order=paid | cancelled), as .pgx-order-status in buy.css. */
.store-order-return { margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.store-order-return.is-paid { color: var(--accent-hi); }
.store-order-return.is-cancelled { color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  .store-card, .store-toast { transition: none; }
}

.store-terms { font-size: 14px; color: var(--text-dim); max-width: 760px; margin-left: auto; margin-right: auto; }
.store-terms h2 { color: var(--text); }
.store-terms p { margin-top: 10px; line-height: 1.6; }
.store-terms a { color: var(--accent); text-decoration: underline; }

/* catalog hero (the product hero, build-store.py hero()): three machines on
 * pedestals, the one on sale in the middle, turning in sync with the cards */
.store-lineup { display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: end; max-width: 1080px; margin: 28px auto 0; padding-bottom: 72px; }
.store-lineup .pgx-halo { top: 55%; }
.store-lineup .store-stage { background: none; }
/* no per-machine overhead glow here: clipped to each stage it drew a hard-edged
 * panel behind every machine; the hero's halo and studio light do the lighting */
.store-lineup .store-stage::before { display: none; }
/* the halo and studio light fade out below the hero instead of stopping at its
 * edge: clip sideways only (body clips the page sideways as well) */
.pgx-hero:has(.store-lineup) { overflow: clip visible; }
.store-lineup-item { position: relative; min-width: 0; }
.store-lineup-item:not(.is-lead) { opacity: .85; }
@media (max-width: 640px) {
  .store-lineup { grid-template-columns: 1fr; max-width: 420px; padding-bottom: 40px; }
  .store-lineup-item:not(.is-lead) { display: none; }
}
/* catalog bands in the product pages' language */
.store-inside .pgx-section-title { margin-bottom: 18px; }
.store-band-lede { color: var(--text-dim); font-size: 17px; max-width: 62ch; margin-bottom: 56px; }
.store-inside .pgx-specs { padding: 0; }
.pgx-hero h1 br { display: block; }
@media (max-width: 560px) { .pgx-hero-cta { flex-wrap: nowrap; } .pgx-hero-cta .btn { white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) { .store-stage::before { transition: none; } }
.store-card-cta.is-busy, .store-sheet-done.is-busy { opacity: .7; cursor: progress; }
