/* =====================================================
   默赫家具 官网样式 — 原创品牌视觉系统
   品牌定位：上海定制楼梯源头工厂 · 木作质感 · 克制专业
   主色：胡桃深棕 #4A3428 / 辅色：暖铜金 #B08A5A
   中性：暖白 #FAF7F2 / 墨炭 #241F1A / 灰 #8A8177
   ===================================================== */
:root {
  --brand-900: #2E211A;
  --brand-800: #4A3428;
  --brand-700: #5C4433;
  --brand-500: #8A6A50;
  --brand-300: #C9A063;
  --brand-100: #EFE4D4;
  --brand-050: #FAF7F2;
  --ink-900: #241F1A;
  --ink-600: #56504A;
  --ink-400: #8A8177;
  --line: #E6DED2;
  --white: #FFFFFF;
  --danger: #B4442E;
  --radius-s: 4px;
  --radius-m: 8px;
  --shadow-1: 0 1px 3px rgba(46, 33, 26, .08);
  --shadow-2: 0 8px 28px rgba(46, 33, 26, .12);
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-900);
  background: var(--brand-050);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
h1 { font-size: 34px; line-height: 1.35; }
h2 { font-size: 28px; line-height: 1.4; }
h3 { font-size: 20px; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 32px; border: none; cursor: pointer;
  font-size: 15px; letter-spacing: .06em; border-radius: var(--radius-s);
  transition: all .25s ease; text-align: center;
}
.btn-primary { background: var(--brand-800); color: var(--brand-050); }
.btn-primary:hover { background: var(--brand-900); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand-800); border: 1px solid var(--brand-800); }
.btn-outline:hover { background: var(--brand-800); color: var(--brand-050); }
.btn-light { background: var(--brand-300); color: var(--brand-900); }
.btn-light:hover { background: #D8B078; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: baseline; gap: 10px; }
.logo-mark {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--brand-800); letter-spacing: .1em;
}
.logo-sub { font-size: 11px; color: var(--ink-400); letter-spacing: .22em; text-transform: uppercase; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 18px; font-size: 15px; color: var(--ink-600);
  border-radius: var(--radius-s); transition: all .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand-800); background: var(--brand-100); }
.main-nav .has-sub { position: relative; }
.main-nav .sub {
  position: absolute; top: 100%; left: 8px; min-width: 180px; display: none;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-s);
  box-shadow: var(--shadow-2); padding: 8px 0;
}
.main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { display: block; }
.main-nav .sub a { padding: 9px 18px; font-size: 14px; }
.header-phone { display: flex; align-items: center; gap: 8px; color: var(--brand-800); font-weight: 600; font-size: 17px; }
.header-phone .ico { width: 18px; height: 18px; fill: var(--brand-800); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--brand-800); margin: 5px 0; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 13px; color: var(--ink-400); }
.breadcrumb a { color: var(--ink-400); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb .sep { margin: 0 8px; color: var(--line); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: center;
  background:
    linear-gradient(105deg, rgba(46,33,26,.94) 0%, rgba(74,52,40,.88) 45%, rgba(92,68,51,.72) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 90px),
    linear-gradient(#3A2B20, #4A3428);
  color: var(--brand-050); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -140px; bottom: -140px; width: 480px; height: 480px;
  border: 1px solid rgba(201,160,99,.25); border-radius: 50%; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 300px; height: 300px;
  border: 1px solid rgba(201,160,99,.18); border-radius: 50%; pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: var(--container); margin: 0 auto; padding: 90px 24px; width: 100%; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .3em;
  color: var(--brand-300); margin-bottom: 22px;
}
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--brand-300); }
.hero h1 { font-size: 44px; margin-bottom: 18px; color: var(--white); }
.hero .hero-desc { max-width: 560px; font-size: 17px; color: rgba(250,247,242,.82); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-contact {
  display: flex; gap: 36px; flex-wrap: wrap; padding-top: 24px;
  border-top: 1px solid rgba(201,160,99,.22); font-size: 14px; color: rgba(250,247,242,.75);
}
.hero-contact strong { color: var(--brand-300); font-size: 20px; font-weight: 700; display: block; }
.hero-contact a strong { color: var(--brand-300); }

/* ---------- 区块通用 ---------- */
.section { padding: 78px 0; }
.section.alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .kicker {
  font-size: 12px; letter-spacing: .28em; color: var(--brand-500);
  text-transform: uppercase; margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--ink-400); max-width: 640px; margin: 0 auto; }
