@charset "utf-8";
/* ==========================================================================
   中国食品网 · 内容页样式 | v1.2 首页绿色版 | 2026-11-16
   主题强调色改为首页同款绿色 #4bc061；正文文字颜色保持不变（#222 / #2b2b2b）。
   logo 按图片原始尺寸 150×66 显示，不拉伸、不压缩、不强制改写宽高比。
   外链文件，不写入帝国CMS模板。缓存参数在各模板 <link> 上控制。
   ========================================================================== */

:root {
  --brand: #4bc061;
  --brand-deep: #3aa54e;
  --brand-light: #eef9f0;
  --brand-line: #c8e8cf;
  --ink: #222;
  --ink-2: #444;
  --muted: #888;
  --line: #e5e5e5;
  --line-soft: #f0f0f0;
  --bg: #f4f4f4;
  --surface: #fff;
  --wrap: 1200px;
  --gap: 20px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.7 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  word-break: break-word;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; border: 0; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
button, input { font: inherit; }
.clearfix::after { content: ""; display: block; clear: both; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 8px 14px;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin-inline: auto; }

/* ---------- 1. 顶部灰条 ---------- */
.topbar { background: #ececec; border-bottom: 1px solid #e0e0e0; font-size: 12px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.topbar .hello { color: var(--brand-deep); }
.topbar .links a { color: #888; margin-inline-start: 12px; }
.topbar .links a:hover { color: var(--brand); }
.topbar .links .submit { color: var(--brand); font-weight: 600; }

/* ---------- 2. 站头：logo + 搜索 ---------- */
.site-header { background: var(--surface); }
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 88px; flex-wrap: wrap; padding-block: 12px;
}
.logo { flex: 0 0 auto; }
/* 原图自然尺寸 150×66：只显示、不缩放；max-width 仅防小屏溢出 */
.logo img { width: auto; height: auto; max-width: 100%; display: block; object-fit: contain; }
.search-form {
  flex: 1 1 360px; max-width: 460px; margin-inline-start: auto;
  display: flex; height: 38px;
  border: 2px solid var(--brand);
}
.search-form input[type=search] {
  flex: 1; min-width: 0; padding: 0 12px; border: 0;
  outline: 0; color: var(--ink); background: #fff;
}
.search-form input::placeholder { color: #aaa; }
.search-form button {
  flex: 0 0 78px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 600;
}
.search-form button:hover { background: var(--brand-deep); }
.nav-toggle { display: none; }

/* ---------- 3. 主导航 ---------- */
.site-nav { background: var(--brand); position: relative; }
.site-nav .wrap { display: flex; align-items: stretch; flex-wrap: wrap; }
.site-nav a {
  color: #fff; font-size: 15px; padding: 0 22px; height: 46px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border-inline-end: 1px solid rgba(255,255,255,.14);
}
.site-nav a:hover, .site-nav a:focus-visible { background: var(--brand-deep); color: #fff; }
.site-nav a.home { background: var(--brand-deep); font-weight: 600; }
.site-nav a img { width: 20px; height: 20px; object-fit: contain; filter: brightness(0) invert(1); }

/* ---------- 4. 面包屑 ---------- */
.crumb {
  font-size: 12px; color: var(--muted);
  padding-block: 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { margin-inline: 6px; color: #bbb; }

/* ---------- 5. 主体两栏 ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--gap); padding-block: var(--gap) 32px; align-items: start;
}
.col-main, .col-side { min-width: 0; }

/* ---------- 6. 正文卡 ---------- */
.article-card { background: var(--surface); border: 1px solid var(--line); padding: 32px 36px 36px; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.article-head h1 {
  font-size: 26px; line-height: 1.5; font-weight: 700;
  text-align: center; margin-bottom: 16px; color: #111;
}
.article-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font-size: 12px; color: var(--muted);
}
.article-meta .hl { color: var(--brand); }

/* ---------- 7. 正文排版 ---------- */
.article-body { font-size: 16px; line-height: 1.95; color: #2b2b2b; }
.article-body p { margin: 0 0 20px; }
.article-body h2, .article-body h3, .article-body h4 {
  color: var(--brand); margin: 30px 0 14px; line-height: 1.5;
}
.article-body h2 { font-size: 20px; border-inline-start: 4px solid var(--brand); padding-inline-start: 12px; }
.article-body h3 { font-size: 17px; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 16px auto; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article-body strong, .article-body b { color: var(--brand-deep); }
.article-body blockquote {
  margin: 20px 0; padding: 12px 18px; background: var(--brand-light);
  border-inline-start: 4px solid var(--brand); color: var(--ink-2);
}
.article-body ul, .article-body ol { margin: 0 0 20px 2em; }
.article-body li { margin-bottom: 6px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body table { width: 100%; margin: 18px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; }
.article-body th { background: #f7f7f7; }
.article-body .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 8. 广告位 / 联系 / 声明 / 标签 ---------- */
.ad-slot { text-align: center; margin: 18px 0; }
.ad-slot img { width: 100%; height: auto; display: inline-block; }
.ad-slot--bottom { margin-top: 28px; }
.contact-line {
  margin: 26px 0; padding: 14px 18px; background: var(--brand-light);
  border: 1px dashed var(--brand-line); font-size: 15px; color: var(--ink-2);
}
.contact-line strong { color: var(--brand-deep); }
.contact-line a.tel { color: var(--brand); font-weight: 700; font-size: 17px; }
.copyright-note {
  margin: 24px 0; padding: 12px 16px; background: #f7f7f7;
  color: var(--muted); font-size: 13px; line-height: 1.8;
  border-inline-start: 3px solid #ccc;
}
.tag-links { font-size: 13px; color: var(--muted); margin: 18px 0; }
.tag-links .label { color: var(--ink-2); margin-inline-end: 8px; }
.tag-links a {
  display: inline-block; padding: 3px 10px; margin: 0 6px 6px 0;
  border: 1px solid var(--line); color: var(--ink-2); background: #fafafa;
}
.tag-links a:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.prev-next {
  border-top: 1px solid var(--line-soft); padding-top: 14px;
  font-size: 14px; color: var(--ink-2);
}
.prev-next p { margin-bottom: 6px; }
.prev-next a:hover { color: var(--brand); }

/* ---------- 9. 相关推荐 ---------- */
.rel-block { margin-top: 30px; }
.block-hd {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--brand); padding-bottom: 8px; margin-bottom: 14px;
}
.block-hd span { font-size: 18px; font-weight: 700; color: var(--ink); }
.block-hd::before { content: ""; width: 4px; height: 18px; background: var(--brand); }
.rel-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 28px; }
.rel-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.rel-list li::before { content: "·"; color: var(--brand); font-weight: 700; }
.rel-list a { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-list a:hover { color: var(--brand); }
.rel-list time { margin-inline-start: auto; color: #aaa; font-size: 12px; flex: 0 0 auto; }

/* ---------- 10. 侧栏 ---------- */
.side-card { background: var(--surface); border: 1px solid var(--line); margin-bottom: var(--gap); }
.side-card h3 {
  font-size: 16px; font-weight: 700; color: var(--ink);
  padding: 12px 16px; border-bottom: 2px solid var(--brand);
  display: flex; align-items: center; gap: 8px;
}
.side-card h3::before { content: ""; width: 4px; height: 15px; background: var(--brand); }
.side-card .cnt { padding: 6px 16px 12px; }
.side-card .cnt li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 0; border-bottom: 1px dotted var(--line);
  font-size: 13px; line-height: 1.6;
}
.side-card .cnt li:last-child { border-bottom: 0; }
.side-card .cnt .num {
  flex: 0 0 18px; text-align: center; font-size: 12px;
  color: #fff; background: #bbb; line-height: 18px; border-radius: 2px;
}
.side-card .cnt li:nth-child(-n+3) .num { background: var(--brand); }
.side-card .cnt a { color: var(--ink-2); }
.side-card .cnt a:hover { color: var(--brand); }
.side-card .cnt time { margin-inline-start: auto; color: #aaa; font-size: 12px; flex: 0 0 auto; }
.side-card.pic .cnt { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 14px 16px; }
.side-card.pic .cnt li { display: block; border: 0; padding: 0; }
.side-card.pic .cnt .num { display: none; }
.side-card.pic .cnt a { display: block; }
.side-card.pic .cnt img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #f0f0f0; }
.side-card.pic .cnt .t { display: block; font-size: 13px; margin-top: 6px; line-height: 1.5; }

/* ---------- 11. 页脚 ---------- */
.site-footer { background: #2b2b2b; color: #bbb; text-align: center; padding: 24px 16px; font-size: 13px; }
.site-footer p { margin-bottom: 6px; }
.site-footer a { color: #ddd; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- 12. 返回顶部 ---------- */
.backtop {
  position: fixed; right: 18px; bottom: 28px; z-index: 30;
  width: 42px; height: 42px; border: 1px solid var(--line);
  background: #fff; color: var(--brand); cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); font-size: 18px;
}
.backtop.show { opacity: 1; visibility: visible; }
.backtop:hover { background: var(--brand); color: #fff; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; }
  .col-side { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--gap); }
  .side-card { margin-bottom: 0; }
  .article-card { padding: 26px 24px; }
  .article-body { font-size: 15px; }
}
@media (max-width: 767px) {
  .wrap { width: calc(100% - 24px); }
  .topbar .hello { display: none; }
  .topbar .wrap { justify-content: flex-end; }
  .topbar .links a { margin-inline-start: 10px; }
  .site-header .wrap { min-height: 68px; gap: 12px; }
  .search-form { flex-basis: 100%; max-width: none; order: 3; margin: 0; height: 36px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto;
    height: 34px; padding: 0 12px; border: 1px solid var(--brand);
    background: #fff; color: var(--brand); cursor: pointer; font-size: 13px;
  }
  .site-nav .wrap { flex-direction: column; }
  .site-nav a { height: 42px; font-size: 14px; padding: 0 16px; border-inline-end: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-nav a.nav-item { display: none; }
  .site-nav.open a.nav-item { display: inline-flex; }
  .site-nav a.home { display: inline-flex; }
  .article-card { padding: 20px 16px 24px; }
  .article-head h1 { font-size: 21px; }
  .article-body { font-size: 15px; line-height: 1.9; }
  .rel-list { grid-template-columns: 1fr; }
  .col-side { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
