/* ============================================================
   思淼cms 前台 · 栖木家居 样式
   版权所有（C）2026 王庆华
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f4eee5;
  --surface-3: #ece3d6;
  --text: #2c2620;
  --text-2: #6f655a;
  --text-3: #9a8f80;
  --border: #e7ddcf;
  --primary: #9c6b3f;
  --primary-2: #c89b6f;
  --primary-soft: rgba(156, 107, 63, 0.10);
  --accent: #7c8b6e;
  --danger: #b4543f;
  --shadow-sm: 0 2px 10px rgba(60, 45, 30, 0.06);
  --shadow: 0 14px 40px rgba(60, 45, 30, 0.10);
  --shadow-lg: 0 28px 70px rgba(60, 45, 30, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

[data-theme="dark"] {
  --bg: #191512;
  --surface: #221d18;
  --surface-2: #2b251f;
  --surface-3: #352d25;
  --text: #f3ece2;
  --text-2: #bcae9d;
  --text-3: #8a7d6c;
  --border: #382f27;
  --primary: #d2a877;
  --primary-2: #9c6b3f;
  --primary-soft: rgba(210, 168, 119, 0.12);
  --accent: #9fb08f;
  --danger: #d98a73;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--text); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .3s var(--ease);
  font-family: var(--sans);
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: all .35s var(--ease);
  background: transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--primary); }
.brand-logo { height: 38px; width: auto; }
.site-nav { display: flex; gap: 30px; }
.nav-link {
  position: relative; font-size: 15px; color: var(--text-2); padding: 6px 0;
  transition: color .25s var(--ease);
}
.site-header:not(.scrolled) .nav-link { color: rgba(255,255,255,0.92); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--primary); transition: width .3s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--primary); }
.site-header:not(.scrolled) .nav-link.is-active,
.site-header:not(.scrolled) .nav-link:hover { color: #fff; }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--primary);
}
.site-header:not(.scrolled) .header-phone { color: #fff; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center;
  transition: all .3s var(--ease);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); transform: rotate(15deg); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.site-header:not(.scrolled) .nav-burger span { background: #fff; }
.mobile-nav { display: none; flex-direction: column; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 24px 20px; }
.mobile-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 16px; }
.mobile-nav .mobile-cta { margin-top: 12px; background: var(--primary); color: #fff; text-align: center; border-radius: 999px; border: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.42)); }
.hero-inner { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 24px; max-width: 820px; }
.hero h1 { color: #fff; font-size: clamp(34px, 6vw, 68px); font-weight: 600; letter-spacing: 2px; margin: 0 0 18px; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.hero p { font-size: clamp(16px, 2vw, 21px); font-weight: 300; color: rgba(255,255,255,.92); margin: 0 0 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; color: rgba(255,255,255,.8); font-size: 13px; letter-spacing: 2px; }

/* ---------- 通用区块 ---------- */
.section { padding: 92px 0; }
.section-tight { padding: 64px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 14px; }
.section-head p { color: var(--text-2); font-size: 16px; margin: 0; }
.section-foot { text-align: center; margin-top: 44px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 28px; }
.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(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.card-body { padding: 20px 22px 24px; }
.card-cat { font-size: 12px; color: var(--primary); letter-spacing: 1px; font-weight: 600; }
.card-title { font-size: 18px; margin: 6px 0 8px; font-family: var(--serif); }
.card-sub { color: var(--text-2); font-size: 14px; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-weight: 700; color: var(--text); font-family: var(--serif); font-size: 17px; }
.card-more { font-size: 13px; color: var(--primary); font-weight: 600; }
.card-link { position: absolute; inset: 0; z-index: 1; }

/* ---------- 栏目分类导航 ---------- */
.cat-nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.cat-chip { padding: 9px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; transition: all .25s var(--ease); }
.cat-chip:hover, .cat-chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 关于/品牌 ---------- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 18px; }
.about-text p { color: var(--text-2); margin: 0 0 16px; }
.stat-row { display: flex; gap: 30px; margin-top: 28px; }
.stat .num { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--text-2); }

/* ---------- 咨询/联系专用布局 ---------- */
.consultation-layout { display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: start; }
.consultation-layout .lead { min-width: 0; }
.consultation-layout .lead h2 { font-size: clamp(28px, 4vw, 42px); margin: 14px 0 18px; line-height: 1.2; }
.consultation-layout .lead p { color: var(--text-2); margin: 0 0 28px; font-size: 16px; }
.consultation-layout .benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.consultation-layout .benefits .card { padding: 22px; }
.consultation-layout .benefits .card-title { font-size: 17px; }
.consultation-layout .benefits .card-sub { margin: 0; }
.consultation-layout .form-wrap { margin: 0; max-width: none; }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; max-width: 1080px; margin: 0 auto; }
.contact-layout .form-wrap { margin: 0; }
.contact-metabar { flex-direction: column; gap: 18px; background: transparent; padding: 0; margin: 0 0 24px; }

