/* =============================================================
 * 分类信息 4.0（/pc/classified.html）专用样式
 * 左右分栏：左栏 sticky 分类导航 + 城区筛选 + 发布入口；右栏工具条 + 卡片列表。
 * 设计语言：复用 tokens.css 政务红语义令牌；对齐 svc-layout--with-side 体系。
 * ============================================================= */

.cls-hero {
  background: var(--surface);
  color: var(--ink); border: none; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 32px 24px 24px; margin: 18px 0 0;
}
.cls-hero__eyebrow { font-size: 13px; color: var(--ink-light); letter-spacing: 1px; margin-bottom: 10px; }
.cls-hero h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); color: var(--ink); }
.cls-hero p { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 720px; }
.cls-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cls-hero__copy { flex: 1 1 520px; min-width: 0; }
.cls-hero__actions { flex: 0 0 210px; display: flex; flex-direction: column; gap: 8px; }
.cls-hero__publish {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.cls-hero__publish:hover { background: var(--gov-red-deep); box-shadow: 0 8px 22px -14px rgba(189,46,46,.7); }
.cls-hero__publish svg { width: 18px; height: 18px; }
.cls-hero__actions p { margin: 0; font-size: 12px; color: var(--ink-light); line-height: 1.6; text-align: center; }

/* ---------- 左右分栏 ---------- */
.cls-layout { align-items: start; margin-bottom: 28px; }
.cls-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cls-main { min-width: 0; }

/* 左栏导航列表（复用 svc-nav__link 视觉，纵向可滚动） */
.svc-nav__list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.svc-nav__list .svc-nav__link { padding: 9px 10px; }
.svc-nav__list .svc-nav__txt { flex: 1 1 auto; }

.cls-region .svc-nav__list { max-height: 300px; }

/* 左栏发布入口 */
.cls-side-publish {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.cls-side-publish .btn-publish { width: 100%; justify-content: center; }
.cls-side-publish__tip { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.cls-side-publish__mini {
  font-size: 12px; color: var(--ink-light); text-align: center; text-decoration: underline;
  text-underline-offset: 3px;
}
.cls-side-publish__mini:hover { color: var(--primary); }

/* ---------- 右栏工具条 ---------- */
.cls-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 16px;
}
.cls-toolbar__search { flex: 1 1 280px; max-width: 420px; margin: 0; }
.cls-toolbar__meta { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.cls-toolbar__count b { color: var(--primary); font-weight: 700; }
.cls-toolbar__current {
  color: var(--ink); background: var(--brand-tint); border-radius: 999px;
  padding: 3px 12px; font-size: 12.5px; font-weight: 600;
}

/* ---------- 子类 chips ---------- */
.sub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; min-height: 0; }
.sub-chips[hidden] { display: none; }
.sub-chip {
  border: 1px solid var(--border); background: var(--card); color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; transition: .15s;
}
.sub-chip:hover { border-color: var(--primary); color: var(--primary); }
.sub-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 信息列表 */
.info-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 18px;
}
.info-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.info-card__img {
  height: 150px; background: var(--brand-tint); display: grid; place-items: center;
  color: var(--primary); font-size: 30px; overflow: hidden; position: relative;
}
.info-card__ph { line-height: 1; }
.info-card__pin {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: #bd2e2e; color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; box-shadow: none;
}
.info-card__img img { width: 100%; height: 100%; object-fit: cover; }
.info-card__body { padding: 13px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.info-card__title {
  font-size: 16px; font-weight: 600; color: var(--foreground); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.info-card__desc {
  font-size: 13px; color: var(--ink-soft); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.info-card__price { font-size: 17px; font-weight: 800; color: hsl(0, 58%, 45%); }
.info-card__price.free { color: var(--muted-foreground); font-weight: 600; font-size: 14px; }
.info-card__meta { font-size: 13px; color: var(--muted-foreground); display: flex; gap: 8px; flex-wrap: wrap; }
.info-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-foreground); display: inline-block; }
.info-card__contact { font-size: 12.5px; color: var(--ink-soft); }

.cls-empty, .cls-loading { text-align: center; color: var(--muted-foreground); padding: 40px 0; font-size: 14px; }

/* 三级子类 chips */
.sub-chips--l3 { padding-top: 0; margin-top: -4px; }
.sub-chips--l3 .sub-chip { font-size: 12px; padding: 4px 12px; background: var(--muted); border-color: transparent; color: var(--muted-foreground); }
.sub-chips--l3 .sub-chip.is-active { background: var(--brand-tint); color: var(--primary); border-color: var(--primary); }

/* 窄屏：侧栏落到上方，纵向堆叠 */
@media (max-width: 960px) {
  .cls-layout { grid-template-columns: 1fr; gap: 18px; }
  .cls-aside {
    position: static; order: 1;
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px; align-items: start;
  }
  .cls-main { order: 2; }
  /* 平板宽度下左栏改为限高滚动，避免 33 个分类把正文推到很下面 */
  .cls-aside .svc-nav__list { max-height: 340px; overflow-y: auto; }
  .cls-region .svc-nav__list { max-height: 220px; }
  /* 头图已有全宽“在线发布”，平板不再重复侧栏卡片，缩短筛选区高度 */
  .cls-side-publish { display: none; }
  .cls-toolbar__meta { margin-left: 0; width: 100%; }
  .cls-hero__row { align-items: stretch; }
  .cls-hero__actions { flex: 1 1 100%; width: 100%; }
  .cls-hero__publish { width: 100%; }
  .cls-hero__actions p { text-align: left; }
}
@media (max-width: 560px) {
  .cls-hero { padding: 20px 16px 18px; }
  .cls-aside { grid-template-columns: 1fr; }
  .cls-hero__eyebrow { font-size: 12px; letter-spacing: .4px; }
  .cls-hero p { font-size: 14px; line-height: 1.8; }
  .cls-hero__publish { min-height: 42px; font-size: 14px; }
}
