/* ════════════════════════════════════════════════════════
   FOODS v2 — clear · scannable · responsive
   ═══════════════════════════════════════════════════════ */
:root {
    --f2-bg:        #FAF8F2;
    --f2-paper:     #FFFFFF;
    --f2-paper-2:   #FDFBF5;
    --f2-ink:       #1F2A24;
    --f2-ink-soft:  #5C6862;
    --f2-ink-mute:  #98A09B;
    --f2-line:      #ECE6D6;
    --f2-line-soft: #F2EDE0;
    --f2-accent:    #3F6B5A;
    --f2-accent-soft:#E8F0EB;
    --f2-warm:      #F5EFE0;
    --f2-shadow:    0 1px 2px rgba(31,42,36,0.04), 0 8px 24px -12px rgba(31,42,36,0.06);

    --f2-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body { background: var(--f2-bg); }
.main-content { padding: 0; background: var(--f2-bg); }

.foods2 {
    font-family: var(--f2-sans);
    color: var(--f2-ink);
    font-feature-settings: 'tnum' on;
}

/* ───── Header ───── */
.foods2-head {
    background: linear-gradient(180deg, var(--f2-paper) 0%, var(--f2-bg) 100%);
    border-bottom: 1px solid var(--f2-line);
    padding: 28px 0 24px;
    position: relative;
    overflow: hidden;
}
.foods2-head::before {
    content: '';
    position: absolute; top: 0; right: 0; width: 320px; height: 320px;
    background: radial-gradient(circle, var(--f2-accent-soft), transparent 70%);
    opacity: 0.5; pointer-events: none;
}
.foods2-head-inner {
    max-width: 1120px; margin: 0 auto; padding: 0 20px;
    position: relative;
}
.head-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em;
    color: var(--f2-accent); text-transform: uppercase;
    background: var(--f2-accent-soft);
    padding: 5px 12px; border-radius: 100px;
    margin-bottom: 12px;
}
.eb-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4A7C59;
    box-shadow: 0 0 0 3px rgba(74,124,89,0.18);
}
.head-title {
    font-family: var(--f2-sans);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--f2-ink);
    line-height: 1.1;
}
.head-sub {
    font-size: 1rem; color: var(--f2-ink-soft);
    margin: 0 0 20px; max-width: 560px; line-height: 1.55;
    font-weight: 500;
}
.head-sub strong { color: var(--f2-ink); font-weight: 800; }

