/* ==========================================================================
   CATALOG — storefront presentation layer (visual only; no behaviour lives here).
   The controls recede so the photography leads: collections read as text tabs with an
   underline, search is a quiet filled field, amount/sort are plain text menus, Grid/List is
   a two-word switch, active filters are soft tags. One hairline under the bar; no outlines.
   ========================================================================== */

/* Header: a calmer title, the count beside the crumbs. */
.catalog .catalog__head { padding-top: clamp(28px, 3.6vw, 52px); padding-bottom: clamp(18px, 2vw, 28px); }
.catalog .catalog__head h1 { font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem); line-height: 1; letter-spacing: -0.045em; margin-top: 14px; }

/* Bar */
.catalog .filters { border-top: 0; border-bottom: 1px solid var(--line-light); background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.catalog .filters__inner { gap: 20px; min-height: 60px; padding-block: 10px; }

/* Search: filled, square, no outline until focused. */
.catalog .filters__search { height: 40px; padding: 0 14px; border-radius: 0; box-shadow: none; background: #f2f3f5; flex: 0 1 230px;
  transition: background-color 200ms ease, box-shadow 200ms ease; }
.catalog .filters__search svg { color: var(--text-on-light-muted); flex: none; }
.catalog .filters__search:focus-within { background: var(--white); box-shadow: inset 0 0 0 1px var(--ink-950); }

/* Collections: text tabs with a sliding-in underline on the current one. */
.catalog .filters__chips { gap: 22px; align-self: stretch; align-items: center; }
.catalog .filters .chip { position: relative; height: 40px; padding: 0; border-radius: 0; box-shadow: none; background: none;
  color: var(--text-on-light-muted); font-size: .9rem; letter-spacing: -0.005em; gap: 6px;
  transition: color 200ms ease, transform 160ms var(--ease-out); }
.catalog .filters .chip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1.5px; background: var(--ink-950);
  transform: scaleX(0); transform-origin: left center; transition: transform 300ms var(--ease-out); }
.catalog .filters .chip[aria-checked="true"] { background: none; color: var(--ink-950); font-weight: 550; }
.catalog .filters .chip[aria-checked="true"]::after { transform: scaleX(1); }
.catalog .filters .chip .count { font-size: .64rem; opacity: .6; transform: translateY(-4px); }
@media (hover: hover) and (pointer: fine) { .catalog .filters .chip:hover { color: var(--ink-950); box-shadow: none; } }

/* Amount / sort: plain text menus with a chevron. */
.catalog .filters__selects { gap: 18px; }
.catalog .filters .select select { height: 40px; padding: 0 20px 0 0; border-radius: 0; box-shadow: none; background: none; font-size: .88rem; color: var(--ink-950); }
.catalog .filters .select svg { right: 2px; color: var(--text-on-light-muted); }
.catalog .filters .select select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Grid / List: two words, the current one in ink. */
.catalog .view-toggle { padding: 0; gap: 2px; border-radius: 0; box-shadow: none; padding-left: 18px; border-left: 1px solid var(--line-light); }
.catalog .view-toggle button { height: 40px; padding: 0 6px; border-radius: 0; font-size: .86rem; color: var(--text-on-light-muted); background: none; transition: color 200ms ease; }
.catalog .view-toggle [aria-checked="true"] { background: none; color: var(--ink-950); font-weight: 550; }
@media (hover: hover) and (pointer: fine) { .catalog .view-toggle button:hover { color: var(--ink-950); } }

/* Result count + active filters: soft square tags. */
.catalog .catalog__status { padding: 22px 0 22px; }
.catalog .afilter { border-radius: 0; box-shadow: none; background: #f2f3f5; height: 30px; font-size: .82rem; }
@media (hover: hover) and (pointer: fine) { .catalog .afilter:hover { background: #e9ebef; box-shadow: none; } }
.catalog .afilter-clear { height: 30px; font-size: .82rem; color: var(--text-on-light-muted); }
@media (hover: hover) and (pointer: fine) { .catalog .afilter-clear:hover { color: var(--ink-950); } }

/* List view: same quiet type system. */
.catalog .index { border-top-color: var(--line-light); }
.catalog .index__name { font-size: clamp(1.15rem, .95rem + .8vw, 1.6rem); font-weight: 550; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .catalog .catalog__head { padding-top: 18px; padding-bottom: 12px; }
  .catalog .catalog__head h1 { font-size: 2.2rem; margin-top: 10px; }
  .catalog .filters__inner { gap: 6px 10px; padding-block: 10px 0; }
  .catalog .filters__search { height: 44px; flex: 1 1 0; }
  .catalog .filters__more { height: 44px; padding: 0 4px 0 8px; border-radius: 0; box-shadow: none; background: none; gap: 8px; font-weight: 550; }
  .catalog .filters__chips { gap: 20px; margin-top: 2px; }
  .catalog .filters .chip { height: 44px; font-size: .92rem; }
  .catalog .catalog__status { padding: 16px 0 18px; }
  .catalog .afilter, .catalog .afilter-clear { height: 34px; }
  /* Two-up grid: generous rows, tight gutters, so each photo stays large. */
  .catalog .pgrid--4 { gap: 40px 12px; }
  .catalog .pcard__body { padding-top: 12px; }
  .catalog .pcard__name { font-size: .95rem; }
  .catalog .pcard__doses { font-size: .74rem; }
  .catalog .pcard__price { margin-top: 8px; font-size: .9rem; }
  .catalog .pcard__act { height: 44px; margin-top: 10px; font-size: .82rem; }
  /* The sheet's controls keep their clear, tappable form on phones. */
  .sheet .select select { height: 48px; padding: 0 34px 0 16px; box-shadow: inset 0 0 0 1px var(--line-light-strong); border-radius: 0; }
  .sheet .select svg { right: 14px; }
  .sheet .view-toggle { border-left: 0; padding-left: 0; }
}
