:root {
  /* 参考站（全友）配色：生态绿主色 + 原木暖中性 + 金/红强调 */
  --bg: #ffffff;
  --bg-alt: #f3ebe5;        /* 米色浅底 */
  --ink: #2b2620;           /* 正文深棕黑 */
  --muted: #6b6258;         /* 次要灰棕 */
  --brand: #2fc7a0;         /* 生态绿主色 */
  --brand-dark: #1f9f82;    /* 深绿（hover/激活） */
  --wood: #895b1f;          /* 暖木金棕（强调锚点） */
  --wood-light: #caa36c;    /* 浅木金 */
  --accent: #f17646;        /* 珊瑚红强调 */
  --accent-gold: #ffb040;   /* 暖金强调 */
  --line: #e7dcc9;          /* 原木描边 */
  --radius: 12px;
  --shadow: 0 6px 24px rgba(43, 38, 32, .08);
  --maxw: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }

/* skip link */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 1000; }
.skip-link:focus { left: 12px; top: 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.main-nav a:hover, .main-nav a.active { background: var(--bg-alt); color: var(--brand-dark); text-decoration: none; }
.header-cta { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 20px; padding: 4px 10px; cursor: pointer; }

/* buttons */
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; cursor: pointer; border: 1px solid transparent; font-size: 15px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--brand); color: var(--brand-dark); }
.btn-ghost:hover { background: var(--bg-alt); text-decoration: none; }

/* hero */
.hero { background: linear-gradient(135deg, #12705a, #0d4a3c); color: #fff; padding: 84px 0 72px; text-align: center; }
.hero-eyebrow { color: var(--accent-gold); font-weight: 700; letter-spacing: 2px; margin: 0 0 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 16px; }
.hero-lead { max-width: 720px; margin: 0 auto 26px; color: #e9e2d6; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* sections */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: 28px; margin: 0 0 32px; position: relative; }
.section-title::after { content: ""; display: block; width: 48px; height: 3px; background: var(--brand); margin: 12px auto 0; border-radius: 2px; }

/* advantages */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.adv-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.adv-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-alt); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.adv-card h3 { margin: 0 0 8px; font-size: 18px; }
.adv-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cat-card { display: block; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.cat-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); transition: .2s; }
.cat-card h3 { margin: 0 0 6px; }
.cat-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); transition: .2s; }
.card-body { padding: 18px 20px 22px; flex: 1; }
.card-body h3 { margin: 8px 0; font-size: 18px; }
.card-body h3 a { color: var(--ink); }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }
.card-cover { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-cover.placeholder { background: linear-gradient(135deg, #d0b49c, #895b1f); color: #fff; display: grid; place-items: center; font-size: 56px; font-weight: 800; }
.tag { display: inline-block; background: var(--bg-alt); color: var(--brand-dark); font-size: 12px; padding: 3px 10px; border-radius: 999px; margin-right: 6px; }
.price { color: var(--brand-dark); font-weight: 700; }
.muted { color: var(--muted); }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }
.filter-bar a { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; }
.filter-bar a.active, .filter-bar a:hover { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }

/* cases page */
.cases-hero { text-align: center; padding: 52px 0 18px; background: var(--bg); }
.cases-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); color: var(--brand-dark); }
.cases-subtitle { margin: 0; color: var(--brand); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; position: relative; display: inline-block; padding: 0 16px; }
.cases-subtitle::before, .cases-subtitle::after { content: ""; position: absolute; top: 50%; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); border-top: 1px dashed var(--line); }
.cases-subtitle::before { right: 100%; }
.cases-subtitle::after { left: 100%; }
.cases-section { padding-top: 18px; }
.case-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 34px; }
.case-pills .pill { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; background: var(--bg); }
.case-pills .pill:hover { text-decoration: none; border-color: var(--brand); color: var(--brand-dark); }
.case-pills .pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.case-list { display: flex; flex-direction: column; gap: 34px; }
.case-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; }
.case-row:hover { transform: translateY(-2px); }
.case-media { position: relative; overflow: hidden; min-height: 320px; background: var(--bg-alt); }
.case-media .card-cover, .case-media .placeholder { width: 100%; height: 100%; min-height: 320px; object-fit: cover; position: absolute; inset: 0; }
.case-badge { position: absolute; left: 14px; top: 14px; background: var(--brand); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 4px; font-weight: 600; z-index: 2; }
.case-body { display: flex; flex-direction: column; justify-content: center; padding: 34px 40px; }
.case-style { display: inline-block; align-self: flex-start; background: var(--bg-alt); color: var(--brand-dark); font-size: 13px; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.case-title { margin: 0 0 14px; font-size: 22px; line-height: 1.4; }
.case-title a { color: var(--ink); }
.case-title a:hover { color: var(--brand-dark); text-decoration: none; }
.case-summary { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.case-meta { margin: 0 0 22px; color: var(--wood); font-size: 14px; font-weight: 600; }
.case-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.case-actions .btn { padding: 10px 22px; font-size: 14px; }
@media (max-width: 860px) {
  .case-row { grid-template-columns: 1fr; }
  .case-media { min-height: 220px; }
  .case-media .card-cover, .case-media .placeholder { min-height: 220px; position: relative; inset: auto; }
  .case-body { padding: 24px; }
  .case-actions .btn { flex: 1; text-align: center; }
}

/* home sections (reference-site style) */
.home-section-head { text-align: center; margin-bottom: 28px; }
.home-section-head h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); color: var(--brand-dark); }
.home-section-head p { margin: 0; color: var(--brand); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; position: relative; display: inline-block; padding: 0 16px; }
.home-section-head p::before, .home-section-head p::after { content: ""; position: absolute; top: 50%; width: 60px; height: 1px; border-top: 1px dashed var(--line); }
.home-section-head p::before { right: 100%; }
.home-section-head p::after { left: 100%; }

