/* =====
   DINKOMART — the shop: the catalogue and the cart
   Loaded by shop.php and cart.php, after store.css (which holds the
   product card); the partners have their own (partners.css, D50). Motion follows DESIGN.md: nothing eases in,
   hover motion only with a pointer, only transform and opacity move.
   ===== */

/* Cards that stay in a filtered grid glide to their new places (shop.js). */
::view-transition-group(*.pc) { animation-duration: .45s; animation-timing-function: var(--ease-out); }

/* ----- the fan
   Three cards dealt into a fan as the page arrives, drifting at three
   speeds as it scrolls away: depth, from three photographs. Each is a
   card of the shelf below, small: its square well, its studio light. */
.fan { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1.5; justify-self: end; }
.fan__card {
  --x: 0%; --y: 0%; --r: 0deg;
  position: absolute; left: 30%; top: 4%; width: 40%;
  padding: 5px; border-radius: 20px;
  background: var(--surface); box-shadow: 0 2px 4px rgba(17, 21, 18, .06), 0 18px 34px -12px rgba(17, 21, 18, .24);
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform .6s var(--ease-out);
  animation: deal .9s var(--ease-out) backwards;
}
.fan__card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 15px; background: var(--well); }
.fan__card img.is-pack { padding: 12%; background: var(--well); }
.fan__card--1 { --x: -62%; --y: 10%; --r: -9deg; animation-delay: .12s; }
.fan__card--2 { z-index: 2; animation-delay: .04s; }
.fan__card--3 { --x: 62%; --y: 10%; --r: 9deg; animation-delay: .2s; }
@keyframes deal { from { opacity: 0; transform: translate(0%, 14%) rotate(0deg) scale(.92); } }
@media (hover: hover) and (pointer: fine) {
  .fan:hover .fan__card--1 { --x: -68%; --r: -11deg; }
  .fan:hover .fan__card--3 { --x: 68%; --r: 11deg; }
  .fan:hover .fan__card--2 { --y: -3%; }
}
/* Longhands: the shorthand would reset each card's delay above. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fan__card {
      animation-name: deal, drift; animation-duration: .9s, auto;
      animation-timing-function: var(--ease-out), linear; animation-fill-mode: backwards, both;
      animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%;
    }
    .fan__card--1 { --d: -14%; } .fan__card--2 { --d: -6%; } .fan__card--3 { --d: -20%; }
  }
}
@keyframes drift { to { translate: 0 var(--d, -10%); } }

/* ===== THE HEAD (D76): the words and the way through the shop on the
   left — crumbs, the title, its line, who makes what is in it, then the
   pills — and on the right the scope's picture: a range's own, an
   aisle's ranges four to a frame, or (everything, a brand) the fan. */
.page-shop .shead { --stage-top: clamp(1.25rem, 2.4vw, 2.25rem); }
.page-shop .shead__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  grid-template-areas: 'copy pic' 'nav pic';
  align-items: center; column-gap: clamp(2rem, 4.5vw, 4.5rem); row-gap: clamp(1rem, 1.8vw, 1.4rem);
}
.page-shop .shead--bare .shead__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'nav'; }
.page-shop .shead__copy { grid-area: copy; align-self: end; }
.page-shop .fan { grid-area: pic; }

/* Who makes what is here (shop.php): their marks overlapping, the count
   and the price it starts at, their names — the home hero's proof line. */
.sproof { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.sproof__logos { display: flex; flex: none; }
.sproof__logo {
  width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px var(--stage-2, var(--bg)), 0 6px 14px -6px rgba(17, 21, 18, .3);
}
.sproof__logo + .sproof__logo { margin-left: -11px; }
.sproof__logo img { width: 76%; height: 76%; object-fit: contain; }
.sproof__txt { display: grid; gap: 3px; min-width: 0; line-height: 1.3; }
.sproof__n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: .9rem; color: var(--fg-muted); }
.sproof__n b { font: 600 .92rem/1.25 var(--font-mono); letter-spacing: -.01em; color: var(--fg); }
.sproof__by { font-size: .88rem; color: var(--fg-muted); }

