/* ==========================================================================
   万禾福礼 GEO 主题 · style.css
   适用：PBootCMS 3.x / template/geo/
   设计基线沿用 Next.js 版（用户确认满意的那一版），此处扩展了
   多栏目形态所需的：二级导航、筛选条、商品网格、图文列表、品牌墙、
   纯文字时间列表、表单、分页、侧栏。
   ========================================================================== */

:root {
  --ink: #1f2328;
  --ink-2: #4a535c;
  --ink-3: #6b7480;
  --line: #e4e0da;
  --line-2: #cfc9c1;
  --surface: #f7f5f2;
  --surface-2: #fffdfa;
  --brand: #a8332a;
  --brand-soft: #fbf0ee;
  --radius: 10px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a { color: #1a5fb4; text-decoration: none; }
a:hover { text-decoration: underline; }

.skip { position: absolute; left: -9999px; }

h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 21px; margin-top: 32px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 14px; }

/* 图片自适应：正文图片来自原站，原图多为 600–900px 宽，
   移动端必须等比缩到屏幕宽度，否则会撑破页面出现横向滚动 */
img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- 页头 */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.brand-name { font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: 1px; }
.brand-tag { display: block; font-size: 13px; color: var(--ink-3); }
.header-contact { margin: 0; font-size: 14px; color: var(--ink-2); }
.header-contact strong { color: var(--brand); font-size: 17px; }

/* ------------------------------------------------------------ 主导航 */
.site-nav { background: var(--brand); margin-bottom: 22px; }

.site-nav ul.menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.site-nav ul.menu > li { position: relative; }

.site-nav ul.menu > li > a {
  display: block;
  padding: 11px 15px;
  color: #fff;
  font-size: 15px;
}
.site-nav ul.menu > li > a:hover,
.site-nav ul.menu > li.active > a {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

/* 二级菜单：桌面端悬停展开 */
.site-nav ul.sub {
  list-style: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 168px;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 60;
}
.site-nav ul.menu > li:hover > ul.sub { display: block; }
.site-nav ul.sub a { display: block; padding: 8px 16px; color: var(--ink); font-size: 14px; }
.site-nav ul.sub a:hover { background: var(--surface); color: var(--brand); text-decoration: none; }

/* ---------------------------------------------------------------- 主体 */
main { min-height: 60vh; padding: 24px 0 48px; }

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 8px; }
.hero-lead { font-size: 17px; color: var(--ink-2); margin-bottom: 0; }

/* 子栏目导航：当前栏目有下级时，以横向药丸展示，便于在二级栏目间切换 */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 20px;
  padding: 0;
}
.subnav:empty { display: none; }
.subnav-link {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .12s, color .12s, background .12s;
}
.subnav-link:hover,
.subnav-link:focus {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}
.subnav-link[aria-current="page"] {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

/* 结论先行摘要块：GEO 核心，放在 H1 之后最先出现，便于 AI 整段抽取 */
.summary {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 22px;
}
.summary-title { font-size: 14px; color: var(--brand); margin: 0 0 4px; letter-spacing: 1px; }
.summary-text { margin: 0; font-size: 16px; }
.summary-text strong { color: var(--ink); }

/* ---------------------------------------------------------- 面包屑 */
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
  color: var(--ink-3);
}
.breadcrumb li + li::before { content: '/'; margin-right: 8px; color: var(--line-2); }

