/* ============================================================
   门户聚合站 公共基础样式（B2B 风格设计系统）
   三套预设模板(tpl1/2/3)共用，模板通过覆盖 --brand 等变量换肤。
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }

:root {
  --brand: #1d4ed8;        /* 主品牌色（链接/强调） */
  --brand-dark: #0f2447;   /* 深品牌（头部/页脚底色） */
  --brand-mid: #16356b;    /* 渐变过渡 */
  --brand-soft: #eaf1ff;   /* 浅品牌（徽章/分区底色） */
  --ink: #1f2937;          /* 正文 */
  --ink-soft: #6b7280;     /* 次要文字 */
  --line: #e6ebf2;         /* 边框 */
  --bg: #f5f7fb;           /* 页面底色 */
  --card: #ffffff;
  --tag: #eef2f7;
}

.p-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===================== 头部 ===================== */
.p-header {
  background: var(--brand-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.p-header .p-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.p-logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  white-space: nowrap;
}
.p-logo a { color: #fff; }
.p-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.p-nav a { color: #cdd9ec; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.p-nav a:hover { color: #fff; border-color: var(--brand); }
.p-search {
  margin-left: auto;
  display: flex;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  height: 38px;
  width: 280px;
  max-width: 38vw;
}
.p-search input {
  border: 0;
  outline: 0;
  padding: 0 16px;
  flex: 1;
  font-size: 13px;
  color: #1f2937;
  background: transparent;
}
.p-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.p-search button:hover { background: var(--brand-mid); }

/* ===================== 主视觉 ===================== */
.p-hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: 54px 0 46px;
}
.p-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 14px; }
.p-hero .p-sub { font-size: 16px; color: #c6d4f1; max-width: 860px; margin: 0; }

/* ===================== 信任/数据条 ===================== */
.p-stats { background: var(--card); border-bottom: 1px solid var(--line); }
.p-stats-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 20px;
}
.p-stat {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px;
  background: var(--brand-soft);
  border-radius: 10px;
}
.p-stat b { font-size: 24px; color: var(--brand); font-weight: 800; }
.p-stat span { font-size: 13px; color: var(--ink-soft); }

/* ===================== 主体布局 ===================== */
.p-layout {
  max-width: 1200px;
  margin: 26px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: start;
}
/* 侧边分类导航 */
.p-side { position: sticky; top: 84px; }
.p-side-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
  padding: 0 0 10px;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 10px;
}
.p-cats { display: flex; flex-direction: column; gap: 2px; }
.p-cats a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.p-cats a:hover { background: var(--brand-soft); color: var(--brand); border-left-color: var(--brand); }

