/* 布艺家具产品大全 · 首页样式
   设计基准 1440；区块高度按 03-ui/ui-spec.md 的分区预算落位（总高 2160） */


* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: var(--fw-black); letter-spacing: -.01em; }

p { margin: 0; }

ul, ol, dl, dd, figure { margin: 0; padding: 0; }

li { list-style: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-12);
  font-weight: var(--fw-black);
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-mark { width: 26px; height: 26px; color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: var(--fs-6);
}

.main-nav a {
  padding: 20px 0;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.main-nav a:hover,
.main-nav a:focus-visible { color: var(--accent); border-color: var(--accent); }

.main-nav a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  height: 391px;
  overflow: hidden;
  background: var(--bg);
}

.hero-media {
  position: absolute;
  top: 0;
  right: 0;
  width: 57%;
  height: 100%;
  overflow: hidden;
}

.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(247, 244, 240, .92) 6%, rgba(247, 244, 240, 0) 26%),
    linear-gradient(180deg, rgba(247, 244, 240, .55) 0%, rgba(247, 244, 240, 0) 22%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 34px;
}

.hero-copy { max-width: 620px; }

.hero-kicker {
  font-size: var(--fs-7);
  font-weight: var(--fw-semibold);
  letter-spacing: .22em;
  color: var(--accent);
}

.hero-title {
  margin-top: 6px;
  font-size: var(--fs-16);
  line-height: 1.06;
  letter-spacing: -.02em;
}

.hero-lead {
  margin-top: 10px;
  max-width: 580px;
  font-size: var(--fs-11);
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero-actions { margin-top: 20px; display: flex; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 10px;
  padding: 11px 24px;
  border-radius: var(--r-pill);
  font-size: var(--fs-8);
  font-weight: var(--fw-semibold);
  transition: transform .18s, background-color .18s, border-color .18s;
}

.btn:hover { transform: translateY(-1px); }

.btn svg { width: 13px; height: 13px; }

.btn-solid { background: var(--accent-fill); color: var(--cream); }
.btn-solid:hover { background: var(--accent-fill-hover); }

.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); background: rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-facts {
  position: absolute;
  left: var(--gutter);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 0;
}

.hero-facts .fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 30px;
  border-left: 1px solid var(--line-strong);
}

.hero-facts .fact:first-child { padding-left: 0; border-left: 0; }

.hero-facts svg { width: 26px; height: 26px; color: var(--ink-soft); flex: 0 0 auto; }

.fact-main { font-size: var(--fs-10); font-weight: var(--fw-bold); line-height: 1.35; }
.fact-sub { margin-top: 1px; font-size: var(--fs-5); color: var(--muted); }

/* --------------------------------------------------------------- section */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 26px;
  flex-wrap: wrap;
}

.section-head h2 {
  position: relative;
  padding-left: 16px;
  font-size: var(--fs-14);
  line-height: 1.25;
  letter-spacing: -.015em;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--accent);
}

.section-head p {
  font-size: var(--fs-7);
  line-height: 1.7;
  color: var(--muted);
}

.section-head .head-note {
  font-size: var(--fs-7);
  font-weight: var(--fw-semibold);
  color: var(--accent);
}

/* ----------------------------------------------------------- 六个品类 */

.section-cats { padding: 6px 0 0; }

.cat-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.cat-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.cat-media { height: 91px; overflow: hidden; background: var(--line); }
.cat-media img { width: 100%; height: 100%; object-fit: cover; }

.cat-body { padding: 10px 13px 12px; display: flex; flex-direction: column; flex: 1; }

.cat-card h3 { font-size: var(--fs-10); font-weight: var(--fw-bold); }

.cat-card .cat-desc {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}

.cat-count {
  align-self: center;
  margin-top: auto;
  padding: 9px 0 0;
}

.cat-count span {
  display: inline-block;
  padding: 3px 15px;
  font-size: 10.5px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
}

/* ----------------------------------------------------------- 面料图谱 */

.section-fabric { padding: 40px 0 0; }

.fabric-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.fabric-media { height: 62px; overflow: hidden; border-radius: var(--r-img); background: var(--line); }
.fabric-media img { width: 100%; height: 100%; object-fit: cover; }

