/* ===== FabFindFoodie base styles — mobile-first ===== */
:root {
    --bg: #fffdf9;
    --surface: #ffffff;
    --text: #2b2622;
    --muted: #7a7068;
    --line: #efe7dd;
    --brand: #e8632a;      /* warm appetizing orange */
    --brand-dark: #c44e1c;
    --accent: #f6b04a;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(80,50,20,.06);
    --maxw: 1100px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header (mobile-first: nav collapses behind a burger) */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--brand); }
.nav-burger { font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text); padding: 4px 8px; }
.nav-links { display: none; flex-basis: 100%; flex-direction: column; gap: 10px; padding: 6px 0 4px; }
.nav-toggle:checked ~ .nav-links { display: flex; }
.nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .9rem; }
.nav-label { width: 100%; font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nav-group a { color: var(--text); }

/* Hero */
.hero { text-align: center; padding: 44px 0 12px; }
.hero h1 { font-size: 1.9rem; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 24px; }
.chip {
    display: inline-block; padding: 7px 14px; border: 1px solid var(--line);
    border-radius: 999px; background: var(--surface); font-size: .9rem; color: var(--text);
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }

/* Sections */
.site-main { padding: 16px 0 48px; }
.recipe-section { margin: 28px 0; }
.recipe-section h2, .browse-by h2 { font-size: 1.3rem; margin: 0 0 14px; text-align: center; }

/* Recipe grid: flex + center so few cards stay centered, many fill the row */
.recipe-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.recipe-card {
    flex: 1 1 220px; max-width: 260px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); color: var(--text); transition: transform .12s ease;
}
.recipe-card:hover { transform: translateY(-2px); text-decoration: none; }
.thumb { aspect-ratio: 4 / 3; background: #fbf3ea; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; }
.card-body { padding: 10px 12px 14px; }
.card-title { font-size: 1rem; margin: 0 0 6px; line-height: 1.35; }
.card-meta { display: flex; gap: 10px; font-size: .8rem; color: var(--muted); }
.empty-state { color: var(--muted); flex-basis: 100%; text-align: center; padding: 24px 0; }

/* Recipe detail */
.recipe-detail { max-width: 760px; margin: 0 auto; }
.recipe-hero h1 { font-size: 1.8rem; margin: 18px 0 14px; }
.recipe-image { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.recipe-intro { font-size: 1.05rem; }
.tag-row, .breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag-pill { padding: 4px 12px; background: #fbf3ea; border-radius: 999px; font-size: .85rem; }
.recipe-info { display: flex; gap: 18px; list-style: none; padding: 14px; margin: 18px 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.recipe-ingredients ul { padding-left: 18px; }
.recipe-ingredients .amt { font-weight: 600; }
.recipe-steps ol { padding-left: 20px; }
.recipe-steps li { margin-bottom: 12px; }
.affiliate-box { background: #fff7ee; border: 1px solid var(--accent); border-radius: var(--radius);
    padding: 16px; margin: 24px 0; }
.affiliate-box h3 { margin: 0 0 8px; }
.ad-slot { min-height: 1px; margin: 16px 0; }
.recipe-tip { background: #f3f9f1; border-left: 4px solid #7bbf6a; padding: 14px 16px; border-radius: 8px; margin: 20px 0; }
.recipe-note { color: var(--muted); margin: 18px 0; }
.recipe-nutrition ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; }

/* Static pages */
.static-page, .error-page { max-width: 720px; margin: 24px auto; }
.static-page h1 { font-size: 1.7rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; margin-top: 40px; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0; }
.affiliate-note { font-size: .85rem; }
.copyright { font-size: .8rem; }

/* Breakpoints */
@media (min-width: 640px) {
    .hero h1 { font-size: 2.4rem; }
}
@media (min-width: 760px) {
    /* 데스크탑: 네비 인라인 노출, 햄버거 숨김 */
    .nav-burger { display: none; }
    .nav-links { display: flex !important; flex-basis: auto; flex-direction: row; flex-wrap: wrap;
        align-items: center; gap: 6px 18px; padding: 0; }
    .nav-label { width: auto; }
    .header-inner { justify-content: flex-start; gap: 10px 24px; }
}
