/* =====================================================================
   fosen-typography v2 — 全站字体统一补丁（简体中文站 + 英文站 + 数据表格）
   部署方式：替换 /static/fosen-typography.css（版本号改为 ?v=2）
   原则：
     1. 一套字体栈走天下，html[lang] 前缀保证简中/英文页统一；
     2. 用更高优先级压过 style.css 的 Noto Sans TC 块、
        Flatsome 主题选项动态 CSS、wpDataTables 后台注入的 Arial；
     3. :not() 排除图标字体（fl-icons / dashicons / wpDataTablesIcons 等），
        避免图标变成方块。
   ===================================================================== */

/* ---------- 1. 全站正文 / 标题 / 导航 / 表单 / 页脚 ---------- */
html[lang] body,
html[lang] h1, html[lang] h2, html[lang] h3, html[lang] h4, html[lang] h5, html[lang] h6,
html[lang] .heading-font, html[lang] .heading-font-family, html[lang] .alt-font,
html[lang] .nav > li > a,
html[lang] .mobile-nav li a, html[lang] .nav-vertical li a,
html[lang] .nav-dropdown li a, html[lang] .nav-sidebar > li > a,
html[lang] .button, html[lang] a.button, html[lang] .button span,
html[lang] button, html[lang] input, html[lang] select, html[lang] textarea,
html[lang] .entry-content, html[lang] .entry-content p,
html[lang] .entry-content span:not([class*="icon"]):not([class*="fa-"]),
html[lang] .footer-wrapper,
html[lang] .footer-wrapper *:not([class*="icon"]):not([class*="fa-"]):not([class*="angle"]):not([class*="arrow"]) {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* ---------- 2. wpDataTables 产品数据表（最大的"第二种字体"来源） ---------- */
html[lang] .wpdt-c,
html[lang] .wpDataTablesWrapper,
html[lang] .wpDataTablesWrapper .wpDataTable,
html[lang] .wpDataTablesWrapper table.wpDataTable,
html[lang] .wpDataTablesWrapper .wpDataTable th,
html[lang] .wpDataTablesWrapper .wpDataTable td,
html[lang] .wpDataTablesWrapper .wpDataTable .wdtheader,
html[lang] .wdt-scroll .wpDataTable,
html[lang] #table_1 th, html[lang] #table_1 td,
html[lang] #filterBox_table_1 label,
html[lang] #filterBox_table_1 input,
html[lang] #filterBox_table_1 select,
html[lang] #filterBox_table_1 button,
html[lang] #fosen-product-search label,
html[lang] #fosen-product-search input,
html[lang] #fosen-product-search button,
html[lang] .wpdt-c .dataTables_info,
html[lang] .wpdt-c .paginate_button,
html[lang] .wpdt-c .page-num,
html[lang] .page-num {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* 表格数据单元格取消后台误设的加粗，标题行保持原有粗细 */
html[lang] .wpDataTablesWrapper .wpDataTable td { font-weight: 400 !important; }

/* ---------- 3. 语言切换器（顺手统一，原来是 Arial 13px） ---------- */
html[lang] .fosen-language,
html[lang] .fosen-language a {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* ---------- 4. 保留原有导航细节（继承 v1）
   注意：字号 / 字重 / 间距属于中文站专属版式，
   必须限定 zh-CN，否则会把英文站 12px 的紧凑导航撑成 17px。 ---------- */
html[lang="zh-CN"] body { font-weight: 400; }
html[lang="zh-CN"] .header-nav > li > .nav-top-link {
  font-size: 17px !important; font-weight: 500 !important;
  line-height: 1.5 !important; letter-spacing: 0 !important;
  white-space: nowrap; color: #4b5563;
}
html[lang="zh-CN"] .header-nav > li.active > .nav-top-link,
html[lang="zh-CN"] .header-nav > li > .nav-top-link:hover { color: #004294; }
html[lang="zh-CN"] .header-nav > li { margin-left: 10px !important; margin-right: 10px !important; }
html[lang] .nav-dropdown li a, html[lang] .nav-sidebar > li > a {
  letter-spacing: 0 !important; line-height: 1.6 !important;
}
@media (min-width: 850px) and (max-width: 1100px) {
  html[lang="zh-CN"] .header-nav > li > .nav-top-link { font-size: 15px !important; }
  html[lang="zh-CN"] .header-nav > li { margin-left: 5px !important; margin-right: 5px !important; }
}

/* ---------- 5. 原有装饰箭头清理（继承 v1） ---------- */
#header .header-nav .menu-item::before,
#header .header-nav .menu-item::after,
#header .header-nav .menu-item a::before,
#header .header-nav > ul > li::before,
#header .header-nav > ul > li::after { content: none !important; display: none !important; }
#header .header-nav .nav-top-link > .icon-angle-down {
  display: inline-block !important; width: 7px; height: 7px;
  margin: 0 0 3px 9px !important;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); font-size: 0 !important; opacity: .7;
}
#header .header-nav .nav-top-link > .icon-angle-down::before,
#header .header-nav .nav-top-link > .icon-angle-down::after { content: none !important; display: none !important; }

/* =====================================================================
   配套建议（CSS 之外，需要到后台操作）：
   1. wpDataTables 后台 → 该表格的 Custom CSS 里删除这一段
      （'Noto Sans Traditional Chinese' 这个字体名在任何系统都不存在）：
        .wpDataTablesWrapper .wpDataTable td {
          font-family: 'Noto Sans Traditional Chinese';
          font-weight: bold;
        }
   2. Flatsome 主题选项 → Typography → 把 Google Fonts 里的
      "Noto Sans TC"（繁体字库，202 个分片，简体站用不上）移除，
      对应文件 static/css/5c8d2c399fec4435a4f9ce34ddadc601.css 将不再加载，
      每页可省几十个字体请求。
   3. style.css 里"=== 字体统一修复 ==="整段可以删除（本补丁已全面接管），
      特别是 * { font-family: inherit; } 这种全局通配写法。
   ===================================================================== */
