/* ============================================================
   板式定制家具网站 - 公共样式
   所有文字图片都可通过 admin.html 编辑
   ============================================================ */

:root {
  --primary: #D97B2D;          /* 橙色 */
  --primary-dark: #6B5235;
  --accent: #D97B2D;           /* 橙色 */
  --text: #2A2522;
  --text-muted: #6E6660;
  --bg: #FFF8EE;
  --bg-card: #FFF8EE;
  --border: #E8E2D8;
  --shadow: 0 2px 12px rgba(60, 40, 20, 0.06);
  --shadow-lg: 0 8px 32px rgba(60, 40, 20, 0.12);
  --radius: 8px;
  --container: 1200px;
  --font-zh: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-zh);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

body[data-lang="en"] { font-family: var(--font-en); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 238, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}
.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.brand-logo-light {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav a {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: #D97B2D; }
.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all .2s;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }
.cta-btn {
  padding: 10px 22px;
  background: #D97B2D;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.cta-btn:hover { background: #fff; color: #000; }

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(rgba(40, 30, 20, 0.55), rgba(40, 30, 20, 0.55)),
              url('https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?auto=format&fit=crop&w=1600&q=80') center/cover;
}
.hero .container { padding: 96px 24px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  max-width: 760px;
  margin-bottom: 24px;
}
.hero p {
  font-size: clamp(15px, 2vw, 18px);
  max-width: 640px;
  opacity: 0.92;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all .2s;
}
.btn-primary { background: #D97B2D; color: #fff; }
.btn-primary:hover { background: #fff; color: #000; transform: translateY(-1px); }
.btn-outline {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); }

/* ========== Sections ========== */
section { padding: 80px 0; }
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.section-head p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 16px;
}

/* ========== Stats ========== */
.stats {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: -60px;
  position: relative;
  z-index: 5;
  overflow: hidden;
}
.stats .item {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stats .item:last-child { border-right: none; }
.stats .num {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stats .label { font-size: 13px; color: var(--text-muted); }

/* ========== Grid / Cards ========== */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  aspect-ratio: 4/3;
  background: #ddd center/cover;
  position: relative;
  overflow: hidden;
}
.card-body { padding: 24px; }
.card-body h3 { font-size: 18px; margin-bottom: 8px; }
.card-body p { color: var(--text-muted); font-size: 14px; }

.product-card .card-img { aspect-ratio: 1/1; }
.product-card .card-body { padding: 20px; }
.product-card h3 { font-size: 17px; }

/* ========== Advantages ========== */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.adv-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: all .25s;
}
.adv-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.adv-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(139, 111, 71, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.adv-item h4 { font-size: 16px; margin-bottom: 8px; }
.adv-item p { color: var(--text-muted); font-size: 14px; }

/* ========== Process ========== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  counter-reset: step;
}
.process-item {
  text-align: center;
  position: relative;
  padding: 24px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.process-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.process-item h5 { font-size: 14px; margin: 8px 0 6px; }
.process-item p { font-size: 12px; color: var(--text-muted); }

/* ========== Contact Form ========== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info { padding: 8px; }
.contact-info h3 { font-size: 22px; margin-bottom: 16px; }
.contact-info p { color: var(--text-muted); margin-bottom: 28px; }
.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.contact-list .ic {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(139, 111, 71, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-list .label { color: var(--text-muted); font-size: 12px; }
.contact-list .val { font-weight: 500; }
.contact-form {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--bg);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.form-submit { width: 100%; padding: 14px; margin-top: 8px; }

/* ========== Footer ========== */
.site-footer {
  background: #1F1B17;
  color: #BFB8AE;
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h5 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
}
.footer-grid p { font-size: 14px; line-height: 1.8; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { padding: 4px 0; font-size: 14px; }
.footer-grid ul li a:hover { color: #fff; }
.copyright {
  border-top: 1px solid #3A332B;
  padding-top: 24px;
  font-size: 12px;
  text-align: center;
  color: #857F76;
}

/* ========== Floating WhatsApp ========== */
.float-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform .2s;
}
.float-wa:hover { transform: scale(1.05); }

/* ========== Edit Mode ========== */
body.edit-mode [data-editable] {
  outline: 1px dashed rgba(139, 111, 71, 0.4);
  outline-offset: 4px;
  cursor: text;
  transition: outline-color .2s;
}
body.edit-mode [data-editable]:hover { outline-color: var(--primary); }
body.edit-mode [data-editable]:focus {
  outline: 2px solid var(--primary);
  background: rgba(255, 240, 200, 0.3);
}
body.edit-mode img[data-editable] {
  outline: 2px dashed rgba(139, 111, 71, 0.5);
  outline-offset: 2px;
  cursor: pointer;
}
body.edit-mode .img-replace {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(40, 30, 20, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  display: none;
}
body.edit-mode .card-img:hover .img-replace,
body.edit-mode .hero:hover .img-replace { display: inline-flex; }

#edit-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  padding: 10px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
body.edit-mode #edit-bar { display: flex; }
#edit-bar button {
  background: rgba(255,255,255,0.18);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background .2s;
}
#edit-bar button:hover { background: rgba(255,255,255,0.3); }
#edit-bar button.primary { background: #fff; color: var(--primary); font-weight: 600; }
#edit-bar .spacer { flex: 1; }
#edit-bar .badge { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 999px; font-size: 11px; }

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .nav { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .stats .item { border-right: none; border-bottom: 1px solid var(--border); }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}