/* ═══════════════════════════════════════════════════════════════════════
   THE TOY SHOP — loaded after bloom.css, pages.css and forms.css.

   Each kind of toy has its own small world at the top of the page: a pink
   sky for babies, a forest for wooden toys, a night sky for board games and
   a rainbow for learning. The scenes are inline SVG drawn by
   tools/shop-pages.mjs, and every colour in them is set here from the brand
   tokens. On the hub, choosing a category tab cross-fades to its scene.
   That cross-fade is the page's one big motion.

   Below the scene the shop is a shop, laid out like any serious one: one
   filter panel (category, age, price, brand, badges) beside one grid of
   white product cards with "רב מכר" and "חדש" badges, a second photo on
   hover and a filled add-to-cart button. Shared furniture (.crumbs,
   .spots-badge, .panel, .btn) is reused, not restyled.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --card: #FFFFFF;
  --line: rgba(140,90,54,0.12);
  --wood-wash:  color-mix(in srgb, var(--mocha) 24%, var(--cream));
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .7, .3, 1);
}

.shop-main { background: var(--cream); }

/* ── Scenes ───────────────────────────────────────────────────────── */
.scene {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 120px;
  color: var(--ink);
  transition: color .6s var(--ease-out);
}
.scene--hub { padding-bottom: 150px; min-height: min(640px, 78vh); }
@media (max-width: 860px) {
  .scene { padding-top: calc(var(--header-h-sm) + 28px); padding-bottom: 96px; }
  /* On a phone the hub's centrepiece sits above the heading, not behind it. */
  .scene--hub { padding-top: calc(var(--header-h-sm) + min(58vw, 255px) + 16px); padding-bottom: 120px; min-height: 0; }
}

.scene-art { position: absolute; inset: 0; z-index: -1; }
.scene-layer {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .7s var(--ease-out);
}
.scene[data-scene="clouds"]  .scene-layer[data-for="clouds"],
.scene[data-scene="forest"]  .scene-layer[data-for="forest"],
.scene[data-scene="night"]   .scene-layer[data-for="night"],
.scene[data-scene="rainbow"] .scene-layer[data-for="rainbow"],
.scene[data-scene="toddler"] .scene-layer[data-for="toddler"] { opacity: 1; }

.scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The centrepiece shares the row with the text, on the side the text is not. */
.scene-hero {
  position: absolute;
  top: calc(var(--header-h) + 12px); height: calc(100% - var(--header-h) - 108px);
  inset-inline-end: max(24px, calc((100% - 1200px) / 2 + 24px));
  width: min(40%, 560px);
}
.scene:not(.scene--hub) .scene-hero { width: min(34%, 460px); }
@media (max-width: 860px) {
  .scene:not(.scene--hub) .scene-hero { display: none; }
  .scene--hub .scene-hero {
    top: calc(var(--header-h-sm) + 8px); height: min(58vw, 255px);
    inset-inline: 0; margin-inline: auto; width: min(92vw, 420px);
  }
}
.scene-grain {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  opacity: .12; mix-blend-mode: multiply; pointer-events: none;
}

