/* ============================================================
   俊胜机械 · 移动端增强样式
   断点：≤768px（手机） / ≤480px（小屏手机）
   作用：修复图标塌陷、优化间距、放大触控区、精简冗余
   ============================================================ */

@media (max-width: 768px) {

  /* ---------- 1. 全局：防止横向溢出 ---------- */
  html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  .main {
    overflow-x: hidden;
  }
  img {
    max-width: 100%;
    height: auto;
  }

  /* ---------- 2. 首页 6 个图标：修复高度塌陷 ---------- */
  .icon-1 {
    margin: 0 -4px;
    display: flex;
    flex-wrap: wrap;
  }
  .icon-1 li {
    width: 33.333%;
    float: none;
    margin-bottom: 8px;
    box-sizing: border-box;
    padding: 0 4px;
    list-style: none;
  }
  /* span 保持背景图（桌面端用），同时容纳 img */
  .icon-1 span {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding-top: 0 !important;
    box-sizing: border-box;
    border-radius: 4px;
    overflow: hidden;
  }
  /* img 才是实际显示的元素 */
  .icon-1 span img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
  }

  /* ---------- 3. 首页顶部公司名区 ---------- */
  /* 模板原本在移动端 display:none 隐藏整块，这里恢复显示 */
  .row-a1 {
    display: block !important;
    padding: 20px 0 16px;
  }
  /* 同时确保图标容器可见 */
  .row-a1 .wp {
    width: 100% !important;
    padding: 0 12px !important;
    box-sizing: border-box;
  }
  .row-a1 .g-tit h3 {
    font-size: 19px;
    line-height: 1.35;
    padding: 0 15px;
  }
  .row-a1 .g-tit p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #888;
    padding: 0 15px;
    margin-top: 8px;
  }

  /* ---------- 5. 产品中心 ---------- */
  .row-a2 {
    padding: 22px 0;
  }
  .m-pro {
    display: block;
  }
  /* 左侧分类导航改为横向标签 */
  .m-pro .category {
    width: 100% !important;
    float: none !important;
    margin-bottom: 14px;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .m-pro .category dt {
    font-size: 15px;
    padding: 9px 0;
    border-bottom: 2px solid #1a4f9c;
    margin-bottom: 10px;
  }
  .m-pro .category dd ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .m-pro .category dd li {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    border: none !important;
  }
  .m-pro .category dd li a {
    display: block;
    padding: 7px 13px;
    background: #f4f6f9;
    border-radius: 4px;
    font-size: 12.5px;
    color: #555 !important;
    white-space: nowrap;
  }
  .m-pro .category dd li a:active {
    background: #1a4f9c;
    color: #fff !important;
  }
  /* 产品网格两列 */
  .ul-por {
    width: 100% !important;
    float: none !important;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .ul-por li {
    width: 50% !important;
    float: left;
    box-sizing: border-box;
    padding: 0 4px;
    margin-bottom: 14px;
  }
  .ul-por li .pic {
    border-radius: 4px;
    overflow: hidden;
  }
  .ul-por li .pic img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
  }
  .ul-por li p {
    font-size: 12.5px;
    line-height: 1.45;
    margin-top: 7px;
    height: auto;
    max-height: 38px;
    overflow: hidden;
    text-align: center;
  }

  /* ---------- 6. 四大技术优势 ---------- */
  .row-a4 {
    padding: 24px 0;
  }
  .row-a4 .tit h2 {
    font-size: 17px;
    line-height: 1.5;
    padding: 0 15px;
  }
  .row-a4 .tit span {
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 6px;
  }
  .ul-imgtxt > li {
    margin-bottom: 22px;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .ul-imgtxt > li .pic {
    width: 100% !important;
    float: none !important;
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
  }
  .ul-imgtxt > li .pic img {
    width: 100%;
    aspect-ratio: 570 / 328;
    object-fit: cover;
    display: block;
  }
  .ul-imgtxt > li .txt {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
  }
  .ul-imgtxt > li .txt .title h4 {
    font-size: 15.5px;
    line-height: 1.5;
  }
  .ul-imgtxt > li .txt .title em {
    font-size: 11px;
    line-height: 1.5;
    color: #aaa;
    display: block;
    margin-top: 4px;
    word-break: break-word;
  }
  .ul-imgtxt > li .ul-txt {
    margin-top: 10px;
  }
  .ul-imgtxt > li .ul-txt li {
    font-size: 13px;
    line-height: 1.7;
    padding-left: 14px;
    margin-bottom: 7px;
    position: relative;
  }
  .ul-imgtxt > li .ul-txt li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a4f9c;
  }

  /* ---------- 7. 案例 / 荣誉网格 ---------- */
  .ul-case {
    padding: 0 12px;
    box-sizing: border-box;
  }
  .ul-case li {
    width: 50% !important;
    float: left;
    box-sizing: border-box;
    padding: 0 4px;
    margin-bottom: 14px;
  }
  .ul-case li .pic img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 4px;
  }
  .ul-case li p {
    font-size: 12.5px;
    line-height: 1.45;
    text-align: center;
    margin-top: 6px;
  }

  /* ---------- 8. 底部表单区 ---------- */
  .row-10 {
    padding: 22px 0;
  }
  .row-10 .wp {
    padding: 0 14px;
    box-sizing: border-box;
  }
  .m-visit h5 {
    font-size: 16px;
    line-height: 1.5;
  }
  .m-visit p {
    font-size: 12.5px;
    margin-top: 6px;
  }
  .m-enlist .txt h4 {
    font-size: 15px;
    line-height: 1.5;
  }
  .m-enlist .txt p {
    font-size: 12px;
    margin-top: 5px;
  }
  .m-enlist form label {
    display: block;
    margin-bottom: 10px;
  }
  .m-enlist form label span {
    font-size: 13px;
  }
  .m-enlist form input,
  .m-enlist form textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;      /* ≥16px 防 iOS 缩放；14px 兼顾美观 */
    padding: 9px 11px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
  }
  .m-enlist form textarea {
    min-height: 72px;
    resize: vertical;
  }
  .m-enlist form button {
    width: 100%;
    padding: 12px 0;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    background: #1a4f9c;
    color: #fff;
  }

  /* ---------- 9. 页脚 ---------- */
  .footer {
    padding-bottom: 62px;   /* 给底部固定菜单留位 */
  }
  .fd-con {
    display: block;
    padding: 22px 14px 12px;
    box-sizing: border-box;
  }
  .fd-con .logo {
    text-align: center;
    margin-bottom: 16px;
  }
  .fd-con .logo img {
    max-width: 190px;
    margin: 0 auto;
  }
  .fd-con .contact h5 {
    font-size: 15px;
    padding-bottom: 9px;
    border-bottom: 1px solid #2c3440;
    margin-bottom: 11px;
  }
  .fd-con .contact .ul-txt li,
  .fd-con .contact p {
    font-size: 12.5px;
    line-height: 1.85;
    word-break: break-all;
  }
  .fd-con .qr {
    margin-top: 16px;
    text-align: center;
    float: none !important;
  }
  .fd-con .qr .qr-1 img {
    width: 96px;
    height: 96px;
    margin: 0 auto;
  }
  .fd-con .qr .qr-1 p {
    font-size: 12px;
    margin-top: 5px;
  }
  .copy {
    font-size: 11.5px;
    line-height: 1.7;
    padding: 12px 14px;
    text-align: center;
    word-break: break-all;
  }

  /* ---------- 10. 底部固定菜单：缩小占屏 ---------- */
  .mb-link {
    height: 50px !important;
  }
  .mb-link li a {
    font-size: 10.5px !important;
    padding-top: 5px;
  }
  .mb-link li a i {
    font-size: 18px !important;
    margin-bottom: 2px;
  }

  /* ---------- 11. 客服悬浮：移动端隐藏，避免遮挡 ---------- */
  .kf {
    display: none !important;
  }

  /* ---------- 12. 内页：左侧栏改顶部 ---------- */
  .row-b1 .col-l {
    display: none;
  }
  .row-b1 .col-r {
    width: 100% !important;
    float: none !important;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .g-cur {
    padding: 10px 14px;
  }
  .g-cur .wp {
    font-size: 12px;
  }
  .g-titIns1,
  .g-titIns1.mdisc {
    font-size: 17px;
    padding: 11px 0;
    margin-bottom: 14px;
  }

  /* 内页表格：可横向滑动 */
  .row-b1 .col-r table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
  }
  .row-b1 .col-r table th,
  .row-b1 .col-r table td {
    font-size: 12.5px;
    padding: 7px 9px;
    white-space: nowrap;
  }

  /* 详情正文排版 */
  #maximg,
  .m-txt2 {
    font-size: 14.5px;
    line-height: 1.85;
    word-break: break-word;
  }
  #maximg img,
  .m-txt2 img {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    margin: 10px 0;
  }
  #maximg h3,
  .m-txt2 h3 {
    font-size: 15.5px;
    margin: 18px 0 9px;
    padding-left: 10px;
    border-left: 3px solid #1a4f9c;
  }
  #maximg p,
  .m-txt2 p {
    margin-bottom: 11px;
  }
  #maximg ul,
  .m-txt2 ul {
    padding-left: 18px;
  }
  #maximg li,
  .m-txt2 li {
    margin-bottom: 6px;
  }

  /* 产品详情参数区 */
  .m-txt1 .txt p {
    font-size: 13px;
    line-height: 1.8;
  }
  .m-txt1 .btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 11px 0;
    font-size: 15px;
  }

  /* 列表页条目 */
  .ul-newslist li {
    padding: 12px 0;
  }
  .ul-newslist li .tit h3 a {
    font-size: 14.5px;
    line-height: 1.5;
  }
  .ul-newslist li .tit .time {
    font-size: 12px;
    margin-bottom: 4px;
    float: none;
    text-align: left;
  }
  .ul-newslist li .txt p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #888;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 分页 */
  .pagebar .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
  }
  .pagebar .pagination a {
    min-width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 13px;
    padding: 0 8px;
    box-sizing: border-box;
  }
}