.section-head.left { text-align: left; }
.section-head.left p { margin-left: 0; }

/* ---------- 卡片 ---------- */
.card-grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  overflow: hidden; transition: all .28s ease; display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--brand-300); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-100); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 18px; margin-bottom: 10px; }
.card-body h3 a:hover { color: var(--brand-500); }
.card-body p { font-size: 14px; color: var(--ink-600); flex: 1; }
.card-meta { margin-top: 14px; font-size: 12px; color: var(--ink-400); }
.card-tag {
  display: inline-block; font-size: 12px; color: var(--brand-700);
  background: var(--brand-100); padding: 2px 10px; border-radius: 2px; margin-bottom: 10px;
}

/* 数字优势块 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat {
  text-align: center; padding: 34px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-m);
}
.stat .num { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--brand-800); }
.stat .num small { font-size: 16px; }
.stat .label { font-size: 14px; color: var(--ink-400); margin-top: 6px; }

/* 步骤流程 */
.step-list { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding: 26px 22px; background: var(--brand-050); border: 1px solid var(--line); border-radius: var(--radius-m); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--brand-300);
  display: block; margin-bottom: 10px;
}
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--ink-600); }

/* 资质徽章 */
.cert-badge {
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
  padding: 26px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.cert-badge .name { font-size: 14px; font-weight: 600; color: var(--brand-800); }
.cert-badge .meta { font-size: 12px; color: var(--ink-400); }

/* 富文本正文 */
.rich-text { font-size: 16px; color: var(--ink-600); }
.rich-text p { margin-bottom: 1.2em; }
.rich-text h2, .rich-text h3 { color: var(--ink-900); margin: 1.6em 0 .8em; }
.rich-text img { border-radius: var(--radius-m); margin: 1em 0; }
.rich-text ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1.2em; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.rich-text th { background: var(--brand-100); }

/* 参数表 */
.param-table { width: 100%; border-collapse: collapse; background: var(--white); }
.param-table th, .param-table td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; font-size: 14px; }
.param-table th { width: 160px; background: var(--brand-100); color: var(--brand-800); }

/* 详情页布局 */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.detail-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.side-card h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-300); }
.side-card ul li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.side-card ul li:last-child { border-bottom: none; }
.side-card ul a:hover { color: var(--brand-500); }

/* 图集 */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.gallery-grid .ph { aspect-ratio: 4/3; background: var(--brand-100); border-radius: var(--radius-s); overflow: hidden; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

/* 无图占位 */
.no-image {
  width: 100%; height: 100%; min-height: 180px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-050) 100%);
  color: var(--brand-500); font-size: 13px; letter-spacing: .2em;
}
.no-image::before { content: "◦ " attr(data-label); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 14px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ink-900);
  list-style: none; position: relative; padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--brand-500);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--ink-600); font-size: 15px; }
.faq-cat-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.faq-cat-bar a {
  padding: 7px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink-600); background: var(--white);
}
.faq-cat-bar a.active, .faq-cat-bar a:hover { border-color: var(--brand-800); color: var(--brand-800); background: var(--brand-100); }