/* Scene palettes. Every colour is mixed from the brand tokens. */
.scene-layer {
  --cl: var(--card);
  --cl-sh: color-mix(in srgb, var(--rose) 34%, var(--cream));
  --clb: color-mix(in srgb, var(--rose) 16%, var(--cream));
  --clb-sh: color-mix(in srgb, var(--rose) 40%, var(--cream));
  --st: color-mix(in srgb, var(--mocha) 32%, var(--ivory));
  --st-hi: var(--cream);
  --sp: var(--card);
}
.scene-layer[data-for="clouds"] {
  --sky-a: color-mix(in srgb, var(--rose) 82%, var(--cream));
  --sky-b: color-mix(in srgb, var(--rose) 34%, var(--cream));
}
.scene-layer[data-for="forest"] {
  --sky-a: color-mix(in srgb, var(--mocha) 30%, var(--cream));
  --sky-b: color-mix(in srgb, var(--rose) 26%, var(--cream));
  --cl-sh: color-mix(in srgb, var(--mocha) 24%, var(--cream));
}
.scene-layer[data-for="night"] {
  --sky-a: color-mix(in srgb, var(--olive) 78%, var(--ink));
  --sky-b: color-mix(in srgb, var(--olive) 86%, var(--sage));
  --cl: color-mix(in srgb, var(--olive) 72%, var(--ivory));
  --cl-sh: color-mix(in srgb, var(--olive) 90%, var(--ink));
  --clb: color-mix(in srgb, var(--olive) 86%, var(--ivory));
  --clb-sh: color-mix(in srgb, var(--olive) 94%, var(--ink));
  --st: var(--ivory); --st-hi: var(--card); --sp: var(--ivory);
}
.scene-layer[data-for="rainbow"] {
  --sky-a: color-mix(in srgb, var(--sage) 66%, var(--cream));
  --sky-b: color-mix(in srgb, var(--sage) 24%, var(--cream));
  --cl-sh: color-mix(in srgb, var(--sage) 42%, var(--cream));
  --clb: color-mix(in srgb, var(--sage) 18%, var(--cream));
  --clb-sh: color-mix(in srgb, var(--sage) 40%, var(--cream));
}
.scene-layer[data-for="toddler"] {
  --sky-a: color-mix(in srgb, var(--rose) 55%, var(--ivory));
  --sky-b: color-mix(in srgb, var(--mocha) 10%, var(--cream));
  --cl-sh: color-mix(in srgb, var(--rose) 30%, var(--cream));
}
.scene-art svg { stroke-linejoin: round; stroke-linecap: round; }
.sky-a { stop-color: var(--sky-a); }
.sky-b { stop-color: var(--sky-b); }
.cl { fill: var(--cl); }
.cl-sh { fill: var(--cl-sh); }
.clb { fill: var(--clb); }
.clb-sh { fill: var(--clb-sh); }
.st { fill: var(--st); stroke: var(--st); }
.st-hi { fill: var(--st-hi); }
.st2 { fill: var(--rose-deep); stroke: var(--rose-deep); }
.st2-hi { fill: var(--rose); }
.sp { fill: var(--sp); }
.dt { fill: var(--sp); opacity: .7; }
.glow { fill: var(--ivory); opacity: .07; }
.shd { fill: var(--ink); opacity: .14; }
.mn { fill: var(--ivory); }
.mn-sh { fill: color-mix(in srgb, var(--ivory) 78%, var(--mocha)); }

/* Materials: the toys keep their colours under any sky. Fill and stroke
   match, so a stroke-width on a shape only rounds its corners. */
.m-rose     { --m: var(--rose); }
.m-rose-sh  { --m: var(--rose-deep); }
.m-wood     { --m: color-mix(in srgb, var(--mocha) 38%, var(--ivory)); }
.m-wood-sh  { --m: color-mix(in srgb, var(--mocha) 62%, var(--ivory)); }
.m-wood-dk  { --m: var(--mocha); }
.m-olive    { --m: var(--olive); }
.m-sage     { --m: var(--sage); }
.m-sage-sh  { --m: var(--sage-deep); }
.m-sage-hi  { --m: color-mix(in srgb, var(--sage) 58%, var(--cream)); }
.m-cream    { --m: var(--cream); }
.m-white    { --m: var(--card); }
.m-ivory-sh { --m: color-mix(in srgb, var(--ivory) 80%, var(--mocha)); }
.m-sun      { --m: color-mix(in srgb, var(--rose) 45%, var(--ivory)); }
.m-sun-sh   { --m: color-mix(in srgb, var(--rose) 75%, var(--ivory)); }
.m-steam    { --m: var(--cream); opacity: .92; }
.m-ink      { --m: var(--ink); }
[class^="m-"] { fill: var(--m); stroke: var(--m); }