/* THE SCOPE'S PICTURE: a frame bitten at its foot (main.css .cut) for
   the range's mark, a coin in its own colour. The frame carries the
   shadow; the picture is masked. */
.shead__pic {
  --cut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M80 0H0A20 20 0 0 0 20 20H26A34 34 0 0 1 60 54V60A20 20 0 0 0 80 80Z'/%3E%3C/svg%3E");
  --cut-w: 80px; --cut-h: 80px;   /* a 60px notch: the 52px coin and an 8px gap */
  grid-area: pic; position: relative; display: grid; align-self: stretch;
  width: 100%; min-height: 250px; max-height: 360px; border-radius: var(--r-2xl);
  box-shadow: 0 2px 4px rgba(17, 21, 18, .06), 0 30px 54px -28px rgba(17, 21, 18, .45);
}
.shead__frame {
  grid-area: 1 / 1; position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  border-radius: inherit; background: #15110D;
}
.shead__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shead__coin {
  grid-area: 1 / 1; justify-self: start; align-self: end; position: relative; z-index: 2;
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: var(--tint-b, var(--fg)); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(17, 21, 18, .45);
}
.shead__coin .ico { width: 22px; height: 22px; }
/* An aisle: its ranges' pictures, two by two, on the stage's own ground. */
.shead__pic--mosaic .shead__frame { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 6px; background: none; }
.shead__pic--mosaic .shead__frame img { position: static; min-width: 0; min-height: 0; border-radius: 12px; background: #15110D; }
.shead__pic--mosaic .shead__frame img:nth-child(3):last-child { grid-column: span 2; }

/* ===== THE PILLS (D76)
   The shop's departments, an aisle's ranges as one; inside an aisle a
   second row of its ranges. Every pill whole: they wrap onto a second
   line rather than slide under an edge; only a phone scrolls them. The
   one you are on is in ink; the aisle you are inside, in its tint. */
.snavs { grid-area: nav; align-self: start; display: grid; gap: 10px; min-width: 0; }
.rtabs { justify-self: stretch; min-width: 0; }
.rtabs__row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 6px; scrollbar-width: none; }
.rtabs__row::-webkit-scrollbar { display: none; }
.rtab {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-height: 48px; padding: 4px 16px 4px 4px;
  border: 0; border-radius: var(--r-full);
  background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(17, 21, 18, .06), 0 6px 16px -10px rgba(17, 21, 18, .25);
  font-weight: 650; font-size: .92rem; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), translate .35s var(--ease-out), scale var(--dur-press) var(--ease-out);
}
.rtab:hover { color: var(--fg); box-shadow: 0 1px 2px rgba(17, 21, 18, .06), 0 12px 22px -12px rgba(17, 21, 18, .32); }
@media (hover: hover) and (pointer: fine) { .rtab:hover { translate: 0 -2px; } }
.rtab:active { scale: .97; }
.rtab__pic {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; background: var(--well); color: var(--fg-subtle);
}
.rtab__pic img { width: 100%; height: 100%; object-fit: cover; }
.rtab__pic .ico { width: 18px; height: 18px; }
.rtab__pic--all { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.rtab__n {
  min-width: 26px; padding: 4px 7px; border-radius: var(--r-full); text-align: center;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  font: 600 var(--fs-label)/1 var(--font-mono); color: var(--fg-subtle);
}
.rtab.is-on { background: var(--fg); color: var(--bg); view-transition-name: rtab-on; }
.rtab.is-on .rtab__n { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.rtab.is-on .rtab__pic { box-shadow: 0 0 0 2px var(--accent); }
/* An aisle's mark, in its tint; the aisle you are inside, open. */
.rtab__pic--mark { background: var(--tint-a, var(--surface-2)); color: var(--tint-b, var(--brand)); }
.rtab.is-on .rtab__pic--mark { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); box-shadow: none; }
.rtab.is-open { background: color-mix(in srgb, var(--tint-b, var(--brand)) 15%, var(--surface)); }
/* Its ranges: a step smaller, on a tray of the aisle's tint. */
.rtabs--sub .rtabs__row {
  width: fit-content; max-width: 100%; padding: 5px; border-radius: 28px;
  background: color-mix(in srgb, var(--tint-b, var(--fg)) 9%, transparent);
}
.rtab--sub { min-height: 40px; gap: 8px; padding: 3px 13px 3px 3px; font-size: .88rem; }
.rtab--sub .rtab__pic { width: 34px; height: 34px; }
.rtab--sub .rtab__n { min-width: 22px; padding: 3px 6px; }
.rtab.is-on .rtab__pic--all { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); box-shadow: none; }

