/* Products page (pages/products-index.php): A menu grid (live), B catalogue sheet,
   C build a request. Built from the site's own materials: paper
   texture, red line-art panels, Tanker + ballinger, the category label colours. */

.pmx {
  --pmx-ease: cubic-bezier(.2, .7, .2, 1);
  --pmx-top: 0px;              /* where sticky bars stop under the header */
  background: #ece4de var(--tile) 0 0 / contain;
  color: #1f1f1f;
}
@media (min-width: 1025px) { .pmx { --pmx-top: 100px; } }   /* the compact desktop header */

.pmx-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.pmx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px 12px; border-radius: 8px;
  font: 400 20px/1 var(--tanker); letter-spacing: .5px; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pmx-btn--red { border: 0; background: var(--red); color: #fff; }
.pmx-btn--red:hover { background: var(--red-hover); color: #fff; }
.pmx-btn--line { border: 1.5px solid var(--green-dark); background: transparent; color: var(--green-dark); }
.pmx-btn--line:hover { background: var(--green-dark); color: #fff; }

/* the design picker (staging only) */
.pmx-lab {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 10px 16px; background: #f0b34a; color: #2a1a00;
  font: 500 15px/1.2 var(--ballinger);
}
.pmx-lab a { color: inherit; padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.pmx-lab a:hover { background: rgba(255, 255, 255, .45); }
.pmx-lab a[aria-current] { background: #2a1a00; color: #f0b34a; }
.pmx-lab__live { text-decoration: underline !important; }

/* ================= A · Menu grid ================= */
.pmx-chips { position: sticky; top: var(--pmx-top); z-index: 50; }

/* Sticky bars (A's categories, B's search, C's tabs). In the page they're just the controls on the
   paper: no band, no line, no shadow. Once stuck under the header (.is-stuck, products-index.js)
   they continue the header's paper, and the pair ends in a torn-paper edge instead of a shadow
   (the header drops its own shadow meanwhile). B and C are narrower than the page; a border-image
   outset carries their paper to the edges. The edge is one fixed strip placed under whichever
   bar is stuck (--pmx-edge-top), since C's tabs scroll sideways and would clip their own. */
.pmx { overflow-x: clip; }
.pmx-chips.is-stuck { background: #ece4de var(--tile) 0 0 / contain; }
.pmx-tools.is-stuck, .pmx-tabs.is-stuck { border-image: conic-gradient(#ece4de 0 0) fill 0 / / 0 100vmax; }
body.pmx-stuck .site-header .mainbar { box-shadow: none; }
.pmx::after {
  content: ""; position: fixed; z-index: 45; left: 0; right: 0; top: var(--pmx-edge-top, 0);
  height: 18px; margin-top: -1px;
  background: url("../img/torn-edge-down.png") left top / auto 100% repeat-x;
  pointer-events: none; opacity: 0;
}
body.pmx-stuck .pmx::after { opacity: 1; }
.pmx-chips__in {
  display: flex; justify-content: safe center; gap: 8px; max-width: 1240px; margin: 0 auto; padding: 12px 20px;
  overflow-x: auto; scrollbar-width: none;
}
.pmx-chips__in::-webkit-scrollbar { display: none; }
.pmx-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 7px 16px 7px 10px; border-radius: 999px;
  border: 1.5px solid rgba(19, 49, 21, .18); background: #fffdf9;
  font: 400 19px/1 var(--tanker); letter-spacing: .5px; color: var(--green-dark); text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.pmx-chip .pmx-icon { color: var(--ink, var(--c)); }
.pmx-chip:hover { border-color: var(--c); }
.pmx-chip.is-current { background: var(--solid, var(--c)); border-color: var(--solid, var(--c)); color: #fff; text-shadow: var(--on-shadow, none); }
.pmx-chip.is-current .pmx-icon { color: #fff; filter: drop-shadow(0 1px 1px rgba(90, 55, 0, var(--icon-shade, 0))); }

.pmx-cat { max-width: 1240px; margin: 0 auto; padding: 56px 20px 24px; scroll-margin-top: calc(var(--pmx-top) + 60px); }
.pmx-cat:last-of-type { padding-bottom: 90px; }
.pmx-cat__head { display: grid; justify-items: center; gap: 16px; max-width: 980px; margin: 0 auto 28px; text-align: center; }
.pmx-cat__title {
  padding: 9px 18px 7px; border-radius: 10px; background: var(--solid, var(--c));
  font: 400 38px/1 var(--tanker); letter-spacing: 2px; color: #fff; text-shadow: var(--on-shadow, none);
}
.pmx-cat__lead { margin: 0; font: 400 20px/1.55 var(--ballinger); color: #1f1f1f; }

.pmx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.pmx-card {
  display: flex; flex-direction: column; height: 100%;
  padding: 0 0 16px; border-radius: 16px; background: #fffdf9;
  box-shadow: 0 1px 0 rgba(19, 49, 21, .06), 0 18px 34px -26px rgba(60, 20, 10, .55);
  outline: 2px solid transparent;
  transition: transform .35s var(--pmx-ease), box-shadow .35s var(--pmx-ease), outline-color .25s, background-color .25s;
}
.pmx-card__link { display: flex; flex: 1; flex-direction: column; align-items: center; color: inherit; text-align: center; text-decoration: none; }
.pmx-card .pmx-add { width: auto; margin: 14px 16px 0; }
.pmx-card.is-picked { outline-color: var(--green-dark); background: #f4f7f1; }
.pmx-card__photo {
  display: grid; place-items: center; align-self: stretch; aspect-ratio: 1.12;
  margin-bottom: 14px; border-radius: 16px 16px 0 0;
  background: var(--pat, url("../img/lineart-light.png")) 0 0 / 320px, var(--c, var(--red));   /* the category's colour */
}
.pmx-card__photo img { width: 74%; height: auto; filter: drop-shadow(4px 12px 12px rgba(0, 0, 0, .45)); transition: transform .6s var(--pmx-ease); }
.pmx-card__name { padding: 0 14px; font: 400 28px/1.05 var(--tanker); letter-spacing: .5px; color: var(--green); }
.pmx-card__tag { margin-top: 6px; padding: 0 16px; font: 400 17px/1.3 var(--ballinger); color: #000; }
.pmx-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; font: 500 16px/1 var(--ballinger); color: var(--red); }
.pmx-card__more .icon { width: 8px; height: 8px; fill: currentColor; transition: transform .3s var(--pmx-ease); }
.pmx-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(19, 49, 21, .06), 0 26px 40px -24px rgba(60, 20, 10, .6); }
.pmx-card__link:hover .pmx-card__photo img { transform: rotate(12deg) scale(1.04); }
.pmx-card__link:hover .pmx-card__more .icon { transform: translateX(3px); }
.pmx-card__link:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 3px; border-radius: 16px; }

@media (max-width: 1024px) { .pmx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .pmx-chip { font-size: 17px; padding: 6px 13px 6px 8px; }
  .pmx-cat { padding: 40px 14px 12px; }
  .pmx-cat__title { font-size: 30px; }
  .pmx-cat__lead { font-size: 18px; }
  .pmx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pmx-card { padding-bottom: 14px; border-radius: 12px; }
  .pmx-card__photo { border-radius: 12px 12px 0 0; margin-bottom: 10px; }
  .pmx-card__name { font-size: 21px; padding: 0 8px; }
  .pmx-card__tag { font-size: 15px; padding: 0 10px; }
  .pmx-card__more { font-size: 15px; padding-top: 10px; }
  .pmx-card .pmx-add { margin: 10px 8px 0; padding: 10px 4px 9px; font-size: 15px; gap: 5px; }
  /* room for the request bar, but only while it is showing (it used to be reserved all the time) */
  body.pmx-has-tray .pmx-menu { padding-bottom: 150px; }
  .pmx-cat:last-of-type { padding-bottom: 56px; }
}

/* ================= B · Catalogue sheet ================= */
.pmx-sheet { padding: 0 20px 90px; }
.pmx-sheet__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px;
  max-width: 1240px; margin: 0 auto; padding: 56px 0 28px;
  border-bottom: 2px solid var(--green-dark);
}
.pmx-sheet__title { margin: 0 0 10px; font: 400 64px/.95 var(--tanker); color: var(--red); }
.pmx-sheet__intro { max-width: 760px; margin: 0; font: 400 20px/1.45 var(--ballinger); }
.pmx-sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pmx-tools {
  position: sticky; top: var(--pmx-top); z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  max-width: 1240px; margin: 0 auto; padding: 14px 0;
}
.pmx-find { position: relative; flex: 1 1 260px; max-width: 380px; }
.pmx-find svg { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }
.pmx-find input {
  width: 100%; padding: 13px 44px 12px 44px; border: 1.5px solid rgba(19, 49, 21, .25); border-radius: 12px;
  background: #fffdf9; font: 400 18px/1.2 var(--ballinger); color: #1f1f1f; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.pmx-find input::-webkit-search-cancel-button, .pmx-find input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.pmx-find input::placeholder { color: #7a726b; }
.pmx-find input:focus { outline: 0; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(19, 49, 21, .15), 0 8px 18px -10px rgba(19, 49, 21, .45); }
.pmx-find__icon { pointer-events: none; }
.pmx-find__clear {
  position: absolute; right: 7px; top: 50%; width: 32px; height: 32px; transform: translateY(-50%); padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(19, 49, 21, .09); color: var(--green-dark); cursor: pointer;
}
.pmx-find__clear:hover { background: rgba(19, 49, 21, .16); }
.pmx-find__clear svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.pmx-find__clear[hidden] { display: none; }
.pmx-find__count { margin: 0; font: 500 16px/1 var(--ballinger); color: #5d554e; }
.pmx-find__count:empty { display: none; }

/* suggestions: a card under the box, photo on its category colour, the matched letters in bold */
.pmx-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; max-height: min(70vh, 460px); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: #fffdf9;
  box-shadow: 0 0 0 1px rgba(19, 49, 21, .1), 0 22px 44px -16px rgba(40, 14, 8, .45);
  overscroll-behavior: contain;
}
.pmx-suggest[hidden] { display: none; }
.pmx-suggest__label { padding: 8px 12px 4px; font: 400 15px/1 var(--tanker); letter-spacing: 1px; color: #7a726b; text-transform: uppercase; }
.pmx-suggest [role="option"] a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.pmx-suggest [role="option"].is-active a { background: rgba(19, 49, 21, .08); }
.pmx-suggest__ph { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; }
.pmx-suggest__ph img { width: 38px; height: 38px; filter: drop-shadow(1px 3px 3px rgba(0, 0, 0, .35)); }
.pmx-suggest__tx { display: grid; gap: 2px; min-width: 0; }
.pmx-suggest__tx b { font: 400 21px/1.1 var(--tanker); letter-spacing: .4px; color: var(--green-dark); }
.pmx-suggest__tx b mark { background: none; color: var(--red); }
.pmx-suggest__tx small { font: 400 15px/1.2 var(--ballinger); color: #6d655e; }
.pmx-suggest__more { padding: 8px 12px 6px; font: 400 15px/1.2 var(--ballinger); color: #6d655e; }
.pmx-suggest__none { display: grid; gap: 4px; padding: 12px; font: 400 16px/1.4 var(--ballinger); color: #3a3530; }
.pmx-suggest__none b { font: 400 20px/1.1 var(--tanker); letter-spacing: .4px; color: var(--green-dark); }
.pmx-suggest__none a { color: var(--red); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pmx-find input { transition: none; } }

.pmx-sheet__body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; max-width: 1240px; margin: 10px auto 0; }
.pmx-index { position: sticky; top: calc(var(--pmx-top) + 84px); align-self: start; display: grid; gap: 2px; }
.pmx-index a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  font: 400 19px/1.1 var(--tanker); letter-spacing: .4px; color: var(--green-dark); text-decoration: none;
}
.pmx-index a .pmx-icon { color: var(--ink, var(--c)); }
.pmx-index a small { margin-left: auto; font: 500 14px/1 var(--ballinger); color: #77706a; }
.pmx-index a:hover { background: rgba(255, 253, 249, .7); }
.pmx-index a.is-current { background: #fffdf9; box-shadow: inset 4px 0 0 var(--c); }

.pmx-group { margin-bottom: 30px; scroll-margin-top: calc(var(--pmx-top) + 84px); }
.pmx-group__title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 8px 0;
  border-bottom: 2px solid var(--c); font: 400 30px/1 var(--tanker); letter-spacing: 1px; color: var(--ink, var(--c));
}
.pmx-group__intro { max-width: 820px; margin: 10px 0 8px; font: 400 18px/1.5 var(--ballinger); color: #3a3a3a; }
.pmx-group ul { margin: 0; padding: 0; list-style: none; }
.pmx-row {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 10px 6px; border-bottom: 1px dashed rgba(19, 49, 21, .22);
}
.pmx-row[hidden], .pmx-group[hidden] { display: none; }
.pmx-row__photo { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: var(--pat, url("../img/lineart-light.png")) 0 0 / 160px, var(--c, var(--red)); }
.pmx-row__photo img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, .4)); }
.pmx-row__text { display: grid; gap: 3px; }
.pmx-row__text a { font: 400 25px/1 var(--tanker); letter-spacing: .4px; color: var(--green-dark); text-decoration: none; }
.pmx-row__text a:hover { color: var(--red); }
.pmx-row__text span { font: 400 17px/1.3 var(--ballinger); color: #5a554f; }
.pmx-row__go { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; font: 500 16px/1 var(--ballinger); color: var(--red); text-decoration: none; }
.pmx-row__go .icon { width: 8px; height: 8px; fill: currentColor; }
.pmx-row__go:hover { background: var(--red); color: #fff; }
.pmx-empty { padding: 30px 0; font: 400 20px/1.4 var(--ballinger); }
.pmx-print-foot { display: none; }

@media (max-width: 1024px) {
  .pmx-sheet__body { grid-template-columns: minmax(0, 1fr); }
  .pmx-index { display: none; }
}
@media (max-width: 767px) {
  .pmx-sheet { padding: 0 14px 70px; }
  .pmx-sheet__head { padding-top: 36px; }
  .pmx-sheet__title { font-size: 46px; }
  .pmx-sheet__intro { font-size: 18px; }
  .pmx-sheet__actions, .pmx-sheet__actions .pmx-btn { width: 100%; }
  .pmx-find { max-width: none; }
    .pmx-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; }
  .pmx-row__photo { width: 64px; height: 64px; }
  .pmx-row__photo img { width: 54px; height: 54px; }
  .pmx-row__text a { font-size: 22px; }
  .pmx-row__text span { font-size: 15px; }
  .pmx-row__go { padding: 8px; font-size: 0; }
  .pmx-row__go .icon { width: 10px; height: 10px; }
}
@media print {
  .pmx-lab, .pmx-tools, .pmx-index, .pmx-sheet__actions, .pmx-row__go, .site-header, .mbar, .navlab, footer, .footer-cta, .footer-main { display: none !important; }
  .pmx { background: none; }
  .pmx-sheet { padding: 0; }
  .pmx-sheet__body { display: block; }
  .pmx-sheet__title { font-size: 40px; }
  .pmx-group { break-inside: avoid; margin-bottom: 14px; }
  .pmx-row { grid-template-columns: 54px minmax(0, 1fr); padding: 5px 0; break-inside: avoid; }
  .pmx-row__photo { width: 54px; height: 54px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pmx-row__photo img { width: 46px; height: 46px; }
  .pmx-print-foot { display: block; margin-top: 16px; font: 400 14px/1.4 var(--ballinger); }
}

/* ================= C · Build a request ================= */
.pmx-req { padding: 0 20px 140px; }
.pmx-req__head { max-width: 860px; margin: 0 auto; padding: 60px 0 26px; text-align: center; }
.pmx-req__title { margin: 0 0 10px; font: 400 72px/.95 var(--tanker); color: var(--red); }
.pmx-req__intro { margin: 0 auto 14px; max-width: 760px; font: 400 20px/1.55 var(--ballinger); }
.pmx-req__how { margin: 0 auto 22px; font: 500 20px/1.4 var(--ballinger); color: var(--green-dark); }
.pmx-catintro { max-width: 1240px; margin: 0 auto 22px; }
.pmx-catintro h2 { display: inline-block; margin: 0 0 12px; padding: 8px 16px 6px; border-radius: 10px; background: var(--solid, var(--c)); font: 400 32px/1 var(--tanker); letter-spacing: 1.5px; color: #fff; text-shadow: var(--on-shadow, none); }
.pmx-catintro p { max-width: 900px; margin: 0; font: 400 19px/1.55 var(--ballinger); }
.pmx-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font: 500 18px/1 var(--ballinger); color: var(--green-dark); }
.pmx-steps li { display: flex; align-items: center; gap: 9px; }
.pmx-steps span { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid currentColor; border-radius: 50%; font: 400 17px/1 var(--tanker); }

.pmx-tabs {
  position: sticky; top: var(--pmx-top); z-index: 40;
  display: flex; gap: 8px; max-width: 1240px; margin: 0 auto 24px; padding: 12px 0;
  overflow-x: auto; scrollbar-width: none;
}
.pmx-tabs::-webkit-scrollbar { display: none; }
.pmx-tabs button {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 15px 6px 10px; border: 1.5px solid rgba(19, 49, 21, .2); border-radius: 999px; background: #fffdf9;
  font: 400 18px/1 var(--tanker); letter-spacing: .4px; color: var(--green-dark); cursor: pointer;
}
.pmx-tabs button:first-child { padding-left: 15px; }
.pmx-tabs button small { font: 500 14px/1 var(--ballinger); opacity: .7; }
.pmx-tabs .pmx-icon { width: 22px; height: 22px; color: var(--ink, var(--c)); }
.pmx-tabs button[aria-selected="true"] { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.pmx-tabs button[aria-selected="true"] .pmx-icon { color: #fff; }

.pmx-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1240px; margin: 0 auto; padding: 0; list-style: none; }
.pmx-pickcard {
  display: flex; flex-direction: column; align-items: center; padding: 18px 16px 16px;
  border-radius: 16px; background: #fffdf9; text-align: center;
  box-shadow: 0 1px 0 rgba(19, 49, 21, .06), 0 18px 34px -26px rgba(60, 20, 10, .55);
  outline: 2px solid transparent; transition: outline-color .25s, background-color .25s;
}
.pmx-pickcard[hidden] { display: none; }
.pmx-pickcard.is-picked { outline-color: var(--green-dark); background: #f4f7f1; }
.pmx-pickcard__photo { display: grid; place-items: center; align-self: stretch; aspect-ratio: 1.15; margin: -18px -16px 12px; border-radius: 16px 16px 0 0; background: var(--pat, url("../img/lineart-light.png")) 0 0 / 300px, var(--c, var(--red)); }
.pmx-pickcard__photo img { width: 72%; }
.pmx-pickcard__photo img { height: auto; filter: drop-shadow(3px 10px 10px rgba(0, 0, 0, .4)); transition: transform .5s var(--pmx-ease); }
.pmx-pickcard__photo:hover img { transform: rotate(10deg); }
.pmx-pickcard__name { font: 400 26px/1.05 var(--tanker); letter-spacing: .4px; color: var(--green); text-decoration: none; }
.pmx-pickcard__name:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pmx-pickcard__tag { margin: 6px 0 14px; font: 400 16px/1.3 var(--ballinger); color: #5a554f; }
.pmx-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: auto;
  padding: 11px 12px 10px; border: 1.5px solid var(--red); border-radius: 9px; background: transparent;
  font: 400 18px/1 var(--tanker); letter-spacing: .4px; color: var(--red); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pmx-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pmx-add:hover { background: var(--red); color: #fff; }
.pmx-add__on, .pmx-add__tick { display: none; }
.pmx-add[aria-pressed="true"] { border-color: var(--green-dark); background: var(--green-dark); color: #fff; }
.pmx-add[aria-pressed="true"] .pmx-add__on, .pmx-add[aria-pressed="true"] .pmx-add__tick { display: inline; }
.pmx-add[aria-pressed="true"] .pmx-add__off, .pmx-add[aria-pressed="true"] .pmx-add__plus { display: none; }
.pmx-add__tick { stroke-dasharray: 24; animation: pmx-tick .35s var(--pmx-ease) both; }
@keyframes pmx-tick { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

.pmx-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 940;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.pmx-tray__in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  max-width: 1100px; margin: 0 auto; padding: 14px 16px 14px 22px;
  border-radius: 16px; background: var(--green-dark); color: #f3ebe1;
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .55);
  pointer-events: auto; animation: pmx-tray-in .4s var(--pmx-ease) both;
}
@keyframes pmx-tray-in { from { transform: translateY(120%); } to { transform: none; } }
.pmx-tray__count { margin: 0; font: 500 18px/1.2 var(--ballinger); white-space: nowrap; }
.pmx-tray__count b { font: 400 24px/1 var(--tanker); color: #f0b34a; }
.pmx-tray__list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 200px; min-width: 0; margin: 0; padding: 2px 0; list-style: none; }
.pmx-tray__list button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 5px 12px; border: 0; border-radius: 999px;
  background: rgba(243, 235, 225, .14); font: 500 15px/1 var(--ballinger); color: #f3ebe1; white-space: nowrap; cursor: pointer;
}
.pmx-tray__list button::after { content: "×"; font-size: 17px; line-height: .8; opacity: .7; }
.pmx-tray__list button:hover { background: rgba(243, 235, 225, .26); }
.pmx-tray__more button { padding-right: 12px; background: none; box-shadow: inset 0 0 0 1.5px rgba(243, 235, 225, .45); color: #f0b34a; }
.pmx-tray__more button::after { content: none; }
/* the full list, opened with "+N more": its own row above the buttons, scrolling if it's long */
.pmx-tray.is-open .pmx-tray__list {
  order: 3; flex-basis: 100%; max-height: min(40vh, 240px); overflow-y: auto;
  padding: 10px 0 2px; border-top: 1px solid rgba(243, 235, 225, .16);
}
.pmx-tray__go { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pmx-tray__clear { padding: 10px; border: 0; background: none; font: 500 16px/1 var(--ballinger); color: #f3ebe1; text-decoration: underline; cursor: pointer; }
body.pmx-tray-open .navlab { display: none; }   /* the request bar sits where the staging switcher does */

@media (max-width: 1024px) { .pmx-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .pmx-req { padding: 0 14px 170px; }
  .pmx-req__head { padding-top: 36px; }
  .pmx-req__title { font-size: 52px; }
  .pmx-req__intro { font-size: 18px; }
  .pmx-steps { gap: 8px 16px; font-size: 16px; }
  .pmx-steps span { width: 26px; height: 26px; font-size: 15px; }
  .pmx-tabs { margin-right: -14px; padding-right: 14px; }   /* top follows --pmx-top (under the header) */
  .pmx-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pmx-pickcard { padding: 14px 10px 10px; border-radius: 12px; }
  .pmx-pickcard__photo { margin: -14px -10px 10px; border-radius: 12px 12px 0 0; }
  .pmx-pickcard__name { font-size: 21px; }
  .pmx-pickcard__tag { font-size: 14px; margin-bottom: 10px; }
  .pmx-add { font-size: 16px; padding: 10px 6px 9px; }
  .pmx-tray { padding: 0 10px calc(10px + env(safe-area-inset-bottom)); }
  .pmx-tray__in { padding: 12px 12px 12px 16px; }
  .pmx-tray__list { order: 3; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pmx-card, .pmx-card__photo img, .pmx-pickcard__photo img, .pmx-tray__in, .pmx-add__tick { transition: none; animation: none; }
}


/* ================= A's category menu, 'tiles' (products_nav) =================
   Photo tiles overlap the banner's torn edge, so the menu belongs to the top of the page;
   once they've scrolled away a dark green band with the categories slides in under the
   header (products-index.js), ending in a torn edge. */
.pmx-nav-tiles .page-banner { padding-bottom: 80px; }
.pmx-tiles {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
  max-width: 1240px; margin: -96px auto 0; padding: 0 20px;
}
.pmx-tile {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 0 14px; border-radius: 16px; background: #fffdf9;
  box-shadow: 0 1px 0 rgba(19, 49, 21, .06), 0 20px 34px -24px rgba(60, 20, 10, .6);
  color: inherit; text-align: center; text-decoration: none;
  transition: transform .3s var(--pmx-ease);
}
.pmx-tile__photo {
  display: grid; place-items: center; align-self: stretch; aspect-ratio: 1.25; margin-bottom: 10px;
  border-radius: 16px 16px 0 0;
  background: var(--pat, url("../img/lineart-light.png")) 0 0 / 240px, var(--c);
}
.pmx-tile__photo img { width: 68%; height: auto; filter: drop-shadow(3px 8px 8px rgba(0, 0, 0, .4)); transition: transform .5s var(--pmx-ease); }
.pmx-tile__name { padding: 0 8px; font: 400 21px/1.05 var(--tanker); letter-spacing: .4px; color: var(--green-dark); }
.pmx-tile__count { margin-top: 5px; font: 500 18px/1 var(--ballinger); color: #3a2618; }   /* dark espresso brown */
.pmx-tile:hover { transform: translateY(-4px); }
.pmx-tile:hover .pmx-tile__photo img { transform: rotate(12deg); }
.pmx-tile:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 3px; }
.pmx-nav-tiles .pmx-cat:first-of-type { padding-top: 64px; }

.pmx-band {
  position: fixed; left: 0; right: 0; top: var(--pmx-band-top, 0px); z-index: 800;
  background: var(--green-dark);
  transform: translateY(calc(-100% - 30px)); visibility: hidden;
  transition: transform .35s var(--pmx-ease), visibility .35s;
}
.pmx-band.is-on { transform: none; visibility: visible; }
.pmx-band::after {   /* torn bottom edge in the band's green */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; margin-top: -1px;
  background: var(--green-dark);
  -webkit-mask: url("../img/torn-edge-down.png") left top / auto 100% repeat-x;
  mask: url("../img/torn-edge-down.png") left top / auto 100% repeat-x;
}
.pmx-band__in {
  display: flex; justify-content: safe center; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 8px 20px;
  overflow-x: auto; scrollbar-width: none;
}
.pmx-band__in::-webkit-scrollbar { display: none; }
.pmx-band a {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 8px 14px 7px; border-radius: 999px;
  font: 400 18px/1 var(--tanker); letter-spacing: .6px; color: #f3ebe1; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.pmx-band .pmx-icon { width: 22px; height: 22px; color: #f3ebe1; opacity: .85; }
.pmx-band a:hover { background: rgba(243, 235, 225, .12); }
.pmx-band a.is-current { background: #f3ebe1; color: var(--green-dark); }
.pmx-band a.is-current .pmx-icon { color: var(--ink, var(--c)); opacity: 1; }
body.pmx-band-on .site-header .mainbar { box-shadow: none; }

@media (max-width: 1024px) {
  .pmx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -70px; }
}
@media (max-width: 767px) {
  .pmx-nav-tiles .page-banner { padding-bottom: 56px; }
  /* the banner on phones is sized like About's: 50px title, 20px text (it had the 72px desktop size) */
  /* phones: the banner is built exactly like About's (480px, text centred, torn paper edge showing);
     the tiles start just below it rather than overlapping it, which is what kept the hero from matching */
  body.page-products-index .page-banner { min-height: 480px; padding: 68px 0; background-position: center center; }   /* 68px: the gap About's text has above and below */
  body.page-products-index .page-banner__title { font-size: 50px; }
  body.page-products-index .page-banner__subtitle { font-size: 20px; line-height: normal; }
  /* phones: one sideways-scrolling row of tiles */
  .pmx-tiles {
    display: flex; gap: 10px; margin-top: 0; padding: 22px 14px 8px; background: #f7ebe2 var(--tile);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .pmx-tiles::-webkit-scrollbar { display: none; }
  .pmx-tile { flex: 0 0 132px; scroll-snap-align: start; padding-bottom: 10px; border-radius: 12px; }
  .pmx-tile__photo { border-radius: 12px 12px 0 0; margin-bottom: 8px; }
  .pmx-tile__name { font-size: 17px; }
  .pmx-nav-tiles .pmx-cat:first-of-type { padding-top: 40px; }
  .pmx-band a { font-size: 16px; padding: 7px 11px 6px; }
  .pmx-band .pmx-icon { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) { .pmx-band, .pmx-tile, .pmx-tile__photo img { transition: none; } }

/* ---- "there's more this way": a soft fade on whichever edge has more to scroll to ----
   products-index.js adds .pmx-scroll to the sideways scrollers and toggles can-left / can-right
   as they move, so the fade only shows where there's actually more (the native-app pattern). */
@property --edge-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --edge-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.pmx-scroll {
  --edge-l: 0px; --edge-r: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--edge-l), #000 calc(100% - var(--edge-r)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--edge-l), #000 calc(100% - var(--edge-r)), transparent 100%);
  transition: --edge-l .25s ease, --edge-r .25s ease;
}
.pmx-scroll.can-left { --edge-l: 48px; }
.pmx-scroll.can-right { --edge-r: 48px; }
@media (prefers-reduced-motion: reduce) { .pmx-scroll { transition: none; } }