/* Cubes: top lightest, left lit, right in shade. */
.dc-edge, .bw-edge, .br-edge, .bs-edge { stroke: currentColor; fill: currentColor; }
.dc-edge { color: color-mix(in srgb, var(--ivory) 70%, var(--mocha)); }
.dc-top { fill: var(--card); }
.dc-l { fill: var(--ivory); }
.dc-r { fill: color-mix(in srgb, var(--ivory) 84%, var(--mocha)); }
.pip { fill: var(--ink); }
.pip-1 { fill: var(--rose-deep); }
.bw-edge { color: color-mix(in srgb, var(--mocha) 66%, var(--ivory)); }
.bw-top { fill: color-mix(in srgb, var(--mocha) 20%, var(--ivory)); }
.bw-l { fill: color-mix(in srgb, var(--mocha) 32%, var(--ivory)); }
.bw-r { fill: color-mix(in srgb, var(--mocha) 46%, var(--ivory)); }
.br-edge { color: color-mix(in srgb, var(--rose-deep) 80%, var(--mocha)); }
.br-top { fill: color-mix(in srgb, var(--rose) 55%, var(--cream)); }
.br-l { fill: var(--rose); }
.br-r { fill: var(--rose-deep); }
.bs-edge { color: color-mix(in srgb, var(--sage-deep) 85%, var(--ink)); }
.bs-top { fill: color-mix(in srgb, var(--sage) 50%, var(--cream)); }
.bs-l { fill: var(--sage); }
.bs-r { fill: var(--sage-deep); }
.bk-t { fill: var(--card); }
.bw .bk-t { fill: var(--mocha-deep); }
.pw-hi { fill: var(--card); opacity: .45; }

.rb1 { stroke: var(--rose); }
.rb2 { stroke: color-mix(in srgb, var(--mocha) 40%, var(--cream)); }
.rb3 { stroke: var(--cream); }
.rb4 { stroke: var(--sage-deep); }

.s-string { stroke: color-mix(in srgb, var(--mocha) 50%, var(--cream)); }
.s-rail   { stroke: var(--mocha-deep); }
.s-grain  { stroke: var(--mocha); opacity: .35; }
.s-ray    { stroke: color-mix(in srgb, var(--rose) 65%, var(--ivory)); }
.s-bird   { stroke: var(--olive); opacity: .55; }
.s-face   { stroke: var(--ink); }
.s-shine  { stroke: var(--card); opacity: .6; }
.s-trail  { stroke: var(--card); stroke-dasharray: .1 13; opacity: .9; }

.scene[data-scene="night"] { color: var(--ivory); }
.scene[data-scene="night"] .crumbs,
.scene[data-scene="night"] .crumbs a,
.scene[data-scene="night"] .scene-lead,
.scene[data-scene="night"] .shop-promises,
.scene[data-scene="night"] .shop-promises strong,
.scene[data-scene="night"] .shop-promises a,
.scene[data-scene="night"] h1 .accent { color: var(--ivory); }

.scene-inner { position: relative; }
.scene h1 {
  max-width: 15ch;
  font-size: clamp(40px, 5.6vw, 76px); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em;
  text-wrap: balance;
}
.scene h1 .accent {
  display: block; margin-top: 14px; max-width: 26ch;
  font-size: clamp(19px, 1.7vw, 24px); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em;
  color: var(--ink); text-wrap: balance;
}
.scene-lead { margin-top: 18px; max-width: 48ch; font-size: 16.5px; line-height: 1.7; color: rgba(43,43,43,0.82); }
.scene .shop-promises { margin-top: 26px; }
.scene .crumbs a { color: var(--ink); }

.scene-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn-shop {
  background: var(--ink); color: var(--ivory); border: 1.5px solid var(--ink);
  font-size: 15px; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 18px 32px -18px rgba(43,43,43,0.6);
}
.btn-shop:hover { transform: translateY(-2px); }
.btn-shop:active { transform: scale(.97); }
.btn-shop:focus-visible, .btn-shop-ghost:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.btn-shop-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; font-size: 15px; font-weight: 700; letter-spacing: 0; }
.btn-shop-ghost:hover { transform: translateY(-2px); }
.btn-shop-ghost:active { transform: scale(.97); }
.scene[data-scene="night"] .btn-shop { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

/* The cream edge every scene melts into. */
.scene-wave { position: absolute; inset-inline: 0; bottom: -1px; width: 100%; height: 72px; fill: var(--cream); }

/* ── Category tabs (hub) ──────────────────────────────────────────── */
.shop-cats { position: relative; z-index: 2; margin-top: -78px; }
.scene-tabs { display: flex; justify-content: center; gap: clamp(10px, 3vw, 40px); }
.scene-tab {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  min-width: 0; border-radius: 20px; padding: 6px;
  color: var(--ink); text-align: center;
}
.scene-tab-icon {
  display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--card); color: var(--ink);
  box-shadow: 0 0 0 7px var(--cream), var(--shadow-card);
  transition: transform .45s var(--spring), background-color .3s, color .3s;
}
.scene-tab-name { font-size: 14.5px; font-weight: 700; line-height: 1.25; color: rgba(43,43,43,0.72); transition: color .2s; }
.scene-tab:hover .scene-tab-icon { transform: translateY(-4px); }
.scene-tab:active .scene-tab-icon { transform: scale(.95); }
.scene-tab:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* The chosen kind is lifted out of the wave in its own scene's colour:
   pressed on the hub, the current page on a category page. */