/* ---------- 材质工艺 ---------- */
.material-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.material {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 24px; transition: all .35s var(--ease);
}
.material:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.material .m-icon { width: 100%; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; margin-bottom: 16px; background: var(--surface-2); }
.material .m-icon img { width: 100%; height: 100%; object-fit: cover; }
.material h4 { margin: 0 0 6px; font-size: 17px; }
.material .en { font-size: 12px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 8px; }
.material p { font-size: 14px; color: var(--text-2); margin: 0; }

/* ---------- 评价 ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: all .35s var(--ease);
}
.review:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.review .stars { color: #e0a93b; letter-spacing: 2px; margin-bottom: 12px; }
.review p { color: var(--text-2); font-size: 14px; margin: 0 0 18px; }
.review-user { display: flex; align-items: center; gap: 12px; }
.review-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.review-user .nm { font-weight: 600; font-size: 15px; }
.review-user .av { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ---------- 案例详情/图集 ---------- */
.case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.case-gallery img { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 3/2; object-fit: cover; }
.metabar { display: flex; flex-wrap: wrap; gap: 24px; padding: 22px; background: var(--surface-2); border-radius: var(--radius-sm); margin: 30px 0; }
.metabar .mi .k { font-size: 12px; color: var(--text-3); }
.metabar .mi .v { font-size: 16px; font-weight: 600; font-family: var(--serif); }

/* ---------- 产品详情 ---------- */
.pd-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; }
.pd-main-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--surface-2); }
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pd-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; transition: .25s; }
.pd-thumbs img.active, .pd-thumbs img:hover { border-color: var(--primary); }
.pd-info h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 10px; }
.pd-sub { color: var(--text-2); font-size: 16px; margin: 0 0 18px; }
.pd-price { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.pd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tag { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.pd-desc { color: var(--text-2); margin-bottom: 26px; }
.color-dots { display: flex; gap: 10px; margin-bottom: 22px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
.pd-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.pd-specs { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 20px; }
.pd-specs .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.pd-specs .row .k { color: var(--text-2); }

/* ---------- 表单 ---------- */
.form-wrap { max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-sm); }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-row .req { color: var(--danger); }
.form-control {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 15px; font-family: var(--sans); transition: .25s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.form-alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; }
.form-alert.ok { background: rgba(124,139,110,.14); color: #5e6b4f; border: 1px solid rgba(124,139,110,.3); }
.form-alert.err { background: rgba(180,84,63,.12); color: #b4543f; border: 1px solid rgba(180,84,63,.3); }

/* ---------- 文章/灵感 ---------- */
.article-list .post { display: grid; grid-template-columns: 280px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--border); }
.article-list .post:last-child { border-bottom: 0; }
.article-list .post-img { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); }
.article-list .post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.article-list .post:hover .post-img img { transform: scale(1.05); }
.post h3 { font-size: 22px; margin: 4px 0 10px; }
.post .meta { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.post .excerpt { color: var(--text-2); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-body { max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 1.9; color: var(--text); }
.article-body h2 { font-size: 24px; margin: 36px 0 14px; }
.article-body p { margin: 0 0 18px; }
.article-body img { border-radius: var(--radius-sm); margin: 18px 0; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 100px 0 0; font-size: 14px; color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; }
.page-title { font-size: clamp(28px, 5vw, 44px); margin: 14px 0 8px; }
.page-sub { color: var(--text-2); margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--text); color: rgba(255,255,255,.72); margin-top: 80px; padding: 64px 0 28px; }
[data-theme="dark"] .site-footer { background: #100d0a; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; }
.footer-logo { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-intro { font-size: 14px; line-height: 1.8; margin: 0 0 18px; }
.footer-social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; margin-right: 10px; font-size: 14px; transition: .3s; }
.footer-social a:hover { background: var(--primary); }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 16px; font-family: var(--sans); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-contact li { line-height: 1.9; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 22px; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.55); }
.footer-bottom a { color: rgba(255,255,255,.7); }
.powered { color: rgba(255,255,255,.4); }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .material-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-nav, .header-phone, .header-cta { display: none; }
  .nav-burger { display: flex; }
  .mobile-nav.open { display: flex; }
  .section { padding: 64px 0; }
  .grid-3, .grid-4, .grid-2, .material-grid, .review-grid { grid-template-columns: 1fr; }
  .about-split, .pd-grid, .article-list .post, .consultation-layout, .contact-layout { grid-template-columns: 1fr; }
  .consultation-layout .benefits { grid-template-columns: 1fr; }
  .contact-layout { gap: 40px; }
  .case-gallery { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-wrap { padding: 26px; }
  .stat-row { flex-wrap: wrap; gap: 18px; }
  .breadcrumb { padding-top: 92px; }
}
