/* ============================================================================
   移动端适配层（2026-11-28）
   —— 口径来自 WorkBuddy 的 p01-mobile.html 示例：抽屉导航 / 44px 触控 / 卡片式表格 /
      输入框 16px 防 iOS 缩放 / 底部 safe-area。品牌色沿用站点 #00b894（不用示例的微信绿）。
   —— 桌面端零影响：除「防横向溢出」和「iOS 输入缩放」两条兜底外，全部规则都在断点内。
   —— 加载顺序：_Layout 里在 site.css 之后、@RenderSection("Styles") 之前；
      页面自带的内联 <style> 优先级更高，所以各页若有专属断点，需在该页自己补（Detail 即如此）。
   ========================================================================== */

/* ---------- 0. 兜底（桌面安全，防手机横向溢出） ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
/* iOS 在 font-size < 16px 的输入框上聚焦会自动放大整页，导致「点一下整页跳一下」 */
@media (max-width: 768px) {
  input, select, textarea, .form-control, .form-select { font-size: 16px; }
}

/* ---------- 1. 断点：平板 / 手机横屏 ---------- */
@media (max-width: 992px) {
  .container { padding-left: 16px; padding-right: 16px; }

  /* 导航：桌面链接行在 ≤992px 本来就 display:none，这里换成抽屉（DOM 在 _Navbar） */
  .pf-site-nav .container { padding: 8px 14px; flex-wrap: nowrap; }
  .pf-nav-logo img { height: 24px; }
  .pf-nav-logo img:first-child { height: 27px; }
  .pf-nav-utility { display: none; }          /* utility 行内容已搬进抽屉底部 */

  .pf-nav-links { display: none; }            /* 桌面横向菜单整体隐藏（原规则已是 none，保留语义） */
  /* 汉堡按钮与抽屉样式拆到了 mobile-nav.css —— 首页克隆页（Layout=null）也要引这一份，
     而本文件的排版规则不该进首页。 */

  /* 正文排版 */
  h1, .display-1, .display-2 { font-size: clamp(24px, 6vw, 32px) !important; }
  h2, .display-3, .display-4 { font-size: clamp(20px, 5vw, 26px) !important; }
  h3 { font-size: clamp(18px, 4.4vw, 22px) !important; }
  p, li, .lead { font-size: 15.5px; line-height: 1.72; }

  /* 触控目标 */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 38px; }
  .pf-ico-btn { min-width: 40px; min-height: 40px; }

  /* 页脚：四列变单列，收起 newsletter 的横向挤压 */
  footer .row > [class*='col-'] { margin-bottom: 20px; }
  footer h5 { font-size: 18px; }
  footer .list-unstyled a { display: inline-block; padding: 6px 0; font-size: 14.5px; }

  /* 表格：横向滚动而不是压扁（报价单 / 订单列表 / 后台列表共用） */
  .pf-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pf-table-scroll > table { min-width: 720px; }

  /* 卡片网格 */
  .row.g-3 > [class*='col-'], .row.g-4 > [class*='col-'] { margin-bottom: 4px; }
}

/* ---------- 2. 断点：手机竖屏 ---------- */
@media (max-width: 768px) {
  /* 段落与区块留白收紧 */
  section, .section { padding-left: 0; padding-right: 0; }
  .py-5 { padding-top: 2.25rem !important; padding-bottom: 2.25rem !important; }
  .mb-5 { margin-bottom: 1.75rem !important; }
  .mt-5 { margin-top: 1.75rem !important; }

  /* 表格：正文里的表格一律自己横滚，别把整页顶宽。
     为什么不用 .table-responsive：隐私政策/条款/服务详情这些内容是后台富文本存的 HTML，
     没有外层滚动容器，表格直接躺在 .col-lg-8 里（实测 411px 挤 343px 的列 → 整页横滚）。
     .pd-spec 是详情页规格表（本来就要自适应），排除。 */
  /* 不强制 nowrap：先让单元格自己换行去凑 343px，实在凑不下的（列太多）才由 overflow 横滚兜底 */
  main table:not(.pd-spec):not([data-no-scroll]) {
    display: block; overflow-x: auto; max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* 表单：label 上、控件下，避免 12px 的 label 挤成两行 */
  .form-label { font-size: 14px; }
  .form-control, .form-select { padding: .55rem .75rem; }

  /* 卡片内边距收一点，一屏能看到更多 */
  .card-body { padding: 1rem; }

  /* 面包屑：允许换行，别被挤成一坨省略号 */
  .breadcrumb { flex-wrap: wrap; font-size: 13px; }
}

/* ---------- 3. 手机端详情页通用（.pd-* 之外的公共块） ---------- */
@media (max-width: 768px) {
  /* 任何「左右两栏 + 右栏固定宽」的卡片在手机上堆叠 */
  .pf-split { display: block !important; }
  .pf-split > * { width: 100% !important; }

  /* 空状态 / 提示条 */
  .alert { font-size: 14.5px; padding: .7rem .9rem; }

  /* 询价进度条（_QuoteProgress.cshtml）：四步横排 + 三条连接线在 375 下要 506px，
     整页被顶出横向滚动。手机上改成 2×2 网格，连接线去掉（含义靠颜色区分已足够）。 */
  .pf-qp { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px 10px; max-width: none !important; }
  .pf-qp-line { display: none; }
  .pf-qp-step .small { font-size: 12.5px; }
}