/* A row that scrolls sideways fades only where there is more (main.js
   sets data-edge); its arrows are for a mouse with no sideways wheel. */
.hscroll { position: relative; min-width: 0; }
.hscroll__btn {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-md);
  transition: scale var(--dur-press) var(--ease-out), border-color var(--dur) var(--ease);
}
.hscroll__btn::before { content: ''; position: absolute; inset: -4px; }
.hscroll__btn:hover { border-color: var(--border-strong); }
.hscroll__btn:active { scale: .9; }
.hscroll__btn--l { left: -4px; }
.hscroll__btn--r { right: -4px; }
@media (hover: none), (pointer: coarse) { .hscroll__btn { display: none; } }
[data-scroller][data-edge='end']   { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
[data-scroller][data-edge='start'] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
[data-scroller][data-edge='both']  { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

/* =====
   THE RESULTS — one bar of filters over a grid the page's full width
   (owner, 2026-10-13: the sidebar of icons and boxes read as clutter)
   ===== */
/* The cards stand on a ground a step under the page, so a white frame
   reads as a card and its cut as a cut (on the page's own paper the notch
   vanished into it). It fades back to paper at its foot, so the footer
   never meets a grey of its own shade. */
.results {
  --ground: var(--surface-sunk);
  padding: clamp(.75rem, 1.6vw, 1.5rem) 0 var(--s-9);
  background: linear-gradient(var(--ground) calc(100% - 7rem), var(--bg));
}

/* The bar sticks under the header: Type, Brand and Price as dropdowns, the
   count, the sort, what is applied. Its paper runs the page's width (the
   ::before; `main` clips it), and nothing clips its dropdowns. */
.sbar {
  position: sticky; top: var(--top-h, 72px); z-index: 30; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin-bottom: clamp(20px, 2.6vw, 32px); padding-block: 12px;
}
.sbar::before { content: ''; position: absolute; z-index: -1; inset: 0 -100vmax; background: var(--ground, var(--bg)); transition: box-shadow var(--dur) var(--ease); }
/* Stuck, it lifts on a soft shadow, not a rule across the page. */
.sbar.is-stuck::before { box-shadow: 0 14px 28px -24px rgba(17, 21, 18, .35); }
.sbar__dds { display: flex; flex-wrap: wrap; gap: 8px; }
/* Search within the scope (D81): a pill like the dropdowns, the room left. */
.ssearch { position: relative; flex: 1 1 240px; max-width: 400px; display: flex; align-items: center; }
.ssearch__ico { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--fg-subtle); pointer-events: none; }
.ssearch__in {
  width: 100%; min-height: var(--tap); padding: 0 44px 0 44px;
  border: 1px solid transparent; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow-sm);
  color: var(--fg); font: 500 .94rem var(--font-body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ssearch__in::placeholder { color: var(--fg-subtle); }
.ssearch__in::-webkit-search-cancel-button { display: none; }
.ssearch__in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.ssearch__x {
  position: absolute; right: 6px; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; color: var(--fg-muted); background: var(--surface-2);
  transition: background var(--dur) var(--ease), scale var(--dur-press) var(--ease-out);
}
.ssearch__x:hover { color: var(--fg); }
.ssearch__x:active { scale: .92; }
.sbar__count { margin-left: auto; font-size: .92rem; color: var(--fg-subtle); white-space: nowrap; }
.sbar__count b { font: 600 1rem var(--font-mono); color: var(--fg); }
.sbar__active { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* A dropdown: a <details>, so it opens with no script; shop.js closes it
   on Escape and on a click elsewhere. Its panel grows from the pill. */
.dd { position: relative; }
.dd__btn, .sort select {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px 0 18px;
  border: 1px solid transparent; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow-sm);
  color: var(--fg); font-size: .92rem; font-weight: 600; cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), scale var(--dur-press) var(--ease-out);
}
.dd__btn { list-style: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.dd__btn::-webkit-details-marker { display: none; }
.dd__btn:hover, .sort select:hover { box-shadow: var(--shadow-md); }
.dd__btn:active { scale: .97; }
.dd__btn b { max-width: 18ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--brand-ink); }
.dd__btn b::before { content: '· '; color: var(--fg-subtle); }
.dd__btn.is-set { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-soft); }
.dd[open] > .dd__btn { border-color: var(--fg-subtle); }
.dd__chev { width: 15px; height: 15px; color: var(--fg-subtle); transition: rotate var(--dur) var(--ease-out); }
.dd[open] .dd__chev { rotate: 180deg; }
.dd__panel {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: 0;
  display: grid; gap: 2px; min-width: 270px; max-height: min(60svh, 440px); padding: 8px;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 30px 60px -24px rgba(17, 21, 18, .28), var(--shadow-md);
  transform-origin: 24px 0; transition: opacity var(--dur) var(--ease-out), scale var(--dur-slow) var(--ease-out);
}
@starting-style { .dd[open] .dd__panel { opacity: 0; scale: .96; } }
.dopt {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; color: var(--fg-muted); font-size: .94rem; line-height: 1.3; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.dopt > span:first-child { flex: 1; min-width: 0; }
.dopt:hover { background: var(--surface-2); color: var(--fg); }
.dopt.is-on { color: var(--fg); font-weight: 600; }
.dopt__n { font: 500 var(--fs-label) var(--font-mono); color: var(--fg-subtle); }
.dopt__tick { width: 16px; height: 16px; color: var(--brand); visibility: hidden; }
.dopt.is-on .dopt__tick { visibility: visible; }

.achip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 14px;
  border-radius: var(--r-full); background: var(--fg); color: var(--bg);
  font-size: .86rem; font-weight: 600; text-decoration: none;
  transition: background var(--dur) var(--ease), scale var(--dur-press) var(--ease-out);
}
.achip:hover { color: var(--bg); background: var(--brand-ink); }
.achip:active { scale: .96; }
.achip .ico { width: 15px; height: 15px; opacity: .75; }
.achip--clear { padding: 0 10px; background: none; color: var(--fg-muted); text-decoration: underline; text-underline-offset: 3px; }
.achip--clear:hover { background: none; color: var(--fg); }