/* 内容区 */
.p-content { min-width: 0; }
.p-sec { margin-bottom: 34px; scroll-margin-top: 84px; }
.p-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.p-sec-head h2 {
  font-size: 20px;
  color: var(--brand-dark);
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.p-sec-head .p-sec-more { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.p-sec-head .p-sec-more a { color: var(--brand); }

/* 供应商卡片网格 */
.p-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.p-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 14px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.p-card:hover { box-shadow: 0 12px 30px rgba(15,36,71,.12); transform: translateY(-3px); border-color: var(--brand); }
.p-card-title { font-size: 16px; margin-bottom: 8px; }
.p-card-title a { color: var(--brand-dark); }
.p-card-title a:hover { color: var(--brand); }
.p-card-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.p-tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
}
.p-tag-soft { background: var(--tag); color: var(--ink-soft); }
.p-card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-prod { border-top: 1px dashed var(--line); padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.p-prod li { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-prod li a { color: var(--ink); }
.p-prod li a:hover { color: var(--brand); }
.p-prod li a::before { content: "·"; color: var(--brand); margin-right: 6px; font-weight: 700; }

/* 最新资讯列表 */
.p-news-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 18px;
}
.p-news-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.p-news-item:last-child { border-bottom: 0; }
.p-news-link {
  flex: 1;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-news-link:hover { color: var(--brand); }
.p-news-src { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.p-news-src a { color: var(--brand); }

/* ===================== 页脚 ===================== */
.p-footer { background: var(--brand-dark); color: #aab6cf; margin-top: 40px; padding: 30px 0 24px; font-size: 13px; }
.p-footer .p-wrap { display: flex; flex-direction: column; gap: 12px; }
.p-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.p-meta li { color: #cdd9ec; }
.p-copy { color: #7e8aa6; }
.p-footlinks { display: flex; gap: 18px; flex-wrap: wrap; }
.p-footlinks a { color: #cdd9ec; }
.p-footlinks a:hover { color: #fff; }

/* 返回顶部 */
.p-backtop {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(15,36,71,.25);
  display: none;
  z-index: 60;
}
.p-backtop.show { display: block; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .p-layout { grid-template-columns: 1fr; }
  .p-side { position: static; }
  .p-cats { flex-direction: row; flex-wrap: wrap; }
  .p-cats a { border-left: 0; background: var(--brand-soft); }
}
@media (max-width: 640px) {
  .p-header .p-wrap { gap: 12px; }
  .p-search { display: none; }
  .p-hero h1 { font-size: 25px; }
  .p-grid { grid-template-columns: 1fr; }
}

/* ===================== 卡片产品缩略图（v2.1） ===================== */
.p-card-imgs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0 0;
}
.p-card-img { border-radius: 8px; overflow: hidden; background: var(--brand-soft); aspect-ratio: 4 / 3; }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.p-card-img:hover img { transform: scale(1.06); }
.p-card-mainimg { margin: 10px 0 0; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.p-card-mainimg img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

/* ===================== FAQ 问答（v2.1） ===================== */
.p-faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 18px; }
.p-faq-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.p-faq-item:last-child { border-bottom: 0; }
.p-faq-item summary {
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--brand-dark);
  list-style: none; position: relative; padding-right: 22px;
}
.p-faq-item summary::-webkit-details-marker { display: none; }
.p-faq-item summary::after { content: "+"; position: absolute; right: 0; top: -2px; color: var(--brand); font-size: 20px; font-weight: 700; }
.p-faq-item[open] summary::after { content: "\2212"; }
.p-faq-item p { margin: 8px 0 4px; font-size: 14px; color: var(--ink-soft); }
.p-faq-src { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--brand); text-decoration: none; }
.p-faq-src:hover { text-decoration: underline; color: var(--brand-dark); }

/* ===================== 产品展示网格（v2.1） ===================== */
.p-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.p-prod-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin: 0; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.p-prod-card:hover { box-shadow: 0 12px 30px rgba(15,36,71,.12); transform: translateY(-3px); }
.p-prod-card img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: var(--brand-soft); }
.p-prod-card figcaption { padding: 10px 12px; }
.p-prod-card figcaption a { display: block; font-size: 14px; color: var(--brand-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-prod-card figcaption a:hover { color: var(--brand); }
.p-prod-card figcaption span { font-size: 12px; color: var(--ink-soft); }

@media (max-width: 640px) {
  .p-prod-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== 页脚品牌区（美化） ===================== */
.p-footer .p-foot-brand { margin-bottom: 12px; }
.p-footer .p-foot-brand .p-foot-name { font-size: 16px; font-weight: 800; color: #fff; }
.p-footer .p-foot-brand .p-foot-desc { font-size: 13px; color: #9fb0cc; margin-top: 4px; max-width: 640px; }

/* ===================== 我要推广 浮动胶囊按钮（右侧居中，醒目红橙渐变） ===================== */
.promo-fab {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.promo-fab-btn {
  width: 46px;
  height: 122px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a3d 0%, #e53935 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: 0 8px 24px rgba(229, 57, 53, 0.42);
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.promo-fab-btn:hover { transform: scale(1.06); box-shadow: 0 12px 30px rgba(229, 57, 53, 0.55); }
.promo-fab-panel {
  position: absolute;
  right: 60px;
  bottom: 0;
  width: 320px;
  max-width: 82vw;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(10, 22, 40, 0.28);
  overflow: hidden;
  opacity: 0;
  transform: translateX(14px) scale(.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.promo-fab-panel.open { opacity: 1; transform: translateX(0) scale(1); pointer-events: auto; }
.promo-fab-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ff6a3d 0%, #e53935 100%);
  color: #fff; font-weight: 800; font-size: 14px;
}
.promo-fab-close { background: none; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.promo-fab-panel-body { padding: 14px; max-height: 320px; overflow: auto; font-size: 14px; color: #1f2937; line-height: 1.75; }
.promo-fab-panel-body a { color: #e53935; font-weight: 600; }
.promo-fab-panel-body img { max-width: 100%; border-radius: 6px; margin: 6px 0; }
.promo-fab-panel-body p { margin: 0 0 8px; }
@media (max-width: 600px) { .promo-fab-panel { right: 56px; width: 280px; } }
