/* ==========================================================================
   展示柜 / The Cabinet — 现货娃娃陈列柜
   木质柜框 + 横向层板 + 射灯光晕 + 悬停娃娃浮起 + 抽屉式信息卡
   ========================================================================== */

.cab-page {
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 250, 238, .9), transparent 70%),
    var(--bg);
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ---------- 标题区 ---------- */
.cab-head {
  text-align: center;
  padding: 76px 24px 34px;
}
.cab-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 500;
  line-height: 1.02;
  color: var(--ink-deep);
  margin: 16px 0 0;
  letter-spacing: -0.01em;
}
.cab-head .lede {
  max-width: 48ch;
  margin: 20px auto 0;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--ink-soft);
}
.cab-head .lede em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
  color: var(--accent-deep);
}

/* ---------- 筛选条 ---------- */
.cab-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  padding: 0 24px 34px;
}
.cab-filter {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 17px;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out),
              background .25s var(--ease-out);
}
.cab-filter:hover { border-color: var(--accent); color: var(--accent); }
.cab-filter.is-active {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  color: var(--bg);
}

/* ==========================================================================
   柜体
   ========================================================================== */
.cabinet {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 柜体外框：木色 + 立体阴影 */
.cab-case {
  position: relative;
  background:
    linear-gradient(180deg, #8C6A45 0%, #7A5A39 8%, #6E5133 92%, #5E4429 100%);
  border-radius: 6px;
  padding: 22px 22px 26px;
  box-shadow:
    0 40px 80px -28px rgba(35, 25, 15, .48),
    0 6px 18px rgba(35, 25, 15, .22),
    inset 0 1px 0 rgba(255, 226, 180, .22);
}
/* 木纹 */
.cab-case::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, .05) 0 1px,
      transparent 1px 4px,
      rgba(255, 255, 255, .022) 4px 5px,
      transparent 5px 11px);
  opacity: .7;
  pointer-events: none;
}

/* 柜内空间 */
.cab-interior {
  position: relative;
  /* 内壁必须是纯色 #EBE4D4 —— 与羽化图背景色完全一致，
     否则照片会比周围亮一档，露出发白的方块边。
     射灯的明暗效果改由 .cab-light 叠加层来做，不改内壁底色。 */
  background: #EBE4D4;
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    inset 0 14px 30px -12px rgba(60, 42, 22, .38),
    inset 0 -10px 22px -14px rgba(60, 42, 22, .26),
    inset 0 0 0 1px rgba(90, 62, 34, .3);
}

/* 顶部射灯光锥 */
/* 射灯光锥：叠在所有格子上方，制造柜内打光的感觉。
   用 screen 混合而不是直接改内壁色，否则照片会露边。 */
.cab-light {
  position: absolute;
  inset: 0 0 auto 0;
  height: 420px;
  background:
    radial-gradient(ellipse 52% 100% at 50% -10%,
      rgba(255, 251, 236, .82) 0%,
      rgba(255, 247, 224, .38) 38%,
      transparent 74%);
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: screen;
}

/* 柜内层板 */
.cab-shelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 14px solid #7A5735;
  box-shadow:
    0 6px 0 -1px #5E4227,
    0 12px 16px -6px rgba(50, 34, 18, .45);
}
.cab-shelf:last-child { border-bottom: 0; box-shadow: none; }
/* 层板前沿高光 */
.cab-shelf::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -13px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 218, 168, .5), rgba(255, 218, 168, .16));
  pointer-events: none;
  z-index: 3;
}

/* 柜内分隔竖板（每格之间的木条） */
/* 每格是一个凹进去的小龛：内壁比层板暗一点，四边有内阴影，
   娃娃才像"摆在格子里"而不是"贴在平面上"。 */
.cab-cell {
  position: relative;
  padding: 20px 16px 22px;
  border-right: 7px solid #7A5735;
  box-shadow:
    7px 0 10px -6px rgba(50, 34, 18, .4),
    inset 0 10px 18px -12px rgba(60, 42, 22, .42),
    inset 0 -8px 14px -12px rgba(60, 42, 22, .3);
  background: linear-gradient(180deg, rgba(150, 120, 80, .1), rgba(150, 120, 80, 0) 22%);
  min-width: 0;
}
.cab-cell:last-child { border-right: 0; box-shadow: none; }

/* ---------- 单格 ---------- */
.cab-item {
  position: relative;
  display: block;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

/* 射灯下的光池 */
.cab-item::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 150%;
  height: 74%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 78%,
    rgba(255, 248, 226, .95) 0%,
    rgba(255, 246, 222, .5) 42%,
    transparent 72%);
  opacity: .5;
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}
.cab-item:hover::before { opacity: 1; }