.sort { position: relative; display: flex; align-items: center; gap: 8px; }
.sort__label { font-size: .88rem; color: var(--fg-subtle); }
.sort select { -webkit-appearance: none; appearance: none; padding-right: 42px; }
.sort::after {
  content: ''; position: absolute; right: 19px; top: 50%; width: 7px; height: 7px;
  border-right: 1.6px solid var(--fg-muted); border-bottom: 1.6px solid var(--fg-muted);
  translate: 0 -70%; rotate: 45deg; pointer-events: none;
}
html.js .sort__go { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--surface); color: var(--fg-muted);
  font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), scale var(--dur-press) var(--ease-out);
}
.chip:hover { color: var(--fg); border-color: var(--border-strong); }
.chip:active { scale: .96; }

/* The grid: five across, four, three, then two on a phone — fixed, so
   "four rows" is a number shop.js can count (Load more adds four rows;
   a page is 20 cards, and a narrower grid holds back what is past its
   fourth row). Cards, not photographs, so the gaps are a card's. */
.pgrid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 1.5vw, 22px) clamp(12px, 1.25vw, 18px);
  transition: opacity .25s var(--ease) .1s;
}
/* While a filter fetches, every card is its own skeleton (store.css). */
.results.is-loading .pgrid { pointer-events: none; }
/* Load more: a row of card shapes (shop.js), until the cards arrive —
   the card's ground, its well, its brand, name and price. */
