/* P130 mobile.css — 仅在 <=820px 生效，桌面端零影响
   站点：china-item.com（C 类模板）
   说明：覆盖 960px 固定宽布局，两栏转单栏（正文在前、侧栏在后），
        主导航横向滑动，轮播整幅缩放到屏宽，表格可横滑。 */

@media screen and (max-width: 820px) {

  /* ---------- 基础 ---------- */
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    background-size: auto;
  }
  * { box-sizing: border-box; }

  /* ---------- 固定宽容器全部改流式 ---------- */
  .content, .topNav, .mainNav, .left, .right, .contL, .contR,
  .topNavLeft, .topNavRight, .footer, .foot, .bottom {
    width: 100% !important; max-width: 100vw !important;
    float: none !important; display: block !important;
  }
  /* 产品区不放进这条通用规则：它必须是 grid，display 由下面单独给 */
  /* .content 原为 shrink-to-fit，先解除再流式 */
  .content { overflow: visible !important; }

  /* ---------- 顶部 logo + 搜索 ---------- */
  .topNav { height: auto !important; padding: 8px 10px 10px; }
  .topNavLeft { height: auto !important; }
  .topNavLeft .logo { float: none !important; text-align: center; }
  .topNavLeft .logo img { max-width: 100%; height: auto !important; }
  .topNavBgL, .topNavBgR { display: none !important; }
  .topNavRight { height: auto !important; margin-top: 8px; }
  .topNavRight ul { width: 100% !important; height: auto !important; float: none !important; }
  .topNavRight ul li.sreach {
    width: 100% !important; height: auto !important;
    float: none !important; padding-top: 0 !important;
  }
  .topNavRight ul .searchForm { width: 100% !important; }
  .topNavRight ul .searchForm form { width: 60% !important; }
  .topNavRight ul li.alibaba { float: none !important; margin: 8px auto 0 !important; }

  /* ---------- 主导航：横向滑动，图标不压缩 ---------- */
  .mainNav {
    width: 100% !important; height: auto !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 8px 0 0 !important;
  }
  .mainNav ul { width: max-content; min-width: 100%; }
  .mainNav li { float: left !important; }
  .mainNav li a {
    height: 42px !important; line-height: 42px !important;
    font-size: 15px !important;
  }

  /* ---------- 轮播：移动端只留首屏第一张，避免 JS 位移错位 ---------- */
  .banner { width: 100% !important; height: auto !important; overflow: hidden; }
  .banner > div { height: auto !important; }
  #MSClassBox { width: 100% !important; height: auto !important; overflow: hidden; }
  #ContentID {
    width: 100% !important; height: auto !important; position: static !important;
    display: block !important; transform: none !important; left: 0 !important; margin: 0 !important;
  }
  #ContentID > li {
    float: none !important; position: static !important;
    width: 100% !important; display: none !important;
  }
  #ContentID > li:first-child { display: block !important; }
  #ContentID img { width: 100% !important; height: auto !important; }
  #TabID { display: none !important; }

  /* ---------- 右侧固定悬浮块：缩小，少挡内容 ---------- */
  #rightsead {
    transform: scale(0.50) !important;
    opacity: 0.94;
    transform-origin: right top !important;
    right: 0 !important;
  }

  /* ---------- 两栏变单栏：正文在前 ---------- */
  /* 部分模板（产品列表页）没有 .left，.contL/.contR 直接挂在 .content 下 */
  .content { display: flex !important; flex-direction: column; }
  .content > .contR { order: 1; }
  .content > .contL { order: 2; margin-top: 14px; }
  .content > .left { order: 1; }
  .content > .right { order: 3; margin-top: 14px; }
  .left { display: flex !important; flex-direction: column; }
  .left .contR { order: 1; }
  .left .contL { order: 2; margin-top: 14px; }
  .right { margin-top: 14px; }

  .contL .proList, .contL .proList .toys, .contL .proList .hobby,
  .contL .proList .toys .proSource, .contL .proList .hobby .proSource,
  .contL .proList .toys .proSource .proSourceName, .proSource li,
  .contL .proList .proSource .proSourceName li { width: 100% !important; }

  /* ---------- 产品卡片：两列网格 ---------- */
  /* 内层 ul.proInfo 被硬编码 318px，必须一并解掉，否则网格里的卡片会溢出 */
  ul.m-progrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important; padding: 0 !important;
    list-style: none !important;
  }
  ul.m-progrid > li.proShowLeft {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: auto !important; margin: 0 !important; padding: 0 !important;
    float: none !important; display: flex !important; flex-direction: column;
    overflow: visible !important;
  }
  /* 同一行的两张卡片等高，底边对齐 */
  ul.m-progrid > li.proShowLeft > .proInfo {
    display: flex !important; flex-direction: column;
    flex: 1 1 auto !important; height: auto !important;
  }
  ul.m-progrid > li.proShowLeft > .proInfo > .proImage { flex: 0 0 auto; }
  ul.m-progrid > li.proShowLeft > .proInfo > .proName { flex: 0 0 auto; }
  ul.m-progrid > li.proShowLeft > .proInfo > .proMode { flex: 1 1 auto; }
  ul.m-progrid > .clearboth { display: none !important; }
  /* ul.proInfo 原为固定 380px 高，窄屏下会在卡片底部留一大片空白 */
  .proInfo {
    width: 100% !important; min-width: 0 !important;
    height: auto !important; overflow: visible !important;
  }
  /* 产品名的 <a> 被写死 310px 宽 + 32px 行高，比卡片还宽，导致文字右侧被裁 */
  .proName a {
    display: block !important;
    width: 100% !important; max-width: 100% !important;
    line-height: 1.45 !important; font-size: 13px !important;
  }
  .proShowLeft > a { display: block !important; width: 100% !important; }
  .proImage, .proInfo .proImage {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: auto !important; overflow: visible !important;
  }
  .proImage img, .proInfo .proImage img {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: auto !important; display: block;
  }
  /* 产品名原来 height:68px+overflow:hidden，窄屏下会被裁成半句；最多 3 行、超出省略 */
  .proInfo .proName, .proInfo .proMode {
    width: 100% !important; height: auto !important; overflow: visible !important;
  }
  /* 不用 -webkit-line-clamp：窄屏下它算出的高度不足，会让 proMode 叠到产品名上 */
  .proName {
    display: block !important;
    font-size: 13px !important; line-height: 1.45 !important;
    height: auto !important; max-height: none !important;
    overflow: visible !important;
    margin: 4px 0 !important;
  }
  .proName, .proMode, .proInfo li { min-height: 0 !important; }
  .proMode { font-size: 12px !important; line-height: 1.5 !important; }

  /* ---------- 图片 / 表格 ---------- */
  img { max-width: 100% !important; height: auto !important; }
  table { display: block; width: 100% !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre { overflow-x: auto; }

  /* ---------- 新闻列表：容器与条目解除定宽 ---------- */
  .newsList { width: 100% !important; }
  .newsList li { width: 100% !important; height: auto !important; overflow: visible !important; }
  .newsList li + li { border-top: 1px solid #eee; }

  /* ---------- 新闻列表：标题占满宽、日期落到下一行 ---------- */
  .newsHearder {
    width: 100% !important; height: auto !important; min-height: 30px;
    line-height: 1.55 !important; padding: 8px 4px !important;
    float: none !important; overflow: visible !important;
  }
  .newsHearder a {
    white-space: normal !important; text-overflow: clip !important;
    overflow: visible !important; word-break: break-word;
  }
  .date {
    float: none !important; display: block !important;
    font-size: 13px !important; color: #8a8a8a !important;
    padding: 0 4px 8px !important;
  }

  /* ---------- 文章正文：解除固定宽、强制换行、表格可横滑 ---------- */
  .contR, .contR > div, .contR p, .contR li, .contR h1, .contR h2, .contR h3,
  .toys, .toysHearder, .psHearder { max-width: 100% !important; }
  .toysHearder, .psHearder { width: 100% !important; }
  .contR h1 { width: auto !important; white-space: normal !important; height: auto !important; }
  p, li, td, th, h1, h2, h3, div { overflow-wrap: break-word; }
  .contR table {
    display: block !important; width: 100% !important;
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
  }
  .contR table td, .contR table th { white-space: normal !important; font-size: 14px !important; }

  /* ---------- 可读性 ---------- */
  p, li, .contR, .contL, .right { line-height: 1.75; word-wrap: break-word; }
  .border_H1, .psHearder, .toysHearder, .newsHearder { font-size: 16px !important; }
  .contR h1, .contR h2, .contR h3 { font-size: 17px !important; line-height: 1.5 !important; }
  a { -webkit-tap-highlight-color: rgba(0,0,0,0.06); }

  /* ---------- 点击区不小于 44px ---------- */
  .mainNav li a, .contL a, .contR a.btn, .botton { min-height: 44px; display: inline-block; }
/* ===== P132 主导航横向滚动 ===== */
.mainNav{overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;}
.mainNav > ul{display:flex!important;width:max-content!important;float:none!important;}
.mainNav > ul > li{flex:0 0 auto!important;float:none!important;display:inline-block!important;}
.mainNav > ul > li > a{display:block!important;}
.mainNav .clearboth{display:none!important;}
/* 右端渐隐 + 箭头，提示可以横滑 */
.mainNav{position:relative;}
.mainNav::after{content:">";position:absolute;right:0;top:0;width:26px;height:100%;
  line-height:38px;text-align:center;font-size:20px;color:#0b8d8a;font-weight:bold;
  background:linear-gradient(to right,rgba(255,255,255,0),#fff 65%);pointer-events:none;}

/* 首页分类表：td 固定 244px，两列 488 溢出 */
.contR table{width:100%!important;max-width:100%!important;table-layout:fixed!important;display:table!important;}
.contR tbody,.contR tr{max-width:100%!important;}
.contR td{width:auto!important;max-width:100%!important;padding-left:0!important;padding-right:6px!important;overflow-wrap:break-word;word-break:break-word;}
.contR td > ul{width:100%!important;max-width:100%!important;}
.contR td > ul > li{width:100%!important;max-width:100%!important;}
.contR td a{white-space:normal!important;overflow-wrap:break-word;}
.contR h2,.contR .font3{width:auto!important;max-width:100%!important;overflow:hidden;}
.contR p{max-width:100%!important;}

/* 首页/分类页 .mainproducts：容器内联 562px + 表格 578 属性宽，窄屏溢出 */
.mainproducts{width:100%!important;max-width:100%!important;overflow:visible!important;}
.mainproducts > div{width:100%!important;max-width:100%!important;overflow:visible!important;}
.mainproducts table{width:100%!important;max-width:100%!important;display:table!important;table-layout:fixed!important;}
.mainproducts td{width:50%!important;padding:0 6px 0 0!important;vertical-align:top!important;overflow-wrap:break-word;}
.mainproducts td > ul{width:100%!important;max-width:100%!important;}
.mainproducts td > ul > li{width:100%!important;max-width:100%!important;}
.mainproducts td a{white-space:normal!important;overflow-wrap:break-word;font-size:12px!important;line-height:1.55!important;display:block!important;}
.mainproducts td a span{white-space:normal!important;}
.mainproducts td li{padding-bottom:4px!important;}
.mainproducts h2{width:auto!important;max-width:100%!important;overflow:hidden;}

/* 右侧悬浮客服块原 top:50%，正好压住导航右端的横滑箭头，改为贴底部 */
#rightsead{top:auto!important;bottom:14px!important;margin-top:0!important;opacity:.92;}
}
