/*
Theme Name: 木序 Cabinet Haus
Theme URI: https://example.com/cabinet-haus
Author: MU XU Studio
Author URI: https://example.com
Description: 面向定制柜 / 隐藏柜销售的家具类 WooCommerce 主题。内置商品视频展示位、按面积计价的定制下单表单（配合 cabinet-customizer 插件）、木色系视觉与中文排版优化。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cabinet-haus
Tags: e-commerce, furniture, custom, woocommerce, video, one-column, custom-menu, custom-logo
WC requires at least: 7.0
WC tested up to: 9.9
*/

/* =========================================================
   1. 设计变量与基础
   ========================================================= */
:root {
  --c-bg: #faf7f2;
  --c-surface: #ffffff;
  --c-ink: #23201c;
  --c-ink-soft: #5f5850;
  --c-muted: #8d857a;
  --c-line: #e9e2d6;
  --c-wood: #8b6a47;
  --c-wood-deep: #6d5136;
  --c-accent: #b98a5a;
  --c-accent-dark: #9a6f43;
  --c-cream: #f3ede3;
  --c-dark: #201c17;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(35, 32, 28, 0.06);
  --shadow-md: 0 14px 40px rgba(35, 32, 28, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-wood-deep); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-accent-dark); }

h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; margin: 0 0 0.6em; letter-spacing: 0.02em; }

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

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  width: auto; height: auto; clip: auto;
  background: var(--c-ink); color: #fff; padding: 8px 16px; border-radius: 8px;
}

/* =========================================================
   2. 通用组件
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.22s ease;
}
.btn-primary { background: var(--c-wood); color: #fff; }
.btn-primary:hover { background: var(--c-wood-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.65); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn-outline { border-color: var(--c-line); color: var(--c-ink); background: var(--c-surface); }
.btn-outline:hover { border-color: var(--c-wood); color: var(--c-wood); }
.btn-lg { padding: 16px 38px; font-size: 16px; }

.section { padding: 88px 0; }
.section--cream { background: var(--c-cream); }
.section--dark { background: var(--c-dark); color: #efe9df; }
.section--dark h2, .section--dark h3 { color: #f7f2e9; }

.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.35em;
  color: var(--c-accent-dark); text-transform: uppercase; margin-bottom: 14px;
}
.section-head h2 { font-size: 34px; }
.section-head p { color: var(--c-ink-soft); margin: 0; }
.section--dark .section-head p { color: rgba(239, 233, 223, 0.75); }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.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); }

/* 视频播放按钮 */
.play-badge {
  position: absolute; inset: 0; margin: auto;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); pointer-events: none;
  transition: transform 0.25s ease;
}
.play-badge::after {
  content: ""; display: block;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--c-wood);
  margin-left: 5px;
}
.video-card:hover .play-badge { transform: scale(1.08); }

/* 视频弹窗 */
.video-modal {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center;
  background: rgba(20, 17, 13, 0.86);
  padding: 24px;
}
.video-modal.is-open { display: flex; }
.video-modal__box {
  position: relative; width: min(920px, 100%);
  background: #000; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.video-modal__box video, .video-modal__box iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
.video-modal__close {
  position: absolute; top: -46px; right: 0;
  background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; line-height: 1;
}
.video-modal__close:hover { color: var(--c-accent); }

/* =========================================================
   3. 顶部公告与导航
   ========================================================= */
.announce {
  background: var(--c-dark); color: #d9cfbf;
  font-size: 13px; letter-spacing: 0.06em; text-align: center;
  padding: 9px 16px;
}
.announce b { color: var(--c-accent); font-weight: 600; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--c-line); box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}

.brand { display: flex; align-items: baseline; gap: 10px; }
.brand__zh { font-family: var(--font-serif); font-size: 26px; font-weight: 700; letter-spacing: 0.12em; color: var(--c-ink); }
.brand__en { font-size: 11px; letter-spacing: 0.4em; color: var(--c-muted); text-transform: uppercase; }
.custom-logo { max-height: 48px; width: auto; }