/* -------------------------------------------------- 两栏布局（侧栏） */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.side-card h2 { font-size: 15px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { font-size: 14px; line-height: 2; border-bottom: 1px dashed var(--line); }
.side-card li:last-child { border-bottom: none; }
.side-card a { color: var(--ink-2); }
.side-card a:hover { color: var(--brand); }

/* ------------------------------------------------------------ 网格卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; }
.card img, .card-ph {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  background: var(--surface);
}
.card h3 {
  font-size: 15px;
  font-weight: 400;
  margin: 10px 12px 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { margin: 0 12px 12px; font-size: 12px; color: var(--ink-3); }
.card:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05); }

/* --------------------------------------------------------- 筛选条 */
.filter-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 4px 16px 12px;
  margin-bottom: 18px;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.filter-row:last-child { border-bottom: none; }
.filter-row > .filter-label { flex: none; width: 74px; font-size: 14px; color: var(--ink-3); }
.filter-row a { font-size: 14px; color: var(--ink-2); padding: 2px 10px; border-radius: 999px; }
.filter-row a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.filter-row a.active { background: var(--brand); color: #fff; }

/* ------------------------------------------------------ 横排图文列表 */
.news-list { list-style: none; margin: 12px 0 0; padding: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.news-list .thumb { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); aspect-ratio: 3 / 4; }
.news-list .thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.news-list h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.news-list h3 a { color: var(--ink); }
.news-list h3 a:hover { color: var(--brand); }
.news-list p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.news-list .meta { font-size: 13px; color: var(--ink-3); }

/* 纯文字时间列表（新闻/动态/行业） */
.text-list { list-style: none; margin: 12px 0 0; padding: 0; }
.text-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.text-list li .dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.text-list li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-list li .t a { color: var(--ink); }
.text-list li .t a:hover { color: var(--brand); }
.text-list li time { flex: none; font-size: 13px; color: var(--ink-3); }

/* --------------------------------------------------------- 品牌墙 */
.brand-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.brand-wall a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 10px;
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}
.brand-wall a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.brand-wall img { height: 54px; object-fit: contain; }

/* -------------------------------------------------------- 参数表 / 表 */
.table-wrap { overflow-x: auto; margin: 14px 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; font-size: 14px; color: var(--ink-3); padding-bottom: 8px; }
th, td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--surface); font-weight: 500; white-space: nowrap; }
.spec-table th { width: 130px; }

/* ------------------------------------------------------------- FAQ */
.faq-list { margin: 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-item dt { font-weight: 500; margin-bottom: 4px; }
.faq-item dd { margin: 0; color: var(--ink-2); }

/* --------------------------------------------------------- 正文排版 */
.article-body p { margin-bottom: 16px; }
.article-body img { display: block; margin: 18px auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.article-body table { display: block; width: 100%; overflow-x: auto; }
.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 17px; }
.meta-line { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.tag-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------ 详情页主图 */
.detail { display: grid; grid-template-columns: 400px 1fr; gap: 28px; align-items: start; }
.detail-media { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; }
.detail-media img { display: block; width: 100%; height: auto; border-radius: 6px; }
.detail-media .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.detail-media .thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.detail-info h1 { font-size: 24px; margin-bottom: 10px; }

.related { margin-top: 34px; }

/* ----------------------------------------------------- 缩略图画廊（案例/方案详情）
   对齐 Node 版：响应式网格，图片 4:3 完整显示（contain），封面+正文图最多 6 张 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 6px;
}

/* -------------------------------------------------------------- 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.form-row label .req { color: var(--brand); margin-left: 4px; }
input[type='text'], input[type='tel'], input[type='email'], input[type='number'], textarea, select {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
textarea { min-height: 110px; resize: vertical; }
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  padding: 10px 26px;
  cursor: pointer;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.form-tip { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

/* 搜索框 */
.search-form { display: flex; gap: 8px; max-width: 520px; margin-bottom: 18px; }
.search-form input { flex: 1; }

/* 表单页窄栏（留言页用，避免输入框在宽屏上过长） */
.form-narrow { max-width: 720px; }

/* ------------------------------------------------------------ 分页 */
.pager { margin-top: 30px; font-size: 14px; color: var(--ink-3); }
.pager a, .pager span {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  margin-right: 6px;
  color: var(--ink-2);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------ 索引 / 频道 */
.channel-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.channel-list a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: inherit; background: #fff; }
.channel-list a:hover { border-color: var(--brand); text-decoration: none; }
.channel-list h2, .channel-list h3 { font-size: 16px; margin: 0 0 4px; }
.channel-list p { margin: 0; font-size: 13px; color: var(--ink-3); }

.index-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 18px; }
.index-list li { font-size: 14px; line-height: 1.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-list a { color: var(--ink); }
.index-list a:hover { color: var(--brand); }

/* 场景 / 品类快捷入口 */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; padding: 0; list-style: none; }
.chip-row a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 15px;
  font-size: 14px;
  color: var(--ink-2);
  background: #fff;
}
.chip-row a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* -------------------------------------------------------------- 页脚 */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.footer-grid h2 { font-size: 15px; margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; color: var(--ink-2); }
.footer-grid p { color: var(--ink-2); margin: 0; }
.footer-bottom { margin-top: 24px; border-top: 1px solid var(--line); padding: 14px 20px; font-size: 13px; color: var(--ink-3); }

/* 页脚「网站栏目」两列显示 */
.footer-grid .col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* ------------------------------------------------------ 侧边悬浮快捷栏（悬停向左展开内容） */
.float-bar {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  z-index: 80;
}
.float-bar .fb-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;            /* 圆角缩小 */
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  transition: background .15s;
}
.float-bar .fb-item + .fb-item { margin-top: 8px; }
.float-bar .fb-item:hover { background: #8f2a22; text-decoration: none; }
.float-bar .fb-ico { font-size: 19px; margin-bottom: 2px; }
.float-bar .fb-txt { font-size: 11px; }

/* 悬停展开的内容气泡（二维码 / 电话），向左弹出 */
.float-bar .fb-pop {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 10px 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  color: var(--ink);
  font-style: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.float-bar .fb-pop::after {            /* 指向悬浮栏的小三角 */
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-left-color: #fff;
}
.float-bar .fb-item:hover .fb-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.float-bar .fb-pop img { display: block; width: 150px; height: 150px; border-radius: 4px; background: #f4f4f4; }
.float-bar .fb-pop em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.float-bar .fb-pop-tel { padding: 14px 20px; }
.float-bar .fb-pop-tel .fb-tel-label { display: block; font-style: normal; font-size: 13px; color: var(--ink-3); }
.float-bar .fb-pop-tel .fb-tel-num { font-size: 20px; color: var(--brand); font-weight: 700; letter-spacing: .5px; }

/* ------------------------------------------------------ 首页：按场景浏览卡片 */
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.scene-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; color: inherit; transition: border-color .15s, box-shadow .15s; }
.scene-card:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(0, 0, 0, .05); text-decoration: none; }
.scene-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.scene-card p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }

