/* ============================================================
   card.css · 全站房源卡单一数据源（v3.6 卡片统一改造）
   ------------------------------------------------------------
   铁律：.card / .thumb / .nc-* / .nc-row / .priceline / .grid
   等「卡片结构类」只允许在本文件定义；各页 CSS 仅保留页面
   特有容器（.near-card / .me-item / .mgmt / .d-thumb /
   .d-near-grid …）与业务特有样式（.st 状态徽章 / .t-vr）。
   改卡片样式 = 只改本文件 → 全站生效。
   守卫：scripts/card_audit.py（扫描本文件以外出现卡片类定义）
   ============================================================ */

/* ---------- 1. 竖卡骨架（列表/首页/搜索/商铺频道） ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 14px; }
.grid.biz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 880px) { .grid.biz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.biz-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s cubic-bezier(.2, .8, .25, 1), box-shadow .22s ease, border-color .22s ease;
  animation: fadeIn .45s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.card.hit { border-color: var(--primary); box-shadow: 0 0 0 1.5px var(--primary), var(--sh-1); }
.card > :not(.thumb) { margin-left: 14px; margin-right: 14px; }
.card > .chips { margin-top: 12px; }
.card h3 { font-size: 15.5px; font-weight: 700; margin-top: 6px; }
.card .meta { color: var(--ink-3); font-size: 12.5px; }
.priceline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.priceline b {
  font-size: 22px; color: var(--primary); font-weight: 800;
  font-variant-numeric: tabular-nums; font-family: var(--font-display);
}
.priceline .unit { font-size: 12px; color: var(--ink-3); }
.priceline b { font-feature-settings: "tnum", "ss01"; }

/* ---------- 2. 图位（RWCard.thumbShell 输出 .thumb / .thumb.nc-thumb） ---------- */
.thumb {
  position: relative; height: var(--thumb-h); margin: 0; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  overflow: hidden; user-select: none;
  text-decoration: none; color: inherit; cursor: pointer;
}
.thumb::before { /* 底部压暗，保证白字可读；v3.14 配合实拍图整体调浅（卡片已叠 .16→.30 渐变） */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .28));
}
.thumb .t-line {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .35);
  padding: 2px 9px; border-radius: 999px; backdrop-filter: blur(4px);
  font-family: var(--font-mono);
}
.thumb .t-name { position: relative; z-index: 2; color: #fff; font-weight: 700; font-size: 16.5px; font-family: var(--font-display); text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.thumb .t-meta { position: relative; z-index: 2; color: rgba(255, 255, 255, .92); font-size: 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.thumb .t-wm { /* 水印 */
  position: absolute; right: -8px; bottom: -14px; z-index: 1;
  font-family: var(--font-mono); font-weight: 800; font-size: 26px; letter-spacing: .04em;
  color: rgba(255, 255, 255, .12); pointer-events: none;
  transition: transform .35s cubic-bezier(.2, .8, .25, 1.2), color .25s ease;
}
.card:hover .thumb .t-wm {
  transform: translate(-3px, -3px) scale(1.08);
  color: rgba(255, 255, 255, .22);
}

/* ---------- 3. 横向卡结构（nc-*：detail 邻近卡 / me·publish 管理卡共用） ---------- */
.nc-thumb { height: var(--thumb-h); border-radius: 0; flex: none; position: relative; }
.nc-thumb .t-line { font-size: 11px; padding: 3px 9px; }
.nc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.nc-name { margin: 0; font-weight: 800; font-size: 14.5px; color: var(--ink); }
:is(.near-card, .me-item):hover .nc-name { color: var(--primary-deep); }
.nc-meta { margin: 0; font-size: 12px; color: var(--ink-3); }
.nc-price {
  font-family: var(--font-display); font-size: 19px; font-weight: 800;
  color: var(--primary-deep); margin-top: 4px; font-feature-settings: tnum;
}
.nc-price small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.nc-body .chip { align-self: flex-start; margin-top: 4px; }
/* 价格行（管理卡：左状态徽章 · 右价格两端对齐；.st 徽章本体在 me.css） */
.nc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.nc-row .nc-price { flex: none; }

/* ---------- 4. 精修块（原 app.css 全局精修：图位更高、悬浮更明显） ---------- */
.grid { gap: 16px; }
.card { border-radius: var(--r-lg); }
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }
.thumb { height: var(--thumb-h); }
.thumb .t-name { font-size: 17.5px; }
.priceline b { font-size: 24px; }
@media (max-width: 760px) { .thumb { height: var(--thumb-h); } }