.scene-tab:is([aria-pressed="true"], [aria-current="page"], [data-home]:not([aria-pressed="false"])) .scene-tab-icon { transform: translateY(-14px) scale(1.08); }
.scene-tab:is([aria-pressed="true"], [aria-current="page"], [data-home]:not([aria-pressed="false"])) .scene-tab-name { color: var(--ink); }
.scene-tab:is([aria-pressed="true"], [aria-current="page"], [data-home]:not([aria-pressed="false"])) .scene-tab-icon { background: var(--lit); color: var(--lit-ink, var(--ink)); }
.scene-tab[data-scene="forest"]  { --lit: var(--wood-wash); }
.scene-tab[data-scene="clouds"]  { --lit: color-mix(in srgb, var(--rose) 45%, var(--cream)); }
.scene-tab[data-scene="toddler"] { --lit: var(--rose); }
.scene-tab[data-scene="rainbow"] { --lit: var(--sage); }
.scene-tab[data-scene="night"]   { --lit: var(--olive); --lit-ink: var(--ivory); }
/* An age in the circle instead of an icon: 1–2, 2–4, 4+. */
.scene-tab-num { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

/* ── Promise band ─────────────────────────────────────────────────── */
.promise-band { margin-top: 72px; padding: 26px 0; background: var(--ivory); border-block: 1px solid var(--line); }
.promise-band .shop-promises { margin: 0; justify-content: center; gap: 12px 64px; text-align: center; }
.promise-band .shop-promises li { align-items: center; }

/* ── The store: one filter panel beside one grid ──────────────────── */
.store { padding: 44px 0 0; scroll-margin-top: var(--header-h); }
.store-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 961px) {
  .store-layout { grid-template-columns: 268px minmax(0, 1fr); gap: 36px; }
}

/* The panel is a <dialog>: a sticky sidebar on a wide screen (non-modal),
   a full-screen sheet on a phone (modal, with its own close and apply). */
.filter-panel { color: var(--ink); }
.filter-panel:not(:modal) {
  position: sticky; top: calc(var(--header-h) + 16px);
  margin: 0; padding: 20px 22px 6px;
  width: auto; max-width: none; height: auto;
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow-card);
}
.filter-panel:modal {
  position: fixed; inset: 0;
  margin: 0; padding: 0;
  width: 100%; max-width: none; height: 100%; max-height: none;
  border: 0; background: var(--cream);
  display: flex; flex-direction: column;
}
.filter-panel::backdrop { background: rgba(43,43,43,0.4); }