/* ---------- 新闻列表 ---------- */
.news-row {
  display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.news-row .date {
  flex: 0 0 74px; text-align: center; font-family: var(--font-display);
  border-right: 1px solid var(--line); padding-right: 20px;
}
.news-row .date .d { font-size: 30px; font-weight: 700; color: var(--brand-800); display: block; line-height: 1.1; }
.news-row .date .ym { font-size: 12px; color: var(--ink-400); }
.news-row h3 { font-size: 18px; margin-bottom: 6px; }
.news-row h3 a:hover { color: var(--brand-500); }
.news-row p { font-size: 14px; color: var(--ink-400); }
.news-row .pin { color: var(--danger); font-size: 12px; margin-right: 6px; }

/* ---------- 表单 ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 34px; max-width: 680px; margin: 0 auto; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--ink-900); }
.form-field label .req { color: var(--danger); margin-left: 2px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 15px; font-family: inherit; background: var(--brand-050); transition: border .2s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--brand-500); background: var(--white); }
.form-field .tip { font-size: 12px; color: var(--ink-400); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-msg { display: none; padding: 12px 16px; border-radius: var(--radius-s); font-size: 14px; margin-bottom: 18px; }
.form-msg.ok { display: block; background: #EDF5EC; color: #3D6B36; border: 1px solid #CBE2C8; }
.form-msg.err { display: block; background: #F9ECE8; color: var(--danger); border: 1px solid #E8C5BB; }

/* ---------- 联系页信息块 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 46px; }
.contact-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px; }
.contact-item .label { font-size: 13px; color: var(--ink-400); margin-bottom: 10px; letter-spacing: .1em; }
.contact-item .value { font-size: 17px; font-weight: 600; color: var(--brand-800); word-break: break-all; }
.contact-item .value a:hover { color: var(--brand-500); }
.copy-btn { margin-top: 12px; font-size: 12px; color: var(--brand-500); background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 4px 12px; cursor: pointer; }
.copy-btn:hover { border-color: var(--brand-500); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--brand-900); color: rgba(250,247,242,.72); margin-top: 40px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding: 60px 0 44px; }
.footer-main h4 { color: var(--brand-050); font-size: 15px; margin-bottom: 16px; letter-spacing: .06em; }
.footer-main li { margin-bottom: 9px; font-size: 13.5px; }
.footer-main a:hover { color: var(--brand-300); }
.footer-brand .logo-mark { color: var(--brand-300); }
.footer-contact li strong { color: var(--brand-300); }
.footer-bottom {
  border-top: 1px solid rgba(250,247,242,.12); padding: 20px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: rgba(250,247,242,.45);
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--brand-300); }

/* ---------- 悬浮按钮 ---------- */
.float-bar {
  position: fixed; right: 22px; bottom: 90px; z-index: 90; display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand-800); color: var(--brand-050); box-shadow: var(--shadow-2);
  transition: all .25s; border: none; cursor: pointer; position: relative;
}
.float-btn:hover { background: var(--brand-700); transform: translateY(-2px); }
.float-btn svg { width: 22px; height: 22px; fill: currentColor; }
.float-btn .float-label {
  position: absolute; right: 62px; top: 50%; transform: translateY(-50%);
  background: var(--brand-900); color: var(--brand-050); font-size: 13px; white-space: nowrap;
  padding: 6px 14px; border-radius: var(--radius-s); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.float-btn:hover .float-label { opacity: 1; }
.float-top { background: var(--white); color: var(--brand-800); border: 1px solid var(--line); }
.float-top:hover { background: var(--brand-100); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 14px; background: var(--white);
}
.pagination .current { background: var(--brand-800); color: var(--white); border-color: var(--brand-800); }
.pagination a:hover { border-color: var(--brand-800); color: var(--brand-800); }

/* ---------- 移动端 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 26px; }
  .hero h1 { font-size: 30px; }
  .section { padding: 52px 0; }
  .main-nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 0 18px;
    box-shadow: var(--shadow-2);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav .sub { position: static; display: block; box-shadow: none; border: none; padding-left: 20px; }
  .nav-toggle { display: block; }
  .header-phone .num { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .hero { min-height: 480px; }
  .hero-inner { padding: 60px 24px; }
  .hero-contact { gap: 20px; }
  .news-row .date { flex-basis: 60px; }
}