.pskel { display: grid; gap: 10px; align-content: start; padding: 7px 7px 16px; border-radius: 22px; background: var(--surface); }
[data-theme='dark'] .pskel { background: #181C19; }
.pskel .sk--media { aspect-ratio: 1; border-radius: 17px; }
.pskel .sk--line { width: 52%; margin: 6px 8px 0; }
.pskel .sk--line + .sk--line { width: 86%; margin-top: 0; }
.pskel .sk--short { width: 34%; height: 1.3em; margin-top: 10px; }

.pager { display: grid; justify-items: center; gap: 14px; margin-top: clamp(2.75rem, 6vw, 5rem); }

/* THE SHELVES (D81): a row per range (or type), its name and count, its
   first cards on the rail (store.css), the way into all of it. */
:is(.shelf, .shelfrow) + :is(.shelf, .shelfrow) { margin-top: clamp(2.25rem, 4.2vw, 3.5rem); }
/* Short shelves share a row, each spanning as many columns as it has cards;
   its rail as many columns as that, so every card is the width of the rest. */
.shelfrow { --n: 5; --gap: clamp(14px, 2vw, 22px); display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2.25rem, 4.2vw, 3.5rem) var(--gap); }
.shelfrow > .shelf { grid-column: span var(--k); min-width: 0; margin-top: 0; }
.shelfrow > .shelf .rail { --n: var(--k); }
@media (max-width: 1240px) { .shelfrow { --n: 4; } }
@media (max-width: 980px)  {
  .shelfrow { --n: 3; }
  /* one line of bar: the head already gives the count */
  .sbar__count { display: none; }
  .ssearch { flex-basis: 160px; }
  .sort { margin-left: auto; }
}
@media (max-width: 700px)  {
  .shelfrow { display: block; }
  .shelfrow > .shelf + .shelf { margin-top: clamp(2.25rem, 4.2vw, 3.5rem); }
  .shelfrow > .shelf .rail { --n: 2; }
}
.shelf__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px var(--s-4); min-height: 44px; margin-bottom: clamp(12px, 1.6vw, 18px); }
.shelf__name { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--fg); text-decoration: none; }
.shelf__pic { flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: var(--well); box-shadow: var(--shadow-sm); }
.shelf__pic img { width: 100%; height: 100%; object-fit: cover; }
.shelf__title {
  font-family: var(--font-display); font-size: clamp(1.3rem, 1.05rem + .8vw, 1.75rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -.025em; text-wrap: balance;
}
.shelf__n {
  flex: none; padding: 3px 9px; border-radius: var(--r-full); background: var(--surface-2);
  font: 600 var(--fs-label)/1.3 var(--font-mono); color: var(--fg-muted);
}
.shelf__name:hover .shelf__title { color: var(--brand-ink); }
/* DM's Choice, the shop's first shelf (D82): its cards on a deep-forest
   panel, "Choice" in gold. */
.shelf--choice {
  position: relative; isolation: isolate; padding: clamp(18px, 2.4vw, 30px) clamp(16px, 2.2vw, 28px) clamp(14px, 1.8vw, 22px);
  border-radius: var(--r-2xl);
  background: radial-gradient(120% 140% at 0% 0%, #1D5A33 0%, rgba(29, 90, 51, 0) 55%), linear-gradient(135deg, #0B2A17, #0F3520 60%, #0A2314);
  box-shadow: 0 30px 60px -40px rgba(4, 23, 11, .8);
}
/* white on the panel: its head only — the cards keep their own ink */
.shelf--choice .shelf__name, .shelf--choice .shelf__title, .shelf--choice .shelf__name:hover .shelf__title { color: #fff; }
.shelf--choice .shelf__title b { color: var(--harvest-400); font-weight: 800; }
.shelf--choice .shelf__n { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .82); }
.shelf__pic--choice { display: grid; place-items: center; background: #fff; }
.shelf__pic--choice img { width: 74%; height: auto; object-fit: contain; }
.shelf--choice .more__all { color: #fff; }
.shelf--choice .pcard__flags .dmc { display: none; }   /* the shelf already says it */

/* A short shelf goes on into its aisle (shop.php; the rail: store.css). */
.more { margin-top: clamp(3rem, 6vw, 5rem); }
.more__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.more__ctrl { display: flex; align-items: center; gap: 8px; }
.more__all {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 6px;
  font: 600 var(--fs-label)/1 var(--font-mono); text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--fg); text-decoration: none;
}
.more__all:hover { color: var(--brand-ink); }
.more__all .ico { transition: translate var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) { .more__all:hover .ico { translate: 3px 0; } }
.pager__note { font: 500 .8rem var(--font-mono); color: var(--fg-subtle); }
.pager__bar { display: block; width: 180px; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.pager__bar i { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: 0 50%; scale: var(--p, 0) 1; transition: scale .6s var(--ease-out); }
.pager__more[aria-busy='true'] { opacity: .6; cursor: progress; }


/* ===== THE CART */
.cartpage { padding-top: clamp(1.4rem, 2.6vw, 2.4rem); }
.cartpage__head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.cartpage__title { display: flex; align-items: baseline; gap: var(--s-4); }
.cartpage__n { padding: 6px 12px; border-radius: var(--r-full); background: var(--surface-2); font-size: .9rem; color: var(--fg-muted); }
.cartpage__n b { font: 600 .95rem var(--font-mono); color: var(--fg); }
.sum__wa .ico { color: #0F8445; }
[data-theme='dark'] .sum__wa .ico { color: #34C46D; }
.cartpage .flash { margin-bottom: var(--s-5); }
.cartpage__grid { display: grid; align-items: start; gap: clamp(1.5rem, 3vw, 3rem); grid-template-columns: minmax(0, 1fr) 380px; }
.lines { display: grid; gap: 12px; padding: 0; list-style: none; }
/* A line on the cart's ground, its corner cut for the remove button (a 40px
   disc in a 46px notch; main.css .cutbox). */
.line {
  --cut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 60H60A14 14 0 0 0 46 46H40A26 26 0 0 1 14 20V14A14 14 0 0 0 0 0Z'/%3E%3C/svg%3E"); --cut-w: 60px; --cut-h: 60px;
  display: grid; align-items: center; gap: 12px 18px;
  grid-template-columns: 96px minmax(0, 1fr) auto 104px;
  padding: 12px 64px 12px 12px; border-radius: 24px;
}
.line > form:last-child { display: contents; }
.line__pic { display: block; width: 96px; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: var(--plate); }
.line__pic img { width: 100%; height: 100%; object-fit: contain; }
.line__txt { display: grid; gap: 3px; min-width: 0; }
.line__name { color: var(--fg); text-decoration: none; font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.line__name:hover { color: var(--brand-ink); }
.line__meta { font-size: .85rem; color: var(--fg-subtle); }
.line__qty { display: flex; align-items: center; gap: 8px; }
html.js .line__update { display: none; }
.line__total { text-align: right; }
.line__rm {
  position: absolute; top: 0; right: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--fg-subtle); box-shadow: var(--shadow-sm);
}
.line__rm::before { content: ''; position: absolute; inset: -2px; }
.line__rm:hover { color: var(--err); background: var(--surface); }

.sum {
  position: sticky; top: calc(var(--top-h, 72px) + 20px);
  display: grid; gap: var(--s-4); padding: var(--s-5);
  border-radius: 28px; background: var(--surface);
  box-shadow: 0 24px 48px -32px rgba(17, 21, 18, .3);
}
.sum__title { font-size: 1.4rem; font-weight: 800; }
.sum__rows > div { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: 10px; border-bottom: 1px solid var(--hairline); }
.sum__rows dt { color: var(--fg-muted); }
.sum__total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.sum__total span { font-weight: 600; }
.sum__total b { font: 600 1.6rem var(--font-mono); letter-spacing: -.02em; }
.sum__note { font-size: .86rem; color: var(--fg-subtle); }
.sum__back { justify-self: center; }

/* ===== RESPONSIVE
   Breakpoints follow the elements: four cards need ~1100px, the fan
   ~360px beside a title, a cart line ~700. */
@media (max-width: 1279px) {
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1099px) { .sort__label { display: none; } }
@media (max-width: 999px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) {
  .cartpage__grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .page-shop .shead__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
}
@media (max-width: 900px) {
  .cartpage__grid { grid-template-columns: minmax(0, 1fr); }
  .sum { position: static; }
}
@media (max-width: 760px) {
  .fan, .shead__pic { display: none; }
  .page-shop .shead__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'nav'; }
  .line { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: 'pic txt txt' 'pic qty total'; padding-right: 14px; }
  .line__txt { padding-right: 40px; }
  .line__pic { grid-area: pic; width: 76px; align-self: start; }
  .line__txt { grid-area: txt; }
  .line__qty { grid-area: qty; }
  .line__total { grid-area: total; }
}
/* Two up on a phone. The dropdowns open the bar's full width under it,
   and the head already gives the count. */
@media (max-width: 699px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  /* A phone: each row of pills one line that scrolls, faded where there is more. */
  .rtabs__row { flex-wrap: nowrap; overflow-x: auto; }
  .rtabs--sub .rtabs__row { width: auto; }
  .rtab { min-height: 44px; padding-right: 13px; }
  .rtab__pic { width: 36px; height: 36px; }
  .rtab--sub { min-height: 38px; }
  .rtab--sub .rtab__pic { width: 32px; height: 32px; }
  .more__head { align-items: center; }
  .more__ctrl .railbtn { display: none; }
  .shelf__all-n { display: none; }
  .shelf__pic { width: 36px; height: 36px; }
  .shelf__name { gap: 10px; }
}
@media (max-width: 599px) {
  .dd { position: static; }
  .dd__panel { left: 0; right: 0; min-width: 0; }
  .sbar__count { display: none; }
  .sort { margin-left: auto; }
  /* the search a row of its own, first; the dropdowns and the sort under it */
  .ssearch { order: -1; flex: 1 1 100%; max-width: none; }
  .ssearch__in { min-height: 44px; font-size: 1rem; }
  /* One row on a phone: compact pills, a sort that truncates. */
  .sbar { gap: 8px 6px; }
  .sbar__dds { gap: 6px; }
  :is(.dd__btn, .sort select) { padding-left: 13px; font-size: .86rem; }
  .dd__btn { gap: 6px; padding-right: 10px; }
  .dd__btn b { max-width: 9ch; }
  .sort select { max-width: 9.5rem; padding-right: 32px; text-overflow: ellipsis; }
  .sort::after { right: 14px; }
}
/* Under the thumb, the tab bar already holds the way to a person (Menu);
   over a grid of cards the floating button only covers them. */
@media (max-width: 899px) {
  :is(.page-shop, .page-cart, .page-partners) .wa { display: none; }
}