.filter-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.filter-panel:modal .filter-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px; background: var(--card); }
.filter-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.filter-clear, .store-empty-clear {
  font-size: 13.5px; font-weight: 700; color: var(--mocha);
  border-bottom: 1.5px solid rgba(140,90,54,0.35);
}
.filter-clear { margin-inline-start: auto; }
.filter-clear[hidden] { display: none; }
.filter-clear:hover, .store-empty-clear:hover { color: var(--mocha-deep); border-color: currentColor; }
.filter-clear:active, .store-empty-clear:active { color: var(--ink); }
.filter-clear:focus-visible, .store-empty-clear:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.filter-close { display: none; }
.filter-panel:modal .filter-close {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cream);
}
.filter-panel:modal .filter-head:not(:has(.filter-clear:not([hidden]))) .filter-close { margin-inline-start: auto; }
.filter-close:hover { background: var(--neutral); }
.filter-close:active { transform: scale(.94); }
.filter-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.filter-panel:modal .filter-form { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
.filter-group { min-width: 0; margin: 0; padding: 16px 0 12px; border: 0; }
.filter-group + .filter-group { border-top: 1px solid var(--line); }
/* A legend will not take margins in normal flow; floated, it does. */
.filter-group legend { float: inline-start; width: 100%; padding: 0; margin-bottom: 8px; font-size: 14.5px; font-weight: 800; }
.filter-list { clear: both; display: flex; flex-direction: column; }
.filter-opt {
  display: flex; align-items: center; gap: 10px;
  margin-inline: -8px; padding: 7px 8px; border-radius: 10px;
  font-size: 14.5px; cursor: pointer;
}
.filter-opt:hover { background: var(--cream); }
.filter-opt input {
  appearance: none; flex: 0 0 auto;
  display: grid; place-content: center;
  width: 20px; height: 20px; margin: 0;
  border: 1.5px solid rgba(43,43,43,0.35); border-radius: 6px;
  background: var(--card);
  transition: background-color .15s, border-color .15s;
}
.filter-opt input::before {
  content: ''; width: 10px; height: 5px;
  border: solid var(--ivory); border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .2s var(--spring);
}
.filter-opt input:checked { background: var(--ink); border-color: var(--ink); }
.filter-opt input:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.filter-opt input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.filter-opt:active input { transform: scale(.92); }
.filter-opt:has(input:checked) .filter-name { font-weight: 700; }
.filter-opt:has(input:disabled) { opacity: .4; cursor: default; }
.filter-opt:has(input:disabled):hover { background: none; }
.filter-n { margin-inline-start: auto; font-size: 12.5px; font-weight: 600; color: rgba(43,43,43,0.55); font-variant-numeric: tabular-nums; }

.filter-foot { display: none; }
.filter-panel:modal .filter-foot {
  display: block;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--card); border-top: 1px solid var(--line);
}
.filter-apply { width: 100%; justify-content: center; }

/* Results: count, active filters, sort, grid. */
.store-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.store-count { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.store-bar .shop-sort { margin-inline-start: auto; }
.shop-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--sage-text); }
.shop-sort[hidden] { display: none; }
.shop-sort-select { width: auto; padding-block: 10px; padding-inline: 16px 36px; background-color: var(--card); }

.store-filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ivory);
  font-size: 14px; font-weight: 700;
  transition: transform .25s var(--spring);
}
.store-filter-btn[hidden] { display: none; }
.store-filter-btn:hover { transform: translateY(-1px); }
.store-filter-btn:active { transform: scale(.96); }
.store-filter-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.store-filter-n {
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--rose); color: var(--ink); font-size: 12px;
}
.store-filter-n[hidden] { display: none; }
@media (min-width: 961px) { .store-filter-btn { display: none; } }

.store-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.store-chips[hidden] { display: none; }
.store-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 12px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink);
  transition: border-color .2s, transform .2s var(--spring);
}
.store-chip::after { content: '✕'; font-size: 10px; opacity: .55; }
.store-chip:hover { border-color: var(--ink); }
.store-chip:active { transform: scale(.95); }
.store-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.store-empty { padding: 56px 0; text-align: center; font-size: 16px; line-height: 1.7; }
.store-empty[hidden] { display: none; }

/* ── About and shortcuts ──────────────────────────────────────────── */
.shop-row { padding-top: 64px; }
.shop-about {
  max-width: 68ch; padding-bottom: var(--space-section);
  display: flex; flex-direction: column; gap: 14px;
  font-size: 16px; line-height: 1.75; color: rgba(43,43,43,0.8);
}
.shop-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; font-size: 14px; }
.shop-shortcuts span { font-weight: 700; color: var(--ink); }
.shop-shortcuts a {
  padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; color: var(--ink);
  transition: border-color .2s;
}
.shop-shortcuts a:hover { border-color: var(--ink); }
.shop-shortcuts a:active { transform: scale(.97); }
.shop-shortcuts a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── Product cards ────────────────────────────────────────────────── */
.toy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.toy {
  position: relative;
  display: flex; flex-direction: column; min-width: 0;
  padding: 10px 10px 16px;
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform .4s var(--spring);
}
/* The deeper shadow fades in rather than animating box-shadow itself. */
.toy::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  box-shadow: var(--shadow-card-hi); opacity: 0; transition: opacity .3s;
}
.toy:hover { transform: translateY(-5px); }
.toy[hidden] { display: none; }
.toy:hover::after { opacity: 1; }

