/* =========================================================
   详情页 · 产品分类筛选 + 分页（2026-11-17 原型）
   一家供应商可有多类产品，左侧切换，右侧分页
   ========================================================= */
.prod-block {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.prod-block.has-cats {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 30px;
}

/* 左侧分类栏 */
.prod-cats {
  padding-right: 20px;
  border-right: 1px solid var(--line);
  align-self: start;
}
.pc-title {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.pc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: 0;
  background: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.pc-item:hover { background: rgba(139, 92, 246, .07); }
.pc-item.is-on {
  background: rgba(139, 92, 246, .12);
  color: #6d28d9;
  font-weight: 600;
}
.pc-item b {
  flex: none;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  color: #a9a3bd;
}
.pc-item.is-on b { color: #6d28d9; }

/* 右侧产品网格 */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(186px, 100%), 1fr));
  gap: 16px;
}
.prod-grid[hidden] { display: none; }
.prod-grid .prod-tile { padding: 16px 16px 18px; scroll-snap-align: none; }
.prod-grid .prod-img { margin-bottom: 10px; }

/* 底部：数量 + 分页 */
.prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.prod-foot .gallery-hint { margin-top: 0; }
.prod-pager { display: flex; gap: 8px; }
.prod-pager .pg {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.prod-pager .pg:hover { border-color: rgba(139, 92, 246, .38); color: #6d28d9; }
.prod-pager .pg.is-on {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

@media (max-width: 1040px) {
  .prod-block.has-cats { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .prod-cats {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .pc-title { width: 100%; margin-bottom: 4px; }
  .pc-item { width: auto; margin-bottom: 0; padding: 8px 12px; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .prod-grid { grid-template-columns: minmax(0, 1fr); }
  .prod-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* 产品网格统一走 auto-fill（桌面端 3 列）。曾试过「4 个产品走 2×2」，
   实测会让卡片和产品图比别家页面大一圈，故取消。 */
@media (min-width: 1041px) {
  .prod-grid.grid-2 { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); max-width: none; }
}
