.shop {
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
  padding: calc(var(--header-h) + clamp(40px, 7vw, 96px)) var(--gutter) clamp(72px, 10vw, 140px);
  min-height: 100svh;
}
.shop__head { margin-bottom: clamp(28px, 4vw, 48px); }
.shop__title { font-size: var(--fs-5); font-weight: 900; font-stretch: 140%; letter-spacing: -.05em; margin-bottom: 14px; }
.shop__lede { font-size: var(--fs-2); max-width: 44ch; }

/* filters: columns that share one baseline; size and sort sit flush right */
.shop__bar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: end; gap: 12px 20px;
  margin: 0 calc(var(--gutter) * -1) clamp(24px, 3vw, 40px); padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
/* the header slides away on scroll down, so the bar can sit at the very top */
.site-header:not(.is-hidden) ~ main .shop__bar { top: var(--header-h); transition: top 420ms var(--ease-out); }
.shop__bar .picker { margin: 0; }
/* both filter rows stay on one line: compact chips, and a sideways scroll if space runs out */
.chips { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.chips a.size { text-decoration: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .size { min-width: 0; padding: 0 11px; height: 36px; font-size: .75rem; white-space: nowrap; }
.chips .opt input:focus-visible + .size { outline: 3px solid var(--fg); outline-offset: 2px; }
.shop__sort { display: grid; gap: 10px; font-weight: 700; font-size: var(--fs-0); }
.shop__sort select {
  min-height: 36px; padding: 0 40px 0 14px; border: 1.5px solid var(--fg); color: var(--fg); font-size: .75rem; border-radius: var(--radius);
  font: inherit; font-size: .75rem; font-weight: 600; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f2efe9' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; cursor: pointer;
}
.shop__status { font-size: var(--fs-0); color: var(--muted); margin-bottom: 18px; }
.shop__group + .shop__group { margin-top: clamp(56px, 8vw, 110px); }
.shop__group[hidden] { display: none; }
.shop__h2 {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: clamp(18px, 2.4vw, 28px); padding-bottom: 14px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .14));
  font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.04em; line-height: 1;
}
.shop__h2 span { font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.shop__empty { display: grid; justify-items: start; gap: 16px; font-size: var(--fs-2); }
.shop__empty[hidden] { display: none; }

@media (max-width: 899px) {
  .shop__bar { grid-template-columns: 1fr; position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: none; }
  .shop__sort { justify-self: start; }
}

/* Fabric gets its own second line so its chips never cut off (owner, 14 Nov): Type, Line, Size, Sort on line one */
.shop__bar { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.shop__bar > .picker:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
.shop__bar > .picker:nth-child(3) .chips { flex-wrap: wrap; overflow: visible; }
.shop__bar > .shop__sort:nth-of-type(1) { grid-column: 4; grid-row: 1; }
.shop__bar > .shop__sort:nth-of-type(2) { grid-column: 5; grid-row: 1; }
@media (max-width: 899px) {
  /* phones and tablets: one filter per line again (the five-column rule above was squeezing Type and Line
     into slivers and stacking Fabric over Size; found in the final device check, 14 Nov) */
  .shop__bar { grid-template-columns: minmax(0, 1fr); }
  .shop__bar > .picker:nth-child(3), .shop__bar > .shop__sort:nth-of-type(1), .shop__bar > .shop__sort:nth-of-type(2) { grid-column: auto; grid-row: auto; }
}
