/* Deals pages: /deals hub, category, search, how-we-pick. Builds on site.css; only what is unique here. */

/* ── Page head ─────────────────────────────────────────────────── */
.deals-head { gap: 14px; }
.deals-method-link { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; color: var(--soft); font-weight: 500; text-decoration: none; transition: color var(--d-s); }
.deals-method-link:hover { color: var(--fg); }
.deals-method-link .i { color: currentColor; }
@media (pointer: coarse) { .deals-method-link { min-height: 44px; } }
.deals-head .chips { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.chip__n { font-size: .8rem; font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__n, .chip.is-on .chip__n { color: inherit; opacity: .75; }

/* ── Rails: scroll on mobile, one row of five on desktop ───────── */
@media (min-width: 1024px) { .deals-rail > :nth-child(n+6) { display: none; } }
.deals-module .section__head h2 a { text-decoration: none; }
.deals-module .section__head h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.deals-event { display: grid; gap: 4px; margin-block: 8px 4px; }
.deals-event h2 { font-size: 1.15rem; }

/* ── Recently viewed (local only) ──────────────────────────────── */
.deals-recent__list { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 4px; }
.deals-recent__list::-webkit-scrollbar { display: none; }
.deals-recent__list a { flex: none; width: 232px; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px; padding-inline-end: 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); text-decoration: none; font-size: .88rem; line-height: 1.35; transition: border-color var(--d-s); }
.deals-recent__list a:hover { border-color: var(--fg); }
.deals-recent__list img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--stage); }
.deals-recent__list span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deals-textbtn { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--soft); font-size: .9rem; text-decoration: underline; text-underline-offset: .18em; }
.deals-textbtn:hover { color: var(--fg); }

/* ── List pages: sticky filters, grid, load more ───────────────── */
.deals-filters { position: sticky; top: var(--header-h); z-index: 20; display: flex; align-items: center; gap: 10px; margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: var(--bg); box-shadow: 0 1px 0 var(--rule); }
.deals-filters .chips { flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 28px); mask-image: linear-gradient(to right, transparent, #000 28px); padding-inline-end: 24px; }
.deals-sort { position: relative; flex: none; display: flex; align-items: center; }
.deals-sort select { appearance: none; -webkit-appearance: none; min-height: 38px; padding-block: 6px; padding-inline: 14px 34px; border: 1.5px solid var(--rule); border-radius: var(--r-pill); background: var(--panel); font-size: .92rem; font-weight: 500; cursor: pointer; transition: border-color var(--d-s); }
.deals-sort select:hover { border-color: var(--fg); }
.deals-sort .i { position: absolute; inset-inline-end: 12px; color: var(--soft); pointer-events: none; }
@media (pointer: coarse) { .deals-sort select { min-height: 44px; } }
/* Small phones: one row; the sort shrinks to a compact pill and the chips scroll under the fade. */
@media (max-width: 399px) { .deals-filters { gap: 8px; } .deals-sort select { padding-inline: 12px 28px; font-size: .88rem; } .deals-sort .i { inset-inline-end: 9px; } }
.deals-grid { margin-top: 14px; }
.deals-grid > [hidden] { display: none; }
.deals-more { display: flex; justify-content: center; margin-top: 20px; }
.deals-more [hidden] { display: none; }
.deals-filtered-empty { padding-block: 28px; }
.deals-filtered-empty[hidden] { display: none; }
.deals-suggest { flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.deals-suggest--start { justify-content: flex-start; }
.deals-answer { display: grid; grid-template-columns: 22px minmax(0, 1fr) 22px; align-items: center; gap: 14px; margin-block: 4px 12px; padding: 16px 18px; text-decoration: none; transition: border-color var(--d-s); }
.deals-answer:hover { border-color: var(--fg); }
.deals-answer > span { display: grid; gap: 2px; }
.deals-answer > span span { color: var(--soft); font-size: .92rem; }
.deals-answer__icon, .deals-answer__chev { color: var(--soft); }
.deals-close { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.deals-join { display: flex; align-items: center; gap: 14px; margin-block: 24px 4px; padding: 16px 18px; text-decoration: none; transition: border-color var(--d-s); }
.deals-join:hover { border-color: var(--fg); }
.deals-join > span { display: grid; gap: 2px; flex: 1; }
.deals-join > span span { color: var(--soft); font-size: .92rem; }
.deals-join__chev { color: var(--soft); }
.deals-guide h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin-bottom: 12px; }

/* ── How we pick (reading column; the example and the rail get more room) ── */
.method > * { max-width: 760px; }
.method > .method-checks { max-width: 1040px; }
.method > .method-top { max-width: none; }
.method > .prose { max-width: 600px; }
.method .answer { margin-bottom: 8px; }
.method-checks__body { display: grid; gap: 20px; }
@media (min-width: 900px) { .method-checks__body { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; } }
.method-example { margin: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .method-example { grid-template-columns: 1fr; position: sticky; top: calc(var(--header-h) + 16px); } }
.method-example figcaption { display: grid; gap: 8px; }
.method-example h3 { font-size: 1rem; font-weight: 700; }
.method-example ul { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 6px; color: var(--soft); font-size: .9rem; line-height: 1.55; }
.method-example strong { color: var(--fg); font-weight: 600; }
.method__h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin-bottom: 6px; }
.method-steps { list-style: none; margin: 0; padding: 0; }
.method-steps li { padding-block: 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.method-steps h3 { font-size: 1.1rem; font-weight: 700; }
.method-steps p { color: var(--soft); line-height: 1.65; max-width: 65ch; }
.method .prose h2:first-child { margin-top: 0; }

/* Brand hero (/deals/brand/:key): the brand's colour with a soft dot field, a white logo plate and three of its products. */
.brand-hero { position: relative; display: grid; gap: 24px; padding: clamp(20px, 4vw, 36px); border-radius: var(--r-panel); background-color: var(--brand); background-image: radial-gradient(circle at 88% 12%, rgb(255 255 255 / .11), transparent 42%), radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.4px); background-size: auto, 16px 16px; color: #fff; overflow: hidden; isolation: isolate; }
.brand-hero__copy { display: grid; gap: 12px; align-content: start; min-width: 0; }
.brand-hero h1 { color: #fff; }
.page-head .brand-hero .lede { color: #fff; }
.brand-hero__logo { justify-self: start; display: inline-flex; align-items: center; min-height: 52px; padding: 8px 18px; border-radius: 14px; background: #fff; color: var(--brand); box-shadow: 0 1px 0 rgb(0 0 0 / .08); }
.brand-hero__logo img { height: 34px; width: auto; }
.brand-hero__wordmark { font-weight: 800; font-size: 1.55rem; line-height: 1; letter-spacing: -.01em; }
.brand-hero__art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brand-hero__tile { aspect-ratio: 1; padding: 10%; border-radius: 16px; background: var(--tray); box-shadow: 0 10px 24px -14px rgb(0 0 0 / .45); }
.brand-hero__tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: brightness(1.05) contrast(1.02); }
@media (min-width: 900px) {
    .brand-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
    .brand-hero__art { align-items: center; }
    .brand-hero__tile:nth-child(2) { transform: translateY(-14px); }
    .brand-hero__tile:nth-child(3) { transform: translateY(10px); }
}

/* Brand hub (/deals/brands) */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.brand-tile { display: grid; grid-template-rows: auto 1fr; height: 100%; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--panel); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow var(--d-s) var(--e-out), transform var(--d-s) var(--e-out); }
.brand-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgb(0 0 0 / .4); }
.brand-tile__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background-color: var(--brand); background-image: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.4px); background-size: 16px 16px; }
.brand-tile__head .brand-hero__logo { min-height: 40px; padding: 6px 12px; border-radius: 11px; }
.brand-tile__head .brand-hero__wordmark { font-size: 1.15rem; }
.brand-tile__thumbs { display: flex; gap: 6px; }
.brand-tile__thumbs span { width: 44px; height: 44px; padding: 4px; border-radius: 10px; background: var(--tray); }
.brand-tile__thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.brand-tile__body { display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; }
.brand-tile__name { font-weight: 700; font-size: 1.05rem; }
.brand-tile__body p { margin: 0; color: var(--soft); font-size: .9rem; line-height: 1.5; }
.brand-tile__count { color: var(--fg); font-size: .85rem; font-weight: 500; }

