/* ==========================================================================
   PRECISIONZHU 移动端适配 v3
   ========================================================================== */

/* 全局：禁止横向溢出 */
html, body{max-width:100%;overflow-x:hidden}
*{min-width:0}

/* ---------- 平板 ---------- */
@media (max-width: 1024px){
  .grid{grid-template-columns:repeat(2,1fr)}
}

/* ---------- 手机横屏 / 小平板 ---------- */
@media (max-width: 768px){
  .wrap{padding:0 16px;max-width:100%}

  /* 导航：logo + 一个按钮，绝不换行不挤压 */
  header .nav{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    padding:12px 0 !important;
  }
  header .nav > nav{display:none !important}
  header .nav > .logo{flex:0 1 auto;min-width:0;overflow:hidden;display:flex;align-items:center;gap:9px}
  header .nav > .logo span:not(.logo-mark){
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  /* 两个按钮都保留，但设最小宽度防压缩 */
  header .nav > a.btn.btn-ghost,
  header .nav > a.btn.btn-primary{
    flex:0 0 auto !important;
    white-space:nowrap;
    font-size:12.5px !important;
    padding:8px 12px !important;
  }
  /* 空间不够时只留 Get a Quote */
  header .nav > a.btn.btn-ghost{display:none !important}

  .hero{padding:40px 0 34px}
  .hero h1{font-size:29px;max-width:100%}
  .hero p{font-size:14px;max-width:100%}

  .stats{grid-template-columns:repeat(2,1fr)}
  h2{font-size:23px}

  .hero p, .hero h1, .sec-head p, .card h3, .why-item p, .lede,
  .info h1, .info p, table{
    max-width:100% !important;
    overflow-wrap:break-word !important;
    word-break:break-word !important;
  }
  .hero em{display:inline}
}

/* ---------- 手机竖屏 ---------- */
@media (max-width: 560px){
  .wrap{padding:0 14px}

  header .nav{padding:10px 0 !important;gap:8px !important}
  header .nav > .logo .logo-mark{width:30px;height:30px;font-size:14px;border-radius:7px}
  header .nav > .logo span:not(.logo-mark){font-size:13.5px !important}
  header .nav > .logo span small{display:none !important}
  header .nav > a.btn.btn-primary{font-size:12px !important;padding:7px 11px !important}

  .hero{padding:26px 0 24px}
  .hero h1{font-size:24px;line-height:1.26;letter-spacing:-.01em}
  .hero p{font-size:13.5px;line-height:1.55;margin-bottom:18px}
  .hero .eyebrow{font-size:11px}
  .hero .btn{margin-bottom:8px;width:100%;justify-content:center}

  .grid{grid-template-columns:1fr;gap:14px}
  .card h3{font-size:15px}
  .card img, .card .thumb img{max-height:250px;object-fit:contain}

  .stats{grid-template-columns:repeat(2,1fr);gap:0}
  .stat{padding:16px 13px;border-right:1px solid #e6e9ef;border-bottom:1px solid #e6e9ef}
  .stat:nth-child(2n){border-right:none}
  .stat b{font-size:21px}
  .stat span{font-size:11px}

  h2{font-size:20px}
  section{padding:34px 0}
  .sec-head{margin-bottom:20px}
  .sec-head p{font-size:13px}

  .cta-row{flex-direction:column;align-items:stretch}
  .cta-row .btn{width:100%;justify-content:center;min-width:0}

  table{font-size:12px;display:block;overflow-x:auto}
  table th, table td{padding:8px 7px}

  footer .cols{grid-template-columns:1fr;gap:18px}
  .form-row, .quote-grid{grid-template-columns:1fr !important}
  .btn{font-size:14px;padding:11px 16px}
}

/* ---------- 极窄屏 ---------- */
@media (max-width: 380px){
  .hero h1{font-size:21px}
  header .nav > a.btn.btn-primary{font-size:11.5px !important;padding:6px 9px !important}
}

/* ---------- 产品详情页：标题/面包屑不溢出 ---------- */
@media (max-width: 768px){
  .product-layout{
    grid-template-columns:1fr !important;
    gap:24px !important;
    width:100% !important;
    max-width:100% !important;
  }
  .product-layout > *{
    min-width:0 !important;
    max-width:100% !important;
    width:100% !important;
  }
  .info{width:100% !important;min-width:0 !important}
  .info h1{
    font-size:21px !important;
    line-height:1.3 !important;
    letter-spacing:-.2px !important;
    max-width:100% !important;
    width:100% !important;
    overflow-wrap:break-word !important;
    word-break:break-word !important;
    hyphens:auto;
    white-space:normal !important;
  }
  .info .sub, .info p{
    max-width:100% !important;
    width:100% !important;
    overflow-wrap:break-word !important;
    word-break:break-word !important;
    font-size:13.5px !important;
    white-space:normal !important;
  }
  .crumb{
    font-size:11.5px !important;
    white-space:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    padding-bottom:4px;
    max-width:100%;
    scrollbar-width:none;
  }
  .crumb::-webkit-scrollbar{display:none}
  .crumb a, .crumb span{flex:0 0 auto}

  .gallery-main{
    border-radius:10px;
    overflow:hidden;
    width:100% !important;
    max-width:100% !important;
  }
  .gallery-main img{
    width:100% !important;
    height:auto !important;
    max-height:340px;
    object-fit:contain;
    display:block;
    margin:0 auto;
  }

  .price-box{padding:16px 16px !important;width:100% !important;box-sizing:border-box}
  .price-big{font-size:24px !important}
  .tiers{flex-wrap:wrap;gap:8px}
  .tiers span{font-size:12px}

  .keylist{width:100% !important}
  .keylist li{
    font-size:13px;
    flex-wrap:wrap;
    gap:4px;
    word-break:break-word;
  }
  .cta-row{width:100% !important}
  .cta-row .btn{width:100%;box-sizing:border-box}

  /* 表格（规格表）不要撑破 */
  .product-layout table{
    width:100% !important;
    table-layout:fixed;
    word-break:break-word;
  }
}

@media (max-width: 560px){
  .info h1{font-size:19px !important}
  .gallery-main img{max-height:300px}
}