.home-cat-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 18px; }
.home-cat-pills .pill { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; background: var(--bg); }
.home-cat-pills .pill:hover { text-decoration: none; border-color: var(--brand); color: var(--brand-dark); }

.home-room-tabs { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.home-room-tabs .tab { position: relative; color: var(--muted); font-size: 15px; padding-bottom: 6px; }
.home-room-tabs .tab::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 0; height: 3px; background: var(--brand); border-radius: 2px; transition: .2s; transform: translateX(-50%); }
.home-room-tabs .tab:hover { color: var(--brand); text-decoration: none; }
.home-room-tabs .tab:hover::after { width: 100%; }

.home-case-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 34px; }
.home-case-pills .pill { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; background: var(--bg); }
.home-case-pills .pill:hover { text-decoration: none; border-color: var(--brand); color: var(--brand-dark); }

.home-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 30px; }
.home-products .center { margin-bottom: 0; }
.home-cases .case-list { margin-bottom: 30px; }

/* faq */
.faq { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* cta band */
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; text-align: center; padding: 54px 0; }
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { margin: 0 0 20px; opacity: .92; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: var(--bg-alt); }

/* page hero */
.page-hero { background: var(--bg-alt); padding: 48px 0; text-align: center; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 0 0 6px; font-size: 32px; }
.page-hero p { margin: 0; color: var(--muted); }

