/* 分类 / 商品列表 — PC */

.page-category {
  padding-bottom: 48px;
}

.page-category .breadcrumbs {
  margin: 16px 0 18px;
}

.category-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: stretch;
}

.category-filters-col {
  min-width: 0;
}

.category-filters {
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 0 8px 12px 0;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.filter-block {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--color-border);
}

.filter-block:last-child {
  border-bottom: 0;
}

.filter-block__title {
  margin: 0 0 12px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-text);
}

.filter-list,
.filter-checks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list li + li,
.filter-checks li + li {
  margin-top: 8px;
}

.filter-list a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.filter-list a:hover,
.filter-list a.is-active {
  color: var(--color-brand);
  font-weight: 600;
}

.filter-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.filter-checks input {
  width: 15px;
  height: 15px;
  accent-color: var(--color-brand);
}

.category-main {
  min-width: 0;
}

.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.category-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.category-view {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.category-view__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.category-view__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.category-view__btn:hover {
  color: var(--color-brand);
}

.category-view__btn.is-active {
  color: var(--color-brand);
}

.category-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-img-plate);
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
}

.category-sort__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: none;
}

.category-sort[data-order="asc"] .category-sort__icon--asc,
.category-sort[data-order="desc"] .category-sort__icon--desc {
  display: block;
}

.category-sort:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.category-sort.is-active {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
}

.page-category .product-grid--5 {
  margin-bottom: 24px;
}

.page-category .product-grid[data-view="list"] {
  grid-template-columns: 1fr;
  gap: 0;
}

.page-category .product-grid[data-view="list"] .product-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  grid-template-areas:
    "media title price"
    "media skus meta";
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;
  padding: 16px 8px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.page-category .product-grid[data-view="list"] .product-card:hover,
.page-category .product-grid[data-view="list"] .product-card.is-sku-open {
  box-shadow: none;
  background: var(--color-brand-muted);
}

.page-category .product-grid[data-view="list"] .product-card__media {
  grid-area: media;
}

.page-category .product-grid[data-view="list"] .product-card__img {
  width: 140px;
  margin: 0;
  aspect-ratio: 1;
}

.page-category .product-grid[data-view="list"] .product-card__skus {
  grid-area: skus;
  margin: 0;
}

.page-category .product-grid[data-view="list"] .product-card__title {
  grid-area: title;
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
  max-width: 100%;
}

.page-category .product-grid[data-view="list"] .product-card__price {
  grid-area: price;
  white-space: nowrap;
}

.page-category .product-grid[data-view="list"] .product-card__meta {
  grid-area: meta;
  margin: 0;
  justify-self: end;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}

.pagination__btn,
.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-img-plate);
  font-size: var(--fs-sm);
  color: var(--color-text);
  font-weight: 500;
}

.pagination__page:hover,
.pagination__btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.pagination__page.is-active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
  font-weight: 700;
}

.pagination__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination__ellipsis {
  padding: 0 4px;
  color: var(--color-text-muted);
}

/* BeikeShop body-class is page-categories */
.page-categories { padding-bottom: 48px; }
.page-categories .breadcrumbs { margin: 16px 0 18px; }
.page-categories .product-grid--5 { margin-bottom: 24px; }
.page-categories .product-grid[data-view="list"] { grid-template-columns: 1fr; gap: 0; }
.page-categories .product-grid[data-view="list"] .product-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  grid-template-areas: "media title price" "media skus meta";
  column-gap: 18px; row-gap: 6px; align-items: center;
  padding: 16px 8px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0;
}
.page-categories .product-grid[data-view="list"] .product-card:hover { box-shadow: none; background: var(--color-brand-muted); }
.page-categories .product-grid[data-view="list"] .product-card__media { grid-area: media; }
.page-categories .product-grid[data-view="list"] .product-card__img { width: 140px; margin: 0; aspect-ratio: 1; }
.page-categories .product-grid[data-view="list"] .product-card__skus { grid-area: skus; margin: 0; }
.page-categories .product-grid[data-view="list"] .product-card__title { grid-area: title; margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.page-categories .product-grid[data-view="list"] .product-card__price { grid-area: price; white-space: nowrap; }
.page-categories .product-grid[data-view="list"] .product-card__meta { grid-area: meta; margin: 0; justify-self: end; }

/* bootstrap-free pagination soft mapping */
.pagination { list-style: none; margin: 0; padding: 8px 0 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pagination .page-item .page-link,
.pagination .page-item span.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--color-img-plate); font-size: var(--fs-sm); color: var(--color-text); font-weight: 500;
}
.pagination .page-item.active .page-link {
  background: var(--color-brand); border-color: var(--color-brand); color: #fff; font-weight: 700;
}
.pagination .page-item.disabled .page-link { opacity: 0.4; pointer-events: none; }
.category-empty { padding: 48px 16px; text-align: center; color: var(--color-text-muted); }
.filter-price-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.filter-price-row input {
  width: 100%; height: 34px; border: 1px solid var(--color-border); border-radius: 6px; padding: 0 8px; font: inherit;
}
.filter-apply {
  width: 100%; height: 34px; border: 0; border-radius: 6px; background: var(--color-brand); color: #fff;
  font-weight: 700; cursor: pointer;
}
.filter-apply:hover { background: var(--color-brand-hover); }