.toy-link { display: flex; flex-direction: column; border-radius: 18px; }
.toy-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.toy-tile {
  position: relative;
  aspect-ratio: 1; min-height: 0;
  display: grid; grid-template-rows: minmax(0, 1fr); place-items: center;
  padding: 7%;
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}
.toy-tile img { width: 100%; height: 100%; min-height: 0; object-fit: contain; transition: opacity .35s, transform .5s var(--spring); }
.toy-tile .toy-alt { position: absolute; inset: 7%; width: 86%; height: 86%; opacity: 0; }
.toy-ph { font-weight: 800; font-size: 15px; letter-spacing: 0.06em; color: rgba(140,90,54,0.42); text-align: center; }
/* Second photo on hover, when there is one. */
.toy-link:hover .toy-tile img:not(.toy-alt):has(+ .toy-alt) { opacity: 0; }
.toy-link:hover .toy-alt { opacity: 1; }
.toy-link:hover .toy-tile img:only-of-type { transform: scale(1.05); }

.toy-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800; line-height: 1.2; letter-spacing: 0.01em;
  color: var(--ink);
}
.toy-badge--bestseller { background: var(--rose); }
.toy-badge--new { background: var(--sage); }
.toy-badge--inline { position: static; display: inline-block; margin-inline-start: 8px; vertical-align: 1px; }

.toy-brand-sm { margin-top: 12px; padding-inline: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; color: var(--mocha-deep); }
.toy-name {
  margin-top: 4px; padding-inline: 6px;
  font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em;
  color: var(--ink);
}
.toy-link:hover .toy-name { text-decoration: underline; text-decoration-color: rgba(140,90,54,0.45); text-underline-offset: 4px; }
.toy-meta { margin-top: 4px; padding-inline: 6px; font-size: 13px; font-weight: 600; color: var(--sage-text); }

.toy-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding: 14px 6px 0;
}
.toy-price { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.toy-add {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--mocha); border: 1.5px solid var(--mocha);
  color: var(--ivory); font-size: 13.5px; font-weight: 700;
  transition: transform .25s var(--spring), background-color .2s, border-color .2s, color .2s;
}
.toy-add:hover { background: var(--mocha-deep); border-color: var(--mocha-deep); transform: translateY(-1px); }
.toy-add:active { transform: scale(.95); }
.toy-add:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.toy-add[data-added] { background: var(--sage); border-color: var(--sage); color: var(--ink); }

/* ── Product page ─────────────────────────────────────────────────── */
.shop-body { padding: 24px 0 var(--space-section); background: var(--cream); }
.toy-head { padding-bottom: 0; background: var(--cream); }
.toy-head .crumbs { margin-bottom: 0; }

.toy-layout { display: grid; gap: 36px; }
@media (min-width: 960px) {
  .toy-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
  .toy-buy { position: sticky; top: calc(var(--header-h) + 20px); }
}

.toy-tile--lg { border-radius: 34px; padding: 7%; box-shadow: var(--shadow-card); }
.toy-tile--lg .toy-ph { font-size: 26px; }

.toy-gallery-strip {
  display: flex; gap: 12px; margin-top: 16px;
  overflow-x: auto; scroll-snap-type: inline mandatory; padding: 4px 4px 8px;
}
.toy-gallery-strip li { flex: 0 0 104px; scroll-snap-align: start; }
.toy-gallery-strip img {
  aspect-ratio: 1; object-fit: contain; padding: 8px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-card);
}

.toy-brand { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--mocha-deep); }
.toy-buy { background: var(--card); }
.toy-buy h1 {
  margin-top: 8px;
  font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
}
.toy-age { margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--sage-text); }
.toy-price-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.toy-price--lg { font-size: 36px; }