/* Brand plates on /deals: logo plate on the brand colour, count under it. */
.brand-plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.brand-plate { display: grid; justify-items: center; gap: 8px; padding: 16px 10px 12px; border-radius: var(--r-card); background-color: var(--brand); background-image: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.4px); background-size: 16px 16px; color: #fff; text-decoration: none; transition: transform var(--d-s) var(--e-out); }
.brand-plate:hover { transform: translateY(-2px); }
.brand-plate .brand-hero__logo { justify-self: center; min-height: 40px; padding: 6px 12px; border-radius: 11px; }
.brand-plate .brand-hero__wordmark { font-size: 1.1rem; }
.brand-plate small { font-size: .82rem; color: rgb(255 255 255 / .88); }

/* Logo variants: a white logo stands on the brand colour; a square mark carries the name beside it. */
.brand-hero__logo img { max-width: 220px; object-fit: contain; }
.brand-hero__logo--bare { padding: 0; min-height: 0; background: none; box-shadow: none; }
.brand-hero__logo--bare img { height: 40px; }
.brand-hero__logo--mark { gap: 10px; }
.brand-hero__logo--mark img { height: 36px; }
.brand-tile__head .brand-hero__logo img, .brand-plate .brand-hero__logo img { height: 24px; max-width: 140px; }
.brand-tile__head .brand-hero__logo--bare img, .brand-plate .brand-hero__logo--bare img { height: 28px; }
.brand-plate .brand-hero__logo--bare { min-height: 40px; }
/* The head never widens the tile: the logo takes at most ~60%, thumbnails drop off before they overflow. */
.brand-tile { grid-template-columns: minmax(0, 1fr); }
.brand-tile__head { min-width: 0; }
.brand-tile__head .brand-hero__logo { flex: 0 1 auto; min-width: 0; max-width: 62%; }
.brand-tile__head .brand-hero__logo img { max-width: 100%; }
.brand-tile__thumbs { flex: 1 1 0; min-width: 0; justify-content: flex-end; overflow: hidden; }
.brand-tile__thumbs span { flex: none; }
.brand-tile__thumbs span:nth-child(n+3) { display: none; } /* two always fit beside the widest logo */