.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 16px;
  font-size: 15px; color: var(--c-ink); border-radius: 10px;
}
.main-nav a:hover { background: var(--c-cream); color: var(--c-wood-deep); }
.main-nav .sub-menu {
  position: absolute; display: none; min-width: 180px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 8px;
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu { display: block; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { font-size: 14px; color: var(--c-ink-soft); white-space: nowrap; }
.header-phone strong { color: var(--c-wood-deep); font-size: 16px; }

.cart-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--c-line); background: var(--c-surface);
}
.cart-link:hover { border-color: var(--c-wood); }
.cart-link svg { width: 20px; height: 20px; stroke: var(--c-ink); }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--c-accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--c-line); background: var(--c-surface); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--c-ink); margin: 0 auto; position: relative;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 4px; }

/* =========================================================
   4. 首页
   ========================================================= */
.hero { position: relative; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(24, 20, 15, 0.72) 0%, rgba(24, 20, 15, 0.38) 55%, rgba(24, 20, 15, 0.15) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 640px; padding: 110px 0; color: #fff; }
.hero__content .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.4em;
  color: #e8c9a0; margin-bottom: 18px; text-transform: uppercase;
}
.hero__content h1 { font-size: 52px; color: #fff; margin-bottom: 20px; }
.hero__content p { font-size: 18px; color: rgba(255, 255, 255, 0.86); margin: 0 0 34px; max-width: 520px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__play {
  position: absolute; right: 8%; bottom: 12%; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  color: rgba(255, 255, 255, 0.9); font-size: 14px; letter-spacing: 0.12em;
  background: none; border: 0; cursor: pointer;
}
.hero__play:hover { color: #fff; }
.hero__play .ring {
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}
.hero__play:hover .ring { transform: scale(1.06); background: rgba(255, 255, 255, 0.12); }
.hero__play .ring::after {
  content: ""; border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff; margin-left: 4px;
}

.stats-band { background: var(--c-dark); color: #d9cfbf; }
.stats-band__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 0; text-align: center; }
.stats-band b { display: block; font-family: var(--font-serif); font-size: 30px; color: #fff; }
.stats-band span { font-size: 13px; letter-spacing: 0.15em; }

/* 分类卡片 */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cat-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 420px; display: flex; align-items: flex-end; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-card:hover img { transform: scale(1.04); }
.cat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 20, 15, 0) 40%, rgba(24, 20, 15, 0.78) 100%);
}
.cat-card__body { position: relative; z-index: 2; padding: 34px; color: #fff; }
.cat-card__body h3 { font-size: 26px; color: #fff; margin-bottom: 6px; }
.cat-card__body p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.82); font-size: 14px; }
.cat-card__more { color: #e8c9a0; font-size: 14px; letter-spacing: 0.1em; }
.cat-card__more::after { content: " →"; }

/* WooCommerce 产品网格（主题化） */
ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; list-style: none; margin: 0; padding: 0; }
ul.products li.product {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); overflow: hidden; margin: 0 !important;
  display: flex; flex-direction: column; position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
ul.products li.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
ul.products li.product .woocommerce-loop-product__title { font-size: 17px; font-family: var(--font-sans); font-weight: 600; padding: 18px 20px 0; margin: 0; }
ul.products li.product .price { padding: 4px 20px 8px; color: var(--c-wood-deep); font-weight: 700; font-size: 17px; }
ul.products li.product del { color: var(--c-muted); font-weight: 400; }
ul.products li.product .button, ul.products li.product .add_to_cart_button {
  margin: 4px 20px 20px;
  text-align: center; border-radius: 999px;
  background: var(--c-cream); color: var(--c-wood-deep);
  border: 1px solid var(--c-line); font-weight: 600; font-size: 14px;
  padding: 11px 18px; transition: all 0.2s ease;
}
ul.products li.product .button:hover, ul.products li.product .add_to_cart_button:hover {
  background: var(--c-wood); border-color: var(--c-wood); color: #fff;
}
ul.products li.product .cabinet-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(32, 28, 23, 0.82); color: #f0e6d6;
  font-size: 12px; letter-spacing: 0.1em; padding: 5px 12px; border-radius: 999px;
}
ul.products li.product .onsale {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--c-accent); color: #fff; font-size: 12px;
  padding: 5px 12px; border-radius: 999px; margin: 0;
}
.woocommerce-loop { margin-top: 10px; }