/* 每格放一张"立在层板上的展示卡"：白卡纸 + 照片 + 桌脚，
   像货架上的商品卡。有相框感，照片又完整不抠图。 */
/* 每格是一个内凹的壁龛（niche），照片做成小卡片贴在龛壁上 ——
   真实家居陈列柜里也常这样贴照片卡。不抠图就没有边缘瑕疵。 */
.cab-figure {
  position: relative;
  height: 202px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.cab-figure img {
  position: relative;
  z-index: 2;
  max-width: 76%;
  max-height: 90%;
  object-fit: contain;
  display: block;
  /* 白卡纸 + 细框线 + 投影 = 一张立在龛里的照片卡 */
  border: 6px solid #FCF8EE;
  outline: 1px solid rgba(120, 92, 56, .26);
  border-radius: 1px;
  background: #FCF8EE;
  box-shadow: 0 8px 14px rgba(50, 34, 18, .26), 0 1px 3px rgba(50, 34, 18, .16);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.cab-item:hover .cab-figure img {
  transform: translateY(-10px) scale(1.05) rotate(-.8deg);
  box-shadow: 0 20px 26px rgba(50, 34, 18, .34), 0 3px 6px rgba(50, 34, 18, .2);
}
/* 贴在龛壁上的照片卡片 */
.cab-figure::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 44%;
  height: 10px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(70, 48, 26, .3) 0%,
    rgba(70, 48, 26, .1) 48%,
    transparent 72%);
  z-index: 1;
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out);
}
.cab-item:hover .cab-figure::after {
  transform: translateX(-50%) scaleX(1.25);
  opacity: .55;
}

/* 摆件底座：柜板上的一圈接触影 */
/* 相框落在层板上的接触影 */
.cab-base {
  position: relative;
  height: 10px;
  margin: 0 auto;
  max-width: 52%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(70, 48, 26, .3) 0%,
    rgba(70, 48, 26, .12) 46%,
    transparent 72%);
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out);
}
.cab-item:hover .cab-base {
  transform: scale(1.3);
  opacity: .55;
}

/* 挂在格前的价签 */
.cab-tag {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.6deg);
  z-index: 4;
  background: linear-gradient(180deg, #FCF7EA, #F0E7D3);
  border: 1px solid #D8C7A6;
  border-radius: 2px;
  padding: 4px 11px 5px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent-deep);
  box-shadow: 0 4px 9px rgba(60, 40, 22, .22);
  transition: background .3s var(--ease-out), color .3s var(--ease-out),
              transform .3s var(--ease-out);
}
/* 价签上的挂绳 */
.cab-tag::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 1px;
  height: 7px;
  background: #A98A5E;
}
.cab-item:hover .cab-tag {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #FCF7EA;
  transform: translateX(-50%) rotate(0deg) translateY(-2px);
}

/* ---------- 信息抽屉 ---------- */
.cab-drawer {
  display: block;
  margin-top: 10px;
  border-top: 1px solid rgba(120, 92, 56, .28);
  padding-top: 9px;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.cab-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.24;
  color: var(--ink-deep);
  margin: 0 0 4px;
  transition: color .3s var(--ease-out);
}
.cab-item:hover .cab-name { color: var(--accent-deep); }
.cab-price {
  display: block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 7px;
}
.cab-mat {
  display: block;
  font-size: .76rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
.cab-desc {
  display: block;
  font-size: .75rem;
  line-height: 1.55;
  color: var(--ink-quiet);
  margin: 8px 0 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease-out), opacity .35s var(--ease-out),
              margin-top .45s var(--ease-out);
}
.cab-item:hover .cab-desc,
.cab-item:focus-visible .cab-desc {
  max-height: 90px;
  opacity: 1;
}
.cab-buy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.cab-buy svg { width: 11px; height: 11px; fill: currentColor; }
.cab-item:hover .cab-buy,
.cab-item:focus-visible .cab-buy { opacity: 1; transform: none; }

/* 分类小标 */
.cab-cat {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 4;
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(90, 68, 40, .6);
}

