/* ==========================================================================
   Shop — /shop.php, redesigned 1 October 2026 at JBM's request.
   Loaded only by shop.php; everything is scoped to .shop-page inside <main>.
   The catalogue below the tiles is the shared partial, already styled by the
   site refresh in jbm.css; this file only lifts its toolbar.
   ========================================================================== */

/* --- Banner --------------------------------------------------------------- */
#main .shop-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 300px;
  padding: 46px 52px 42px; margin-bottom: 34px; color: #fff; background: var(--ink);
  border-radius: calc(var(--radius) * 2.4);
  box-shadow: 0 2px 6px rgba(23,27,25,.18), 0 30px 56px -36px rgba(23,27,25,.85);
}
#main .shop-hero.is-compact { min-height: 0; padding-block: 32px 30px; margin-bottom: 22px; }
#main .shop-hero-photo { position: absolute; z-index: -2; top: 0; right: 0; width: 58%; height: 100%; object-fit: cover; filter: saturate(1.05) brightness(.95); }
#main .shop-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--ink) 0%, var(--ink) 42%, rgba(23,27,25,.72) 58%, rgba(23,27,25,.15) 85%, rgba(23,27,25,.05) 100%),
    radial-gradient(60% 90% at 0% 100%, rgba(246,191,20,.12) 0%, rgba(246,191,20,0) 70%);
}
#main .shop-hero::after {
  content: ""; position: absolute; z-index: -1; top: -12px; bottom: -12px; left: 46%; width: 12px;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-hover)); transform: skew(-16deg);
}
#main .shop-hero-copy { position: relative; max-width: 560px; }
#main .shop-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); }
#main .shop-kicker::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--yellow); }
#main .shop-hero h1 { color: #fff; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.045em; margin: 12px 0 14px; }
#main .shop-hero.is-compact h1 { font-size: clamp(30px, 3.2vw, 42px); margin-bottom: 8px; }
#main .shop-intro { color: #cfd3d0; font-size: 15.5px; line-height: 1.6; margin: 0; max-width: 500px; }
#main .shop-hero.is-compact .shop-intro { display: none; }
#main .shop-facts { display: flex; flex-wrap: wrap; margin: 24px 0 0; padding: 0; }
#main .shop-hero.is-compact .shop-facts { margin-top: 14px; }
#main .shop-facts > div { display: flex; flex-direction: column; padding: 0 26px; border-left: 1px solid rgba(255,255,255,.16); }
#main .shop-facts > div:first-child { padding-left: 0; border-left: 0; }
#main .shop-facts dd { order: 1; margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
#main .shop-facts > div:first-child dd { color: var(--yellow); }
#main .shop-facts dt { order: 2; margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9fa6a1; }
#main .shop-hero.is-compact .shop-facts dd { font-size: 26px; }

/* --- Category tiles ------------------------------------------------------- */
#main .shop-families { margin-bottom: 40px; }
#main .shop-families h2, #main .shop-all-title { font-size: clamp(24px, 2.4vw, 31px); letter-spacing: -.035em; margin: 0 0 18px; }
#main .shop-family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
#main .shop-family {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #ecebe5; border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 1px 2px rgba(23,27,25,.05),
              0 8px 16px -8px rgba(23,27,25,.14), 0 26px 44px -32px rgba(23,27,25,.45);
  transition: transform .28s ease, box-shadow .28s ease;
}
#main .shop-family-photo { display: block; aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; background: var(--paper); }
#main .shop-family-photo .photo { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
#main .shop-family-photo .photo[src*="product-placeholder"] { object-fit: contain; background: transparent; }
#main .shop-family-text { display: flex; flex-direction: column; gap: 2px; padding: 14px 52px 16px 16px; }
#main .shop-family-text strong { font-size: 16.5px; letter-spacing: -.02em; }
#main .shop-family-text small { font-size: 13px; color: var(--muted); }
#main .shop-family-go {
  position: absolute; right: 14px; bottom: 16px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--yellow); color: var(--ink); box-shadow: 0 8px 14px -8px rgba(180,132,0,.9); transition: transform .2s;
}
#main .shop-family-go .icon { width: 16px; height: 16px; }
#main .shop-family:focus-visible { outline: 3px solid #927200; outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #main .shop-family:hover {
    transform: perspective(900px) rotateX(4deg) translateY(-5px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 4px rgba(23,27,25,.06),
                0 16px 26px -12px rgba(23,27,25,.2), 0 38px 60px -34px rgba(23,27,25,.55);
  }
  #main .shop-family:hover .shop-family-photo .photo { transform: scale(1.06); }
  #main .shop-family:hover .shop-family-go { transform: translateX(3px); }
}
#main .shop-chips { margin: -6px 0 22px; }

/* --- The catalogue's toolbar, raised ------------------------------------- */
#main .shop-page .catalogue-toolbar {
  padding: 10px 12px 10px 18px; margin-bottom: 20px; border: 1px solid #ecebe5; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(23,27,25,.04), 0 14px 26px -22px rgba(23,27,25,.4);
}
#main .shop-page .catalogue-toolbar select { border-radius: 10px; }
#main .shop-page .filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }

@media (max-width: 860px) {
  #main .shop-hero { padding: 180px 26px 30px; min-height: 0; }
  #main .shop-hero.is-compact { padding: 26px 22px 24px; }
  #main .shop-hero-photo { width: 100%; height: 220px; }
  #main .shop-hero.is-compact .shop-hero-photo { display: none; }
  #main .shop-hero::before { background: linear-gradient(180deg, rgba(23,27,25,.1) 0px, rgba(23,27,25,.65) 140px, var(--ink) 220px, var(--ink) 100%); }
  #main .shop-hero.is-compact::before { background: none; }
  #main .shop-hero::after { display: none; }
  #main .shop-page .filters { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  #main .shop-hero { padding: 160px 20px 24px; border-radius: 18px; }
  #main .shop-hero-photo { height: 190px; }
  #main .shop-facts dd { font-size: 28px; }
  #main .shop-facts > div { padding: 0 16px; }
  #main .shop-family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #main .shop-family-text { padding: 11px 12px 13px; }
  #main .shop-family-text strong { font-size: 14.5px; }
  #main .shop-family-go { display: none; }
  /* An odd last tile takes the full row rather than leaving a hole beside it. */
  #main .shop-family:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #main .shop-family:last-child:nth-child(odd) .shop-family-photo { aspect-ratio: 16 / 7; }
}
@media (prefers-reduced-motion: reduce) {
  #main .shop-family, #main .shop-family-photo .photo, #main .shop-family-go { transition: none; }
}
