* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1f2937;
  background: #f8fafc;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.site-wrap { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-logo { height: 40px; width: auto; }
.site-title { font-size: 18px; font-weight: 600; flex: 1; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.site-nav a { color: #374151; }
.site-nav a:hover { color: #2563eb; }
.site-footer {
  margin-top: 32px;
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.site-footer a { margin: 0 8px; color: #6b7280; }
.site-footer a:hover { color: #2563eb; }
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .15s;
}
.card-item:hover { transform: translateY(-2px); }
.card-cover { height: 160px; object-fit: cover; width: 100%; background: #e5e7eb; }
.card-body { padding: 14px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.card-summary { font-size: 13px; color: #6b7280; }
.page-title { font-size: 22px; font-weight: 700; margin: 20px 0 16px; }
.empty-tip { text-align: center; color: #9ca3af; padding: 40px 0; }
.loading { text-align: center; color: #9ca3af; padding: 24px; }
/* 详情页通用 */
.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9ca3af;
  margin: 16px 0 20px;
}
.detail-breadcrumb a {
  color: #6b7280;
  transition: color .15s;
}
.detail-breadcrumb a:hover { color: #2563eb; }
.detail-breadcrumb .sep { color: #d1d5db; user-select: none; }
.detail-breadcrumb .current {
  color: #374151;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-article {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  overflow: hidden;
  margin-bottom: 32px;
}
.detail-header {
  padding: 28px 28px 0;
}
.detail-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 10px;
}
.detail-meta {
  font-size: 14px;
  color: #9ca3af;
  padding-bottom: 4px;
}
/* 元信息分隔：作者/来源/日期每项前都带小圆点（沿用原日期前导点的样式，天然起到项间分隔作用） */
.detail-meta > span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1d5db;
  margin-right: 8px;
  vertical-align: middle;
}
.detail-tag {
  display: inline-block;
  font-size: 12px;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.detail-cover-wrap {
  padding: 20px 28px 0;
}
.detail-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.detail-content {
  padding: 24px 28px;
  font-size: 15px;
  line-height: 1.85;
  color: #374151;
}
.detail-content p { margin-bottom: 12px; }
.detail-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}
/* 正文表格：后台富文本插入的表格，其边框样式只存在于后台编辑器内部，
   不会随内容带出 → 必须在这里补样式，否则前台表格无边框、看起来"没显示" */
.detail-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 14px 0 18px;
  font-size: 14px;
  background: #fff;
}
.detail-content th,
.detail-content td {
  border: 1px solid #e5e7eb;
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
  word-break: break-word;
}
.detail-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #111827;
}
.detail-content tbody tr:nth-child(even) td { background: #fcfcfd; }
.detail-content td p,
.detail-content th p { margin-bottom: 0; }
@media (max-width: 768px) {
  .detail-content table { font-size: 13px; }
  .detail-content th,
  .detail-content td { padding: 7px 8px; }
}
.detail-actions {
  padding: 0 28px 28px;
  border-top: 1px solid #f3f4f6;
  padding-top: 20px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.btn-back:hover {
  border-color: #b45309;
  color: #b45309;
  box-shadow: 0 2px 8px rgba(180, 83, 9, .1);
}
.btn-back-icon {
  font-size: 16px;
  line-height: 1;
}

.banner-section { position: relative; overflow: hidden; }
.banner-slider {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
}
.banner-slider .banner-item { flex: 0 0 100%; min-width: 100%; }
.banner-slider .banner-item img { width: 100%; max-height: 400px; object-fit: cover; display: block; }
/* 轮播跳转：site-runtime 按后台配置给图片包 <a>（banner-link），保持视觉不变 */
.banner-section .banner-link,
.pk-banner-main .banner-link { display: block; height: 100%; color: inherit; text-decoration: none; cursor: pointer; }
.banner-section .banner-link img { display: block; }
.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.banner-dots span.active { background: #fff; }

/* 轮播浮动文案（2026-09-27）：后台每张图可配 主标题/副标题/按钮，site-runtime 逐 slide
   注入 .banner-caption；容器 pointer-events:none 保证周边点击落到图片链接上 */
.banner-slider .banner-item.has-caption { position: relative; }
.banner-caption {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.banner-caption-inner {
  pointer-events: auto;
  max-width: min(56%, 1160px);
  padding: 0 5% 0 8%;
  /* 大屏对齐主体容器：auto-container 内容左缘 = (100%-1200px)/2 + 20px（≤1200 时为 20px）。
     旧写法 8% 按全屏宽算，超宽屏文案漂到容器外（2026-09-28 用户截图）；
     max() 保底：窄于容器时维持原 8%，宽于容器时贴容器左缘。老内核不支持 max() 自动回退上一行。 */
  padding-left: max(8%, calc((100% - 1200px) / 2 + 20px));
}
.banner-caption-title {
  color: #fff;
  font-size: 38px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 10px;
  white-space: pre-line;
  text-shadow: 0 2px 12px rgba(10, 22, 64, 0.45);
}
.banner-caption-sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 18px;
  white-space: pre-line;
  text-shadow: 0 1px 8px rgba(10, 22, 64, 0.45);
}
.banner-caption-btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  padding: 11px 22px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}
.banner-caption-btn:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }
.banner-caption-btn + .banner-caption-btn { margin-left: 10px; }
@media (max-width: 768px) {
  .banner-caption-inner { max-width: 86%; padding: 0 6% 0 7%; }
  .banner-caption-title { font-size: 24px; margin-bottom: 6px; }
  .banner-caption-sub { font-size: 13px; margin-bottom: 12px; }
  .banner-caption-btn { font-size: 13px; padding: 9px 18px; }
}

/* 新闻/产品列表分页 */
.list-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 8px;
  padding-top: 8px;
}
.list-pagination .page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.list-pagination .page-btn:hover:not(:disabled):not(.is-active) {
  border-color: #0d9488;
  color: #0d9488;
}
.list-pagination .page-btn.is-active {
  border-color: #0d9488;
  background: #0d9488;
  color: #fff;
  cursor: default;
}
.list-pagination .page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.list-pagination .page-total {
  margin-left: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* 列表加载动画 */
.list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  padding: 40px 16px;
  color: #64748b;
  font-size: 14px;
}
.list-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: list-spin .7s linear infinite;
}
.list-loading-text { color: #64748b; }
.list-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(1px);
  border-radius: 8px;
}
.list-loading-overlay .list-loading { min-height: 120px; padding: 24px; }
.is-list-loading {
  position: relative;
  pointer-events: none;
}
.list-load-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.list-retry-btn {
  min-width: 96px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #0d9488;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.list-retry-btn:hover { filter: brightness(1.05); }

@keyframes list-spin {
  to { transform: rotate(360deg); }
}

/* 联系页地图图片 */
.contact-map-wrap {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}
.contact-map-wrap[hidden] {
  display: none !important;
}
.contact-map-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

/* 留言提交结果提示条 */
.contact-submit-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 9999;
  transform: translate(-50%, -12px);
  opacity: 0;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}
.contact-submit-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.contact-submit-toast.is-success {
  background: #16a34a;
  color: #fff;
}
.contact-submit-toast.is-error {
  background: #dc2626;
  color: #fff;
}

/* 留言提交弹窗 */
.contact-submit-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.contact-submit-modal.is-show {
  opacity: 1;
  pointer-events: auto;
}
.contact-submit-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.contact-submit-modal-panel {
  position: relative;
  z-index: 1;
  width: min(90vw, 360px);
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}
.contact-submit-modal.is-show .contact-submit-modal-panel {
  transform: translateY(0) scale(1);
}
.contact-submit-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: #16a34a;
}
.contact-submit-modal-panel.is-error .contact-submit-modal-icon {
  background: #dc2626;
}
.contact-submit-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.contact-submit-modal-msg {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 20px;
}
.contact-submit-modal-btn {
  min-width: 112px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.contact-submit-modal-panel.is-error .contact-submit-modal-btn {
  background: #dc2626;
}
.contact-submit-modal-btn:hover {
  filter: brightness(1.05);
}

.cf-tip.success {
  padding: 8px 10px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #15803d !important;
  font-weight: 600;
}
.cf-tip.error {
  padding: 8px 10px;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c !important;
  font-weight: 600;
}

/* ===== FAQ 常见问题（各模板通用，展开交互见 site-runtime.js 的 initFaqAccordion） ===== */
.faq-section { padding: 40px 0 24px; }
/* 后台把问答清空后（注入时给容器加 is-empty），整块隐藏，避免出现空壳栏目 */
.faq-list.is-empty { display: none; }
.faq-list.is-empty ~ .faq-more { display: none; }
.faq-section:has(> .faq-list.is-empty) { display: none; }
.faq-list {
  /* 不再单独限宽（曾 860px 居中，与全站 1200px 容器不一致，2026-09-23 已踩）：
   * 宽度跟随外层容器（aigeo .faq-section / 各模板页面容器） */
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item:hover { border-color: #cbd5e1; }
.faq-item.is-open {
  border-color: #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .08);
}
.faq-q {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: #111827;
}
.faq-q:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
.faq-q .faq-badge {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.faq-q .faq-q-text { flex: 1; }
.faq-arrow {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform .2s, border-color .2s;
}
.faq-item.is-open .faq-arrow {
  transform: rotate(225deg);
  border-color: #2563eb;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-a-inner {
  padding: 0 20px 16px 54px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #4b5563;
}
/* 答案内 ul/ol 清掉浏览器默认缩进：列表首行与问题标题文字对齐（54px = 18+24+12） */
.faq-a-inner ul,
.faq-a-inner ol {
  margin: 0 0 8px;
  padding-left: 0;
  list-style-position: inside;
}
/* 展开高度：site-runtime.js 会按 scrollHeight 实测内联写入；
 * 这里的 4000px 只是无 JS 环境的兜底（曾用 420px，长答案被截断，2026-09-23 已踩） */
.faq-item.is-open .faq-a { max-height: 4000px; }
.faq-more {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: #6b7280;
}
.faq-more a { color: #2563eb; }
.faq-more a:hover { text-decoration: underline; }
/* FAQ 前端分页（site-runtime.js 在条数 > 10 时自动挂载，纯展示层） */
.faq-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.faq-pager button {
  min-width: 76px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}
.faq-pager button:hover:not(:disabled) { border-color: #2563eb; color: #2563eb; }
.faq-pager button:disabled { opacity: .45; cursor: not-allowed; }
.faq-pager .faq-pager-info { font-size: 14px; color: #6b7280; }

/* 深色模板（设备制造 pk-*）FAQ 区底色微调 */
.tpl-machinery .faq-section .faq-item { border-color: #e2e8f0; }
.tpl-machinery .faq-section .faq-item.is-open { border-color: #d97706; box-shadow: 0 6px 18px rgba(217, 119, 6, .12); }
.tpl-machinery .faq-section .faq-q .faq-badge { background: #fef3c7; color: #b45309; }
.tpl-machinery .faq-section .faq-item.is-open .faq-arrow { border-color: #d97706; }

/* 休闲食品模板：圆角更大、配色更柔和 */
.tpl-snack .faq-section .faq-item { border-radius: 16px; }
.tpl-snack .faq-section .faq-item.is-open { border-color: #e11d48; box-shadow: 0 6px 18px rgba(225, 29, 72, .1); }
.tpl-snack .faq-section .faq-q .faq-badge { background: #ffe4e6; color: #e11d48; }
.tpl-snack .faq-section .faq-item.is-open .faq-arrow { border-color: #e11d48; }