/* ============================================================
   小屏（≤400px）再收紧
   ============================================================ */
@media (max-width: 400px) {
  .icon-1 li {
    width: 50%;
  }

  .banner .bn-txt h2 {
    font-size: 18px !important;
  }
  .banner .bn-txt p {
    font-size: 11.5px !important;
  }
  .ul-por li p,
  .ul-case li p {
    font-size: 12px;
  }
  .row-a1 .g-tit h3 {
    font-size: 17px;
  }
}


/* ============================================================
   产品详情页专项优化（移动端）
   ============================================================ */
@media (max-width: 768px) {

  /* 主图图集：压缩上下留白 */
  .m-pic1 .view {
    padding: 0;
  }
  .m-pic1 .swiper-container {
    padding-bottom: 0 !important;
  }
  .m-pic1 .imgauto {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    max-height: 300px;
  }
  .m-pic1 .imgauto img {
    max-height: 300px;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
  }
  .m-pic1 .preview {
    margin-top: 8px;
  }

  /* 产品标题与参数区 */
  .m-txt1 h3 {
    font-size: 17px;
    line-height: 1.45;
    padding: 10px 0;
  }
  .m-txt1 .txt {
    padding: 10px 0;
  }
  .m-txt1 .txt p {
    font-size: 13.5px;
    line-height: 1.95;
    margin-bottom: 4px;
  }
  .m-txt1 .txt p .jgg {
    font-size: 15px;
    color: #c8102e;
    font-weight: 600;
  }

  /* 在线询价按钮 */
  .m-txt1 .btn {
    display: block;
    margin-top: 12px;
    background: #1a4f9c;
    border-radius: 4px;
  }
  .m-txt1 .btn span {
    font-size: 15px;
    color: #fff;
  }

  /* 正文区 */
  .m-txt2 {
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
    margin-top: 14px;
  }
}