/* ---------- 柜脚 ---------- */
.cab-feet {
  display: flex;
  justify-content: space-between;
  padding: 0 34px;
}
.cab-foot {
  width: 26px;
  height: 16px;
  background: linear-gradient(180deg, #6B4E30, #4E381F);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 5px 10px rgba(35, 25, 15, .3);
}

/* ---------- 柜下说明 ---------- */
.cab-note {
  text-align: center;
  max-width: 54ch;
  margin: 34px auto 0;
  padding: 0 24px;
  font-size: .86rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.cab-note a { color: var(--accent); }

/* ---------- 空态 ---------- */
.cab-empty {
  text-align: center;
  padding: 70px 24px 40px;
  color: var(--ink-quiet);
  font-size: .95rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .cab-shelf { grid-template-columns: repeat(4, 1fr); }
  .cab-figure { height: 175px; }
}
@media (max-width: 860px) {
  .cab-shelf { grid-template-columns: repeat(3, 1fr); }
  .cab-case { padding: 14px 14px 18px; }
  .cab-cell { padding: 16px 12px 18px; border-right-width: 5px; }
  .cab-figure { height: 150px; }
}
@media (max-width: 600px) {
  .cab-head { padding: 52px 16px 26px; }
  .cab-filters { padding: 0 16px 26px; gap: 7px; }
  .cab-filter { font-size: .68rem; padding: 8px 12px; }
  .cabinet { padding: 0 12px; }
  .cab-shelf { grid-template-columns: repeat(2, 1fr); border-bottom-width: 11px; }
  .cab-cell { padding: 14px 9px 16px; border-right-width: 4px; }
  .cab-figure { height: 132px; margin-bottom: 9px; }
  .cab-name { font-size: .88rem; }
  .cab-price { font-size: .74rem; }
  .cab-mat { font-size: .68rem; }
  .cab-tag { font-size: .7rem; padding: 3px 8px 4px; }
  .cab-feet { padding: 0 18px; }
  .cab-foot { width: 18px; height: 11px; }
}

/* ---------- 减少动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .cab-item:hover .cab-figure img { transform: none; }
  .cab-item:hover .cab-base { transform: none; }
  .cab-desc, .cab-buy { transition: none; }
  .cab-item:hover .cab-desc { max-height: 90px; opacity: 1; }
  .cab-item:hover .cab-buy { opacity: 1; transform: none; }
}

/* ==========================================================================
   首页柜子预览（8 件）
   ========================================================================== */

.cab-peek { margin: 30px 0 10px; }
.cab-peek-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.cab-peek-head .eyebrow { margin: 0; }
.cab-peek-more {
  font-family: var(--sans);
  font-size: .76rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease-out);
}
.cab-peek-more:hover { color: var(--accent-deep); }

/* 迷你柜体 */
.cab-peek-case {
  background: linear-gradient(180deg, #8C6A45 0%, #7A5A39 6%, #6E5133 94%, #5E4429 100%);
  border-radius: 5px;
  padding: 12px 12px 14px;
  box-shadow: 0 26px 46px -22px rgba(35, 25, 15, .45), 0 4px 12px rgba(35, 25, 15, .2);
}
.cab-peek-interior {
  background: #EBE4D4;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 8px 18px -10px rgba(60, 42, 22, .34), inset 0 0 0 1px rgba(90, 62, 34, .28);
}
.cab-peek-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}

/* 单格 */
.cab-peek-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 12px;
  border-right: 5px solid #7A5735;
  text-decoration: none;
  box-shadow: 5px 0 8px -5px rgba(50, 34, 18, .38);
  transition: background .35s var(--ease-out);
}
.cab-peek-cell:last-child { border-right: 0; box-shadow: none; }
.cab-peek-cell:hover { background: rgba(255, 250, 236, .5); }

.cab-peek-tag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: linear-gradient(180deg, #FCF7EA, #F0E7D3);
  border: 1px solid #D8C7A6;
  border-radius: 2px;
  padding: 2px 7px 3px;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent-deep);
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.cab-peek-cell:hover .cab-peek-tag {
  background: var(--accent);
  border-color: var(--accent);
  color: #FCF7EA;
}
.cab-peek-fig {
  position: relative;
  height: 116px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.cab-peek-fig img {
  max-width: 76%;
  max-height: 100%;
  object-fit: contain;
  border: 4px solid #FCF8EE;
  outline: 1px solid rgba(120, 92, 56, .24);
  border-radius: 1px;
  background: #FCF8EE;
  box-shadow: 0 6px 11px rgba(50, 34, 18, .24);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.cab-peek-cell:hover .cab-peek-fig img {
  transform: translateY(-7px) scale(1.05) rotate(-.8deg);
  box-shadow: 0 15px 20px rgba(50, 34, 18, .3);
}
.cab-peek-name {
  font-family: var(--serif);
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-deep);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 3px;
}
.cab-peek-cell:hover .cab-peek-name { color: var(--accent-deep); }
.cab-peek-mat {
  font-size: .66rem;
  color: var(--ink-quiet);
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 1100px) { .cab-peek-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 620px) {
  .cab-peek-row { grid-template-columns: repeat(2, 1fr); }
  .cab-peek-fig { height: 108px; }
  .cab-peek-cell { padding: 12px 8px 10px; border-right-width: 4px; }
  .cab-peek-name { font-size: .8rem; }
}
