/* ============================================================
   91SM v11 · list.css
   List page (category / subcategory / tag) - shared template
   Density-first: 4 cols × 6 rows = 24 cards / page
   ============================================================ */

/* ---------- Hero bar ---------- */

.list-hero {
  max-width: 1760px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 80px) 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  position: relative;
}

.list-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: clamp(16px, 4vw, 80px);
  right: clamp(16px, 4vw, 80px);
  height: 1px;
  background: var(--border-2);
}

.list-hero-left { min-width: 0; flex: 1; }

.list-hero-title {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(255, 46, 126, 0.3), 0 0 60px rgba(255, 46, 126, 0.15);
  margin: 0;
}

/* 合集 / 标签 简介（运营填写，前台显示 + SEO 共用） */

.list-hero-desc {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.list-hero-desc[hidden] { display: none; }

@media (max-width: 640px) {
  .list-hero-desc { font-size: 13px; margin-top: 10px; }
}

.list-hero-desc {
  margin-top: 8px;
  max-width: 600px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.list-hero-right {
  flex-shrink: 0;
  text-align: right;
}

.hero-count {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.hero-count .count-unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  margin-left: 6px;
  font-weight: 400;
  letter-spacing: 0.18em;
  vertical-align: 6px;
  text-transform: uppercase;
}

.hero-count-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---------- Sticky filter bar ---------- */

.list-filterbar-wrap {
  position: sticky;
  top: 46px; /* under sticky nav */
  z-index: 80;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin-top: 18px;
}

.list-filterbar-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,5,13,0.95) 0%, rgba(7,5,13,0.98) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
}

.list-filterbar {
  max-width: 1760px;
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 80px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.subtag-strip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  min-width: 0;
  position: relative;
}

.subtag-strip::-webkit-scrollbar { display: none; }

.subtag-strip::after {
  content: '';
  position: sticky;
  right: -2px;
  width: 32px;
  flex-shrink: 0;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
  align-self: stretch;
}

.subtag-chip {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: all 0.18s;
}

.subtag-chip:hover {
  border-color: var(--accent-subtle);
  color: var(--text);
}

.subtag-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,46,126,0.45);
}

.subtag-chip .chip-count {
  font-family: var(--mono);
  font-size: 10px;
  margin-left: 5px;
  opacity: 0.55;
}

.filter-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ---------- Sort chips (inline, instant switch) ---------- */

.sort-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.sort-chip {
  min-height: 36px;
  min-width: 52px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.sort-chip:hover {
  border-color: var(--accent-subtle);
  color: var(--text);
}

.sort-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.sort-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Applied chips (below filter bar) */

.applied-chips-wrap {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 80px);
  display: none;
}

.applied-chips-wrap.has-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px clamp(16px, 4vw, 80px) 0;
}

.applied-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-3);
  text-transform: uppercase;
}

.applied-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-subtle);
  color: var(--accent);
  font-size: 11.5px;
  font-family: var(--sans);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.18s;
}

.applied-chip:hover { background: var(--accent); color: #fff; }

.applied-chip .x { font-family: var(--mono); font-size: 10px; opacity: 0.75; }

.applied-clear {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--text-3);
  cursor: pointer;
  text-transform: uppercase;
  margin-left: 4px;
  background: transparent;
  border: none;
  padding: 4px 8px;
}

.applied-clear:hover { color: var(--accent); }

/* ---------- List grid ---------- */

.list-main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 80px) 36px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-height: 200px;
}

/* Empty states */

.list-empty {
  grid-column: 1 / -1;
  padding: 80px 28px;
  text-align: center;
  border: 1px dashed var(--border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.list-empty-icon {
  font-family: var(--display);
  font-size: 48px;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  opacity: 0.45;
}

.list-empty-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.list-empty-sub {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  max-width: 420px;
}

.list-empty-action {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 9px 22px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.list-empty-action:hover { background: var(--accent); color: #fff; box-shadow: 0 0 18px rgba(255,46,126,0.35); }

/* ---------- Pagination ---------- */

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 0 4px;
  margin-top: 28px;
}

.pagination-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pagination-meta .meta-em { color: var(--text); }

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-subtle);
  color: var(--text);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,46,126,0.4);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0 4px;
  letter-spacing: 0.1em;
}

.mobile-load-more {
  display: none;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--accent-subtle);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s;
}

.mobile-load-more:hover { background: var(--accent-bg); }

/* ---------- Related section ---------- */

.related-block {
  max-width: 1760px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 80px) 12px;
  border-top: 1px solid var(--border);
}

.related-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.related-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.related-en {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  text-decoration: none;
}

.related-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.related-chip .rc-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}

.related-chip:hover .rc-count { color: var(--accent); opacity: 0.85; }

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .list-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .list-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 20px;
    padding-bottom: 14px;
  }
  .list-hero-right { text-align: left; }
  .list-hero-title { font-size: 28px; }
  .list-filterbar { padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
  .filter-controls { width: 100%; justify-content: flex-end; }
  .list-main { padding-top: 18px; padding-bottom: 30px; }
  .list-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pagination-wrap { flex-direction: column; gap: 12px; }
  .pagination { flex-wrap: wrap; justify-content: center; }
  .related-block { padding: 28px 16px 8px; }
  .applied-chips-wrap.has-chips { padding: 10px 16px 0; }
}

@media (max-width: 640px) {
  .list-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pagination { display: none; }
  .mobile-load-more { display: block; }
  .list-hero-title { font-size: 24px; }
  .hero-count { font-size: 26px; }
}