.toy-buy-row { display: flex; gap: 12px; margin-top: 24px; }
.toy-qty { width: 84px; flex: 0 0 auto; text-align: center; }
.toy-buy-row .btn { flex: 1; justify-content: center; font-size: 16px; font-weight: 700; letter-spacing: 0; }
.toy-buy-row .btn-mocha { background: var(--mocha); border-color: var(--mocha); color: var(--ivory); }
.toy-buy-row .btn-mocha:hover { background: var(--mocha-deep); border-color: var(--mocha-deep); }
.btn-mocha:active { transform: scale(.98); }

.toy-added { min-height: 1.6em; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ok); }
.toy-added a { color: var(--ink); border-bottom: 1px solid currentColor; }
.toy-out-note { margin-top: 20px; font-size: 15px; line-height: 1.6; color: rgba(43,43,43,0.8); }
.toy-out-note a { color: var(--mocha); border-bottom: 1px solid rgba(140,90,54,0.4); }

.shop-promises {
  display: flex; flex-wrap: wrap; gap: 12px 36px;
  font-size: 14px; line-height: 1.5;
  color: rgba(43,43,43,0.75);
}
.shop-promises li { display: flex; flex-direction: column; }
.shop-promises strong { color: var(--ink); font-weight: 700; }
.shop-promises a { color: var(--mocha); border-bottom: 1px solid rgba(140,90,54,0.4); }
.shop-promises a:hover { color: var(--mocha-deep); }
.shop-promises a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.toy-buy .shop-promises {
  flex-direction: column; gap: 12px;
  margin-top: 14px; padding-top: 20px;
  border-top: 1px solid var(--line);
}

.toy-about {
  max-width: 68ch; margin-top: 80px;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 16.5px; line-height: 1.75; color: rgba(43,43,43,0.85);
}
.toy-about h2, .toy-related h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.toy-highlights { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.toy-highlights li { position: relative; padding-inline-start: 22px; }
.toy-highlights li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: 0.7em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--sage);
}
.toy-safety {
  margin-top: 8px; padding: 14px 18px;
  border-radius: var(--radius-field);
  background: rgba(140,90,54,0.07);
  font-size: 14.5px;
}
.toy-related { margin-top: 96px; }
.toy-related h2 { margin-bottom: 28px; }

/* ── Cart pill ────────────────────────────────────────────────────── */
/* Opposite corner from the WhatsApp button, at the same height. */
.cart-pill {
  position: fixed; z-index: 60;
  inset-inline-start: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ivory);
  font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-float);
  transition: transform .3s var(--spring);
}
.cart-pill[hidden] { display: none; }
body:has(.demo-banner) .cart-pill { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
.cart-pill:hover { transform: translateY(-3px); }
.cart-pill:active { transform: scale(.96); }
.cart-pill:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cart-pill-count {
  min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--rose); color: var(--ink); font-size: 13px;
}
.cart-pill[data-bump] { animation: cart-bump .5s var(--spring); }
@keyframes cart-bump { 40% { transform: scale(1.08); } }

