/* 老板端 · 分类页 v3
   只在 #/pages/classify/index 生效；配色跟随后台「主题装扮」的 --t-* 变量
   （渐变底 --t-c1/c2/c3/bg、强调色 --t-primary、按钮 --t-btn），
   括号里的旧粉色是变量缺失时的兜底，不是设计色。
   底部留出 52px 让原生 tabbar 保持可点 */

.cf-root {
  position: fixed;
  left: 0; right: 0; top: 0;
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, var(--t-c1, #ff7bac), var(--t-c2, #ffd8e6) 26%, var(--t-c3, #fff0f4) 58%, var(--t-bg, #fff) 100%);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部：综合 / 排行榜 ---------- */
.cf-top {
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 0;
  flex: 0 0 auto;
}
.cf-seg {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 1px 10px rgba(0, 0, 0, .04), inset 0 1px rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.cf-seg-item {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  color: #8a8a8a;
  background: rgba(255, 255, 255, .3);
  border: 1px solid rgba(255, 255, 255, .5);
  transition: all .18s ease;
}
.cf-seg-item.on {
  background: var(--t-primary, #000);
  border-color: var(--t-primary, #000);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

/* ---------- 游戏图标行 ---------- */
.cf-games {
  flex: 0 0 auto;
  margin: 10px 12px 0;
  padding: 14px 10px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.cf-games::-webkit-scrollbar { display: none; }
.cf-game {
  flex: 1 0 68px;
  min-width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}
.cf-game .ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow .18s ease, transform .18s ease;
}
.cf-game .ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-game .ring .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: var(--t-primary, #b0793a);
  background: var(--t-c3, #fff6e4);
}
.cf-game .nm {
  font-size: 12.5px;
  color: #444;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-game.on .ring {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--t-primary, #faad14);
  transform: translateY(-1px);
}
.cf-game.on .nm { color: #000; font-weight: 700; }

/* ---------- 主体：左侧分类 + 右侧商品 ---------- */
.cf-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 8px;
  margin: 10px 12px 10px;
  padding: 10px 10px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.cf-rail {
  flex: 0 0 84px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 16px;
}
.cf-rail::-webkit-scrollbar { display: none; }
.cf-rail-item {
  position: relative;
  padding: 14px 8px 14px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.25;
  color: #6b6b6b;
  word-break: break-all;
  transition: background .16s ease, color .16s ease;
}
.cf-rail-item.on {
  background: #fff;
  color: #111;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.cf-rail-item.on::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 16px;
  margin-top: -8px;
  border-radius: 2px;
  background: var(--t-primary, #faad14);
}

.cf-list {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-card {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.cf-card:active { transform: scale(.995); }
.cf-card .thumb {
  position: relative;
  flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--t-c3, #fff8ea);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cf-card .thumb .ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--t-primary, #c39a4e);
}
.cf-card .thumb img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.cf-card .info { flex: 1 1 auto; min-width: 0; }
.cf-card .ttl {
  font-size: 13.5px;
  line-height: 1.35;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cf-card .sub {
  margin-top: 3px;
  font-size: 11px;
  color: #a0a0a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-card .pr {
  margin-top: 6px;
  color: #ff4d3d;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}
.cf-card .pr i { font-style: normal; font-size: 11.5px; font-weight: 600; margin-right: 1px; }
.cf-card .buy {
  flex: 0 0 auto;
  align-self: center;
  min-width: 66px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: var(--t-btn, #111);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
}

.cf-empty {
  margin: auto;
  text-align: center;
  color: #b3b3b3;
  font-size: 13px;
}
.cf-list { justify-content: flex-start; }
.cf-empty .dot {
  width: 56px; height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(0, 0, 0, .05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cf-empty .dot svg { opacity: .5; }

.cf-skel {
  height: 84px;
  border-radius: 14px;
  background: linear-gradient(100deg, #fff 30%, #f5f5f5 50%, #fff 70%);
  background-size: 300% 100%;
  animation: cfShine 1.1s infinite linear;
}
@keyframes cfShine {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

.cf-toast {
  position: fixed;
  left: 50%; bottom: 110px;
  transform: translateX(-50%);
  max-width: 70vw;
  padding: 9px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 13px;
  z-index: 1200;
  text-align: center;
}

.cf-count {
  flex: 0 0 auto;
  padding: 2px 2px 4px;
  font-size: 12px;
  color: #999;
  letter-spacing: .02em;
}

/* ---------- 排行榜视图（原版逻辑：goodsList sort=1 销量榜） ---------- */
.cf-ranklist {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 10px 12px 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cf-rankrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
}
.cf-rankrow .no {
  flex: 0 0 22px;
  width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #999;
}
.cf-rankrow .no.hot { color: #ff4d3d; font-size: 14px; }
.cf-rankrow .thumb {
  position: relative;
  flex: 0 0 52px;
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--t-c3, #fff8ea);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cf-rankrow .thumb .ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--t-primary, #c39a4e);
}
.cf-rankrow .thumb img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.cf-rankrow .info { flex: 1 1 auto; min-width: 0; }
.cf-rankrow .ttl {
  font-size: 13.5px;
  font-weight: 600;
  color: #2b2b2b;
  line-height: 1.3;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cf-rankrow .prow { display: flex; align-items: center; gap: 8px; }
.cf-rankrow .pwrap {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .08);
  overflow: hidden;
}
.cf-rankrow .pfill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--t-primary, #ff7bac), var(--t-primary2, #ff4d3d));
}
.cf-rankrow .sold { flex: 0 0 auto; font-size: 11px; color: #999; }
.cf-rankrow .buy {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 15px;
  background: var(--t-btn, #1c1c1c);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
