/* ==========================================
   SOLWE Mobile & Tablet Optimization v3
   Desktop = 结构 | Mobile = 路径 | Tablet = 加速
   Supports DOM-restructured index.html
   ========================================== */

:root {
  --blue: #2563eb; --blue-dark: #1d4ed8;
  --white: #fff; --black: #0f172a;
  --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0;
  --gray-500: #64748b; --gray-600: #475569; --gray-700: #334155;
  --whatsapp: #25d366;
  --radius: 8px; --shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* ===========================
   TRUST STRIP (MERGED) — BASE
   =========================== */
.trust-strip-merged { background: var(--gray-50); border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.trust-scroll-row {
  display: flex; align-items: center; justify-content: center; gap: 40px;
  padding: 18px 20px; flex-wrap: wrap;
}
.trust-scroll-row .trust-item {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.trust-icon { font-size: 22px; line-height: 1; }
.trust-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }

/* ===========================
   ABOUT PREVIEW — BASE
   =========================== */
.about-preview-text { 
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; display: -webkit-box;
}
.about-learn-more { transition: color 0.2s; }
.about-learn-more:hover { color: var(--blue-dark); }

/* ===========================
   TABLET (max-width: 1024px)
   =========================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .products-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 16px; }
  .series-grid, .category-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Trust: single row */
  .trust-scroll-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 28px; padding: 16px 20px; -webkit-overflow-scrolling: touch; }
  .trust-scroll-row::-webkit-scrollbar { display: none; }
  .trust-item { flex-shrink: 0; }

  /* FAQ: 2-column */
  .faq-wrapper, #faq .section-inner > div { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  #faq details { border-bottom: 1px solid var(--gray-200); padding: 14px 0; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .hero h1 { font-size: 32px; }
  .section-title { font-size: 24px; }
}

/* ===========================
   MOBILE (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
  :root { --nav-height: 56px; }

  /* NAV */
  .nav-links { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--white); flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow); z-index: 999; }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
  .nav-toggle { display: block; }

  /* RULE 1: Single dominant module */
  .section { padding: 28px 12px; }
  .section-title { font-size: 20px; margin-bottom: 4px; }
  .section-subtitle { font-size: 12px; margin-bottom: 16px; padding: 0 4px; }

  /* HERO */
  .hero, .hero-banner { padding: 40px 14px 32px; }
  .hero h1, .hero-banner h1 { font-size: 22px; line-height: 1.25; }
  .hero .subtitle, .banner-content .subtitle { font-size: 14px; }
  .banner-content .desc { font-size: 12px; margin-bottom: 16px; }

  /* ===== RULE 2: Product grid 2-col ===== */
  .series-grid, .category-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .product-img { height: 130px; }
  .product-info { padding: 6px 8px; }
  .product-info h3 { font-size: 11px; -webkit-line-clamp: 2; overflow: hidden; }
  .product-info .desc { display: none; }
  .product-actions { flex-direction: column; gap: 3px; }
  .product-actions .btn { font-size: 10px; padding: 7px 4px; }

  /* Filter horizontal scroll */
  .filter-bar { overflow-x: auto; flex-wrap: nowrap; gap: 4px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }

  /* ===== RULE 3: Trust strip horizontal scroll ===== */
  .trust-strip-merged { padding: 0; }
  .trust-scroll-row {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    gap: 20px; padding: 14px 14px;
    -webkit-overflow-scrolling: touch;
  }
  .trust-scroll-row::-webkit-scrollbar { display: none; }
  .trust-scroll-row .trust-item { flex-shrink: 0; }
  .trust-icon { font-size: 20px; }
  .trust-label { font-size: 11px; }

  /* ===== RULE 4: About preview ===== */
  #about { padding: 20px 14px; }
  .about-preview-text { -webkit-line-clamp: 3; font-size: 13px; }
  .about-learn-more { font-size: 13px; }

  /* FAQ */
  #faq { padding: 20px 12px; }
  #faq details { padding: 12px 0; }
  #faq summary { font-size: 14px; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; gap: 6px; }
  .inquiry-form, .cta-form { padding: 14px; }

  /* Footer */
  .footer { padding: 28px 14px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-col h4 { font-size: 12px; }
  .footer-col ul li a { font-size: 11px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; font-size: 11px; }

  /* Modal */
  .modal { width: 95vw; max-height: 85vh; overflow-y: auto; padding: 18px 12px; border-radius: 12px; }

  /* About page */
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .about-hero { padding: 36px 14px; }
  .about-hero h1 { font-size: 24px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 20px; padding: 32px 12px; }

  /* Page headers */
  .page-header { padding: 24px 14px; }
  .page-header h1 { font-size: 20px; }

  /* OEM/ODM page */
  .oem-grid-6 { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .qc-grid-6 { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  /* ===== STICKY CTA ===== */
  .quick-cta-strip { position: sticky; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--gray-200); padding: 8px 14px; display: flex; gap: 8px; box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 100; }
  .quick-cta-strip .btn { flex: 1; padding: 11px 6px; font-size: 13px; border-radius: var(--radius); }

  /* WhatsApp float */
  .whatsapp-float { width: 44px; height: 44px; bottom: 14px; right: 14px; }

  /* FINAL CTA */
  .cta-final { padding: 40px 14px; }
  .cta-final h2 { font-size: 20px; }
  .cta-final .cta-sub { font-size: 13px; }
  .cta-btns { flex-direction: column; gap: 8px; }
  .cta-btns .btn { width: 100%; }
}

/* ===========================
   SMALL PHONE (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
  .hero h1, .hero-banner h1 { font-size: 19px; }
  .hero, .hero-banner { padding: 36px 10px 28px; }
  .section { padding: 24px 10px; }
  .section-title { font-size: 18px; }
  .products-grid { gap: 6px; }
  .product-img { height: 110px; }
  .trust-scroll-row { gap: 14px; padding: 12px 10px; }
  .trust-icon { font-size: 18px; }
  .trust-label { font-size: 10px; }
  .cta-final h2 { font-size: 18px; }
  .btn { font-size: 13px; padding: 11px 16px; }
}

/* ===========================
   Accessibility
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
