/* ============================================================
 * 品类切换栏（ip-supermarket 列表页共用）
 * 专利 / 商标 / 版权 / 域名 四品类快速切换，替代原列表页标题。
 *
 * 用法：页面渲染 .ip-cat-switch > a.ip-cat-switch__item，
 *       当前品类加 .is-active。样式与站点主色 #423dff 对齐。
 * ============================================================ */

.ip-cat-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ip-cat-sub {
  font-size: 13px;
  color: #8a9099;
  margin: 0 0 16px;
  line-height: 1.6;
}

.ip-cat-sub em {
  font-style: normal;
  color: #423dff;
  font-weight: 600;
  margin: 0 2px;
}

.ip-cat-switch__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: #5a5f6a;
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease,
              box-shadow .18s ease;
}

.ip-cat-switch__item:hover {
  color: #423dff;
  border-color: #c9c6ff;
  background: #f6f5ff;
  /* hover 预感（R7-15 批 7）：轻阴影无位移——⛔ 保持 2026-10-19「切换/hover 零位移」决策 */
  box-shadow: 0 2px 10px rgba(66, 61, 255, .10);
  /* ⛔ 不加 transform：全排按钮几何一致，切换/hover 零位移（2026-10-19） */
}

.ip-cat-switch__item.is-active {
  color: #fff;
  background: #423dff;
  border-color: #423dff;
  /* ⛔ 不加 transform、阴影克制：全排按钮几何零差异，切换 tab 新按钮位置不偏移 */
  box-shadow: 0 2px 8px rgba(66, 61, 255, .22);
}

.ip-cat-switch__count {
  min-width: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: #6b7280;
  background: #e9eaee;
}

.ip-cat-switch__item.is-active .ip-cat-switch__count {
  color: #423dff;
  background: #fff;
}

/* ==================== 五页统一样式（2026-10-19 切换丝滑修复） ====================
 * 根因：trademark 经 wrapper>.container(padding-top:16px) 有间距，
 * patent/copyright/domain 三页 wrap 为裸 div 无样式（切换条贴 header），code 页
 * 其余页 wrapper 裸 div 无样式——切换品类时切换条上下跳。
 * 统一口径：间距**唯一来源**为 .ip-cat-switch 自身 margin-top；各页 container
 * 不再重复提供 padding-top（避免叠加成 32px）。
 */
.ip-cat-switch {
  margin: 0 0 8px;      /* top 间距由各 wrap 的 padding-top 统一提供（margin 会折叠失效） */
}

/* 五页统一：wrap 级 padding-top:16px（padding 不参与 margin 折叠，5 页切换条位置一致）。
   宽度/居中由 .container（modern.css max-width:1250 + margin-inline:auto）负责——
   五页结构统一为 wrap > .container > 内容（2026-10-19 对齐 trademark 结构） */
.ip-list-wrap {
  padding-top: 16px;
  background-color: var(--bg-page, #f6f8fa);
  min-height: calc(100vh - 128px);   /* 空结果撑满，footer 不上移 */
}

/* 页面底色与最小高度（空结果撑满，footer 不上移） */

/* ==================== 动效（R7-15 批 7 · 保守档） ====================
 * 入场 fadeUp / 计数气泡 pop / :active 先切态再跳——纯 CSS，一次性，
 * prefers-reduced-motion 全量禁用。⛔ 不改 2026-10-19「hover 零位移」约束：
 * transform 不占布局，按下缩放不破坏几何一致。 */
@keyframes catSwitchIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ip-cat-switch {
  animation: catSwitchIn .18s ease-out both;
}

@keyframes catCountPop {
  0%   { opacity: 0; transform: scale(.6); }
  70%  { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

.ip-cat-switch__item:nth-child(1) .ip-cat-switch__count { animation: catCountPop .24s ease-out .02s both; }
.ip-cat-switch__item:nth-child(2) .ip-cat-switch__count { animation: catCountPop .24s ease-out .06s both; }
.ip-cat-switch__item:nth-child(3) .ip-cat-switch__count { animation: catCountPop .24s ease-out .10s both; }
.ip-cat-switch__item:nth-child(4) .ip-cat-switch__count { animation: catCountPop .24s ease-out .14s both; }
.ip-cat-switch__item:nth-child(5) .ip-cat-switch__count { animation: catCountPop .24s ease-out .18s both; }

/* 按下：瞬时呈现「即将激活」底色 + 轻微下压（先切态再跳的 CSS 实现） */
.ip-cat-switch__item:active {
  color: #423dff;
  background: #e8e6ff;
  border-color: #c9c6ff;
  transform: scale(.97);
}

.ip-cat-switch__item.is-active:active {
  color: #fff;
  background: #423dff;
  transform: scale(.97);
}

@media (prefers-reduced-motion: reduce) {
  .ip-cat-switch {
    animation: none;
  }

  .ip-cat-switch__item .ip-cat-switch__count {
    animation: none;
  }

  .ip-cat-switch__item:active {
    transform: none;
  }
}

