/* ===== 世界早餐图鉴 样式 ===== */
:root {
  --bg: #fffaf3;
  --card-bg: #ffffff;
  --primary: #e07b39;      /* 暖橙,早餐色 */
  --primary-dark: #c25f22;
  --text: #33302b;
  --text-light: #7a736a;
  --border: #efe6da;
  --shadow: 0 2px 10px rgba(90, 60, 20, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ----- 头部 ----- */
.site-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(180deg, #ffe9d2 0%, var(--bg) 100%);
}
.site-header h1 { font-size: 2.2rem; letter-spacing: 0.05em; }
.tagline { font-size: 1.15rem; margin-top: 0.6rem; }
.subtitle { color: var(--text-light); font-size: 0.85rem; margin-top: 0.3rem; }

/* ----- 工具栏:筛选 + 搜索 ----- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem 1.5rem;
}
.region-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.region-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.region-btn:hover { border-color: var(--primary); color: var(--primary); }
.region-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.search-input {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  min-width: 240px;
  background: var(--card-bg);
}
.search-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ----- 卡片网格 ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}
.card {
  display: block;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  font: inherit;
  color: inherit;
  overflow: hidden;
}
.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: var(--border);
}
.card-title, .card-region, .card-foods, .card-more {
  margin-left: 1.3rem;
  margin-right: 1.3rem;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(90, 60, 20, 0.14);
}
.card-title { font-size: 1.2rem; margin: 0.7rem 0 0.2rem; }
.card-region {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--primary-dark);
  background: #fdeee0;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  margin-bottom: 0.6rem;
}
.card-foods { color: var(--text-light); font-size: 0.92rem; }
.card-more { margin-top: 0.7rem; font-size: 0.85rem; color: var(--primary); }

.empty-hint { text-align: center; color: var(--text-light); padding: 2rem; }

/* ----- 详情页 ----- */
.detail-topbar {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.2rem 1rem 0;
}
.back-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 0.95rem;
}
.back-link:hover { text-decoration: underline; }

.detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}
.detail-header { margin-bottom: 1rem; }
.detail-header h1 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.detail-figure { margin: 0 0 1.4rem; }
.detail-figure img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: var(--shadow);
}
.img-credit { color: var(--text-light); font-size: 0.75rem; margin-top: 0.3rem; }
.detail-section { margin-bottom: 1.4rem; }
.detail-section h2 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  border-left: 4px solid var(--primary);
  padding-left: 0.55rem;
  margin-bottom: 0.45rem;
}
.detail-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px dashed var(--border);
  margin-top: 2rem;
  padding-top: 1.2rem;
}
.detail-pager a {
  color: var(--primary-dark);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
}
.detail-pager a:hover { border-color: var(--primary); color: var(--primary); }
.food-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.food-list li {
  background: #fdeee0;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.88rem;
}
.note { color: var(--text-light); font-size: 0.9rem; }
.source { color: var(--text-light); font-size: 0.82rem; border-top: 1px dashed var(--border); padding-top: 0.6rem; margin-top: 0.6rem; }

/* ----- 页脚 ----- */
.site-footer {
  background: #fdf1e3;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 3rem;
}
.site-footer h2 { font-size: 1.05rem; margin-bottom: 0.6rem; text-align: center; }
.site-footer ul {
  max-width: 720px;
  margin: 0 auto;
  padding-left: 1.4rem;
  color: var(--text-light);
  font-size: 0.9rem;
}
.site-footer li { margin-bottom: 0.35rem; }

/* ----- 移动端 ----- */
@media (max-width: 600px) {
  .site-header h1 { font-size: 1.7rem; }
  .toolbar { flex-direction: column; }
  .search-input { width: 100%; max-width: 360px; }
  .detail-header h1 { font-size: 1.5rem; }
  .detail-pager { flex-direction: column; align-items: stretch; text-align: center; }
}