/* Rating stat pills */
.head-stats {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.stat-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--f2-paper);
    border: 1px solid var(--f2-line);
    border-radius: 100px;
    padding: 8px 16px 8px 12px;
    text-decoration: none;
    transition: all 0.15s;
    color: var(--f2-ink);
}
.stat-pill:hover { border-color: var(--f2-ink-mute); transform: translateY(-1px); }
.stat-pill.active {
    background: var(--f2-ink); color: var(--f2-paper);
    border-color: var(--f2-ink);
}
.sp-dot { width: 8px; height: 8px; border-radius: 50%; }
.stat-safe     .sp-dot { background: #4A7C59; }
.stat-moderate .sp-dot { background: #C77A2C; }
.stat-limit    .sp-dot { background: #D55F2E; }
.stat-avoid    .sp-dot { background: #B5453B; }
.stat-pill strong {
    font-size: 0.95rem; font-weight: 800; line-height: 1;
    font-feature-settings: 'tnum' on;
}
.sp-label { font-size: 0.78rem; font-weight: 600; color: var(--f2-ink-soft); }
.stat-pill.active .sp-label { color: var(--f2-paper); opacity: 0.8; }
.sp-x {
    font-size: 1rem; font-weight: 400; opacity: 0.7;
    margin-left: 2px; line-height: 1;
}

/* ───── Body wrapper ───── */
.foods2-body {
    max-width: 1120px; margin: 0 auto; padding: 20px;
    padding-bottom: 40px; /* extra bottom room; mobile overrides below */
}

/* ───── Sticky tool bar ───── */
.tool-bar {
    position: sticky; top: 60px; z-index: 30;
    background: rgba(250,248,242,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: -8px -20px 16px;
    padding: 12px 20px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.tool-bar.scrolled { border-bottom-color: var(--f2-line); }

.search-row {
    position: relative; display: flex; align-items: center;
    background: var(--f2-paper);
    border: 1px solid var(--f2-line);
    border-radius: 14px;
    transition: border-color 0.15s, box-shadow 0.2s;
    margin-bottom: 12px;
}
.search-row:focus-within {
    border-color: var(--f2-accent);
    box-shadow: 0 0 0 4px var(--f2-accent-soft);
}
.search-icon {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: var(--f2-ink-mute); pointer-events: none;
}
.search-row input {
    width: 100%;
    padding: 14px 70px 14px 50px;
    border: none; background: transparent; outline: none;
    font-family: var(--f2-sans); font-size: 0.98rem; color: var(--f2-ink);
    font-weight: 500;
}
.search-row input::placeholder { color: var(--f2-ink-mute); }
.search-kbd {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-family: var(--f2-sans);
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
    background: var(--f2-warm); color: var(--f2-ink-soft);
    border: 1px solid var(--f2-line);
    pointer-events: none;
}
.search-clear {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--f2-warm); color: var(--f2-ink);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: background 0.15s;
}
.search-clear:hover { background: var(--f2-ink); color: var(--f2-paper); }

/* Sort presets */
.sort-presets {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sort-presets::-webkit-scrollbar { display: none; }
.sort-label {
    font-size: 0.78rem; color: var(--f2-ink-soft); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding-right: 6px; white-space: nowrap;
    flex-shrink: 0;
}
.sort-chip {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--f2-paper);
    border: 1px solid var(--f2-line);
    border-radius: 100px;
    font-size: 0.8rem; font-weight: 600;
    color: var(--f2-ink-soft);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.sort-chip:hover { border-color: var(--f2-ink-mute); color: var(--f2-ink); }
.sort-chip.active {
    background: var(--f2-ink); color: var(--f2-paper);
    border-color: var(--f2-ink);
}

/* ───── Category bar ───── */
.cat-bar {
    display: flex; gap: 6px; overflow-x: auto;
    padding: 4px 0 12px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-pill {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    background: var(--f2-paper);
    border: 1px solid var(--f2-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--f2-ink);
    transition: all 0.15s;
}
.cat-pill:hover { border-color: var(--f2-ink-mute); }
.cat-pill.active {
    background: var(--f2-ink); color: var(--f2-paper);
    border-color: var(--f2-ink);
}
.cat-icon { font-size: 1rem; line-height: 1; }
.cat-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.cat-num {
    font-size: 0.72rem; font-weight: 700;
    padding: 1px 8px; border-radius: 100px;
    background: var(--f2-warm); color: var(--f2-ink-soft);
    font-feature-settings: 'tnum' on;
}
.cat-pill.active .cat-num { background: rgba(255,255,255,0.18); color: var(--f2-paper); }

/* ───── Results meta ───── */
.results-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--f2-line);
    margin-bottom: 20px; gap: 10px; flex-wrap: wrap;
}
.rm-count { font-size: 0.88rem; color: var(--f2-ink-soft); font-weight: 500; }
.rm-count strong { color: var(--f2-ink); font-weight: 800; font-feature-settings: 'tnum' on; }
.rm-clear {
    color: var(--f2-accent); font-size: 0.82rem; text-decoration: none;
    font-weight: 600; margin-left: 12px;
    padding: 4px 10px; border-radius: 100px;
    background: var(--f2-accent-soft);
    transition: all 0.15s;
}
.rm-clear:hover { background: var(--f2-accent); color: var(--f2-paper); }

/* ───── Active filters chips bar ───── */
.active-filters {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 8px 0 12px;
}
.af-label {
    font-size: 0.72rem; color: var(--f2-ink-mute);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
    flex-shrink: 0; white-space: nowrap;
    margin-right: 2px;
}
.af-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px 5px 12px;
    background: var(--f2-ink); color: var(--f2-paper);
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.8rem; font-weight: 600;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.af-chip:hover { opacity: 0.8; }
.af-chip svg { flex-shrink: 0; opacity: 0.65; }
.af-chip-safe     { background: #4A7C59; }
.af-chip-moderate { background: #C77A2C; }
.af-chip-limit    { background: #D55F2E; }
.af-chip-avoid    { background: #B5453B; }
.af-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5); flex-shrink: 0;
}
.af-clear {
    font-size: 0.78rem; color: var(--f2-ink-soft);
    text-decoration: none; font-weight: 600;
    padding: 5px 12px;
    border: 1px solid var(--f2-line);
    border-radius: 100px;
    transition: all 0.15s;
    margin-left: auto;
    white-space: nowrap;
}
.af-clear:hover { background: var(--f2-ink); color: var(--f2-paper); border-color: var(--f2-ink); }

/* ───── Empty state additions ───── */
.empty2-sup {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.82rem; color: var(--f2-ink-soft); font-weight: 500;
    padding: 10px 18px;
    background: #fff5f5; border: 1px solid #fecaca;
    border-radius: 100px;
    margin-top: 4px;
}
.empty2-sup a { color: #dc2626; font-weight: 700; text-decoration: none; }
.empty2-sup a:hover { text-decoration: underline; }
.es-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
    vertical-align: middle; margin-right: 2px;
}
.es-safe { background: #4A7C59; }
.es-moderate { background: #C77A2C; }

.view-toggle {
    display: inline-flex; gap: 0;
    background: var(--f2-paper); border: 1px solid var(--f2-line);
    border-radius: 10px; padding: 3px;
}
.vt-btn {
    background: transparent; border: none; cursor: pointer;
    padding: 6px 10px; border-radius: 7px;
    color: var(--f2-ink-mute); transition: all 0.15s;
    display: inline-flex; align-items: center; justify-content: center;
}
.vt-btn:hover { color: var(--f2-ink); }
.vt-btn.active { background: var(--f2-ink); color: var(--f2-paper); }

/* ════════════════════════════════════════════════════════
   FOOD GRID + CARD
   ═══════════════════════════════════════════════════════ */
.food-grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    position: relative; /* needed for loading overlay */
    transition: opacity 0.15s;
}

/* Loading state — instant feedback on filter navigation */
.food-grid2.is-loading {
    opacity: 0.45;
    pointer-events: none;
}
.food-grid2.is-loading::after {
    content: '';
    position: absolute; inset: 0;
    z-index: 10;
    cursor: wait;
    border-radius: 16px;
}
@media (min-width: 1280px) {
    .food-grid2 { grid-template-columns: repeat(4, 1fr); }
}

/* CARD */
.fc {
    position: relative;
    background: var(--f2-paper);
    border: 1px solid var(--f2-line);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex; flex-direction: column;
}
.fc:hover {
    transform: translateY(-2px);
    box-shadow: var(--f2-shadow);
}

.fc-link {
    display: flex; flex-direction: column; flex: 1;
    text-decoration: none; color: inherit;
}

.fc-image {
    width: 100%; aspect-ratio: 4 / 3;
    background: var(--f2-warm);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.fc-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.fc:hover .fc-image img { transform: scale(1.04); }
.fc-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    background: var(--f2-warm);
}
.fc-rating-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--rate-bg); color: var(--rate-color);
    font-size: 0.7rem; font-weight: 700;
    padding: 3px 9px; border-radius: 100px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-transform: uppercase; letter-spacing: 0.04em;
}

.fc-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex; flex-direction: column;
}
.fc-cat {
    font-size: 0.72rem;
    color: var(--f2-ink-mute);
    font-weight: 600;
    margin-bottom: 6px;
}
.fc-name {
    font-family: var(--f2-sans);
    font-size: 0.95rem; font-weight: 800;
    color: var(--f2-ink);
    margin: 0 0 8px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.fc-cal {
    font-size: 0.78rem; color: var(--f2-ink-soft);
    margin-bottom: 12px;
    font-feature-settings: 'tnum' on;
}
.fc-cal strong { font-size: 1rem; font-weight: 800; color: var(--f2-ink); margin-right: 2px; }

.fc-nutrients {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 10px;
    background: var(--f2-paper-2);
    border-radius: 10px;
    margin-top: auto;
}
.fc-nut {
    text-align: center;
    border-right: 1px solid var(--f2-line);
}
.fc-nut:last-child { border-right: none; }
.fc-nut-key {
    display: block;
    font-size: 0.65rem; color: var(--f2-ink-mute);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.fc-nut-val {
    font-size: 0.95rem; font-weight: 800; color: var(--f2-ink);
    font-feature-settings: 'tnum' on;
}
.fc-nut-val em {
    font-style: normal; font-weight: 500; font-size: 0.7rem;
    color: var(--f2-ink-mute); margin-left: 1px;
}

/* Quick-add button */
.fc-quick-add {
    position: absolute; top: 10px; left: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(31,42,36,0.92);
    color: #fff; border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0; transform: scale(0.8);
    transition: all 0.2s;
    z-index: 2;
}
.fc-quick-add span { display: none; }
.fc:hover .fc-quick-add { opacity: 1; transform: scale(1); }
.fc-quick-add:hover { background: var(--f2-accent); width: 64px; }
.fc-quick-add:hover span { display: inline; font-size: 0.72rem; font-weight: 700; }
.fc-quick-add.added,
.fc-quick-add.touch-active { background: var(--f2-accent); width: auto; padding: 0 12px; opacity: 1; transform: scale(1); }
.fc-quick-add.added span { display: inline; font-size: 0.72rem; font-weight: 700; }

/* ───── Supporter inline CTA card ───── */
.fc-sup-cta {
    background: linear-gradient(160deg, #fffbf0 0%, #fff8f4 100%);
    border: 1.5px solid #fde68a !important;
    display: flex; align-items: center; justify-content: center;
    min-height: 300px;
    cursor: default;
}
.fc-sup-cta::before { display: none; } /* remove left rating bar */
.fc-sup-cta:hover { transform: none; box-shadow: none; }
.fc-sup-inner {
    padding: 26px 20px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    width: 100%;
}
.fc-sup-heart {
    width: 52px; height: 52px;
    background: #fef2f2; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    animation: heartbeat 3.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes heartbeat {
    0%, 60%, 100% { transform: scale(1); }
    20%, 40%      { transform: scale(1.18); }
}
.fc-sup-cta h4 {
    font-size: 1rem; font-weight: 800; margin: 0;
    color: var(--f2-ink); letter-spacing: -0.01em;
}
.fc-sup-cta p {
    font-size: 0.85rem; color: var(--f2-ink-soft); margin: 0;
    font-weight: 500; line-height: 1.55;
}
.fc-sup-cta p strong { color: var(--f2-ink); }
.fc-sup-btn {
    display: block; width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff; border-radius: 100px;
    text-decoration: none; font-size: 0.85rem; font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(220,38,38,0.22);
    text-align: center;
}
.fc-sup-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220,38,38,0.32); }
.fc-sup-note {
    font-size: 0.71rem; color: var(--f2-ink-mute); font-weight: 500;
}

/* ═══ COMPACT/LIST VIEW ═══ */
.food-grid2[data-view="list"] {
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 760px;
    margin: 0 auto;
}
.food-grid2[data-view="list"] .fc {
    flex-direction: row;
}
.food-grid2[data-view="list"] .fc-link {
    flex-direction: row; align-items: stretch;
    padding-left: 4px;
}
.food-grid2[data-view="list"] .fc-image {
    width: 90px; aspect-ratio: 1;
    flex-shrink: 0;
}
.food-grid2[data-view="list"] .fc-rating-badge {
    top: 4px; right: 4px;
    font-size: 0.6rem; padding: 1px 6px;
}
.food-grid2[data-view="list"] .fc-body {
    flex: 1;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    gap: 16px;
}
.food-grid2[data-view="list"] .fc-cat,
.food-grid2[data-view="list"] .fc-cal { display: none; }
.food-grid2[data-view="list"] .fc-name {
    flex: 1; margin: 0; min-height: 0;
    font-size: 0.92rem;
    -webkit-line-clamp: 1;
}
.food-grid2[data-view="list"] .fc-nutrients {
    flex-shrink: 0;
    width: auto;
    display: flex;
    background: transparent;
    padding: 0;
    gap: 14px;
}
.food-grid2[data-view="list"] .fc-nut {
    text-align: right;
    border: none;
    padding: 0;
}
.food-grid2[data-view="list"] .fc-nut-key {
    font-size: 0.62rem; margin-bottom: 0;
}
.food-grid2[data-view="list"] .fc-nut-val { font-size: 0.85rem; }
.food-grid2[data-view="list"] .fc-quick-add {
    position: relative; top: auto; left: auto;
    margin: 0 14px 0 0; opacity: 1; transform: none;
    align-self: center;
}

/* ───── Pagination ───── */
.pagination2 {
    display: flex; justify-content: space-between; align-items: center;
    margin: 32px 0 24px; padding: 18px 20px;
    background: var(--f2-paper); border: 1px solid var(--f2-line);
    border-radius: 14px; gap: 16px; flex-wrap: wrap;
}
.pg-info { font-size: 0.85rem; color: var(--f2-ink-soft); font-weight: 500; }
.pg-info strong { color: var(--f2-ink); font-weight: 800; font-feature-settings: 'tnum' on; }

.pg-controls { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pg-btn {
    min-width: 36px; height: 36px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    background: transparent;
    border: 1px solid var(--f2-line);
    border-radius: 9px;
    color: var(--f2-ink); text-decoration: none;
    font-family: var(--f2-sans);
    font-size: 0.85rem; font-weight: 600;
    transition: all 0.15s;
    font-feature-settings: 'tnum' on;
}
.pg-btn:hover:not(.active):not(.disabled) { border-color: var(--f2-ink-mute); background: var(--f2-paper-2); }
.pg-btn.active { background: var(--f2-ink); color: var(--f2-paper); border-color: var(--f2-ink); cursor: default; }
.pg-btn.disabled { opacity: 0.35; cursor: not-allowed; }
.pg-ellipsis { color: var(--f2-ink-mute); padding: 0 4px; user-select: none; }

/* ───── Empty state ───── */
.empty2 {
    background: var(--f2-paper);
    border: 1px dashed var(--f2-line);
    border-radius: 16px;
    padding: 56px 24px;
    text-align: center;
}
.empty2-icon { color: var(--f2-ink-mute); margin-bottom: 12px; opacity: 0.6; }
.empty2 h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; color: var(--f2-ink); letter-spacing: -0.01em; }
.empty2 p { color: var(--f2-ink-soft); margin: 0 0 16px; font-weight: 500; }
.empty2-suggest {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    margin-bottom: 18px;
}
.empty2-suggest a {
    padding: 6px 14px; background: var(--f2-warm); color: var(--f2-ink);
    text-decoration: none; border-radius: 100px;
    font-size: 0.82rem; font-weight: 600;
    transition: all 0.15s;
}
.empty2-suggest a:hover { background: var(--f2-accent); color: var(--f2-paper); }

/* ───── Buttons ───── */
.btn2-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    background: var(--f2-ink); color: var(--f2-paper);
    border: none; border-radius: 12px;
    text-decoration: none;
    font-family: var(--f2-sans);
    font-size: 0.92rem; font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn2-primary:hover { background: var(--f2-accent); transform: translateY(-1px); }

/* ───── Meal CTA ───── */
.meal-cta2 {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 28px; margin: 32px 0 24px;
    background: linear-gradient(135deg, var(--f2-paper) 0%, var(--f2-warm) 100%);
    border: 1px solid var(--f2-line);
    border-radius: 18px;
    gap: 18px; flex-wrap: wrap;
}
.cta-text h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.cta-text p  { font-size: 0.9rem; color: var(--f2-ink-soft); margin: 0; font-weight: 500; }

/* ───── Quick-add toast ───── */
.qa-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px;
    background: var(--f2-ink); color: var(--f2-paper);
    border-radius: 100px;
    font-size: 0.88rem; font-weight: 600;
    box-shadow: 0 10px 40px rgba(31,42,36,0.25);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    max-width: 92vw;
}
.qa-toast.show { transform: translateX(-50%) translateY(0); }
.qa-toast svg { color: #4ADE80; flex-shrink: 0; }
.qa-toast-link {
    color: var(--f2-paper); text-decoration: none;
    background: rgba(255,255,255,0.18); padding: 4px 10px;
    border-radius: 100px; font-size: 0.78rem; font-weight: 700;
    margin-left: 6px;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .head-stats { gap: 6px; }
    .stat-pill { padding: 7px 13px 7px 10px; }
    .sp-label { font-size: 0.75rem; }
}

/* Mobile landscape + small tablet */
@media (max-width: 768px) {
    .foods2-head { padding: 20px 0 18px; }
    .foods2-head-inner { padding: 0 16px; }
    .head-title { font-size: 1.5rem; }
    .head-sub { font-size: 0.92rem; margin-bottom: 16px; }
    .foods2-body { padding: 14px 16px; }
    .tool-bar { margin: -8px -16px 12px; padding: 10px 16px; top: 56px; }
    .search-row input { font-size: 0.92rem; padding: 12px 60px 12px 46px; }
    .search-kbd { display: none; }

    .meal-cta2 { padding: 20px; flex-direction: column; align-items: flex-start; }
    .meal-cta2 .btn2-primary { align-self: stretch; justify-content: center; }
}

/* Mobile portrait — KEEP 2 columns! (was 1 column = giant cards) */
@media (max-width: 600px) {
    .food-grid2 {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .fc-image { aspect-ratio: 4 / 3; }
    .fc-rating-badge { font-size: 0.62rem; padding: 2px 7px; top: 6px; right: 6px; }
    .fc-body { padding: 10px 11px 12px; }
    .fc-cat { font-size: 0.65rem; }
    .fc-name { font-size: 0.85rem; min-height: 2.2em; -webkit-line-clamp: 2; }
    .fc-cal { font-size: 0.7rem; margin-bottom: 8px; }
    .fc-cal strong { font-size: 0.88rem; }
    .fc-nutrients { padding: 6px 4px; gap: 2px; }
    .fc-nut-key { font-size: 0.58rem; }
    .fc-nut-val { font-size: 0.78rem; }
    .fc-nut-val em { font-size: 0.6rem; }
    /* Mobile quick-add: always-visible, top-left of image (rating badge is top-right) */
    .fc-quick-add {
        opacity: 0.88 !important;
        transform: none !important;
        display: flex !important;
        top: 8px; left: 8px;
        width: 28px; height: 28px;
        background: rgba(31,42,36,0.85);
    }
    .fc-quick-add:hover,
    .fc-quick-add.touch-active { width: 28px; background: var(--f2-accent) !important; }
    .fc-quick-add span { display: none !important; }

    .head-stats { width: 100%; }
    .stat-pill { flex: 1; justify-content: center; padding: 8px 6px; }
    .sp-label { display: none; }
    .stat-pill strong { font-size: 1.1rem; }

    .pagination2 { flex-direction: column; gap: 12px; padding: 14px; }
    .pg-controls { width: 100%; justify-content: center; }

    .results-meta { flex-direction: row; }
    .view-toggle { flex-shrink: 0; }

    /* Active filters: stack under label on small screens */
    .af-clear { margin-left: 0; }

    /* Bottom safe area — prevent mobile bottom nav from covering content */
    .foods2-body { padding-bottom: 100px; }

    /* Supporter CTA: full-row on mobile portrait */
    .fc-sup-cta {
        grid-column: 1 / -1;
        min-height: 0;
    }
    .fc-sup-inner { flex-direction: row; text-align: left; gap: 14px; padding: 18px 16px; }
    .fc-sup-heart { width: 40px; height: 40px; flex-shrink: 0; }
    .fc-sup-heart svg { width: 20px; height: 20px; }
    .fc-sup-cta h4 { font-size: 0.9rem; }
    .fc-sup-cta p { font-size: 0.8rem; }
    .fc-sup-btn { margin-top: 4px; }
    .fc-sup-note { display: none; }
}

/* Very small (≤380px) */
@media (max-width: 380px) {
    .fc-name { font-size: 0.8rem; }
    .fc-nut-val { font-size: 0.72rem; }
    /* Keep page numbers visible — make buttons smaller instead of hiding */
    .pg-btn { min-width: 30px; height: 30px; padding: 0 6px; font-size: 0.78rem; }
    .pg-nav { padding: 0 10px; }
    .pg-ellipsis { font-size: 0.85rem; padding: 0 2px; }
}

/* Galaxy Fold & very narrow (≤320px): single column */
@media (max-width: 320px) {
    .food-grid2 { grid-template-columns: 1fr; gap: 10px; }
    .fc-image { aspect-ratio: 16 / 9; }
    .foods2-body { padding: 10px 12px 100px; }
    .head-stats { gap: 4px; }
    .stat-pill { padding: 6px 4px; }
}

/* Large desktop (≥1600px): 5-column grid */
@media (min-width: 1600px) {
    .food-grid2 { grid-template-columns: repeat(5, 1fr); }
}

/* List view: always single column even on desktop */
.food-grid2[data-view="list"] {
    grid-template-columns: 1fr !important;
}
@media (max-width: 600px) {
    .food-grid2[data-view="list"] { max-width: none; }
    .food-grid2[data-view="list"] .fc-image { width: 64px; }
    .food-grid2[data-view="list"] .fc-body { padding: 8px 10px; gap: 8px; }
    .food-grid2[data-view="list"] .fc-name { font-size: 0.82rem; }
    .food-grid2[data-view="list"] .fc-nutrients { gap: 6px; }
    .food-grid2[data-view="list"] .fc-nut-val { font-size: 0.75rem; }
    .food-grid2[data-view="list"] .fc-nut-key { font-size: 0.55rem; }
    .food-grid2[data-view="list"] .fc-quick-add { display: none; }
}

/* Mobile landscape (e.g. iPhone 932×430) — disable sticky to free vertical space */
@media (max-height: 480px) and (orientation: landscape) {
    .tool-bar { position: relative; top: auto; }
    .foods2-head { padding: 14px 0 12px; }
    .head-stats { gap: 4px; }
    .stat-pill { padding: 5px 10px 5px 8px; }
    .stat-pill strong { font-size: 0.85rem; }
}

/* Cat-bar fade edge hint (so users know it's scrollable) */
.cat-bar {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
