/* ============================================================
   YIFA VALVE — 外贸营销站全局样式
   依据 DESIGN.md 设计系统 Token（唯一样式依据）
   深蓝 #0F2B46 + 橙 #F28C28，B2B 工业风
   ============================================================ */

/* ---------- 设计 Token ---------- */
:root {
  --c-primary: #0F2B46;
  --c-primary-2: #143A5F;
  --c-accent: #F28C28;
  --c-accent-2: #E8730C;
  --c-bg: #FFFFFF;
  --c-bg-2: #F5F7FA;
  --c-text: #1E293B;
  --c-text-2: #64748B;
  --c-border: #E2E8F0;

  --font-head: 'Montserrat', 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Open Sans', 'Segoe UI', Arial, sans-serif;

  --container: 1200px;
  --pad-section: 88px;
  --pad-section-m: 56px;
  --radius: 4px;
  --shadow-card: 0 4px 20px rgba(15, 43, 70, 0.08);
  --shadow-hover: 0 12px 32px rgba(15, 43, 70, 0.16);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--c-primary);
  font-weight: 700;
}
h1 { font-size: 40px; }
h2 { font-size: 32px; margin-bottom: 16px; }
h3 { font-size: 22px; margin-bottom: 12px; }
p { margin-bottom: 14px; }
ul, ol { padding-left: 20px; margin-bottom: 14px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: var(--pad-section) 0; }
.section-sm { padding: 48px 0; }
.bg-light { background: var(--c-bg-2); }
.bg-dark { background: var(--c-primary); }
.text-center { text-align: center; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head .subtitle {
  color: var(--c-accent); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; font-size: 14px; margin-bottom: 8px;
}
.section-head p { color: var(--c-text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  border: 2px solid transparent; cursor: pointer; transition: all .2s;
  text-align: center;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-2); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--c-primary); }
.btn-outline-dark { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-outline-dark:hover { background: var(--c-primary); color: #fff; }
.btn-lg { padding: 16px 38px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--c-border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 42px; width: auto; }
.logo .logo-text { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--c-primary); line-height: 1.1; }
.logo .logo-text small { display: block; font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--c-text-2); }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  font-weight: 500; font-size: 15px; color: var(--c-text);
  padding: 8px 0; display: inline-block;
}
.nav-menu > li > a:hover, .nav-menu > li.active > a { color: var(--c-accent); }
.nav-menu .nav-cta { margin-left: 12px; }
/* Get a Quote 按钮：用更高优先级选择器压过导航链接样式，确保橙色按钮不被覆盖 */
.nav-menu .nav-cta .btn.btn-primary,
.nav-menu li.nav-cta > a.btn.btn-primary {
  color: #fff; background: var(--c-accent); border-color: var(--c-accent);
  padding: 10px 22px; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; border-radius: var(--radius);
}
.nav-menu .nav-cta .btn.btn-primary:hover,
.nav-menu li.nav-cta > a.btn.btn-primary:hover {
  color: #fff; background: var(--c-accent-2); border-color: var(--c-accent-2);
}
/* 下拉（产品中心） */
.nav-menu .dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 12px 0; }
.nav-menu li:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 20px; font-size: 14px; color: var(--c-text); }
.dropdown a:hover { background: var(--c-bg-2); color: var(--c-accent); }

