/* ============================================================
   SFCHEM V6.0 品牌层 · 组件皮肤(保守层)
   原则:只动颜色、字体、圆角、阴影与焦点;不动布局、间距结构与正文排版。
   页头/页脚选择器为候选(GeneratePress 默认 + 通用回退),
   V5.815 自定义结构上线前必须按生产 DOM 核对(实施文档 §8a)。
   ============================================================ */

/* ---- 标题:全站无衬线(V6.2,2026-08-20 定稿) ----
   原「宋标黑文」(思源宋体 900)改为思源黑体 700。
   决策依据:与英文站 sfchem-english-v6 的 Inter 600 调性统一;正文本就是
   黑体,整页字族收敛为一套,观感更清爽。宋体方案保留在注释中可随时回退。
   注意:serif 字体分片(sfchem-serif-900.css,101 片 woff2)暂不下线——
   回退成本为零,且未被引用时浏览器按 unicode-range 不会实际下载。 */
h1, h2 {
  font-family: var(--sfv6-sans);
  font-weight: 700;
  letter-spacing: 0;
  color: #102A43;
}
/* 回退到宋体方案:把上面四行换成
   font-family: var(--sfv6-serif); font-weight: 900; letter-spacing: .04em; */
h3, h4 { font-weight: 700; }