/* ── Small screens ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .store { padding-top: 32px; }
  /* On a phone the filter button and sort stay in reach while scrolling. */
  .store-bar {
    position: sticky; top: var(--header-h-sm); z-index: 5;
    margin-inline: -24px; padding: 10px 24px;
    background: color-mix(in srgb, var(--cream) 92%, transparent);
    backdrop-filter: blur(8px);
  }
  .store-count { font-size: 15px; }
}
@media (max-width: 520px) {
  .shop-cats { margin-top: -64px; }
  .scene-tabs { gap: 4px; justify-content: space-between; }
  .scene-tab { flex: 1 1 0; gap: 8px; padding: 4px 0; }
  .scene-tab-icon { width: 62px; height: 62px; box-shadow: 0 0 0 5px var(--cream), var(--shadow-card); }
  .scene-tab-icon svg { width: 24px; height: 24px; }
  .scene-tab-num { font-size: 17px; }
  .scene-tab-name { font-size: 12px; }
  .scene-tab:is([aria-pressed="true"], [aria-current="page"], [data-home]:not([aria-pressed="false"])) .scene-tab-icon { transform: translateY(-10px) scale(1.06); }
  .store-bar { flex-wrap: nowrap; gap: 8px; margin-inline: -16px; padding-inline: 16px; }
  .store-count { font-size: 14px; white-space: nowrap; }
  .store-bar .shop-sort { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  .shop-sort-select { width: 100%; max-width: 170px; min-width: 0; padding-inline: 12px 30px; font-size: 13.5px; }
  /* The word "מיון" goes, but stays the select's name for a screen reader. */
  .shop-sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .toy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .toy { padding: 6px 6px 12px; border-radius: 20px; }
  .toy-tile { border-radius: 14px; }
  .toy-name { font-size: 14.5px; }
  .toy-price { font-size: 18px; }
  .toy-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .toy-add { text-align: center; padding: 9px 12px; }
  .toy-badge { top: 6px; inset-inline-start: 6px; font-size: 11px; padding: 4px 9px; }
  .toy-tile--lg { border-radius: 24px; }
  .promise-band .shop-promises { flex-direction: column; gap: 14px; }
  .cart-pill { inset-inline-start: 16px; bottom: 16px; padding: 12px 16px; }
  body:has(.demo-banner) .cart-pill { bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .scene-layer, .scene-tab-icon, .toy, .toy::after, .toy-tile img,
  .toy-add, .store-filter-btn, .store-chip, .filter-opt input, .filter-opt input::before, .cart-pill { transition: none; }
  .toy:hover { transform: none; }
  .cart-pill[data-bump] { animation: none; }
}

/* ── Cart page ────────────────────────────────────────────────────── */
/* Markup order is lines → summary → form, so on a phone the total sits
   above the form rather than under the submit button. On a wide screen the
   summary moves to a sticky side column spanning both rows. */
.cart-layout { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "lines summary" "form summary";
    gap: 8px 40px; align-items: start;
  }
  .cart-main { grid-area: lines; }
  .cart-form-panel { grid-area: form; }
  .cart-summary { grid-area: summary; position: sticky; top: calc(var(--header-h) + 20px); }
}
.cart-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }

.cart-lines { display: flex; flex-direction: column; margin-bottom: 40px; }
.cart-line {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto;
  gap: 18px; align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(140,90,54,0.14);
}
.cart-line:first-child { border-top: 1px solid rgba(140,90,54,0.14); }
.cart-line-img {
  width: 96px; height: 96px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.cart-line-img img { width: 84%; height: 84%; object-fit: contain; }
.cart-line-img .toy-ph { font-size: 10.5px; padding: 0 6px; }
.cart-line-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-line-name { font-size: 16px; font-weight: 700; }
.cart-line-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.cart-line-brand { font-size: 12.5px; font-weight: 600; color: var(--mocha-deep); letter-spacing: 0.03em; }
.cart-line-price { font-size: 13px; color: rgba(43,43,43,0.7); }
.cart-line-qty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cart-line-qty .toy-qty { width: 72px; padding-block: 8px; }
.cart-line-total { font-size: 17px; font-weight: 800; color: var(--sage-text); min-width: 84px; text-align: end; }

.cart-sums { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.cart-sums div { display: flex; justify-content: space-between; gap: 12px; }
.cart-sums dt { color: rgba(43,43,43,0.75); }
.cart-sums dd { margin: 0; font-weight: 600; }
.cart-total { margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(140,90,54,0.14); }
.cart-total dt, .cart-total dd { font-size: 19px; font-weight: 800; color: var(--ink); }
.cart-free-note:not(:empty) { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--sage-text); }
.cart-pay-note { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: rgba(43,43,43,0.75); }

.cart-address { margin-top: 20px; }
.cart-ship-soon { margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--sage-text); font-weight: 600; }
.cart-ship-soon[hidden] { display: none; }
.cart-address[hidden] { display: none; }

.cart-empty, .cart-done {
  max-width: 560px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.cart-empty h2, .cart-done h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.cart-empty[hidden], .cart-done[hidden], .cart-layout[hidden] { display: none; }
.cart-done p { font-size: 16px; line-height: 1.7; }

@media (max-width: 640px) {
  .cart-line { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; }
  .cart-line-img { width: 72px; height: 72px; }
  .cart-line-total { grid-column: 2 / -1; text-align: start; min-width: 0; font-size: 15px; }
}
