/* ========== 基础与变量（商务蓝） ========== */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --line: #e5e7eb;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(30, 41, 90, .08);
  --maxw: 1000px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
}
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ========== 导航 ========== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 14px rgba(30,41,90,.06); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo-mark { color: var(--primary); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }

/* ========== 首屏（白底 + 产品合集图） ========== */
.hero { position: relative; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); overflow: hidden; background: #fff; }
.hero-bg { position: relative; width: 100%; padding: 0 20px; }
.hero-bg img { width: 100%; max-width: 1400px; height: auto; display: block; margin: 0 auto; }
.hero-inner { position: relative; padding: 40px 20px 56px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 12px; }
.hero p { font-size: 17px; color: var(--ink-soft); }

/* ========== 通用区块 ========== */
.section { padding: 76px 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }
.section-title { text-align: center; font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 36px; }

/* ========== 企业简介（居中三行式） ========== */
.about-inner { text-align: center; }
.about-inner h2 { font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 16px; }
.about-inner > p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 30px; }

/* ========== 产品展示（一行一款，图左文右交替） ========== */
.product-row {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px;
  align-items: center; margin-bottom: 48px;
}
.product-row:last-child { margin-bottom: 0; }
.product-row.reverse .product-media { order: 2; }
.product-row.reverse .product-info { order: 1; }
.product-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-info h3 { font-size: 21px; margin-bottom: 10px; }
.product-info p { color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; }

/* 产品参数列表 */
.spec-list { list-style: none; border-top: 1px solid var(--line); }
.spec-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 2px; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.spec-list span { color: var(--ink-soft); flex-shrink: 0; }
.spec-list i { font-style: normal; color: var(--ink); font-weight: 600; text-align: right; }

/* ========== 产品图与参数 ========== */
.product-media img { object-fit: contain; background: #fff; }

/* ========== 联系我们 ========== */
.contact-inner { text-align: center; }
.contact-list { list-style: none; display: inline-grid; gap: 10px; color: var(--ink-soft); font-size: 16px; }

/* ========== 页脚 ========== */
.site-footer { background: #111827; color: #9ca3af; padding: 24px 0; font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer a { color: #9ca3af; text-decoration: none; margin-left: 14px; }
.site-footer a:hover { color: #fff; }

/* ========== 入场动画（仅 JS 可用时隐藏） ========== */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ========== 图片失败渐变兜底 ========== */
.img-fallback {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
  border-radius: var(--radius);
  min-height: 160px;
}
.img-fallback img { border-radius: inherit; }

/* ========== 动画增强 ========== */
/* 首屏文字入场 */
.js .hero h1.reveal { transition-delay: .1s; }
.js .hero p.reveal { transition-delay: .4s; }

/* 首屏轮播图完整显示，不做裁切推拉 */

/* 区块标题下划线滑入 */
.section-title { position: relative; padding-bottom: 14px; }
.section-title::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 56px; height: 3px;
  background: var(--primary); border-radius: 2px;
  transform: translateX(-50%) scaleX(0); transition: transform .5s ease .35s;
}
.section-title.reveal.visible::after { transform: translateX(-50%) scaleX(1); }

/* 产品图悬停放大 + 阴影加深 */
.product-media img { transition: transform .5s ease, box-shadow .5s ease; }
.product-row:hover .product-media img { transform: scale(1.03); box-shadow: 0 16px 36px rgba(30,41,90,.16); }

/* 桌面端导航链接滑动下划线 */
@media (min-width: 641px) {
  .nav-links a { position: relative; padding: 4px 0; }
  .nav-links a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--primary); border-radius: 1px;
    transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
  }
  .nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
}

/* logo 菱形悬停旋转 */
.logo-mark { display: inline-block; transition: transform .5s ease; }
.logo:hover .logo-mark { transform: rotate(135deg); }

/* 无障碍：用户开启"减少动态效果"时全部关闭 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img.active { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .section-title::after { transition: none; transform: translateX(-50%) scaleX(1); }
}

/* ========== 响应式 ========== */
@media (max-width: 760px) {
  .product-row, .product-row.reverse { grid-template-columns: 1fr; gap: 18px; }
  .product-row.reverse .product-media { order: 0; }
  .product-row.reverse .product-info { order: 1; }
  .section { padding: 56px 0; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    box-shadow: 0 12px 24px rgba(30,41,90,.08);
  }
  .nav-links.open { max-height: 240px; }
  .nav-links a { padding: 13px 20px; border-top: 1px solid var(--line); }
}