/* 深色首屏/深色带上的标题 */
.sfv6-dark h1, .sfv6-dark h2,
.site-header h1, .site-header h2 { color: #fff; }

/* ---- 链接与焦点 ---- */
a { color: var(--sfv6-blue); }
a:hover { color: var(--sfv6-blue-deep); }
:focus-visible { outline: 3px solid rgba(43, 200, 230, .55); outline-offset: 2px; }
::selection { background: rgba(43, 200, 230, .28); }

/* ---- 按钮(通用 WP 通道;一屏至多一个渐变主按钮) ---- */
.button, .wp-block-button__link,
button[type="submit"], input[type="submit"] {
  background: var(--sfv6-grad);
  color: #fff;
  border: none;
  border-radius: var(--sfv6-r-btn);
  font-weight: 600;
  letter-spacing: .05em;
}
.button:hover, .wp-block-button__link:hover,
button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--sfv6-blue-deep);
  color: #fff;
}
/* 询样/联系专用琥珀(手动挂类) */
.sfv6-btn-amber { background: var(--sfv6-amber) !important; color: #3A2A05 !important; font-weight: 700; }

/* ---- 页头 / 主导航(2026-08-19 实测:V5.815 以 body.sf-visual-system .site-header
   特异度覆盖本层,页头保持白底致 onnavy 字标不可读 → 提升特异度压回深蓝) ---- */
.site-header,
body.sf-visual-system .site-header { background: var(--sfv6-navy) !important; }
/* ↑ !important 是必须的:V5.815 用 background:#fff !important 锁死页头(visual-system.css L436) */
.site-header a { color: #C3D6EA; }
.main-navigation a { color: #C3D6EA; }
.main-navigation .current-menu-item > a,
.main-navigation a:hover { color: #fff; }
.main-navigation .current-menu-item > a { box-shadow: inset 0 -2.5px 0 var(--sfv6-cyan); }

/* 内联 SVG 标志 */
.sfchem-v6-logo-link { position: relative; display: flex; align-items: center; width: max-content; max-width: 100%; text-decoration: none; }
.sfchem-v6-logo { height: 42px; width: auto; display: block; }
.sfchem-v6-brand-mark {
  position: absolute;
  top: 34px;
  /* Cube center after the r28 optical shift: (48 * 0.7917 - 3.5) / 421. */
  left: 8.1952%;
  width: max-content;
  transform: translateX(-50%);
  color: #D8E8F4;
  font-size: 7.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .05em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.sfchem-v6-brand-mark sup {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 1px;
  font-size: 5px;
  line-height: 1;
}
@media (max-width: 600px) {
  .sfchem-v6-logo { height: 34px; }
  .sfchem-v6-brand-mark { top: 28px; font-size: 6.2px; }
  .sfchem-v6-brand-mark sup { font-size: 4.2px; }
}

/* ---- 页脚 ---- */
.site-footer { background: var(--sfv6-ink); color: #7C97B5; }
.site-footer a { color: #7C97B5; }
.site-footer a:hover { color: #fff; }

/* ---- 表格(产品参数表沿用现有结构,只统一色) ---- */
table th { background: #EFF5FB; }
table th, table td { border-color: var(--sfv6-line); }

/* ---- 卡片通用(V5.812+ 卡片体系存在时,仅统一圆角与阴影观感) ---- */
.sfv6-card { background: var(--sfv6-card); border: 1px solid var(--sfv6-line);
  border-radius: var(--sfv6-r-card); box-shadow: var(--sfv6-shadow-1); }

/* ============================================================
   V5.815 生产 DOM 适配 · 2026-08-19(逐条按线上 DOM 核对)
   核对结论:.site-header/.inside-header/.main-navigation/.site-footer/
   .site-info 均存在;页头内仅 site-logo;搜索工具条在页头外(sf-site-search)。
   ============================================================ */

/* 编辑式 h2 侧条:黄铜→品牌渐变(浅色底不用青线;选择器逐字复制自 V5.815) */
body.sf-visual-system :is(
  .sf-v5316-section,
  .sf-v5317-section,
  .sf-v5318-content,
  .sf-v5530-content,
  .sf-v5714-content,
  .sf-v5678-technical-index > section,
  .sf-v5630-applications-index > section
) > h2::before {
  background: var(--sfv6-grad);
}

/* 首页入口卡编号(白卡浅底):青色对白底对比不足 → 四方蓝 */
body.home.sf-visual-core .sf-v5316-card::before {
  color: var(--sfv6-blue);
}

/* 页脚小部件区转深底后,标题反白(链接色已由上方 .site-footer 规则处理) */
.site-footer :is(h1, h2, h3, h4, .widget-title) {
  color: #fff;
}

/* GP 页头 Logo 容器(generate_logo_output 通道输出 .site-logo > a.sfchem-v6-logo-link) */
.site-logo { display: flex; align-items: center; }

/* ============================================================
   语言入口「EN」· V6.3.2(2026-08-20)
   节点由 mu-plugin 的 wp_nav_menu_items 通道输出;wp-config 未定义
   SFCHEM_EN_URL 时 DOM 里没有 .sfchem-lang-switch,本段规则零匹配。
   选择器都比 V5.815 的 .main-nav ul li a 多一个类,压得住其 !important。
   ============================================================ */

/* 推到导航条最右(.main-nav > ul 是 flex,见 GP main.css) */
.main-navigation .main-nav > ul > li.sfchem-lang-switch { margin-left: auto; }

/* 弱描边 pill;字重取 600 —— 站内只加载了 Inter 600 一档,取 700 会被合成加粗 */
body.sf-visual-system .main-navigation .main-nav ul li.sfchem-lang-switch > a,
.main-navigation .main-nav ul li.sfchem-lang-switch > a {
  padding: 7px 14px !important;
  border: 1px solid rgba(195, 214, 234, .45);
  border-radius: 999px;
  background: transparent !important;
  color: #C3D6EA !important;
  font-family: var(--sfv6-en);
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: .06em;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

body.sf-visual-system .main-navigation .main-nav > ul > li.sfchem-lang-switch:hover > a,
body.sf-visual-system .main-navigation .main-nav > ul > li.sfchem-lang-switch > a:focus-visible,
.main-navigation .main-nav > ul > li.sfchem-lang-switch:hover > a {
  border-color: var(--sfv6-cyan);
  background: rgba(43, 200, 230, .10) !important;
  color: #fff !important;
}

/* pill 自带反馈,不叠 V5.815 的导航下划线动画 */
body.sf-visual-system .main-navigation .main-nav > ul > li.sfchem-lang-switch > a::after {
  content: none;
}

/* 移动端:菜单收进汉堡后按普通菜单项排布,不右浮、不做 pill */
@media (max-width: 768px) {
  .main-navigation .main-nav > ul > li.sfchem-lang-switch { margin-left: 0; }

  body.sf-visual-system .main-navigation .main-nav ul li.sfchem-lang-switch > a,
  .main-navigation .main-nav ul li.sfchem-lang-switch > a {
    display: block;
    border: 0;
    border-radius: 0;
    padding: 13px 18px !important;
    font-size: 14px !important;
    letter-spacing: .04em;
  }
}

/* 导航条右端本来就有 V5.x 的电话 CTA(sfchem-fix-fadein.php 用 .main-nav > ul::after
   注入「☎ 0591-88800666」,自带 margin-left:auto)。EN 也用 auto 外边距时,两个 flex
   项会平分剩余空白 → EN 悬在导航中段。EN 存在时收掉电话 pill 的 auto 外边距,让
   「EN + 电话」贴成一组靠右。:has() 不支持的老浏览器退化成两段空白,不影响可用性;
   未定义 SFCHEM_EN_URL 时选择器不匹配,电话 pill 位置一如既往。 */
body.sf-visual-system .main-navigation .main-nav > ul:has(> li.sfchem-lang-switch)::after,
.main-navigation .main-nav > ul:has(> li.sfchem-lang-switch)::after {
  margin-left: 14px !important;
}
