/* ============================================================
   中华美食荟 · 前台样式
   配色：中国红 / 金黄 / 米白，温润中式质感
   ============================================================ */
:root {
  --red: #c8362b;
  --red-dark: #9e2a21;
  --gold: #d99326;
  --gold-soft: #f7e2bd;
  --bg: #fffaf4;
  --bg-soft: #fdf3e7;
  --card: #ffffff;
  --ink: #2d2420;
  --ink-soft: #5c4a41;
  --muted: #93806f;
  --line: #f0e2d2;
  --shadow: 0 2px 10px rgba(80, 45, 20, .06);
  --shadow-lg: 0 12px 32px rgba(80, 45, 20, .12);
  --radius: 14px;
  --maxw: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; line-height: 1.35; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; }
.dim { color: var(--muted); font-size: .88em; font-weight: 400; }
.hidden { display: none !important; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: rgba(255, 250, 244, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { font-size: 30px; line-height: 1; }
.brand-text strong { display: block; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 20px; letter-spacing: .04em; }
.brand-text small { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.site-nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); font-size: 15px; font-weight: 500;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--red); }
.site-nav a.on { background: var(--red); color: #fff; }
.site-search { display: flex; gap: 6px; }
.site-search input {
  width: 190px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 14px; outline: none; transition: .2s;
}
.site-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 147, 38, .15); }
.site-search button {
  padding: 8px 16px; border: 0; border-radius: 999px; background: var(--gold); color: #fff;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.site-search button:hover { background: #c4831e; }

.site-notice {
  margin: 14px auto 0; padding: 10px 16px; background: var(--gold-soft); border-radius: 10px;
  color: #7a5312; font-size: 14.5px;
}

/* ---------- Hero ---------- */
.hero {
  margin: 22px auto 0; max-width: calc(var(--maxw) + 40px);
  background: linear-gradient(120deg, #40201a, #8a3826);
  background-size: cover; background-position: center;
  border-radius: 22px; color: #fff; overflow: hidden;
}
.hero-inner { padding: 68px 20px 58px; max-width: var(--maxw); margin: 0 auto; }
.hero-kicker { color: var(--gold-soft); letter-spacing: .22em; font-size: 13px; margin-bottom: 12px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 14px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-lead { max-width: 640px; color: rgba(255,255,255,.9); font-size: 1.05rem; }
.hero-stats { display: flex; gap: 34px; margin: 26px 0 30px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.9rem; font-family: "Noto Serif SC", serif; color: var(--gold-soft); line-height: 1.1; }
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.75); letter-spacing: .08em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .18s; text-align: center;
}
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(200, 54, 43, .25); }
.btn.primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }
.btn.ghost { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.08); }
.btn.ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.section .btn.ghost, .wrap .btn.ghost { border-color: var(--line); color: var(--ink-soft); background: #fff; }
.section .btn.ghost:hover, .wrap .btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 6px 14px; font-size: 13.5px; }
.btn.danger { background: #fff; border-color: #f0c7c3; color: var(--red); }
.btn.danger:hover { background: #fdf3f2; }

/* ---------- 区块 ---------- */
.section { padding: 54px 20px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { margin-bottom: 6px; position: relative; padding-left: 18px; }
.section-head h2::before {
  content: ''; position: absolute; left: 0; top: .28em; width: 6px; height: 1.05em;
  background: linear-gradient(var(--red), var(--gold)); border-radius: 3px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 15px; }
.more { text-align: center; margin-top: 26px; }

.page-head { padding: 34px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.page-head h1 { margin-bottom: 10px; }
.page-head p { color: var(--ink-soft); max-width: 780px; margin: 0; }
.block-title { margin: 34px 0 16px; padding-left: 14px; border-left: 4px solid var(--gold); font-size: 1.25rem; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.center-page { text-align: center; padding: 90px 0; }

/* ---------- 面包屑 ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); padding: 18px 0 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 8px; color: #d9c9b8; }

/* ---------- 网格与卡片 ---------- */
.grid { display: grid; gap: 20px; }
.cuisines-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dishes-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.articles-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.cuisine-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: .22s; box-shadow: var(--shadow);
}
.cuisine-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #e8d3ba; color: var(--ink); }
.cuisine-thumb {
  height: 132px; background-size: cover; background-position: center; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cuisine-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(45, 20, 12, .12), rgba(45, 20, 12, .45));
}
.cuisine-icon { position: relative; font-size: 44px; z-index: 1; filter: drop-shadow(0 3px 10px rgba(0,0,0,.35)); }
.cuisine-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.cuisine-body h3 { margin-bottom: 2px; font-size: 1.2rem; }
.region { color: var(--gold); font-size: 12.5px; letter-spacing: .06em; margin: 0 0 8px; }
.cuisine-body .sum { color: var(--ink-soft); font-size: 14px; flex: 1; }
.count { color: var(--red); font-size: 13px; font-weight: 600; margin-top: 10px; }

.dish-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: .22s; box-shadow: var(--shadow);
}
.dish-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #e8d3ba; color: var(--ink); }
.dish-thumb { height: 150px; background-size: cover; background-position: center; }
.dish-thumb.ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fdf0dd, #f7ddc0);
}
.dish-thumb.ph span { font-family: "Noto Serif SC", serif; font-size: 52px; color: #d8b184; }
.dish-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.dish-body h3 { font-size: 1.08rem; margin-bottom: 4px; }
.dish-body .meta { color: var(--gold); font-size: 12.5px; margin: 0 0 8px; }
.dish-body .sum { color: var(--muted); font-size: 13.5px; margin: 0; }

.article-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; color: var(--ink); transition: .22s; box-shadow: var(--shadow);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.article-card .cat {
  display: inline-block; font-size: 12px; color: var(--red); background: #fdece9;
  padding: 2px 10px; border-radius: 999px; margin-bottom: 10px;
}
.article-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.article-card p { color: var(--ink-soft); font-size: 14px; margin-bottom: 12px; }
.article-card .date { color: var(--muted); font-size: 12.5px; }

/* ---------- 详情页通用 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.side-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.side-card h3 { font-size: 1rem; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.side-links { list-style: none; padding: 0; margin: 0; }
.side-links li { border-bottom: 1px dashed #f5ece1; }
.side-links li:last-child { border: 0; }
.side-links a { display: block; padding: 8px 0; color: var(--ink-soft); font-size: 14.5px; }
.side-links a:hover { color: var(--red); padding-left: 4px; transition: .15s; }
.dim-note { color: var(--muted); font-size: 13.5px; margin: 0; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }

.prose { color: var(--ink-soft); font-size: 16.5px; }
.prose p { margin-bottom: 1.1em; }
.disclaimer-inline {
  background: var(--bg-soft); border-left: 3px solid var(--gold); border-radius: 6px;
  padding: 12px 16px; color: #7a6647; font-size: 13.5px; margin: 26px 0;
}
.tick-list { list-style: none; padding: 0; margin: 0 0 10px; }
.tick-list li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--ink-soft); }
.tick-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700;
}
.step-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.step-list li {
  counter-increment: s; position: relative; padding: 0 0 16px 48px; color: var(--ink-soft);
  border-left: 2px solid var(--line); margin-left: 16px;
}
.step-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-list li::before {
  content: counter(s); position: absolute; left: -17px; top: -2px; width: 32px; height: 32px;
  background: var(--red); color: #fff; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 700;
}
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 10px; }
.chip-list li {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px; font-size: 14px; color: var(--ink-soft);
}
.chip-list.alt li { background: #fff; border-style: dashed; }

/* 用料分组：主料 / 配菜 / 调料 */
.serves { font-size: 14px; color: var(--muted); margin: -6px 0 16px; }
.ing-groups { display: grid; gap: 18px; }
.ing-group {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 8px; box-shadow: var(--shadow);
}
.ing-group h3 {
  display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink);
  margin-bottom: 12px; letter-spacing: .04em;
}
.ing-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ing-dot.main { background: var(--red); }
.ing-dot.side { background: var(--gold); }
.ing-dot.season { background: #7a8f5a; }
.ing-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* 详细做法：步骤更长的排版 */
.step-list.detailed li { padding-bottom: 20px; line-height: 1.85; }
.step-list.detailed li:last-child { padding-bottom: 0; }
.step-list.detailed li::before { top: 0; }

@media (min-width: 720px) {
  .ing-groups { grid-template-columns: 1fr 1fr; }
  .ing-group:first-child { grid-column: 1 / -1; }
}

/* ---------- 菜系详情 ---------- */
.cuisine-hero {
  border-radius: var(--radius); color: #fff; padding: 40px 32px; margin-top: 16px;
  background-size: cover; background-position: center; display: flex; gap: 24px; align-items: center;
}
.cuisine-hero-icon { font-size: 62px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.4)); }
.cuisine-hero h1 { color: #fff; margin-bottom: 4px; }
.cuisine-hero .region { color: var(--gold-soft); font-size: 13.5px; }
.cuisine-hero .lead { color: rgba(255,255,255,.92); margin: 8px 0 0; max-width: 720px; }

/* ---------- 名菜成册页 ---------- */
.dish-page { margin-top: 10px; }
.img-ai-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.dish-head { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: center; margin-bottom: 26px; }
.dish-hero-img {
  height: 260px; border-radius: var(--radius); background-size: cover; background-position: center;
  box-shadow: var(--shadow-lg);
}
.badge {
  display: inline-block; background: #fdece9; color: var(--red); font-size: 13px;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; font-weight: 600;
}
.dish-head h1 { margin-bottom: 6px; }
.alias { color: var(--gold); font-size: 14px; margin: 0 0 10px; }
.dish-head .lead { color: var(--ink-soft); }
.dish-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 0; }
.dish-facts li { display: flex; flex-direction: column; font-size: 14px; }
.dish-facts li span { color: var(--muted); font-size: 12.5px; }
.dish-facts li strong { font-weight: 600; }