/* 视频专区 */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.video-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; cursor: pointer; border: 0; padding: 0; width: 100%;
  background: var(--c-dark);
}
.video-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.86; transition: transform 0.4s ease, opacity 0.3s ease; }
.video-card:hover img { transform: scale(1.05); opacity: 1; }
.video-card__label {
  position: absolute; left: 18px; bottom: 16px; z-index: 2; text-align: left; color: #fff;
}
.video-card__label b { display: block; font-size: 16px; }
.video-card__label span { font-size: 12px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.72); }
.video-card__meta { position: absolute; right: 18px; bottom: 18px; z-index: 2; color: #e8c9a0; font-size: 12px; letter-spacing: 0.12em; }

/* 定制流程 */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: step; }
.process-item {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg); padding: 34px 28px; position: relative;
}
.process-item::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-serif); font-size: 44px; color: rgba(232, 201, 160, 0.85);
  display: block; margin-bottom: 14px;
}
.process-item h3 { font-size: 19px; color: #fff; }
.process-item p { margin: 0; font-size: 14px; color: rgba(239, 233, 223, 0.72); }

/* 工艺优势 */
.feature-item { text-align: center; padding: 30px 22px; }
.feature-item .icon {
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--c-cream); display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.feature-item h3 { font-size: 18px; }
.feature-item p { font-size: 14px; color: var(--c-ink-soft); margin: 0; }

/* 评价 */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.quote-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 30px; }
.quote-card .stars { color: var(--c-accent); letter-spacing: 3px; margin-bottom: 12px; }
.quote-card p { font-size: 15px; color: var(--c-ink-soft); margin: 0 0 18px; }
.quote-card footer { font-size: 13px; color: var(--c-muted); }

/* CTA */
.cta-band { border-radius: var(--radius-lg); padding: 64px 56px; text-align: center; }
.cta-band h2 { font-size: 32px; }
.cta-band p { color: rgba(239, 233, 223, 0.78); max-width: 560px; margin: 0 auto 30px; }

/* =========================================================
   5. 内容页 / 博客
   ========================================================= */
.page-shell { max-width: 860px; margin: 0 auto; padding: 72px 24px; }
.page-shell--wide { max-width: var(--wrap); }
.entry-title { font-size: 38px; }
.entry-content h2 { font-size: 28px; margin-top: 1.8em; }
.entry-content blockquote {
  border-left: 3px solid var(--c-accent); margin: 1.6em 0; padding: 6px 24px;
  color: var(--c-ink-soft); background: var(--c-cream); border-radius: 0 12px 12px 0;
}
.entry-meta { color: var(--c-muted); font-size: 14px; margin-bottom: 28px; }
.post-list { display: grid; gap: 30px; }
.post-card { padding: 30px; }
.post-card h2 { font-size: 24px; margin-bottom: 8px; }
.post-card h2 a { color: var(--c-ink); }
.readmore { font-size: 14px; letter-spacing: 0.08em; }

/* =========================================================
   6. WooCommerce 页面
   ========================================================= */
