/* ===========================================================
   板材外贸官网 · 公共样式
   =========================================================== */
:root {
  --ink: #1c1a17;
  --ink-2: #3d3833;
  --muted: #7b7267;
  --line: #e7e0d6;
  --bg: #faf7f2;
  --bg-2: #f2ece3;
  --white: #fff;
  --brand: #8b5e34;
  --brand-dark: #5f3d1f;
  --gold: #c1975c;
  --radius: 10px;
  --shadow: 0 6px 22px rgba(28, 26, 23, 0.08);
  --shadow-hover: 0 14px 34px rgba(28, 26, 23, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(28, 26, 23, 0.96);
  backdrop-filter: blur(6px);
  color: #fff;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--brand));
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px;
  letter-spacing: -0.5px;
}
.logo-text strong { display: block; font-size: 16px; letter-spacing: 0.5px; }
.logo-text span { display: block; font-size: 11px; color: #b9b0a4; letter-spacing: 1px; }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: 14px; color: #e6e0d6; padding: 6px 0; border-bottom: 2px solid transparent; transition: 0.25s; }
.nav a:hover, .nav a.active { color: #fff; border-color: var(--gold); }

.header-cta {
  font-size: 13px; padding: 8px 16px; border-radius: 999px;
  background: var(--gold); color: #2a2118; font-weight: 600; transition: 0.25s;
}
.header-cta:hover { background: #d5ad74; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 460px; display: flex; align-items: center; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(24, 20, 15, 0.88) 0%, rgba(24, 20, 15, 0.55) 55%, rgba(24, 20, 15, 0.25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 80px 20px; max-width: 1200px; margin: 0 auto; width: 100%; color: #fff; }
.hero-tag {
  display: inline-block; font-size: 12px; letter-spacing: 2px; padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.25; font-weight: 700; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin-top: 16px; max-width: 620px; color: #e9e3d9; font-size: 15px; }
.hero-btns { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Hero 轮播 */
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slider { touch-action: pan-y; }
.hero-prev, .hero-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 22px; line-height: 1;
  display: grid; place-items: center; transition: .2s;
}
.hero-prev:hover, .hero-next:hover { background: rgba(0,0,0,.55); }
.hero-prev { left: 18px; } .hero-next { right: 18px; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; }
.hero-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: .2s; }
.hero-dots span.on { background: var(--gold); width: 22px; border-radius: 5px; }

/* 汉堡按钮（仅手机显示） */
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(28,26,23,.98); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 15px; }
  .header { position: relative; }
  .header-inner { flex-wrap: nowrap; }
  .logo-text span { display: none; }
}

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 6px; font-size: 14px; font-weight: 600;
  transition: 0.25s; border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: #2a2118; }
.btn-primary:hover { background: #d9b279; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

.stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.stats div strong { font-size: 30px; color: var(--gold); font-family: Georgia, serif; }
.stats div span { display: block; font-size: 12px; color: #cfc7bb; }

/* ---------- 区块通用 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-2); }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: 28px; letter-spacing: 1px; position: relative; display: inline-block; padding-bottom: 14px; }
.sec-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 46px; height: 3px; background: var(--gold); border-radius: 2px;
}
.sec-head p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.sec-head .en { font-size: 12px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }

/* ---------- 优势卡片 ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.adv-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; transition: 0.3s;
}
.adv-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.adv-ico {
  width: 44px; height: 44px; border-radius: 10px; background: rgba(139, 94, 52, 0.1);
  display: grid; place-items: center; margin-bottom: 14px;
}
.adv-ico svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 1.6; }
.adv-card h3 { font-size: 16px; margin-bottom: 8px; }
.adv-card p { font-size: 13.5px; color: var(--muted); }

/* ---------- 产品筛选 ---------- */
.filter { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.filter button {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); font-size: 13px; color: var(--ink-2); cursor: pointer; transition: 0.25s;
  font-family: inherit;
}
.filter button:hover { border-color: var(--brand); color: var(--brand); }
.filter button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.product-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: 0.3s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover .thumb img { transform: scale(1.05); }
.tag {
  position: absolute; left: 12px; top: 12px; background: rgba(28, 26, 23, 0.78); color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 4px; letter-spacing: 0.5px;
}
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 15.5px; color: var(--ink); margin-bottom: 2px; }
.card-body .en { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.spec-line { font-size: 12.5px; color: var(--ink-2); margin: 3px 0; display: flex; gap: 6px; }
.spec-line b { font-weight: 600; color: var(--muted); min-width: 42px; }
.card-body .more {
  margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--brand); font-weight: 600;
}

/* ---------- 关于我们 ---------- */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.about p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 14px; }
.about-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 18px; }
.about-list li { font-size: 13.5px; color: var(--ink-2); padding-left: 18px; position: relative; }
.about-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
}
.about-visual { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- 联系 / 表单 ---------- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; }
.contact-info li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.contact-info li b { color: var(--muted); font-weight: 600; min-width: 62px; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff; transition: 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139, 94, 52, 0.1);
}
.field textarea { resize: vertical; min-height: 96px; }
.form button { width: 100%; border: none; cursor: pointer; font-family: inherit; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }

/* ---------- 页脚 ---------- */
.footer { background: #1c1a17; color: #cfc7bb; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; letter-spacing: 1px; }
.footer p, .footer li { font-size: 13px; margin: 6px 0; }
.footer a:hover { color: var(--gold); }
.footer .logo-text strong { color: #fff; }
.footer-bottom {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 12.5px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 产品详情 ---------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px 0 56px; }
.gallery-main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.gallery-thumbs div {
  width: 92px; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; cursor: pointer; background: var(--bg-2);
}
.gallery-thumbs div.on { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-info h1 { font-size: 26px; line-height: 1.35; }
.detail-info .en { font-size: 13px; color: var(--muted); margin-bottom: 14px; letter-spacing: 0.5px; }
.detail-info .summary { font-size: 14px; color: var(--ink-2); padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.key-param { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 18px 0; }
.key-param div { font-size: 13.5px; }
.key-param span { color: var(--muted); }
.detail-btns { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.detail-btns .btn { flex: 1; min-width: 140px; text-align: center; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
  padding: 10px 20px; background: none; border: none; border-bottom: 2px solid transparent;
  font-family: inherit; font-size: 14px; color: var(--muted); cursor: pointer; transition: 0.2s;
}
.tabs button.active { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.panel { display: none; }
.panel.active { display: block; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.spec-table th { background: var(--bg-2); width: 160px; color: var(--ink-2); font-weight: 600; }
.feature-list li { padding: 8px 0 8px 22px; position: relative; font-size: 14px; color: var(--ink-2); }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { font-size: 12.5px; padding: 5px 12px; background: var(--bg-2); border-radius: 999px; color: var(--ink-2); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* ---------- 空状态 / 加载 ---------- */
.loading, .empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }

/* ---------- 响应式 ---------- */
html { scrollbar-gutter: stable; }
@media (max-width: 960px) {
  .about, .contact, .detail { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
  .nav { gap: 16px; }
  .wrap { padding: 0 16px; }
  .hero-inner { padding: 60px 16px; }
}
@media (max-width: 640px) {
  .header-inner { gap: 12px; padding: 12px 16px; }
  .header-cta { display: none; }
  .stats { gap: 20px; }
  .stats div strong { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row, .key-param, .about-list { grid-template-columns: 1fr; }
  .hero { min-height: 420px; }
  .hero h1 { font-size: 24px; line-height: 1.3; }
  .hero p { font-size: 13px; margin-top: 10px; }
  .hero-tag { font-size: 11px; }
  .hero-inner { padding: 56px 18px; }
  .hero-btns { margin-top: 20px; }
  .hero-btns .btn { padding: 10px 18px; font-size: 13px; }
  .hero-prev, .hero-next { width: 34px; height: 34px; font-size: 18px; }
  .section { padding: 48px 0; }
  .sec-head h2 { font-size: 22px; }
  .detail-btns .btn { min-width: 100%; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 21px; }
  .adv-grid, .product-grid, .related-grid, .media-grid, .cert-grid { grid-template-columns: 1fr; }
}