/* ---------- 文章详情 ---------- */
.article-page { max-width: 780px; margin: 10px auto; }
.article-page h1 { margin-bottom: 12px; }
.art-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.article-cover { height: 300px; border-radius: var(--radius); background-size: cover; background-position: center; margin: 22px 0; box-shadow: var(--shadow-lg); }

/* ---------- 静态页 ---------- */
.static-page h2 { margin-top: 34px; padding-left: 14px; border-left: 4px solid var(--gold); font-size: 1.2rem; }
.updated { color: var(--muted); font-size: 13px; margin-top: 34px; }

/* ---------- 登录 ---------- */
.login-card {
  max-width: 380px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow-lg); text-align: left;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-card label { display: block; font-size: 14px; color: var(--ink-soft); margin: 18px 0; }
.login-card input {
  width: 100%; margin-top: 8px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; outline: none;
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,147,38,.15); }
.login-card .btn { width: 100%; }
.form-err { color: var(--red); font-size: 14px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 34px 0 0; font-size: 14.5px; }
.pager a { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); }
.pager a:hover { border-color: var(--red); color: var(--red); }
.pager .cur { color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 60px; background: #fdf5ea; border-top: 1px solid var(--line); padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 30px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--ink-soft); font-size: 14px; padding: 3px 0; }
.footer-grid a:hover { color: var(--red); }
.footer-grid p { color: var(--muted); font-size: 13.5px; }
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 13px;
}
.footer-bottom p { margin: 6px 0; }
.icp-line a { color: var(--muted); }
.icp-line a:hover { color: var(--red); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .two-col { grid-template-columns: 1fr; }
  .dish-head { grid-template-columns: 1fr; }
  .dish-hero-img { height: 220px; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .header-inner { min-height: auto; padding: 12px 0; gap: 12px; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .site-search { margin-left: auto; }
  .site-search input { width: 130px; }
  .hero { border-radius: 16px; margin: 14px 8px 0; }
  .hero-inner { padding: 44px 16px 40px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 1.5rem; }
  .section { padding: 36px 16px; }
  .cuisine-hero { flex-direction: column; text-align: center; padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .step-list li { padding-left: 40px; }
}
