/* ============================================================
   B2B Factory Website — Starter Template
   Customize brand tokens, copy and images. No framework needed.
   ============================================================ */

:root {
  /* Brand */
  --brand-900: #2c1e17;
  --brand-700: #5a4234;
  --brand-600: #6f5340;
  --brand-500: #8a6b4f;
  /* Neutrals */
  --ink: #1f2428;
  --ink-soft: #5b636a;
  --line: #e6e3de;
  --bg: #ffffff;
  --bg-alt: #f7f5f1;
  --bg-dark: #2c1e17;
  /* Semantic */
  --cta: #1f3a5f;
  --cta-hover: #17304f;
  --success: #2e7d4f;
  --white: #ffffff;
  /* Shape */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(31, 36, 40, 0.08);
  --shadow-sm: 0 4px 14px rgba(31, 36, 40, 0.06);
  --container: 1200px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cta); text-decoration: none; }
a:hover { color: var(--cta-hover); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--brand-900); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #e9e3dd; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-500);
  margin-bottom: 12px;
}
.lead { font-size: 1.12rem; color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.98rem; cursor: pointer;
  border: 1.5px solid transparent; transition: all .2s ease;
  text-align: center; white-space: nowrap;
}
.btn--primary { background: var(--cta); color: #fff; }
.btn--primary:hover { background: var(--cta-hover); color: #fff; }
.btn--light { background: var(--brand-600); color: #fff; }
.btn--light:hover { background: var(--brand-700); color: #fff; }
.btn--outline { background: transparent; color: var(--cta); border-color: var(--cta); }
.btn--outline:hover { background: var(--cta); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-700); padding-left: 4px; padding-right: 4px; }
.btn--ghost:hover { color: var(--cta); }
.btn--block { width: 100%; }
.btn--lg { min-height: 54px; padding: 15px 34px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { font-size: 1.3rem; font-weight: 800; color: var(--brand-900); letter-spacing: -.02em; }
.logo span { color: var(--brand-500); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-600); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; height: 2px; width: 22px; background: var(--brand-900);
  margin: 0 auto; position: relative; transition: all .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open span::after { transform: rotate(-45deg); top: 0; }

/* Hero */
.hero {
  position: relative; color: #fff;
  /* 替换主图：用同名文件覆盖 images/hero-workshop.jpg（建议 1920×1080），无需改代码 */
  background: linear-gradient(rgba(30,22,17,.62), rgba(30,22,17,.62)),
    url('../images/hero-workshop.jpg');
  background-size: cover; background-position: center;
  padding: 120px 0 130px;
}
.hero-inner { max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { font-size: 1.15rem; color: #efe9e2; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 0.9rem; color: #e3dbd2; }
.hero-badges li::before { content: "✓ "; color: #d8b98c; font-weight: 700; }
.page-hero { padding: 72px 0 60px; background: var(--brand-900); color: #fff; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #e3dbd2; max-width: 680px; }

/* Stats */
.stats { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 40px 0; }
.stat { text-align: center; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--brand-600); line-height: 1; }
.stat .label { margin-top: 8px; color: var(--ink-soft); font-size: 0.95rem; }

/* Generic grids */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Category / product cards */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.12rem; margin: 0; }
.card-body .meta { color: var(--ink-soft); font-size: 0.9rem; }
.card-body .btn { margin-top: auto; }

/* Feature tiles */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature .ico { width: 48px; height: 48px; border-radius: 10px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--brand-600); }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Process steps */
.process { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
.process-step { position: relative; padding: 24px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.process-step .step-no { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-600);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.process-step h3 { font-size: 1.02rem; }
.process-step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.process-step .time { display: inline-block; margin-top: 10px; font-size: .82rem; color: var(--brand-500); font-weight: 600; }

/* Logo wall */
.logo-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.logo-wall .logo-item {
  height: 64px; min-width: 140px; padding: 0 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-soft);
  font-weight: 700; filter: grayscale(1); opacity: .7; transition: all .2s; background: #fff;
}
.logo-wall .logo-item:hover { filter: none; opacity: 1; color: var(--brand-700); }
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert { aspect-ratio:3/4; border:1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; display:flex; align-items:center; justify-content:center; color: var(--ink-soft);
  font-size:.85rem; text-align:center; padding:10px; cursor: pointer; }

/* Video block */
.video-block { position: relative; max-width: 960px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-block video, .video-block img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.video-block .play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 26px rgba(0,0,0,.35); pointer-events: none; transition: transform .25s;
}
.video-block:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); }
.video-block .play-btn::before {
  content: ""; border-style: solid; border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--brand-700); margin-left: 6px;
}
@media (max-width: 600px) { .video-block .play-btn { width: 60px; height: 60px; } }

/* Two column content */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  background: var(--brand-600); color: #fff; border-radius: 50%; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field label .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(138,107,79,.15);
}
.form-note { font-size: .82rem; color: var(--ink-soft); }
.form-success { display: none; padding: 28px; text-align: center; background: #eef7f0; border: 1px solid #cfe6d7; border-radius: var(--radius); color: var(--success); }
.form-success.show { display: block; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-item .ico { color: var(--brand-600); flex: 0 0 24px; }
.map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); }

/* Filter (products) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-btn { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; font-size: .92rem; color: var(--ink-soft); }
.filter-btn.active, .filter-btn:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* Detail gallery */
.gallery { display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumbs img { border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--brand-600); }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.gallery-main img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Tables / specs */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 38%; color: var(--ink-soft); font-weight: 600; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff; }
.faq-item summary { padding: 18px 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--brand-500); }
.faq-item[open] summary::after { content: "–"; }
.faq-item .answer { padding: 0 20px 18px; color: var(--ink-soft); }

/* Breadcrumb */
.breadcrumb { font-size: .88rem; color: #cdbfb2; padding: 18px 0 0; }
.breadcrumb a { color: #e3d7c9; }
.breadcrumb span { color: #fff; }

/* Timeline */
.timeline { border-left: 2px solid var(--line); margin-left: 10px; padding-left: 28px; }
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item::before { content: ""; position: absolute; left: -35px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-600); }
.timeline-year { font-weight: 700; color: var(--brand-600); }

/* CTA banner */
.cta-banner { background: linear-gradient(135deg, var(--brand-700), var(--brand-900)); color: #fff; border-radius: var(--radius); padding: 48px; text-align: center; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #e8ded4; }

/* Footer */
.site-footer { background: var(--bg-dark); color: #c8bdb2; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #c8bdb2; display: block; padding: 4px 0; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-logo { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Placeholder (replace with real images) */
.ph { display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #ece6de, #ddd3c7); color: #8a7a68; font-size: .85rem;
  padding: 20px; width: 100%; height: 100%; }

/* Responsive */
@media (max-width: 960px) {
  .grid-4, .process { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 24px 24px;
    border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-cta .btn { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 80px 0 90px; }
  .grid-2, .grid-3, .grid-4, .process { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .gallery-thumbs { flex-direction: row; overflow-x: auto; }
  .cta-banner { padding: 32px 22px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
