/* =============================================
   万众批发部 官网 CSS
   响应式：桌面 / 平板 / 手机自适应
   ============================================= */

/* ---------- 变量 & Reset ---------- */
:root {
  --primary: #1a3a5c;
  --primary-light: #2c5282;
  --primary-dark: #0f2340;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --text-dark: #2c3e50;
  --text-body: #555;
  --text-light: #888;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --max-w: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26,58,92,0.97);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.logo span { color: var(--accent-light); }

.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230,126,34,0.35);
}
.btn-full { width: 100%; }

/* ---------- 通用标题 ---------- */
.section-title {
  font-size: 2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 48px;
  font-size: 0.95rem;
}

/* ---------- Hero 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, #0f2340 0%, #1a3a5c 50%, #2c5282 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(230,126,34,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(44,82,130,0.4) 0%, transparent 50%);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, #fff, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 140px;
  max-width: 700px;
}
.hero-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: #fff;
  line-height: 1.3;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 28px;
  line-height: 1.8;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.hero-badges span {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.95);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.88rem;
}

/* ---------- Features 优势 ---------- */
.features {
  padding: 90px 0;
  background: var(--bg-white);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 36px 24px;
  border-radius: var(--radius);
  background: var(--bg-light);
  text-align: center;
  transition: all 0.3s;
  border: 1px solid var(--border);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
}
.feature-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 700;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---------- Products 产品分类 ---------- */
.products {
  padding: 90px 0;
  background: var(--bg-light);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.product-img {
  font-size: 3rem;
  margin-bottom: 16px;
}
.product-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}
.product-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
}
.product-tag {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 50px;
  font-weight: 600;
}

/* ---------- Brands 合作品牌 ---------- */
.brands {
  padding: 80px 0;
  background: var(--bg-white);
}
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.brand-item {
  padding: 14px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-white);
  transition: all 0.25s;
}
.brand-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(230,126,34,0.15);
  transform: translateY(-2px);
}

/* ---------- 热销型号速查 ---------- */
.hot-models {
  padding: 90px 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}
.hot-models .section-title { color: #fff; }
.hot-models .section-sub { color: rgba(255,255,255,0.6); }

.models-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.model-tag {
  display: inline-block;
  padding: 8px 18px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.06);
}
.model-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.models-loading { color: rgba(255,255,255,0.6); padding: 20px; text-align: center; }
.models-empty { color: rgba(255,255,255,0.5); padding: 20px; text-align: center; }

/* ---------- Contact 联系我们 ---------- */
.contact {
  padding: 90px 0;
  background: var(--bg-light);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ci-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }
.contact-item strong { display: block; color: var(--primary); font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { color: var(--text-body); font-size: 0.9rem; }

.wechat-qr { margin-top: 8px; }
.qr-placeholder {
  width: 140px; height: 140px;
  border: 2px dashed rgba(0,0,0,0.15);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s;
}
.qr-placeholder:hover { border-color: var(--accent); color: var(--accent); }
.qr-placeholder small { font-size: 0.75rem; margin-top: 4px; }

.contact-form {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.contact-form h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 24px;
  font-weight: 700;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: border-color 0.2s;
  background: var(--bg-white);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary-light); }
.form-group textarea { resize: vertical; min-height: 90px; }

.form-msg {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}
.form-msg.ok { display: block; background: #d4edda; color: #155724; }
.form-msg.err { display: block; background: #f8d7da; color: #721c24; }

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.5);
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
}
.footer .beian {
  margin-top: 8px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  visibility: visible !important;
  opacity: 1 !important;
}
.footer .beian a {
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.footer .beian a:hover {
  color: #fff;
}
.footer .beian-divider {
  margin: 0 12px;
  color: rgba(255,255,255,0.3);
}
.footer .gongan-placeholder {
  color: rgba(255,255,255,0.5);
}

.footer .gongan-logo {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }

/* ---------- 响应式：平板 (≤992px) ---------- */
@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- 响应式：手机 (≤768px) ---------- */
@media (max-width: 768px) {
  :root { --max-w: 100%; }

  /* 导航 */
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; }
  .hero-content { padding-bottom: 120px; }
  .hero-content h1 { font-size: 1.9rem; }
  .hero-badges { gap: 8px; }
  .hero-badges span { font-size: 0.82rem; padding: 5px 12px; }

  /* 各区块 */
  .features-grid,
  .products-grid { grid-template-columns: 1fr; }
  .features, .products, .hot-models, .contact { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
  .feature-card { padding: 24px 20px; }
  .product-card { padding: 24px 20px; }
  .contact-form { padding: 24px 20px; }

  /* 热销型号横滚 */
  .models-wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .model-tag { flex-shrink: 0; }
}