.fabric-card h3 { margin-top: 12px; font-size: var(--fs-10); font-weight: var(--fw-bold); }

.fabric-card p {
  margin-top: 4px;
  font-size: var(--fs-4);
  line-height: 1.62;
  color: var(--muted);
}

/* ----------------------------------------------------------- 精选条目 */

.section-featured { padding: 18px 0 0; }

.feature-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  padding: 8px 32px 8px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color .2s, box-shadow .2s;
}

.feature-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }

.feature-thumb {
  display: block;
  height: 74px;
  overflow: hidden;
  border-radius: var(--r-img);
  background: var(--line);
}

.feature-thumb img { width: 100%; height: 100%; object-fit: cover; }

.feature-body h3 { font-size: var(--fs-10); line-height: 1.4; }

.tag {
  display: inline-block;
  margin-top: 3px;
  font-size: var(--fs-2);
  letter-spacing: .06em;
  color: var(--accent);
}

.feature-body p {
  margin-top: 4px;
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--muted);
}

.circle-arrow {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-circle);
  color: var(--accent);
}

.circle-arrow svg { width: 11px; height: 11px; }

/* ----------------------------------------------------------- 尺寸对照 */

.section-table { padding: 33px 0 0; }

.size-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: var(--fs-5);
}

.size-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.size-table th,
.size-table td {
  padding: 7px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.size-table thead th {
  background: var(--sage);
  font-size: var(--fs-5);
  font-weight: var(--fw-bold);
  color: var(--ink);
  border-bottom: 0;
}

.size-table thead th:first-child { border-radius: var(--r-img) 0 0 var(--r-img); }
.size-table thead th:last-child { border-radius: 0 var(--r-img) var(--r-img) 0; }

.size-table tbody th {
  font-weight: var(--fw-semibold);
  color: var(--ink);
  width: 18%;
}

.size-table tbody td { color: var(--ink-soft); }
.size-table tbody td:last-child { color: var(--muted); }

/* ----------------------------------------------------------- 选购五步 */

.section-steps { padding: 14px 0 0; }

.step-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 12px 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, .5);
}

.step-item {
  position: relative;
  padding: 0 26px 0 0;
}

.step-item + .step-item { padding-left: 26px; }

.step-item + .step-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 1px;
  height: calc(100% - 12px);
  background: var(--line);
}

.step-icon { width: 22px; height: 22px; color: var(--accent); }

.step-item h3 { margin-top: 3px; font-size: var(--fs-8); font-weight: var(--fw-bold); }

.step-item p {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}

.step-arrow {
  position: absolute;
  right: 8px;
  top: 22px;
  width: 10px;
  height: 10px;
  color: var(--line-strong);
}

/* ----------------------------------------------------------- 打理 / 说明 / FAQ */

.section-lower { padding: 26px 0 0; }

.lower-grid {
  display: grid;
  grid-template-columns: 1.18fr .92fr 1fr;
  gap: 16px;
}

.lower-grid > section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px 20px;
}

.lower-grid .lower-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.lower-grid h2 {
  position: relative;
  padding-left: 14px;
  font-size: 21px;
  line-height: 1.3;
}

.lower-grid h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--accent);
}

.lower-grid .lower-lead {
  font-size: var(--fs-4);
  color: var(--muted);
}

.care-body { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; margin-top: 10px; }

.care-figure { height: 146px; overflow: hidden; border-radius: var(--r-img); background: var(--line); }
.care-figure img { width: 100%; height: 100%; object-fit: cover; }

.care-list { display: grid; gap: 8px; align-content: start; }

.care-list li { position: relative; padding-left: 16px; }

.care-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: var(--r-circle);
  background: var(--accent);
}

.care-list h3 { font-size: var(--fs-4); font-weight: var(--fw-bold); line-height: 1.4; }

.care-list p { margin-top: 1px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }

.notes-list { margin-top: 9px; display: grid; gap: 10px; }

.notes-list h3 { font-size: var(--fs-9); font-weight: var(--fw-bold); }

.notes-list p { margin-top: 2px; font-size: 11px; line-height: 1.55; color: var(--muted); }

