/* ============================================================
   产品页公共头部样式 v3  (2026-10-19)
   用途：统一覆盖 19 个产品页的 topbar / header / nav 移动端布局
   加载位置：页面原有 <style> 之后（</head> 前）
   v2：导航独占一行
   v3：① 导航改 2×3 网格，全部可见不滚动、不截断
       ② 字号收紧，6 项正好放下
       ③ 来源/更新时间单行省略
   ============================================================ */

/* ---------- 1. 移动端头部 ---------- */
@media (max-width: 900px) {
  header.site, header.new-site {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
  }

  /* 关键：wrap 纵向排列 —— 品牌行在上，导航网格在下 */
  header.site .wrap, header.new-site .wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    padding: 8px 10px 0 !important;
    gap: 0 !important;
  }

  /* 品牌行 */
  header.site .brand, header.new-site .brand {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    padding: 0 0 6px !important;
  }
  header.site .brand img, header.new-site .brand img {
    height: 26px !important;
    width: 26px !important;
    flex-shrink: 0 !important;
  }
  header.site .brand b, header.new-site .brand b {
    font-size: 14px !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  header.site .brand small, header.new-site .brand small { display: none !important; }

  /* 导航：3 列 × 2 行网格，全部可见，不滚动不截断 */
  header.site nav, header.new-site nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 1px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 4px 0 6px !important;
    overflow: visible !important;
    border-top: 1px solid #f0f0f0 !important;
    box-sizing: border-box !important;
    background: #fafafa !important;
  }
  header.site nav a, header.new-site nav a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    padding: 8px 2px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    border-radius: 3px !important;
    line-height: 1.15 !important;
    background: #fff !important;
    border: 1px solid #eee !important;
  }
  /* 在线询价（第 6 项）保持橙色强调 */
  header.site nav a.nav-cta, header.new-site nav a.nav-cta {
    background: #f59e0b !important;
    color: #fff !important;
    border-color: #f59e0b !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    padding: 8px 2px !important;
    margin: 0 !important;
    flex-shrink: 1 !important;
  }

  /* topbar 手机端压缩 */
  .topbar { padding: 0 !important; height: auto !important; }
  .topbar .wrap {
    height: 30px !important;
    padding: 0 12px !important;
    justify-content: center !important;
  }
  .topbar .wrap span { display: none !important; }
  .topbar a, .topbar b { font-size: 12.5px !important; }
}

/* ---------- 2. 超窄屏（≤360px） ---------- */
@media (max-width: 360px) {
  header.site .brand b, header.new-site .brand b { font-size: 12.5px !important; }
  header.site nav a, header.new-site nav a { font-size: 11.5px !important; padding: 7px 1px !important; }
}

/* ---------- 3. 正文避让 + 来源行单行省略 ---------- */
@media (max-width: 900px) {
  article { scroll-margin-top: 110px !important; }
  article .wrap { padding-top: 8px !important; }
  h1 { margin-top: 2px !important; }

  /* 来源/更新时间：单行省略，不再折成两行 */
  .meta, .article-meta, .post-meta {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
}

/* ---------- 4. 桌面端不做任何覆盖 ---------- */
