:root {
  --ink: #191713;
  --ink-2: #3c3831;
  --muted: #8d857a;
  --line: #e2ddd3;
  --bg: #f4f2ee;
  --card: #ffffff;
  --gold: #a5855a;
  --shadow: 0 10px 30px rgba(30, 26, 20, 0.10);
  --maxw: 560px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: #eae6e0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(30, 26, 20, 0.08);
  padding-bottom: 8px;
  overflow-x: clip;
}

/* 防止图片撑破宫格与文字溢出 */
.cat-grid > *, .item-grid > * { min-width: 0; }
.gal .slide { min-width: 0; }
.spec-row > div { min-width: 0; }
.desc, .detail-meta h1, .spec-row .v, .rel-card .nm, .item-card .nm { overflow-wrap: anywhere; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

img { display: block; border: 0; }
a { color: inherit; text-decoration: none; }

/* ---------- 顶部 ---------- */
.head {
  padding: 30px 22px 16px;
}

.head-en {
  font-size: 9.5px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.brand {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.head-sub {
  margin-top: 9px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 厂家直销提示行 */
.head-promo {
  margin-top: 12px;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(165, 133, 90, 0.13), rgba(165, 133, 90, 0.03));
  border-left: 2px solid var(--gold);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: #4a443b;
  line-height: 1.6;
}

.head-sub .dot {
  width: 3px;
  height: 3px;
  background: var(--gold);
  border-radius: 50%;
  flex: none;
}

/* ---------- 板块标题 ---------- */
.sec {
  margin-top: 26px;
}

.sec-title {
  padding: 0 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.sec-title h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0;
}

.sec-title .en {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: #b3aa9d;
  text-transform: uppercase;
}

.sec-title .more {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 顶部推荐横向滑动 ---------- */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 22px 10px;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.rec-card {
  position: relative;
  flex: 0 0 auto;
  width: min(72vw, 308px);
  aspect-ratio: 4 / 2.5;
  scroll-snap-align: start;
  background: #e7e2da;
  overflow: hidden;
  border-radius: 3px;
}

.rec-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.rec-card:active img { transform: scale(1.03); }

.rec-card .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 8, 0.74) 0%, rgba(12, 10, 8, 0.28) 32%, rgba(12, 10, 8, 0) 62%);
}

.rec-card .label {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 11px;
  color: #fff;
}

.rec-card .label .t {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

.rec-card .label .s {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  opacity: 0.72;
  margin-top: 3px;
  text-transform: uppercase;
}

.rec-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #fff;
  background: rgba(165, 133, 90, 0.92);
  padding: 3px 8px;
  border-radius: 2px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 2px 0 0;
}

.dots i {
  display: block;
  width: 14px;
  height: 2px;
  background: #cfc7ba;
  transition: background 0.3s, width 0.3s;
}

.dots i.on { background: var(--gold); width: 22px; }

/* ---------- 分类宫格 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 22px;
}

.cat-card {
  position: relative;
  aspect-ratio: 1 / 1.3;
  border-radius: 3px;
  overflow: hidden;
  background: #e7e2da;
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.cat-card .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 9, 7, 0.72) 0%, rgba(10, 9, 7, 0.16) 46%, transparent 72%);
}

.cat-card .txt {
  position: absolute;
  left: 13px;
  bottom: 12px;
  right: 13px;
  color: #fff;
}

.cat-card .txt .t {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.cat-card .txt .n {
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.7;
  margin-top: 2px;
  text-transform: uppercase;
}

.cat-card .txt .tags {
  font-size: 9.5px;
  letter-spacing: 0.02em;
  opacity: 0.66;
  margin-top: 3px;
  line-height: 1.5;
}

.cat-card.wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

/* ---------- 分类页 / 花色列表 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(244, 242, 238, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 221, 211, 0.9);
}

.back {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 19px;
  line-height: 1;
  color: var(--ink-2);
  padding-bottom: 3px;
}

.topbar .tb-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.topbar .tb-count {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cat-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

/* 板块内分类栏 */
.subbar {
  position: sticky;
  top: 63px;
  z-index: 18;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 22px;
  background: rgba(244, 242, 238, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.subbar::-webkit-scrollbar { display: none; }

.fchip {
  flex: none;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: #6d675c;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.fchip.on {
  background: #221f1a;
  border-color: #221f1a;
  color: #fff;
}

.cat-head .h-en {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.cat-head h1 {
  font-size: 20px;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin: 0;
}

.cat-head .desc {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 10px;
  padding: 0 22px 24px;
}

.item-card { display: block; }

.item-card .pic {
  position: relative;
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  background: #e7e2da;
  border-radius: 3px;
  border: 1px solid rgba(226, 221, 211, 0.8);
}

.item-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.item-card:active .pic img { transform: scale(1.05); }

.item-card .nm {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--ink-2);
}

.item-card .sub {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-align: center;
  color: #b6ae9f;
  text-transform: uppercase;
  margin-top: 1px;
}

.empty {
  padding: 70px 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ---------- 详情页 ---------- */
.gal {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #ded9d0;
}

.gal::-webkit-scrollbar { display: none; }

.gal .slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gal .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 0;
}

.gal-hint {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.gal-num {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.gal-num b { color: var(--gold); font-weight: 600; }

.detail-meta {
  padding: 20px 22px 0;
}

.detail-meta .chip {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
  border: 1px solid rgba(165, 133, 90, 0.42);
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.detail-meta h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0;
  line-height: 1.35;
}

.detail-meta .en {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #b6ae9f;
  text-transform: uppercase;
  margin-top: 6px;
}

.detail-meta .desc {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.95;
  color: #4c4740;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  white-space: pre-wrap;
}

.spec-row {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.spec-row > div { flex: 1 1 0; }

.spec-row .k {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: #b6ae9f;
}

.spec-row .v {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-top: 2px;
}

.rel {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: 20px;
}

/* 安装案例 */
.cases {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: 24px;
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 22px;
}

.case-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: #e7e2da;
  border: 1px solid rgba(226, 221, 211, 0.8);
}

.case-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.case-item:active img { transform: scale(1.04); }

.rel .rail {
  padding: 0 22px 4px;
}

.rel-card {
  flex: 0 0 auto;
  width: 112px;
  scroll-snap-align: start;
}

.rel-card .pic {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e7e2da;
  border-radius: 2px;
}

.rel-card .pic img { width: 100%; height: 100%; object-fit: cover; }

.rel-card .nm {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 全屏看图 ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 7, 6, 0.96);
  display: none;
  flex-direction: column;
}

.lb.on { display: flex; }

.lb .top {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
}

.lb .close {
  color: #fff;
  font-size: 24px;
  line-height: 1;
  opacity: 0.85;
  padding: 4px 8px;
}

.lb .stage {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  align-items: center;
}

.lb .stage::-webkit-scrollbar { display: none; }

.lb .stage img {
  flex: 0 0 100%;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  scroll-snap-align: center;
}

.lb .foot {
  padding: 14px 0 26px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 34px;
  padding: 26px 22px 34px;
  background: #211e19;
  color: rgba(255, 255, 255, 0.86);
}

.foot .fb {
  font-size: 15px;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.foot .line {
  margin-top: 12px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.58);
  line-height: 2;
}

.foot .line b { color: rgba(255, 255, 255, 0.82); font-weight: 400; }

.foot .note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.36);
  line-height: 1.9;
}

.foot .en {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  margin-top: 14px;
}

@media (min-width: 600px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
}