/* ============================================================
   列表页产品卡片标题：允许两行，避免截断
   ============================================================ */
@media (max-width: 768px) {
  .ul-por li p,
  .ul-case li p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    max-height: 42px;
    line-height: 1.45;
    font-size: 12.5px;
    text-align: center;
    padding: 0 2px;
  }

  /* 「产品中心」标题去重：隐藏列表页内重复的居中大标题 */
  .row-a2 .g-tit {
    padding-bottom: 10px;
  }
  .row-a2 .g-tit h3 {
    font-size: 17px;
  }
  .row-a2 .g-tit p {
    display: none;
  }
}


/* ============================================================
   第三轮修正：标题去重 / 网格防溢出 / 页脚信息换行
   ============================================================ */
@media (max-width: 768px) {

  /* 1. 首页「产品中心」标题：模板里 .g-tit 与 .category dt 重复，
        移动端只保留一个（保留 .g-tit 作区块标题） */
  .row-a2 .m-pro .category dt {
    display: none !important;
  }

  /* 2. 产品/案例网格：用 grid 彻底杜绝溢出 */
  .ul-por,
  .ul-case {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    width: 100% !important;
    float: none !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .ul-por li,
  .ul-case li {
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    min-width: 0;
  }
  .ul-por li .pic,
  .ul-case li .pic {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #f6f7f9;
  }
  .ul-por li .pic img,
  .ul-case li .pic img {
    width: 100% !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
  }
  .ul-por li p,
  .ul-case li p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    max-height: 35px;
    margin: 6px 0 0;
    text-align: center;
    word-break: break-all;
  }

  /* 3. 页脚联系方式：改为上下两行，避免左右挤压 */
  .fd-con .contact .ul-txt li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    font-size: 12.5px;
    line-height: 1.9;
    word-break: break-all;
  }
  .fd-con .contact p {
    font-size: 12.5px;
    line-height: 1.9;
    word-break: break-all;
  }

  /* 4. 分页按钮紧凑 */
  .pagebar .pagination a {
    min-width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 12.5px !important;
  }
}

