/* 分类页：左侧栏 + 右侧双列商品流 */
.jd-cate-page {
  background: #f4f4f4;
  padding-top: 48px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

.jd-cate-page.jd-list-page {
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

.mc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.mc-header__back {
  flex-shrink: 0;
  padding: 4px;
}

.mc-header__back .jd-ico-back {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E") !important;
  width: 24px;
  height: 24px;
}

.mc-header__search {
  flex: 1;
  min-width: 0;
}

.mc-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: #f5f5f5;
  border-radius: 17px;
}

.mc-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.mc-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 48px - 56px);
}

.mc-side {
  width: 84px;
  flex-shrink: 0;
  background: #f7f7f7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 48px - 56px);
  position: sticky;
  top: 48px;
}

.mc-side-item {
  display: block;
  padding: 14px 6px;
  text-align: center;
  font-size: 12px;
  color: #666;
  text-decoration: none;
  border-left: 3px solid transparent;
  line-height: 1.35;
  word-break: break-all;
}

.mc-side-item.is-active {
  background: #fff;
  color: var(--ice-primary, #4a9ff5);
  font-weight: 600;
  border-left-color: var(--ice-primary, #4a9ff5);
}

.mc-main {
  flex: 1;
  min-width: 0;
  padding: 8px 8px 8px 6px;
  overflow: hidden;
}

.mc-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
  gap: 8px;
}

.mc-main-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: #333;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-sort {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.mc-sort a {
  font-size: 12px;
  color: #999;
  text-decoration: none;
  white-space: nowrap;
}

.mc-sort a.is-on {
  color: var(--ice-accent, #ff8c00);
  font-weight: 600;
}

.mc-brand-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
  padding-bottom: 2px;
}

.mc-brand-row::-webkit-scrollbar {
  display: none;
}

.mc-brand-row a {
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 11px;
  background: #fff;
  border-radius: 12px;
  color: #666;
  text-decoration: none;
  border: 1px solid #eee;
}

/* 右侧商品双列（窄栏内） */
.jd-cate-page .mc-product-grid,
.jd-cate-page .jd-cate-products.jd-products--grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 0 !important;
  background: transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.jd-cate-page .mc-product-grid .jd-card,
.jd-cate-page .jd-cate-products .jd-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.mc-pagebar {
  padding: 12px 0 4px;
  text-align: center;
  font-size: 12px;
  clear: both;
}

.mc-pagebar a,
.mc-pagebar span {
  display: inline-block;
  margin: 0 3px;
  padding: 4px 6px;
  color: #666;
  text-decoration: none;
}

.mc-pagebar .current {
  color: var(--ice-primary, #4a9ff5);
  font-weight: 600;
}

/* 分类页小屏：略缩小字号 */
@media (max-width: 360px) {
  .jd-cate-page .jd-card--feed .jd-card-title {
    font-size: 12px;
  }
  .jd-cate-page .jd-card--feed .jd-card-price .p {
    font-size: 14px;
  }
}
