/* components.css — 公共组件（首页 / 分类页 / 详情页共用）
   组件清单：site-header、site-footer、btn、eyebrow、kicker、lede、tags、
   card（cat-card / feat-card / room / mat-item / struct-item / step）、faq、notes。
   只写"长什么样"，页面里的列数与间距写在 style.css。 */

/* ---------------- 基础元件 ---------------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
  font-weight: var(--fw-bold);
}

.kicker {
  margin: 6px 0 0;
  font-size: var(--fs-5);
  color: var(--muted);
}

.lede {
  margin: 10px 0 0;
  font-size: var(--fs-7);
  line-height: 1.8;
  color: var(--body);
}

.tags {
  margin: 8px 0 0;
  font-size: var(--fs-3);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-dark);
  font-size: var(--fs-6);
  font-weight: var(--fw-bold);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(120, 72, 40, 0.07);
  color: var(--accent-deep);
}

/* ---------------- M0 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 18px rgba(92, 53, 32, 0.04);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: var(--fs-10);
  font-weight: var(--fw-black);
  color: var(--ink);
  letter-spacing: 0.04em;
}

.brand-text em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: var(--fs-5);
  color: var(--body);
}

.nav a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.header-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-4);
  font-weight: var(--fw-bold);
  color: var(--accent);
  transition: background 0.18s ease;
}

.header-cta:hover {
  background: rgba(120, 72, 40, 0.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--accent);
  cursor: pointer;
}

/* ---------------- M12 页脚 ---------------- */
.site-footer {
  background: var(--accent);
  color: var(--on-dark);
  padding: 18px 0 16px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}

.footer-col {
  flex: 1 1 200px;
  min-width: 170px;
}

.footer-col--brand {
  flex: 1.4 1 260px;
  min-width: 220px;
}

.footer-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: var(--fs-5);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--on-dark);
}

.footer-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-12);
  letter-spacing: 0.05em;
}

.footer-brand span {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-3);
  color: rgba(247, 239, 230, 0.66);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: var(--fs-5);
}

.footer-links a {
  color: rgba(247, 239, 230, 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.footer-links a:hover {
  color: #fff;
  border-bottom-color: rgba(247, 239, 230, 0.6);
}

.footer-note {
  margin: 0;
  font-size: var(--fs-3);
  line-height: 1.7;
  color: rgba(247, 239, 230, 0.62);
}

.footer-col .footer-note + .footer-note {
  margin-top: 6px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(247, 239, 230, 0.18);
  font-size: var(--fs-3);
  color: rgba(247, 239, 230, 0.62);
}

/* ---------------- 卡片通用 ---------------- */
.img-frame {
  overflow: hidden;
  border-radius: var(--radius-img);
  background: var(--panel-soft);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* 品类卡 */
.cat-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  height: 100%;
  padding: 7px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.cat-card:hover img {
  transform: scale(1.04);
}

.cat-card img {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel-soft);
}

.cat-card-body {
  min-width: 0;
}

.cat-num {
  font-family: var(--serif);
  font-size: var(--fs-3);
  color: var(--accent-soft);
  letter-spacing: 0.1em;
}

.cat-card h3 {
  margin: 1px 0 2px;
  font-size: var(--fs-6);
  font-family: var(--serif);
  letter-spacing: 0.01em;
}

.cat-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--body);
}

.cat-card .tags {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0;
  color: var(--muted);
}

/* 精选条目卡 */
.feat-card {
  display: flex;
  gap: 11px;
  height: 100%;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.feat-card:hover img {
  transform: scale(1.04);
}

.feat-card img {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  object-fit: cover;
  border-radius: var(--radius-img);
  background: var(--panel-soft);
}

.feat-body {
  min-width: 0;
}

.feat-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--panel-warm);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: var(--fw-bold);
}

.feat-card h3 {
  margin: 5px 0 4px;
  font-size: var(--fs-6);
  font-family: var(--serif);
  line-height: 1.45;
}

.feat-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--body);
}

.feat-more {
  display: inline-block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: var(--fw-bold);
  color: var(--accent);
}

.feat-card:hover .feat-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 结构条目 */
.struct-item {
  position: relative;
  padding: 8px 9px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.struct-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent-soft);
}

.struct-item--a::before { background: #9c6b45; }
.struct-item--b::before { background: #7d8a76; }
.struct-item--c::before { background: #b08a6a; }
.struct-item--d::before { background: #8b7f76; }
.struct-item--e::before { background: #a9775a; }

.struct-item h3 {
  margin: 0 0 5px;
  font-size: var(--fs-7);
  font-family: var(--serif);
}

.struct-item p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--body);
}

/* 材质条目 */
.mat-item {
  padding: 8px 9px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mat-bar {
  display: block;
  width: 30px;
  height: 4px;
  border-radius: 3px;
  margin-bottom: 6px;
  background: var(--accent-soft);
}

.mat-bar--wood { background: #a4713f; }
.mat-bar--board { background: #cbb391; }
.mat-bar--stone { background: #9a9490; }
.mat-bar--glass { background: #a9c2c4; }
.mat-bar--metal { background: #b3b7ba; }
.mat-bar--rattan { background: #c19a63; }

.mat-item h3 {
  margin: 0 0 4px;
  font-size: var(--fs-7);
  font-family: var(--serif);
}

.mat-item p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--body);
}

/* 步骤 */
.step {
  position: relative;
  padding: 8px 10px 8px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.step-row {
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 9px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: var(--fw-bold);
  color: var(--accent);
  font-family: var(--serif);
  line-height: 1;
}

.step h3 {
  margin: 0 0 4px;
  font-size: var(--fs-6);
  font-family: var(--serif);
}

.step p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--body);
}

/* 空间卡 */
.room {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.room img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-img);
  background: var(--panel-soft);
}

.room:hover img {
  transform: scale(1.03);
}

.room h3 {
  margin: 0;
  font-size: var(--fs-6);
  font-family: var(--serif);
}

.room p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--body);
}

.room--plain {
  justify-content: center;
  background: var(--panel-warm);
  border-color: transparent;
}

/* 打理要点 */
.care-list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
}

.care-list li:last-child {
  border-bottom: 0;
}

.care-list strong {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink);
}

.care-list span {
  color: var(--body);
}

/* 收录说明 */
.notes {
  padding: 12px 14px;
  background: var(--panel-warm);
  border-radius: var(--radius-panel);
}

.notes h2 {
  font-family: var(--serif);
  font-size: var(--fs-13);
  margin: 0;
}

.notes-kicker {
  margin: 5px 0 8px;
  font-size: var(--fs-4);
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.notes p:last-child {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--body);
}

/* FAQ 手风琴 */
.faq {
  padding: 5px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.faq summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  font-family: var(--serif);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}

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

.faq p {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--body);
}

.faq summary:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.cat-card:focus-visible,
.feat-card:focus-visible,
.header-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