/* 移动端：导航横向滚动，不做汉堡（DESIGN 铁律） */
@media (max-width: 920px) {
  .nav-menu { gap: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .nav-cta .btn { padding: 10px 16px; font-size: 14px; }
  .logo-text small { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--c-primary);
  color: #fff; padding: 120px 0 110px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,31,53,.88) 15%, rgba(15,43,70,.28) 55%, rgba(20,58,94,.18)); }
.hero .container { position: relative; }
.hero h1 { color: #fff; font-size: 46px; max-width: 720px; margin-bottom: 20px; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,.85); max-width: 600px; margin-bottom: 34px; }
.hero .hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badge {
  display: inline-block; background: rgba(242,140,40,.15); border: 1px solid var(--c-accent);
  color: #ffd9a8; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 30px;
  letter-spacing: .06em; margin-bottom: 18px;
}
/* 页面头部（内页） */
.page-head { position: relative; background: var(--c-primary); color: #fff; padding: 84px 0 64px; overflow: hidden; }
.page-head .ph-bg { position: absolute; inset: 0; object-fit: cover; opacity: 1; width: 100%; height: 100%; }
.page-head .container { position: relative; }
.page-head h1 { color: #fff; font-size: 38px; }
.page-head p { color: rgba(255,255,255,.8); max-width: 640px; margin-top: 10px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { background: var(--c-bg-2); padding: 14px 0; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.breadcrumb .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--c-text-2); }
.breadcrumb a { color: var(--c-text-2); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { color: #B6C2D4; }
.breadcrumb .current { color: var(--c-primary); font-weight: 600; }

/* ---------- 统计区 ---------- */
.stats { background: var(--c-primary); padding: 64px 0; color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 44px; color: var(--c-accent); line-height: 1.1; }
.stat-num .suffix { font-size: 26px; }
.stat-label { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 6px; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card .card-img { aspect-ratio: 1/1; overflow: hidden; background: #fff; display:flex; align-items:center; justify-content:center; }
.card .card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.card .card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card .card-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--c-primary); }
.card .card-model { color: var(--c-accent); font-weight: 600; font-size: 13px; letter-spacing: .04em; margin-bottom: 8px; }
.card .card-desc { color: var(--c-text-2); font-size: 14px; flex: 1; margin-bottom: 12px; }
.card .card-link { color: var(--c-accent); font-weight: 600; font-size: 14px; }
.card .card-link:hover { color: var(--c-accent-2); }

/* 分类卡（真实产品照片风格） */
.cat-card { padding: 0 0 26px; text-align: center; overflow: hidden; }
.cat-card .cat-ico { width: 100%; height: 190px; margin: 0 0 18px; border-radius: 0; background: var(--c-bg-2); display:flex; align-items:center; justify-content:center; }
.cat-card .cat-ico img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cat-card:hover .cat-ico img { transform: scale(1.05); }
.cat-card .cat-name { font-size: 18px; font-weight: 700; color: var(--c-primary); margin-bottom: 8px; padding: 0 20px; }
.cat-card .cat-count { color: var(--c-text-2); font-size: 13px; margin-bottom: 14px; }
.cat-card .btn { padding: 10px 22px; font-size: 14px; }

/* 产品列表页分类导航（文字链接式） */
.cat-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cat-nav a {
  padding: 10px 22px; border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-primary); font-weight: 600; font-size: 14px; background: #fff;
  transition: all .2s;
}
.cat-nav a:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

/* ---------- 认证徽章 ---------- */
.certs { display: flex; gap: 20px; flex-wrap: wrap; align-items: stretch; justify-content: center; }
.cert-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 170px; padding: 18px 14px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
  border: 1px solid var(--c-border);
}
.cert-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  letter-spacing: .02em; line-height: 1.1; text-align: center;
  padding: 4px;
}
.cert-item span { font-size: 13px; color: var(--c-primary); font-weight: 600; text-align: center; }

/* ---------- CTA 横幅 ---------- */
.cta-banner { background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2)); color: #fff; padding: 64px 0; text-align: center; }
.cta-banner h2 { color: #fff; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,.92); max-width: 640px; margin: 0 auto 28px; }
.cta-banner .btn-outline { border-color: #fff; }
.cta-banner .btn-outline:hover { background: #fff; color: var(--c-accent-2); }
.cta-banner-dark { background: var(--c-primary); }
.cta-banner-dark p { color: rgba(255,255,255,.8); }

/* ---------- 流程时间线 ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.tl-step { position: relative; padding: 0 28px; text-align: center; }
.tl-step::before { counter-increment: step; content: "0" counter(step);
  display: block; width: 64px; height: 64px; line-height: 64px; margin: 0 auto 16px;
  background: var(--c-bg-2); color: var(--c-accent); border-radius: 50%;
  font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.tl-step h4 { font-size: 16px; margin-bottom: 8px; }
.tl-step p { font-size: 14px; color: var(--c-text-2); }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, 1fr); gap: 28px 0; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

/* ---------- 产品页：图库 + 详情 ---------- */
.product-layout { display: grid; grid-template-columns: 460px 1fr; gap: 48px; align-items: start; }
@media (max-width: 960px) { .product-layout { grid-template-columns: 1fr; } }
.gallery-main { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; background:#fff; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; }
.gallery-main img { width:100%; height:100%; object-fit:contain; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.gallery-thumbs .thumb { width: 88px; height: 88px; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; cursor: pointer; background:#fff; padding:0; }
.gallery-thumbs .thumb img { width:100%; height:100%; object-fit:contain; }
.gallery-thumbs .thumb.active { border-color: var(--c-accent); }

.spec-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); }
.spec-table th, .spec-table td { padding: 13px 18px; border-bottom: 1px solid var(--c-border); text-align: left; font-size: 15px; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-table th { background: var(--c-bg-2); color: var(--c-primary); font-weight: 600; width: 220px; white-space: nowrap; }

/* ---------- 表格（产品大参数表） ---------- */
.data-table { width: 100%; border-collapse: collapse; background:#fff; border: 1px solid var(--c-border); }
.data-table th, .data-table td { border: 1px solid var(--c-border); padding: 10px 12px; font-size: 14px; text-align: center; }
.data-table th { background: var(--c-primary); color: #fff; font-weight: 600; font-size: 13px; }
.data-table tr:nth-child(even) td { background: var(--c-bg-2); }

/* ---------- 正文 ---------- */
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 26px; }
.prose ul li, .prose ol li { margin-bottom: 6px; }
.prose strong { color: var(--c-primary); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; background: #fff; }
.faq-q { padding: 18px 24px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--c-primary); }
.faq-q::after { content: "+"; font-size: 22px; color: var(--c-accent); font-weight: 700; }
.faq-item.open .faq-q::after { content: "–"; }
.faq-a { display: none; padding: 0 24px 18px; color: var(--c-text-2); }
.faq-item.open .faq-a { display: block; }

/* ---------- 联系表单 ---------- */
.contact-grid { display: grid; grid-template-columns: 420px 1fr; gap: 48px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info .ci-item { display: flex; gap: 16px; margin-bottom: 26px; align-items: flex-start; }
.contact-info .ci-ico { flex: 0 0 46px; height: 46px; border-radius: 50%; background: var(--c-bg-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.contact-info h4 { font-size: 16px; margin-bottom: 4px; }
.contact-info p, .contact-info a { color: var(--c-text-2); font-size: 15px; }
.contact-info a { color: var(--c-primary); font-weight: 500; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--c-primary); }
.form-group label .req { color: var(--c-accent); }
.form-control { width: 100%; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 15px; font-family: var(--font-body); background: #fff; color: var(--c-text); }
.form-control:focus { outline: 2px solid var(--c-accent); border-color: transparent; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 13px; color: var(--c-text-2); margin-top: 10px; }
.form-success { background: #E8F5E9; color: #1B5E20; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; display: none; font-size: 15px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0A1D30; color: #B6C2D4; padding: 64px 0 0; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .f-desc { font-size: 14px; margin: 16px 0 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #B6C2D4; font-size: 14px; }
.footer-links a:hover { color: var(--c-accent); }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; align-items: flex-start; }
.footer-contact .fc-ico { color: var(--c-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: 13px; text-align: center; color: #7d8ba1; }
.footer-bottom a { color: #B6C2D4; }

/* ---------- 新闻页 ---------- */
.news-card { padding: 26px; }
.news-card .news-date { color: var(--c-accent); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.news-card h3 { font-size: 18px; }
.news-card p { color: var(--c-text-2); font-size: 14px; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 120px 0; }
.error-page .code { font-family: var(--font-head); font-size: 120px; font-weight: 800; color: var(--c-border); line-height: 1; }
.error-page h1 { margin: 10px 0 14px; }
.error-page p { color: var(--c-text-2); margin-bottom: 30px; }

/* ---------- 工具类 ---------- */
.mt-1 { margin-top: 16px; } .mt-2 { margin-top: 32px; } .mt-3 { margin-top: 48px; }
.mb-1 { margin-bottom: 16px; } .mb-2 { margin-bottom: 32px; }
.hidden { display: none; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
@media (max-width: 640px) {
  h1 { font-size: 30px; } h2 { font-size: 26px; }
  section { padding: 56px 0; }
  .hero { padding: 76px 0 66px; }
  .hero h1 { font-size: 32px; }
  .page-head { padding: 56px 0 44px; }
  .page-head h1 { font-size: 28px; }
}