/* ═══════════════════════════════════════════════════════════
   Aqua TexSide v4 · 贴图页 ambientCG 式双栏：左侧栏（搜索+分类），右侧展示区
   ═══════════════════════════════════════════════════════════ */
.tex-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.tex-side {
  position: sticky; top: 84px;
  display: flex; flex-direction: column; gap: 12px;
}
/* 关键修正：.sr-box 原为横排工具行设计（flex: 1 1 260px），放进竖排侧栏后
   260px 会变成高度基准，把 46px 的胶囊撑成大圆球——这里钉死高度与自适应宽 */
.tex-side .sr-box { flex: 0 0 auto; width: 100%; height: 46px; padding: 0 12px; }
.tex-side .sr-panel { margin: 0; padding: 14px 14px 16px; max-height: 52vh; overflow: auto; }
.tex-side .sr-grid { grid-template-columns: 1fr; }

/* 分类清单：竖排一列，像 ambientCG 左边的分类 */
.tex-cats { padding: 12px; }
.tex-cats .cat-chips {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 8px; margin: 0;
}
.tex-cats .cat-chip {
  width: 100%; text-align: left;
  padding: 10px 14px; border-radius: 12px;
}
.tex-cats .cat-add { margin-left: 0; justify-content: center; }

/* 右区顶栏：排序钉在右上角 */
.tex-main-bar { display: flex; justify-content: flex-end; margin: 0 0 10px; min-height: 10px; }

/* 搜索时右侧让位，结果就出在侧栏里 */
body.sr-on .tex-cats { display: none !important; }

@media (max-width: 960px) {
  .tex-layout { grid-template-columns: 1fr; }
  .tex-side { position: static; }
  .tex-side .sr-panel { max-height: none; }
  .tex-cats .cat-chips { flex-direction: row; flex-wrap: wrap; }
  .tex-cats .cat-chip { width: auto; }
  .tex-main-bar { justify-content: flex-start; }
}

/* ── v3 · 分类分组（常用 / 建筑 / 纺织物 / 自然）── */
.tex-group { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tex-group-tx {
  padding: 0 14px 2px;
  font-size: 11px; font-weight: 900; letter-spacing: .16em;
  color: var(--ink-faint, #7f97b8);
}
@media (max-width: 960px) {
  .tex-group { display: contents; }
  .tex-group-tx { display: none; }
}

/* ── v4 · 双会话兜底：并行会话的 catalog-v8 会往分类条塞自己的分组胶囊
   （.cat-grp，形如「★常用」「建筑5」）与重复的「全部贴图」。本页分组
   以 tex.html 内联重组脚本为准，这些残留一律藏掉，用户只看到一套分组。 ── */
.tex-chips-final .cat-grp, #texCats .cat-grp { display: none !important; }
#texCats .tex-group ~ [data-cat-btn="all"] { display: none !important; }