.woo-shell { padding: 46px 0 90px; }
.woocommerce-breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 30px; }
.woocommerce-breadcrumb a { color: var(--c-muted); }
.woocommerce-breadcrumb a:hover { color: var(--c-wood); }

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-info, .woocommerce-error {
  border-radius: 12px; border-top: 0; background: var(--c-cream);
  border: 1px solid var(--c-line); color: var(--c-ink);
  padding: 14px 18px 14px 3em; list-style: none;
}
.woocommerce-error { background: #fbeeea; border-color: #ecd2c8; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--c-wood); }
.woocommerce-error::before { color: #b3552f; }

/* 商品单页 */
.single-product div.product { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 56px; align-items: start; }
.single-product div.product .woocommerce-product-gallery { position: sticky; top: 100px; }
.single-product div.product .woocommerce-product-gallery__wrapper { border-radius: var(--radius-lg); overflow: hidden; background: #efe9df; }
.single-product div.product .woocommerce-product-gallery__image img { width: 100%; border-radius: var(--radius-lg); }
.single-product div.product .product_title { font-size: 32px; margin-bottom: 10px; }
.single-product div.product .price { font-size: 26px; color: var(--c-wood-deep); font-weight: 700; }
.single-product div.product .price .unit-note { font-size: 14px; color: var(--c-muted); font-weight: 400; margin-left: 6px; }
.single-product div.product .woocommerce-product-details__short-description { color: var(--c-ink-soft); margin: 14px 0 24px; }
.single-product form.cart .button { background: var(--c-wood); color: #fff; border: 0; border-radius: 999px; padding: 15px 44px; font-size: 16px; font-weight: 600; cursor: pointer; }
.single-product form.cart .button:hover { background: var(--c-wood-deep); }
.single-product .product_meta { padding-top: 18px; border-top: 1px solid var(--c-line); font-size: 13px; color: var(--c-muted); }
.single-product div.product .woocommerce-tabs { grid-column: 1 / -1; margin-top: 40px; }
.single-product .woocommerce-Tabs-panel, .single-product .woocommerce-tabs ul.tabs { width: 100%; }
.single-product .woocommerce-tabs ul.tabs { padding-left: 0; border-bottom: 1px solid var(--c-line); display: flex; gap: 8px; }
.single-product .woocommerce-tabs ul.tabs::before { border: 0; }
.single-product .woocommerce-tabs ul.tabs li { background: none; border: 0; border-radius: 10px 10px 0 0; margin: 0; }
.single-product .woocommerce-tabs ul.tabs li.active { background: var(--c-cream); }
.single-product .woocommerce-tabs ul.tabs li a { color: var(--c-ink); font-weight: 600; }

/* 商品视频块 */
.cabinet-video-tile { position: relative; cursor: pointer; }
.cabinet-video-tile img, .cabinet-video-tile .cabinet-video-tile__ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.cabinet-video-tile__ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4a3d2e, #2a241c); color: #e8c9a0;
  font-size: 15px; letter-spacing: 0.2em;
}
.cabinet-video-section { margin-top: 26px; }
.cabinet-video-section .frame { border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.cabinet-video-section video, .cabinet-video-section iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }

/* 定制表单（插件输出） */
.cabinet-form {
  background: var(--c-cream); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 26px; margin: 26px 0;
}
.cabinet-form h3 { font-size: 18px; margin-bottom: 18px; }
.cabinet-form .cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.cabinet-form .cf-field { display: flex; flex-direction: column; gap: 6px; }
.cabinet-form .cf-field--full { grid-column: 1 / -1; }
.cabinet-form label { font-size: 13px; color: var(--c-ink-soft); font-weight: 600; }
.cabinet-form label .req { color: #b3552f; }
.cabinet-form select, .cabinet-form input[type="number"], .cabinet-form input[type="text"], .cabinet-form input[type="file"] {
  border: 1px solid var(--c-line); border-radius: 10px; background: #fff;
  padding: 10px 12px; font-size: 14px; color: var(--c-ink); font-family: inherit;
}
.cabinet-form .dim-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cabinet-form .dim-row .unit { position: relative; }
.cabinet-form .dim-row .unit::after { content: attr(data-unit); position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--c-muted); }
.cabinet-form .dim-row input { width: 100%; padding-right: 30px; }
.cabinet-form .cf-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.cabinet-form .cf-checks label { font-weight: 400; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cabinet-estimate {
  margin-top: 18px; padding: 14px 18px; border-radius: 12px;
  background: #fff; border: 1px dashed var(--c-accent);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.cabinet-estimate .label { font-size: 13px; color: var(--c-muted); }
.cabinet-estimate .amount { font-size: 22px; font-weight: 700; color: var(--c-wood-deep); }
.cabinet-estimate .hint { font-size: 12px; color: var(--c-muted); width: 100%; }

/* 购物车 / 结算 */
.woocommerce table.shop_table { border: 1px solid var(--c-line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; background: var(--c-surface); }
.woocommerce table.shop_table th { background: var(--c-cream); font-size: 13px; letter-spacing: 0.06em; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: 14px 16px; border-color: var(--c-line); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout-review-order { border-radius: var(--radius); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container--default .select2-selection--single {
  border: 1px solid var(--c-line) !important; border-radius: 10px !important; padding: 10px 12px; background: #fff;
}
.woocommerce form .form-row label { font-size: 13px; color: var(--c-ink-soft); }
#place_order, .woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce input.button.alt {
  background: var(--c-wood) !important; color: #fff !important; border-radius: 999px !important;
  font-weight: 600; padding: 13px 34px; border: 0;
}
#place_order:hover, .woocommerce button.button.alt:hover { background: var(--c-wood-deep) !important; }
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
  border-radius: 999px; font-weight: 600; background: var(--c-cream); color: var(--c-wood-deep); border: 1px solid var(--c-line);
}
.woocommerce button.button:hover, .woocommerce a.button:hover { background: var(--c-wood); color: #fff; border-color: var(--c-wood); }
.woocommerce-checkout #payment { background: var(--c-cream); border-radius: var(--radius); }
.payment_methods li { border-bottom: 1px dashed var(--c-line); }
.payment_methods li label { font-weight: 600; }
.payment_box { background: #fff; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.woocommerce-thankyou { text-align: center; padding: 40px 0; }
.woocommerce-thankyou h2 { font-size: 30px; }

/* =========================================================
   7. 页脚
   ========================================================= */
.site-footer { background: var(--c-dark); color: #b9ad9b; margin-top: 40px; }
.site-footer a { color: #b9ad9b; }
.site-footer a:hover { color: #e8c9a0; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding: 66px 0 46px; }
.site-footer h4 { color: #efe9df; font-size: 15px; letter-spacing: 0.12em; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: 14px; }
.site-footer__brand .brand__zh { color: #f0e6d6; }
.site-footer__brand p { font-size: 14px; line-height: 1.9; margin-top: 16px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   8. 视频选型页（可单独发给客户）
   ========================================================= */
.vg-hero { background: var(--c-dark); color: #efe9df; padding: 64px 0 54px; }
/* 首页：视频选柜作为第一主屏内容 */
.section--videofirst { padding-bottom: 0; }
.section--videofirst .section-head { margin-bottom: 30px; }
.vg-hero .eyebrow { color: var(--c-accent); }
.vg-hero h1 { font-family: var(--font-serif); font-size: 46px; line-height: 1.16; margin: 14px 0 16px; letter-spacing: 0.02em; }
.vg-hero p { max-width: 640px; color: #c9bfae; font-size: 16px; line-height: 1.9; margin: 0; }
.vg-hero__tips { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: 13px; color: #b5a893; letter-spacing: 0.04em; }
.vg-hero__intro { max-width: 640px; color: #c9bfae; font-size: 16px; line-height: 1.9; }
.vg-hero__intro p { margin: 0 0 10px; }
.vg-hero__intro a { color: var(--c-accent); }
.vg-hero__tips span::before { content: "·"; margin-right: 8px; color: var(--c-accent); }
.vg-hero__tips span:first-child::before { content: ""; margin: 0; }

.vg-toolbar {
  position: sticky; top: 76px; z-index: 90;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.vg-toolbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.vg-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vg-filters::-webkit-scrollbar { display: none; }
.vg-filter {
  flex: 0 0 auto; border: 1px solid var(--c-line); background: transparent; color: var(--c-ink-soft);
  font-family: inherit; font-size: 13.5px; letter-spacing: 0.04em;
  padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.vg-filter:hover { border-color: var(--c-accent); color: var(--c-wood-deep); }
.vg-filter.is-active { background: var(--c-dark); border-color: var(--c-dark); color: #f3ede3; }
.vg-count { font-size: 13px; color: var(--c-muted); letter-spacing: 0.06em; white-space: nowrap; }
.vg-count b { color: var(--c-wood-deep); }

.vg-section { padding: 46px 0 70px; }
.vg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 26px; }

.vg-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.vg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.vg-card[hidden] { display: none; }

.vg-card__media { position: relative; aspect-ratio: 3 / 4; background: var(--c-cream); cursor: pointer; overflow: hidden; }
.vg-card__media img, .vg-card__media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.vg-card:hover .vg-card__media img { transform: scale(1.04); }
.vg-card__media .play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.vg-card__media:hover .play-badge { transform: translate(-50%, -50%) scale(1.08); }
.vg-card__time {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: rgba(20, 17, 13, 0.72); color: #f0e6d6; font-size: 11.5px;
  letter-spacing: 0.08em; padding: 4px 9px; border-radius: 999px;
}
.vg-card__no {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  background: rgba(250, 247, 242, 0.92); color: var(--c-wood-deep);
  font-size: 11.5px; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 999px;
}
.vg-pick {
  position: absolute; right: 12px; top: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(35, 32, 28, 0.14);
  background: rgba(250, 247, 242, 0.94); color: var(--c-ink-soft);
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.vg-pick:hover { transform: scale(1.06); border-color: var(--c-accent); }
.vg-pick.is-picked { background: var(--c-dark); border-color: var(--c-dark); color: #f0e6d6; }
.vg-card.is-picked { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent) inset; }

.vg-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.vg-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vg-card__tags span {
  font-size: 11.5px; letter-spacing: 0.06em; color: var(--c-wood-deep);
  background: var(--c-cream); border-radius: 6px; padding: 3px 8px;
}
.vg-card__title { font-size: 17.5px; font-weight: 600; line-height: 1.45; margin: 0; color: var(--c-ink); }
.vg-card__desc { font-size: 13.5px; line-height: 1.75; color: var(--c-ink-soft); margin: 0; }
.vg-card__spec { font-size: 12.5px; color: var(--c-muted); letter-spacing: 0.02em; }
.vg-card__price { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 6px; }
.vg-card__price b { font-family: var(--font-serif); font-size: 22px; color: var(--c-wood-deep); letter-spacing: 0.01em; }
.vg-card__price span { font-size: 12.5px; color: var(--c-muted); }
.vg-card__actions { display: flex; gap: 8px; margin-top: 6px; }
.vg-card__actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 10px 12px; }

.vg-empty { text-align: center; padding: 70px 20px; color: var(--c-muted); font-size: 15px; }
.vg-empty[hidden] { display: none; }

/* 桌面端：勾选汇总条（手机端由底部常驻条替代） */
.vg-summary {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 28px; padding: 16px 22px;
  background: var(--c-cream); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.vg-summary__num { font-size: 14px; color: var(--c-ink-soft); letter-spacing: 0.04em; }
.vg-summary__num b { color: var(--c-wood-deep); font-size: 18px; font-family: var(--font-serif); }
.vg-summary .btn { padding: 10px 20px; font-size: 13.5px; }
.vg-summary__hint { font-size: 12.5px; color: var(--c-muted); }

.vg-cta { background: var(--c-cream); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 40px; display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center; }
.vg-cta h2 { font-family: var(--font-serif); font-size: 27px; margin: 0 0 10px; color: var(--c-ink); }
.vg-cta p { margin: 0; color: var(--c-ink-soft); font-size: 14.5px; line-height: 1.8; }
.vg-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 手机端底部常驻咨询条 */
.vg-stickybar { display: none; }

.vg-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); z-index: 600;
  background: var(--c-dark); color: #f0e6d6; font-size: 13px; line-height: 1.5;
  padding: 11px 20px; border-radius: 999px; max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.vg-toast.is-show { opacity: 0.95; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .vg-hero { padding: 44px 0 38px; }
  .vg-hero h1 { font-size: 32px; }
  .vg-hero p { font-size: 14.5px; }
  .vg-toolbar { top: 64px; }
  .vg-toolbar__inner { padding: 11px 0; gap: 10px; }
  .vg-count { display: none; }
  .vg-filter { padding: 8px 15px; font-size: 13px; }
  .vg-section { padding: 28px 0 96px; }
  .vg-grid { grid-template-columns: 1fr; gap: 18px; }
  .vg-card__media { aspect-ratio: 4 / 3; }
  .vg-summary { display: none; }
  .vg-cta { grid-template-columns: 1fr; padding: 26px 22px; }
  .vg-stickybar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(250, 247, 242, 0.97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
  .vg-stickybar .btn { justify-content: center; padding: 12px; font-size: 14px; }
}

/* =========================================================
   9. 响应式
   ========================================================= */
@media (max-width: 1080px) {
  .grid-4, ul.products, .process-grid { grid-template-columns: repeat(3, 1fr); }
  .video-grid, .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__content h1 { font-size: 42px; }
}

@media (max-width: 860px) {
  /* 抽屉菜单平时移出屏幕右侧，会撑出横向滚动 → 限死页面横向滚动（clip 不破坏 sticky 头部） */
  html, body { overflow-x: hidden; }
  @supports (overflow-x: clip) {
    html, body { overflow-x: clip; }
  }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
    width: min(78vw, 320px);
    background: var(--c-surface); box-shadow: var(--shadow-md);
    transform: translateX(100%); transition: transform 0.28s ease, visibility 0s linear 0.28s;
    padding: 90px 26px 30px; overflow-y: auto;
    visibility: hidden;
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s ease; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav ul ul { display: block; position: static; box-shadow: none; border: 0; padding-left: 16px; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; z-index: 300; position: relative; }
  .header-phone { display: none; }
  .single-product div.product { grid-template-columns: 1fr; gap: 30px; }
  .single-product div.product .woocommerce-product-gallery { position: static; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { min-height: 320px; }
  .stats-band__inner { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .section { padding: 62px 0; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, ul.products, .process-grid, .video-grid, .quote-grid { grid-template-columns: 1fr; }
  .hero { min-height: 540px; }
  .hero__content h1 { font-size: 34px; }
  .hero__content { padding: 80px 0; }
  .hero__play { right: 24px; bottom: 20px; }
  .cabinet-form .cf-grid, .cabinet-form .dim-row { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .section-head h2 { font-size: 27px; }
  .cta-band { padding: 44px 26px; }
  /* 小屏品牌区不再把「木序定制」挤成两行 */
  .site-header__inner { gap: 12px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 1px; }
  .brand__zh { font-size: 20px; letter-spacing: 0.08em; }
  .brand__en { font-size: 8.5px; letter-spacing: 0.26em; }
}

/* 极窄屏（≤360，如 iPhone SE）：底部常驻条文字不再折行 */
@media (max-width: 360px) {
  .vg-stickybar { grid-template-columns: 1fr 1.1fr; padding-left: 10px; padding-right: 10px; }
  .vg-stickybar .btn { font-size: 12.5px; padding: 11px 8px; white-space: nowrap; }
  .vg-hero h1 { font-size: 28px; }
  .announce { font-size: 11.5px; padding: 8px 10px; letter-spacing: 0.03em; }
}

/* 焦点可访问性 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--c-accent); outline-offset: 2px;
}