/* product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-media .card-cover, .product-media .placeholder { height: 360px; border-radius: var(--radius); }
.feature-list { padding-left: 20px; }
.feature-list li { margin-bottom: 8px; }
.rich-text { font-size: 16px; }
.rich-text p { margin: 0 0 16px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h2, .contact-form h2 { margin-top: 0; }
.map-placeholder { margin-top: 16px; height: 180px; border-radius: var(--radius); background: linear-gradient(135deg, #e7dcc9, #caa36c); display: grid; place-items: center; color: var(--wood); font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form input, .contact-form select, .contact-form textarea { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 3px solid rgba(47,199,160,.35); border-color: var(--brand); }
.form-msg { margin: 0; font-size: 14px; min-height: 18px; }
.form-msg.ok { color: #1a7f37; }
.form-msg.err { color: #c0392b; }

/* footer */
.site-footer { background: #2b2620; color: #d9d2c6; padding: 48px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 30px; }
.site-footer h3, .site-footer h4 { color: #fff; margin: 0 0 12px; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 8px; }
.site-footer a { color: #d9d2c6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; font-size: 13px; }
.footer-icp { margin-top: 6px; }
.footer-icp a { color: inherit; text-decoration: none; opacity: .8; }
.footer-icp a:hover { text-decoration: underline; opacity: 1; }
.link-danger { background: none; border: none; color: #c0392b; cursor: pointer; padding: 0; font: inherit; }

/* admin */
body.admin { background: #f0ece4; }
.admin-main { padding: 30px 0 60px; }
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; background: #fff; padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.admin-form input, .admin-form textarea, .admin-form select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.admin-form textarea.code { font-family: ui-monospace, monospace; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin: 20px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 30px; color: var(--brand-dark); }
.stat span { color: var(--muted); font-size: 14px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.admin-table th { background: var(--bg-alt); }
.ok { color: #1a7f37; font-weight: 600; }
.err { color: #c0392b; font-weight: 600; }
.login-wrap { max-width: 380px; margin: 80px auto; background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- admin image upload fields ---------- */
.img-field { display: flex; flex-direction: column; gap: 8px; }
.img-field-label { font-weight: 600; font-size: 14px; }
.img-field-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-preview { width: 160px; height: 120px; border: 1px dashed var(--line); border-radius: 10px; background: #faf8f5; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-empty { color: var(--muted); font-size: 13px; }
.img-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.btn-upload { cursor: pointer; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.img-hint { color: var(--muted); font-size: 12px; margin: 0; }
.img-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.img-item { position: relative; width: 110px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #faf8f5; }
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-del:hover { background: #c0392b; }
.upload-toast { position: fixed; right: 24px; bottom: 24px; background: #123024; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; z-index: 9999; }
.upload-toast.show { opacity: 1; transform: translateY(0); }
.upload-toast.err { background: #8e2b20; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(47,199,160,.5); outline-offset: 2px; }

/* products center (reference-site style) */
.products-banner { position: relative; min-height: 380px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background: linear-gradient(135deg, #0d4a3c, #1f9f82) center/cover no-repeat; overflow: hidden; }
.products-banner-overlay { position: absolute; inset: 0; background: rgba(13, 74, 60, .45); }
.products-banner-content { position: relative; z-index: 1; padding: 60px 20px; }
.products-banner-content h1 { font-size: 42px; margin: 0 0 12px; font-weight: 700; }
.products-banner-content p { font-size: 18px; margin: 0 0 24px; opacity: .95; }
.btn-light { display: inline-block; background: #fff; color: var(--brand-dark); padding: 12px 32px; border-radius: 999px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.btn-light:hover { background: var(--bg-alt); text-decoration: none; }

.product-section { padding-top: 36px; }
.cat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 0 24px; }
.cat-pills a { display: inline-block; padding: 10px 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 14px; transition: .2s; }
.cat-pills a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.cat-pills a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.room-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; margin: 0 0 32px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.room-tabs a { position: relative; color: var(--muted); font-size: 15px; padding-bottom: 6px; }
.room-tabs a::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 0; height: 3px; background: var(--brand); border-radius: 2px; transition: .2s; transform: translateX(-50%); }
.room-tabs a:hover { color: var(--brand); text-decoration: none; }
.room-tabs a.active { color: var(--brand); font-weight: 600; }
.room-tabs a.active::after { width: 100%; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(43, 38, 32, .12); }
.product-card-media { position: relative; display: block; overflow: hidden; }
.product-card-media .card-cover { width: 100%; height: 240px; object-fit: cover; transition: transform .4s; }
.product-card-media:hover .card-cover { transform: scale(1.05); }
.product-card-media .placeholder { width: 100%; height: 240px; }
.design-tag { position: absolute; top: 14px; left: 14px; background: var(--brand); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 999px; font-weight: 600; z-index: 1; }
.product-card-body { padding: 18px 20px 22px; }
.product-card-body h3 { margin: 0 0 8px; font-size: 17px; }
.product-card-body h3 a { color: var(--ink); }
.product-card-body h3 a:hover { color: var(--brand); text-decoration: none; }
.product-meta { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.product-card-body .price { margin: 0; color: var(--accent); font-size: 15px; font-weight: 700; }
.empty-tip { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* responsive */
@media (max-width: 860px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .product-detail, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .products-banner-content h1 { font-size: 28px; }
  .products-banner { min-height: 300px; }
  .cat-pills { gap: 10px; }
  .cat-pills a { padding: 8px 16px; font-size: 13px; }
  .room-tabs { gap: 8px 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}