.faq-list { margin-top: 10px; }

.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:first-child { border-top: 0; }

.faq-list summary {
  position: relative;
  padding: 10px 26px 10px 0;
  font-size: var(--fs-4);
  font-weight: var(--fw-semibold);
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 400;
  color: var(--accent);
}

.faq-list details[open] summary::after { content: "–"; }

.faq-list details p {
  padding: 0 22px 12px 0;
  font-size: var(--fs-3);
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------- footer */

.site-footer {
  margin-top: 0;
  background: var(--dark);
  color: var(--cream);
  padding: 42px 0 98px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  gap: 40px;
  align-items: start;
}

.brand-light { color: var(--cream); }
.brand-light .brand-mark { color: var(--cream); }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 6px 0; align-items: center; }

.footer-nav li + li::before {
  content: "|";
  display: inline-block;
  margin: 0 14px;
  color: var(--line-cream);
}

.footer-nav a {
  font-size: var(--fs-6);
  color: var(--cream-strong);
  border-bottom: 1px solid transparent;
}

.footer-nav a:hover { border-color: var(--line-cream); }

.footer-note {
  padding-left: 26px;
  border-left: 1px solid var(--line-cream);
}

.footer-title {
  font-size: var(--fs-9);
  font-weight: var(--fw-bold);
  color: var(--cream);
}

.footer-note p {
  margin-top: 6px;
  font-size: var(--fs-4);
  line-height: 1.7;
  color: var(--cream-soft);
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1200px) {
  .hero { height: 360px; }
  .hero-title { font-size: 52px; }
  .hero-media { width: 54%; }
  .hero-facts div { padding: 0 20px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-cats { height: auto; padding-bottom: 26px; }
  .fabric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .lower-grid { grid-template-columns: 1fr 1fr; }
  .lower-grid > section:last-child { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 300px 1fr; }
  .footer-note { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--line-cream); padding-top: 18px; }
}

@media (max-width: 900px) {
  :root { --gutter: 22px; --header-h: 58px; }
  .hero { display: flex; flex-direction: column; height: auto; padding-bottom: 22px; }
  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: 230px;
    order: 2;
    margin-top: 24px;
  }
  .hero-media::after {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(247, 244, 240, 0) 26%);
  }
  .hero-inner { padding-top: 26px; display: flex; flex-direction: column; }
  .hero-title { font-size: 40px; }
  .hero-lead { font-size: 14px; }
  .hero-facts { position: static; margin-top: 24px; flex-wrap: wrap; gap: 14px 0; }
  .hero-facts div { padding: 0 16px; }
  .hero-facts div:first-child { padding-left: 0; }
  .section-head { gap: 10px; }
  .section-head p { flex-basis: 100%; }
  .section-cats, .section-fabric, .section-featured, .section-table, .section-steps, .section-lower { height: auto; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-list { grid-template-columns: 1fr; }
  .size-table th, .size-table td { padding: 5px 10px; }
  .size-table tbody td:last-child, .size-table thead th:last-child { display: none; }
  .step-list { grid-template-columns: 1fr; padding: 18px 20px; row-gap: 16px; }
  .step-item, .step-item + .step-item { padding: 0; }
  .step-item + .step-item::before { display: none; }
  .step-arrow { display: none; }
  .lower-grid { grid-template-columns: 1fr; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .site-footer { padding-bottom: 56px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .footer-note { border-top: 1px solid var(--line-cream); padding-top: 16px; }
}

@media (max-width: 620px) {
  .hero-title { font-size: 32px; }
  .hero-actions { flex-wrap: wrap; }
  .section-head h2, .lower-grid h2 { font-size: 20px; }
  .section-head h2::before { top: 1px; height: 18px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-media { height: 140px; }
  .fabric-grid { grid-template-columns: 1fr; }
  .fabric-media { height: 84px; }
  .care-body { grid-template-columns: 96px minmax(0, 1fr); }
  .care-figure { height: 132px; }
  .size-table { font-size: 11px; }
  .size-table tbody th { width: 32%; }
  .size-table tbody td:nth-child(4), .size-table thead th:nth-child(4) { display: none; }
}
