/* ==============================================
   全局基础样式
   ============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.mobile-br {
  display: none;
}

/* ==============================================
   WhatsApp 强制左下角（电脑+手机全局生效）
   ============================================== */
.whatsapp-float,
.whatsapp-landing-btn {
  position: fixed !important;
  left: 20px !important;
  bottom: 20px !important;
  right: auto !important;
  z-index: 9999999 !important;
}

/* ==============================================
   侧边浮动报价弹窗（可拖动）
   ============================================== */
#floatQuoteBox {
  position: fixed;
  left: 300px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  z-index: 9999;
  cursor: move;
  user-select: none;
}
@media (max-width: 768px) {
  #floatQuoteBox {
    left: 15px !important;
    width: calc(100% - 30px) !important;
  }
}

/* ==============================================
   报价表格横向滚动（移动端完整显示）
   ============================================== */
#quoteList {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}
#quoteTable {
  min-width: 750px;
  width: 100%;
  border-collapse: collapse;
}
#quoteTable th,
#quoteTable td {
  padding: 7px 5px;
  font-size: 13px;
  border: 1px solid #ddd;
  white-space: nowrap;
}
@media (max-width: 768px) {
  #quoteTable th,
  #quoteTable td {
    white-space: nowrap;
  }
  /* 表格滚动提示 */
  #quoteList::after {
    content: "⇠ Swipe left/right to view more ⇢";
    display: block;
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
  }
}

/* ==============================================
   移动端通用适配
   ============================================== */
@media (max-width: 768px) {
  .mobile-br {
    display: block;
  }
  .container, main, .content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .product-grid,
  .products-row,
  .why-row,
  .testi-row,
  .related-products {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .product-card,
  .product-item {
    width: 100% !important;
    margin: 20px auto !important;
    max-width: calc(100% - 32px) !important;
    padding: 20px 16px !important;
  }
  p, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .product-card img,
  .product-item img {
    height: auto !important;
    max-height: none;
    object-fit: contain;
  }
  .hero-text-box {
    width: 90% !important;
    max-width: 90% !important;
    padding: 20px !important;
    background: rgba(255,255,255,0.85) !important;
    border-radius: 12px !important;
  }
  .hero-text-box h1 {
    font-size: 1.6rem !important;
    line-height: 1.4 !important;
    margin: 0 0 10px 0 !important;
    text-align: center;
  }
  .hero-text-box p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }
  .fixed-sidebar {
    display: none !important;
  }
  .product-card h1,
  .prod-title h1 {
    display: block !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin: 0 auto 20px auto !important;
    padding: 0 10px !important;
  }
  /* 普通表格横向滚动 */
  .product-table,
  .spec-table,
  table:not(#quoteTable) {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }
  .product-table th,
  .product-table td,
  .spec-table th,
  .spec-table td,
  table:not(#quoteTable) th,
  table:not(#quoteTable) td {
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
  }
  html, body {
    overflow-x: hidden;
  }
  nav {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    padding: 12px 10px !important;
    gap: 2px !important;
  }
  nav a {
    font-size: 13px !important;
    padding: 2px 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
}

/* 超窄屏 */
@media (max-width: 320px) {
  nav a {
    font-size: 12px !important;
    padding: 2px 4px !important;
  }
}