/* ------------------------------------------------------ 首页：关键事实 */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 28px; margin: 14px 0 8px; }
.fact { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fact dt { font-weight: 600; color: var(--brand); font-size: 14px; }
.fact dd { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------ 品牌墙无图占位 */
.brand-wall .brand-name { display: flex; align-items: center; justify-content: center; height: 54px; font-size: 14px; color: var(--ink-2); text-align: center; padding: 0 6px; }
.news-list .thumb .card-ph { height: 100%; }

/* ------------------------------------------------------ 移动端适配 */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 23px; }
  .wrap { padding: 0 14px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 18px 16px; }

  /* 手机端导航收成可横向滚动的单行，避免换行占屏 */
  .site-nav ul.menu { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-nav ul.menu > li { flex: none; }
  .site-nav ul.menu > li > a { padding: 10px 12px; white-space: nowrap; font-size: 14px; }
  .site-nav ul.sub { display: none !important; }

  /* 手机端列表两列，缩略图按 3:4 比例随屏宽自适应（不再写死高度） */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .news-list li { grid-template-columns: 108px 1fr; gap: 10px; }

  .gallery { grid-template-columns: repeat(2, 1fr); }

  .brand-wall { grid-template-columns: repeat(2, 1fr); }

  .float-bar { right: 6px; }
  .float-bar .fb-item { width: 46px; height: 46px; }
  .float-bar .fb-item + .fb-item { margin-top: 6px; }
  .float-bar .fb-ico { font-size: 16px; }
  .float-bar .fb-txt { font-size: 10px; }
  .float-bar .fb-pop { right: calc(100% + 8px); padding: 8px; }
  .float-bar .fb-pop img { width: 120px; height: 120px; }

  .filter-row > .filter-label { width: 100%; }
  .spec-table th { width: 96px; }
  table { font-size: 14px; }
  th, td { padding: 7px 9px; }

  /* 手机端子栏目药丸允许横向滚动，避免换行占屏 */
  .subnav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .subnav-link { flex: none; padding: 6px 12px; font-size: 13px; }
}
