/* Catalogue (products/). Loads after category.css. Kept quiet: a title, a category
   column and one plain list, all inside the nav's 81.25rem column. */

.cxp { --cx-x: max(var(--edge), calc((100% - 81.25rem) / 2)); }

/* ---------- Hero ---------- */
.cx-hero { padding: 9rem var(--cx-x) 3rem; }
.cx-hero__title {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: 4.5rem; line-height: 1; letter-spacing: -0.025em;
  color: var(--ink-strong);
}
.cx-hero__title em { color: var(--orange); }
.cx-hero__lede { margin: 1rem 0 0; max-width: 48ch; font-size: max(15px, 1.0625rem); line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Index ---------- */
.cx {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding: 1rem var(--cx-x) 6rem;
}

/* Categories */
.cx-cats { position: sticky; top: 7rem; max-height: calc(100vh - 8rem); display: flex; flex-direction: column; }
.cx-cats__select { display: none; }
.cx-cats__list {
  margin: 0; padding: 0 0.5rem 1rem 0; list-style: none;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent;
}
.cx-cat {
  appearance: none; width: 100%;
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  padding: 0.375rem 0.625rem;
  border: 0; border-radius: 0.5rem; background: transparent;
  font: inherit; font-size: max(14px, 0.9375rem); text-align: left; color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.cx-cat:hover { color: var(--ink-strong); }
.cx-cat__n { font-size: max(12px, 0.8125rem); color: var(--ink-soft); font-variant-numeric: tabular-nums; opacity: 0.8; }
.cx-cat[aria-pressed="true"] { background: var(--paper-2); color: var(--ink-strong); font-weight: 500; }

/* List head */
.cx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ink-strong); }
.cx-head__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--ink-strong); }
.cx-head__count { font-size: max(14px, 0.875rem); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cx-head__link { margin-left: auto; font-size: max(14px, 0.875rem); }
.cx-head__link[hidden] { display: none; }

/* Rows */
.cx-rows { margin: 0; padding: 0; list-style: none; }
.row { border-bottom: 1px solid var(--line); }
.row__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name go" "desc go";
  column-gap: 2rem;
  padding: 1.125rem 0;
  color: inherit;
}
.row__name { grid-area: name; font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; color: var(--ink-strong); transition: color 0.2s; }
.row__desc {
  grid-area: desc; margin-top: 0.25rem; max-width: 70ch;
  font-size: max(14px, 0.9375rem); line-height: 1.5; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.row__go {
  grid-area: go; align-self: center;
  width: 1.125rem; height: 1.125rem; fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.2s, translate 0.3s var(--ease-soft);
}
.row__head:hover .row__name { color: var(--orange-deep); }
.row__head:hover .row__go { stroke: var(--orange); translate: 0.25rem 0; }
.row__head:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 0.25rem; }

.cx-more { display: flex; justify-content: center; margin-top: 2.5rem; }
.cx-more[hidden] { display: none; }
#cx-more-n { font-weight: 500; color: var(--ink-soft); }
.more:hover #cx-more-n { color: inherit; }

/* ---------- Quote close ---------- */
.cx-quote {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem 5rem;
  margin: 0 max(var(--edge), calc((100% - 81.25rem) / 2)) 2rem; padding: 3.5rem 4rem;
  position: relative;
  background: var(--kraft); border-radius: 1.75rem;
}
.cx-quote::after { content: ""; position: absolute; inset: 0.5rem; border: 1px dashed rgba(194, 83, 15, 0.45); border-radius: 1.375rem; pointer-events: none; }
.cx-quote__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 3.25rem; line-height: 1.03; letter-spacing: -0.02em; color: var(--ink-strong); }
.cx-quote__title em { color: var(--orange-deep); }
.cx-quote__copy p { margin: 1rem 0 0; max-width: 52ch; font-size: max(15px, 1.0625rem); line-height: 1.55; color: var(--ink-soft); }
.cx-quote__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; position: relative; z-index: 1; }
.cx-quote .btn svg { width: 1rem; height: 1rem; }

/* Entrance on the shared load timeline */
.cx-hero__title, .cx-hero__lede {
  transition-property: opacity, translate;
  transition-duration: 1s, 1.2s;
  transition-timing-function: var(--ease-soft);
}
.is-loading .cx-hero__title, .is-loading .cx-hero__lede { opacity: 0; translate: 0 1rem; }
.cx-hero__lede { transition-delay: 0.12s; }
@media (prefers-reduced-motion: reduce) {
  .is-loading .cx-hero__title, .is-loading .cx-hero__lede { translate: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 767.98px) {
  .cx-hero { padding: 6.5rem var(--edge) 1.5rem; }
  .cx-hero__title { font-size: clamp(2.75rem, 13vw, 3.75rem); }

  .cx { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 0.5rem var(--edge) 3rem; }
  .cx-cats { position: static; max-height: none; }
  .cx-cats__list { display: none; }
  .cx-cats__select { position: relative; display: flex; align-items: center; }
  .cx-cats__select select {
    appearance: none; width: 100%; height: 3rem; padding: 0 2.75rem 0 1rem;
    border: 1px solid rgba(26, 23, 18, 0.2); border-radius: 0.75rem; background: var(--paper);
    font: inherit; font-size: 16px; font-weight: 500; color: var(--ink-strong);
  }
  .cx-cats__select svg { position: absolute; right: 1rem; width: 1rem; height: 1rem; fill: none; stroke: var(--ink-strong); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
  .cx-head__title { font-size: 1.5rem; }
  .cx-head__link { margin-left: 0; flex-basis: 100%; }
  .row__head { column-gap: 1rem; padding: 1rem 0; }
  .row__name { font-size: 1.1875rem; }

  .cx-quote { grid-template-columns: 1fr; margin: 0 var(--edge) 1.5rem; padding: 2.5rem 1.5rem; }
  .cx-quote__title { font-size: clamp(2rem, 9vw, 2.6rem); }
}