/* 超小屏（≤360px）：网格保持两列但缩小间距 */
@media (max-width: 360px) {
  .ul-por, .ul-case {
    gap: 8px 6px;
    padding: 0 8px !important;
  }
  .ul-por li p, .ul-case li p {
    font-size: 11.5px;
  }
}


/* ============================================================
   第四轮：列表页真实类名 ul-imgtxt-01 / ul-imgtxt2 网格化
   ============================================================ */
@media (max-width: 768px) {

  /* 列表页容器去掉多余内边距，给网格留足宽度 */
  .row-b1 .col-r {
    padding: 0 12px !important;
    width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  /* 产品/案例/资质/厂房列表网格 */
  .ul-imgtxt-01,
  .ul-imgtxt2 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  .ul-imgtxt-01 > li,
  .ul-imgtxt2 > li {
    width: auto !important;
    min-width: 0 !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
  .ul-imgtxt-01 > li > a,
  .ul-imgtxt2 > li > a {
    display: block;
    width: 100%;
  }
  .ul-imgtxt-01 > li .pic,
  .ul-imgtxt2 > li .pic {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    overflow: hidden;
    background: #f6f7f9;
  }
  .ul-imgtxt-01 > li .pic img,
  .ul-imgtxt2 > li .pic img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
  }
  .ul-imgtxt-01 > li p,
  .ul-imgtxt2 > li p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px !important;
    line-height: 1.45 !important;
    max-height: 35px;
    margin: 6px 0 0 !important;
    padding: 0 2px;
    text-align: center;
    word-break: break-all;
    box-sizing: border-box;
  }

  /* 案例列表（case.html 用的同类名）适配 */
  .m_chanpin {
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   触屏端优化补丁 (Touch Optimization Patch)
   2026-10-31
   背景：底部导航字号 10.5px 偏小、点击区偏紧；部分文案 <12px 影响小屏可读性。
   原则：仅提升触屏可用性与可读性，不改配色与版式；规则限定 max-width:768px，
        不影响 PC 端。
   ========================================================================== */

@media screen and (max-width: 768px) {
  /* 1. 底部导航：字号 12px，点击区 ≥44px */
  .mb-link li a {
    font-size: 12px !important;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }

  .mb-link li a img,
  .mb-link li a i {
    margin-bottom: 2px;
  }

  /* 2. 文案字号下限 12px（保留原有层级感） */
  .copy {
    font-size: 12px !important;
  }

  .title em {
    font-size: 12px !important;
  }

  .ul-case li p {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  /* 3. 长英文 / URL 不撑破容器 */
  .copy,
  .title em,
  .ul-case li p,
  .txt,
  .m-txt1,
  .m-txt2 {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* 4. 正文图片居中并限宽 */
  .txt img,
  .m-txt1 img,
  .m-txt2 img {
    display: block;
    max-width: 100% !important;
    height: auto;
    margin: 12px auto;
  }

  /* 5. 正文表格改为可横向滚动，不撑破页面 */
  .txt table,
  .m-txt1 table,
  .m-txt2 table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 6. 表单控件 16px，避免 iOS 聚焦时自动放大 */
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
    box-sizing: border-box;
  }

  /* 7. 触摸反馈（替代桌面 hover） */
  .mb-link li a:active,
  .page a:active,
  .btn:active {
    opacity: .7;
    transition: opacity .1s;
  }
}

/* 8. 超小屏（≤375px）进一步收紧 */
@media screen and (max-width: 375px) {
  .mb-link li a {
    font-size: 11px !important;
  }

  .copy {
    font-size: 11.5px !important;
    padding: 10px 10px !important;
  }
}
