/* ============================================================
   Tank Workshop Model — 全站样式
   ============================================================ */

:root {
  --bg: #f5f3ed;
  --surface: #ffffff;
  --ink: #22262b;
  --muted: #66707c;
  --line: #e2ddd0;
  --dark: #1f2420;
  --dark-2: #2a302a;
  --accent: #8a7444;
  --accent-dark: #6d5a33;
  --soldout: #a8432e;
  --instock: #3e6b47;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .06);
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* logo 原图为纯黑，深色背景上反转为白色 */
.logo, .footer-logo { filter: brightness(0) invert(1); }
.logo { height: 46px; width: auto; }

.main-nav { display: flex; gap: 34px; align-items: center; }

.main-nav a {
  color: #d8dcd4;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: #fff; }
.main-nav a.active { color: #fff; border-bottom-color: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: .2s;
}

/* ---------- 首页 Hero ---------- */
.hero { position: relative; background: var(--dark); }
.hero img.hero-img { width: 100%; height: 68vh; min-height: 420px; object-fit: cover; opacity: .92; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(22, 26, 22, .35), rgba(22, 26, 22, .72));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-content { padding: 0 20px; color: #fff; }
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #d9c48f;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero-tagline {
  font-size: 18px;
  color: #e6e8e2;
  max-width: 560px;
  margin: 0 auto 30px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
  border: 0;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #0e110e; color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .65); }
.btn-outline:hover { border-color: #fff; color: #fff; }

/* ---------- 版块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); }

/* ---------- 产品卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0, 0, 0, .1); color: inherit; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eae6da; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  border-radius: 3px;
}
.badge-instock { background: rgba(62, 107, 71, .94); }
.badge-soldout { background: rgba(168, 67, 46, .94); }

.card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.card-meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.card-title { font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 14px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 19px; font-weight: 700; color: var(--ink); }
.card-link { font-size: 13px; font-weight: 600; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- 内页页头 ---------- */
.page-hero {
  background: var(--dark);
  padding: 64px 0;
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-hero p { color: #c9cec4; margin-top: 10px; }

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-dark); }

/* ---------- 产品详情 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.gallery-main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eae6da;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 78px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #eae6da;
}
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-info h1 { font-size: 28px; line-height: 1.3; margin-bottom: 10px; }
.detail-meta { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.detail-price-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.detail-price { font-size: 30px; font-weight: 700; }
.status-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.status-pill.in-stock { background: #e4efe6; color: var(--instock); }
.status-pill.sold-out { background: #f6e6e1; color: var(--soldout); }

.detail-desc { margin-bottom: 22px; }
.detail-desc li { margin-left: 20px; margin-bottom: 6px; }

.specs-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.specs-table td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.specs-table td:first-child { color: var(--muted); width: 40%; }

.note-box {
  background: #f0ede3;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  font-size: 13.5px;
  color: #55503f;
  margin-top: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- 关于页 / 图文区 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.steps { counter-reset: step; display: grid; gap: 20px; margin-top: 28px; }
.step {
  counter-increment: step;
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.step::before {
  content: counter(step);
  flex: 0 0 40px;
  height: 40px;
  background: var(--dark);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- 联系页 ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.channel-list { display: grid; gap: 14px; }
.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.channel-icon {
  flex: 0 0 40px;
  height: 40px;
  background: var(--dark);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.channel-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.channel-value { font-weight: 600; word-break: break-all; }
.channel-note { font-size: 12.5px; color: var(--muted); }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.social-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 表单 ---------- */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-panel h2 { font-size: 22px; margin-bottom: 6px; }
.form-panel .form-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #4a5056; margin-bottom: 6px; }
.field label .req { color: var(--soldout); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc9ba;
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 116, 68, .15);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.form-msg { display: none; padding: 14px 16px; border-radius: var(--radius); font-size: 14.5px; margin-bottom: 18px; }
.form-msg.ok { display: block; background: #e4efe6; color: #2c5533; border: 1px solid #bcd6c2; }
.form-msg.err { display: block; background: #f6e6e1; color: #8c3a28; border: 1px solid #e5b9ab; }
.field-error { color: var(--soldout); font-size: 13px; margin-top: 4px; display: none; }

/* ---------- CTA 横带 ---------- */
.cta-band { background: var(--dark); color: #fff; text-align: center; }
.cta-band h2 { font-size: 28px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.cta-band p { color: #c9cec4; max-width: 540px; margin: 0 auto 24px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--dark-2); color: #b9beb4; padding: 56px 0 28px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 14px; }
.site-footer a { color: #b9beb4; }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 8px; }
.footer-logo { height: 40px; width: auto; margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #8d938a;
}

/* ---------- 404 / 兜底 ---------- */
.notfound { text-align: center; padding: 100px 20px; }
.notfound h1 { font-size: 80px; color: var(--accent); line-height: 1; }
.notfound p { color: var(--muted); margin: 16px 0 26px; }
.render-fallback {
  background: #f6e6e1;
  color: #8c3a28;
  border: 1px solid #e5b9ab;
  border-radius: var(--radius);
  padding: 16px;
  margin: 20px 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .split, .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav-toggle { display: block; }
  .section { padding: 52px 0; }
  .hero img.hero-img { height: 56vh; }
  .form-panel { padding: 22px; }
}
