/* DupeEats · listing.css (A4 §7.8–7.10, §6.9, §3.15). Filters, hubs,
   product page, /gear/ and /saved/. After main.css, same tokens. */

/* ---------- browse by chain + filters ---------- */
.browse-chains { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.browse-title { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.recipe-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin-bottom: var(--s-5); padding: var(--s-4); border-radius: var(--r-md); background: var(--bg); }
.rf-fields { display: contents; }
.rf-toggle { display: none; }
.rf-field { display: grid; gap: 4px; min-width: 160px; flex: 1 1 160px; max-width: 240px; }
.rf-field label { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); }
.rf-select { position: relative; display: block; }
.rf-select select {
  width: 100%; min-height: 44px; padding: 0 40px 0 var(--s-3); appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.rf-select select:hover { border-color: var(--ink-2); }
.rf-select select:focus-visible { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.rf-select .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-2); }
.rf-actions { display: flex; align-items: center; gap: var(--s-4); min-height: 44px; }
.rf-apply { min-height: 44px; }
/* A11: hidden from the first paint when JS runs (html.js), not after filters.js (CLS 0) */
.js .recipe-filters[data-filters] .rf-apply, .recipe-filters.is-auto .rf-apply { display: none; }
.recipe-filters.is-loading { opacity: 0.7; }
.rf-clear { min-height: 44px; }
.listing-count { margin-bottom: var(--s-3); }
.band-white .recipe-filters { background: var(--bg); }

/* ---------- hubs ---------- */
.term-counts { color: var(--ink-2); font-weight: 600; }
.most-cloned { margin-bottom: var(--block-gap); }
.page-head--short { margin-bottom: var(--s-5); }
.page-head--short h1 { font-size: var(--fs-lg); }
.hub-products--two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.gone-list { display: grid; }
.gone-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); min-height: 60px; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.gone-item:first-child { border-top: 1px solid var(--line); }
.gone-name { font-weight: 700; }
.gone-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.gone-recipe { margin-left: auto; min-height: 44px; }
.tag-gone { background: var(--ink); color: var(--surface); }

/* ---------- product page ---------- */
.product-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.product-top--media { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.product-head { margin-bottom: 0; grid-template-columns: minmax(0, 1fr); }
.product-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.product-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.product-links a { color: var(--cobalt); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; margin-block: -10px; }
.product-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-links .sep { color: var(--muted); align-self: center; }
.product-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); }
.product-cta-meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.product-cta-meta .save { font-size: var(--fs-base); }
.product-facts { margin: var(--s-4) 0 0; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.product-photo { margin-bottom: 0; aspect-ratio: 4 / 3; }
.product-prose { margin-top: var(--s-6); }
.product-note { margin-top: var(--s-5); max-width: 70ch; }

/* ---------- /gear/ ---------- */
.gear-page .aff-note { display: flex; gap: var(--s-2); align-items: baseline; max-width: 860px; margin-bottom: var(--s-5); color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.gear-page .aff-note a { color: var(--cobalt); font-weight: 600; text-decoration: underline; }
.gear-jump { margin-bottom: var(--s-6); }
.gear-group { scroll-margin-top: 140px; }
.gear-group + .gear-group { margin-top: var(--block-gap); }
.gear-group h2 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.gear-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-3); }
.gear-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; gap: var(--s-3) var(--s-4); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.gear-card-body { grid-column: 2; display: grid; gap: var(--s-2); align-content: start; }
.gear-card:not(:has(.gear-photo)) .gear-card-body { grid-column: 1 / -1; }
.gear-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--fs-base); }
.gear-why { color: var(--ink-2); font-size: var(--fs-sm); }
.gear-used { font-size: var(--fs-sm); color: var(--muted); }
.gear-used a { color: var(--cobalt); font-weight: 600; }
.gear-card-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.gear-card .gear-photo { width: 56px; height: 56px; overflow: hidden; border-radius: var(--r-sm); background: var(--sunken); }
.gear-card .gear-photo img { width: 100%; height: 100%; object-fit: cover; }
.gear-page .gear-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--cobalt); font-size: var(--fs-sm); font-weight: 700; }
.gear-page .gear-link:hover { box-shadow: inset 0 0 0 2px var(--cobalt); }

/* ---------- tablet / phone ---------- */
@media (max-width: 1100px) {
  .product-top--media { grid-template-columns: minmax(0, 1fr); }
  .product-photo { order: -1; }
}
@media (max-width: 760px) {
  .recipe-filters { padding: var(--s-3) var(--gutter); gap: var(--s-2); margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .rf-toggle { display: inline-flex; min-height: 44px; }
  .recipe-filters:not(.is-open) .rf-fields { display: none; }
  .recipe-filters.is-open .rf-fields { display: flex; flex-wrap: wrap; gap: var(--s-2); width: 100%; }
  .rf-field { flex: 1 1 calc(50% - var(--s-2)); min-width: 0; max-width: none; }
  .hub-products--two { grid-template-columns: minmax(0, 1fr); gap: var(--block-gap); }
  .gone-recipe { margin-left: 0; }
  .product-links { flex-direction: column; align-items: flex-start; gap: 0; }
  .product-links a { margin-block: 0; }
  .product-links .sep { display: none; }
  .product-photo { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .gear-cards { grid-template-columns: minmax(0, 1fr); }
  .browse-chains .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .browse-chains .chips::-webkit-scrollbar { display: none; }
  .browse-chains .chip { flex: none; white-space: nowrap; }
}

/* A8: the drop that changed this product status ("See the news"). */
.product-status-drop a { color: var(--cobalt); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- A8.1: /photo-credits/ ---------- */
.credits-group { margin-top: var(--s-7); }
.credits-group h2 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--s-3); }
.credits-count { padding: 0 var(--s-2); border-radius: 6px; background: var(--sunken); color: var(--ink-2); font-size: var(--fs-xs); line-height: 22px; }
.credits-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.credits-table th { padding: var(--s-2) var(--s-3) var(--s-2) 0; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.credits-table td { padding: var(--s-3) var(--s-3) var(--s-3) 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.credits-table .credits-desc { color: var(--ink); font-weight: 600; max-width: 42ch; }
.credits-thumb { width: 112px; }
.credits-thumb img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--sunken); }
.credits-table a { display: inline-block; padding-block: 2px; color: var(--cobalt); font-weight: 600; }
.credits-table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.credits-k { display: none; }
.credits-empty { color: var(--ink-2); }
@media (max-width: 760px) {
  .credits-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .credits-table tr { display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .credits-table td { padding: 0; border: 0; }
  .credits-table .credits-thumb { grid-row: span 4; width: auto; }
  .credits-thumb img { width: 80px; height: 60px; }
  .credits-table .credits-desc { margin-bottom: var(--s-1); }
  .credits-k { display: inline; color: var(--muted); }
  .credits-k::after { content: ": "; }
}
