/* ========================================
   寻机捡漏 - 响应式样式
   屏幕宽度 ≤ 768px 时自动切换移动端布局
   ======================================== */

@media screen and (max-width: 768px) {
  /* ---------- Base ---------- */
  html { font-size: 14px; }
  .container { padding: 0 15px; }

  /* ---------- Top Bar ---------- */
  .top-bar { font-size: 12px; }

  /* ---------- Header ---------- */
  .header .container { position: relative; }
  .header-phone { display: none; }
  .hamburger { display: flex; }

  /* ---------- Navigation ---------- */
  .main-nav { display: none; }
  .main-nav.mobile-show {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 998;
    background: rgba(0,0,0,0.5);
  }
  .main-nav.mobile-show .nav-list {
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--white);
    overflow-y: auto;
  }
  .main-nav.mobile-show .nav-list li a {
    color: var(--dark-gray);
    border-bottom: 1px solid var(--border-color);
  }
  .main-nav.mobile-show .nav-list li a:hover,
  .main-nav.mobile-show .nav-list li a.active {
    background: var(--red);
    color: var(--white);
  }

  /* ---------- Banner ---------- */
  .banner-slide img { height: 220px; }
  .banner-content h2 { font-size: 22px; margin-bottom: 10px; }
  .banner-content p { font-size: 14px; }
  .banner-arrows button { width: 34px; height: 34px; font-size: 16px; }
  .page-banner { height: 160px; }
  .page-banner .banner-text h1 { font-size: 24px; }

  /* ---------- About Section ---------- */
  .about-wrap { flex-direction: column; }
  .about-img { flex: none; }
  .about-img img { height: 200px; }
  .about-text h3 { font-size: 20px; }

  /* ---------- Advantages ---------- */
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .advantage-card { padding: 24px 16px; }

  /* ---------- Products ---------- */
  .category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .category-tabs .tab { flex-shrink: 0; }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card .card-img { height: 140px; }
  .product-card .card-info { padding: 10px; }
  .product-card .card-info h4 { font-size: 13px; }
  .product-card .card-info .price { font-size: 16px; }

  /* Product list page */
  .product-list-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* ---------- Cases ---------- */
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .case-card .card-img { height: 140px; }
  .case-list-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* ---------- News ---------- */
  .news-item { flex-direction: column; align-items: flex-start; }
  .news-item .thumb {
    flex: none;
    width: 100%;
    height: 160px;
    margin-right: 0;
    margin-bottom: 12px;
  }
  .news-item .date-action {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
  }

  /* ---------- Culture ---------- */
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .culture-card { padding: 20px 14px; }

  /* ---------- Team ---------- */
  .team-slide img { height: 200px; }

  /* ---------- Contact ---------- */
  .contact-cards {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .contact-card { width: 100%; max-width: 320px; }

  /* ---------- Form ---------- */
  .message-form {
    flex-direction: column;
    gap: 20px;
  }
  .form-left,
  .form-right { width: 100%; }
  .form-right textarea { min-height: 120px; }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-group input,
  .form-group textarea,
  .form-group select {
    height: 46px;
    font-size: 16px; /* prevent iOS zoom */
  }
  .form-group textarea { height: 120px; }

  /* ---------- Detail ---------- */
  .detail-header h1 { font-size: 20px; }
  .detail-content { font-size: 14px; }
  .detail-content table { font-size: 13px; }
  .detail-content table th,
  .detail-content table td { padding: 8px 10px; }
  .detail-nav { flex-direction: column; gap: 10px; }

  /* ---------- Product Detail ---------- */
  .detail-top { flex-direction: column; }
  .detail-gallery { flex: none; width: 100%; }
  .detail-info { width: 100%; padding-left: 0; margin-top: 24px; }
  .detail-actions { flex-direction: column; }
  .btn-inquiry { width: 100%; }
  .thumb-list { gap: 8px; }
  .thumb { width: 60px; height: 60px; }
  .related-products-grid { grid-template-columns: repeat(2, 1fr); }

  /* ---------- Case Detail ---------- */
  .customer-review { padding: 20px; }
  .related-cases-grid { grid-template-columns: repeat(2, 1fr); }

  /* ---------- News Detail ---------- */
  .news-meta { flex-direction: column; gap: 8px; }
  .related-news-grid { grid-template-columns: 1fr; }

  /* ---------- About Detail ---------- */
  .culture-bg { padding: 40px 0; }
  .culture-grid { padding: 0 10px; }
  .team-slider-outer { padding: 0; }
  .team-prev, .team-next { display: none; }

  /* ---------- Network ---------- */
  .network-img { height: 200px; }
  .region-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .region-card { padding: 16px; }

  /* ---------- Inner Banner ---------- */
  .inner-banner { height: 160px; }
  .inner-banner h1 { font-size: 24px; }

  /* ---------- Contact Slogan ---------- */
  .contact-slogan { padding: 20px 0; }
  .slogan-main { font-size: 20px; }

  /* ---------- Footer ---------- */
  .footer-nav .container { gap: 15px; }
  .footer-info .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .footer-qrcode img { margin: 0 auto 8px; }

  /* ---------- Float Sidebar ---------- */
  .float-sidebar { right: 6px; }
  .float-btn { width: 40px; height: 40px; }
  .float-btn svg { width: 18px; height: 18px; }
  .float-btn .tooltip { display: none; }

  /* ---------- Section spacing ---------- */
  .about-section,
  .advantages-section,
  .products-section,
  .cases-section,
  .news-section,
  .culture-section,
  .team-section,
  .product-list-section,
  .case-list-section,
  .news-list-section,
  .detail-section,
  .form-section,
  .network-section { padding: 35px 0; }

  .section-title { margin-bottom: 24px; }
  .section-title h2 { font-size: 24px; }

  /* ---------- Network page ---------- */
  .network-content { font-size: 14px; line-height: 1.8; }
}

/* ---------- Tablet (768px - 1024px) ---------- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid,
  .product-list-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid,
  .case-list-grid { grid-template-columns: repeat(2, 1fr); }
  .culture-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-info .container { grid-template-columns: 1fr 1fr; gap: 20px; }
  .banner-slide img { height: 350px; }
}
