/* ============================================================
   /zr/ 首页移动端布局
   ------------------------------------------------------------
   为什么需要这个文件：
   clone.css 里有一句
     @media(max-width:1199px){ html{overflow-x:hidden} body{width:1200px!important} }
   它把 body 锁死 1200px，再靠 overflow:hidden 裁掉超出的部分。
   手机打开看到的是「缩到 1/3 的桌面版」，右侧内容既看不清、
   也滑不到（overflow-x 被 hidden 了）。

   transfer.css 里 .tf-* 组件的移动端规则其实写得比较完整
   （hero 竖排、业务网格 2 列、商品卡 82vw），但 body 被锁在
   1200px 画布上，媒体查询再怎么写也落不到真实视口。

   所以这里只做两件事：
     1) 在窄屏解锁画布（body/#web 变流式）；
     2) 把凡科外壳（顶栏、导航、页脚）从绝对定位改成流式堆叠。
   全部规则都包在 @media(max-width:900px) 里，桌面端零影响。
   ============================================================ */

@media(max-width:900px){
  /* clone.js 会给 body 打 transform:scale(视口/1200) 做整体缩放，
     并把 html 的高度写成 scrollHeight*scale。两处都得覆盖：
     不加 transform:none 的话，即使画布解锁，看到的还是缩小的桌面版。 */
  html{height:auto!important}
  body{transform:none!important;-webkit-transform:none!important}
  /* 只解锁 width 不够：clone.css 里那句 html{overflow-x:hidden} 实际算出来是 auto，
     于是内容再宽也能滚，Chrome 会把布局视口从 375 撑到 732（真机上表现为
     「页面比屏幕宽、右侧一片空白」）。必须显式关掉横向滚动。 */
  html,body{width:auto!important;min-width:0!important;max-width:100%!important;overflow-x:hidden!important}
  /* 商品横滑条与各板块都要能收缩到视口内；横滑由 .tf-product-scroll 自己负责 */
  #tf-root,.tf-section,.tf-wrap,.tf-cards{max-width:100%!important;min-width:0!important;box-sizing:border-box}
  #web,#webTop,#webNav,#webHeaderTable,#webHeader,#webFooterTable,.webFooterTable{width:auto!important;min-width:0!important;max-width:100%!important;position:relative!important;left:auto!important;top:auto!important;margin:0!important}

  /* ---------- 顶栏：logo 与电话竖排 ---------- */
  .webTopTable,#webTop{height:auto!important;min-height:0!important;position:relative!important}
  #corpTitle{position:relative!important;left:0!important;top:0!important;width:auto!important;min-width:0!important;min-height:0!important;padding:14px 16px 6px!important;box-sizing:border-box}
  #corpTitle .newPrimaryTitle{font-size:20px!important;line-height:1.4!important}
  .absTopTable,.absForms{position:relative!important;height:auto!important}
  /* 凡科的空表单区被写成固定 1200px 宽，会把整页最小宽度顶到 1200
     → 触发 Chrome 的 shrink-to-fit，前面所有解锁都白做。它本来就是空的，直接不渲染。 */
  .absTopTable,.absForms,.fk-moduleZoneBg,.elemZoneBg{display:none!important}
  /* 模块区（.elemZoneModule）同样被写死 1200px 且 overflow 可见，
     是撑大文档宽度的元凶。改成 100% 宽、相对定位。 */
  .elemZone,.elemZoneModule,.J_moduleZone,.fk-moduleZone,.fk-webHeaderZone{width:100%!important;min-width:0!important;max-width:100%!important;position:relative!important;left:auto!important;top:auto!important;box-sizing:border-box}

  /* ---------- 导航：换行成多行，不再被 Nowrap 顶宽 ---------- */
  .webNavTable,#webNav{height:auto!important;position:relative!important;top:0!important;padding:0 8px!important;box-sizing:border-box}
  #navV2Wrap,#navV2{position:relative!important;left:auto!important;top:0!important;width:100%!important;height:auto!important;min-height:44px!important;background:#fff!important}
  #navV2 .navContent{display:flex!important;flex-wrap:wrap!important;width:100%!important;min-width:0!important;height:auto!important;position:relative!important;left:auto!important;top:0!important;padding:0!important}
  #navV2 :is(.navMainContent,.navCenterContent,.navCenter,.itemContainer){position:relative!important;width:100%!important;height:auto!important;left:auto!important;top:0!important;transform:none!important;overflow:visible!important}
  #navV2 .itemContainer{display:flex!important;flex-wrap:wrap!important;justify-content:center}
  #navV2 .item{flex:0 1 auto!important;float:none!important;width:auto!important;min-width:0!important;max-width:100%!important;height:42px!important;margin:0!important}
  #navV2 .itemSep{display:none!important}
  #navV2 :is(.itemName,.itemCenter,.itemLeft,.itemRight,.navItem){height:auto!important;min-width:0!important;padding:0 4px!important}
  #navV2 a.J_nav_item_link{display:block!important;font-size:14px!important;line-height:42px!important;padding:0 8px!important}
  #navV2 :is(.itemNext,.itemPrev){display:none!important}

  /* ---------- 内容区容器 ---------- */
  /* 这一块在凡科原版里是 180px 高的绝对定位横幅（只放「一站式专家／电话」几行小字），
     手机上留着只会撑出一片空白；电话在右下角悬浮按钮和 .tf-cta 里都有，直接不显示。 */
  /* 用 id 重复写两遍来压过页面里内联生成的高特异性规则（凡科会在 <style> 里写
     #webHeaderTable.webHeaderTable{display:table} 这类规则，单个 id 选择器压不住）。 */
  html body #webHeaderTable#webHeaderTable,
  html body .webHeaderTable.webHeaderTable,
  html body #webHeader#webHeader{display:none!important;height:0!important}
  #webHeaderContent,.webHeaderTd,.J_webHeaderTd{height:auto!important;min-height:0!important;position:relative!important;width:100%!important}
  .tf-wrap{max-width:100%!important;width:auto!important;padding:0 16px!important;box-sizing:border-box}
  /* 板块标题在 flex 行里被压到 71px，中文就竖排了 */
  .tf-head{flex-wrap:wrap!important;align-items:baseline!important;gap:4px 10px!important}
  .tf-head h2{flex:0 0 auto;white-space:nowrap}
  .tf-head em{flex:1 1 100%;line-height:1.6}

  /* ---------- 首屏 ---------- */
  .tf-hero{overflow:hidden}
  .tf-hero-inner{padding:28px 16px!important}
  .tf-hero h1{font-size:32px!important;line-height:1.2!important}
  .tf-hero h1 strong{font-size:22px!important}

  /* ---------- 页脚 ---------- */
  #webFooterTable,.webFooterTable,.fk-webFooterZone,.footer,.footerContent{height:auto!important;min-height:0!important;position:relative!important;top:auto!important;left:auto!important;width:100%!important;box-sizing:border-box}
  #webFooterTable .webFooterTd,.webFooterTd{height:auto!important;min-height:0!important;padding:0!important}
  #webFooterTable .footerItemList,.footerItemList{display:block!important;width:100%!important;padding:0 16px!important;box-sizing:border-box}
  #webFooterTable .footerItem{display:block!important;width:100%!important;padding:12px 0!important;text-align:left!important}
  .fk-webFooterZone{padding:24px 16px 90px!important}
  .fk-webFooterZone .fk-editor{font-size:14px!important;line-height:1.8!important}
}
/* ============================================================
   iOS 表单控件字号
   ------------------------------------------------------------
   Safari 的规矩：input/select/textarea 的 font-size < 16px 时，
   聚焦会**自动放大整个页面**，而且收起键盘后不会缩回原样 ——
   手机上表现为「点一下输入框，页面就歪了」。
   这里把求购/转让两个表单的控件统一到 16px，
   并把高度补到 44px（Apple HIG 的最小触控目标）。
   桌面端不受影响（规则限定在 <=900px，与文件其它规则一致）。
   ============================================================ */
@media(max-width:900px){
  .tf-hero-form input,.tf-hero-form select,.tf-hero-form textarea,
  .tf-tr-form input,.tf-tr-form select,.tf-tr-form textarea{font-size:16px!important;min-height:44px}
  .tf-hero-form button,.tf-tr-form button{min-height:44px}
}
