/* 产品分类æ ?â€?左图右文，项间竖线分隔；桌面与产品目å½?可视化同å®?*/
.product-category-bar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: min(1680px, 96vw);
  margin: 0 auto var(--space-6);
  padding-inline: clamp(16px, 3vw, 48px);
  box-sizing: border-box;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
}

a.product-category-bar__item,
a.news-category-bar__item {
  text-decoration: none;
  color: inherit;
}

.product-category-bar__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-4) var(--space-5);
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.25s ease;
}

.product-category-bar__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: #d5d8de;
}

.product-category-bar__item:hover {
  background: rgba(43, 124, 211, 0.06);
}

.product-category-bar__item.is-active {
  background: var(--color-primary-light);
}

.product-category-bar__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: #8a9199;
  transition: color 0.25s ease;
}

/* 覆盖 reset.css img{max-width:100%}，避å…?flex 收缩时图标被压扁 */
.product-category-bar__icon img {
  width: 56px;
  height: 56px;
  max-width: none;
  object-fit: contain;
  display: block;
  opacity: 0.72;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.product-category-bar__item:hover .product-category-bar__icon img {
  opacity: 0.9;
}

.product-category-bar__item.is-active .product-category-bar__icon img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(36%) sepia(85%) saturate(1200%) hue-rotate(186deg)
    brightness(95%) contrast(92%);
}

.product-category-bar__item.is-active .product-category-bar__icon {
  color: var(--color-primary);
}

.product-category-bar__label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.product-category-bar__item.is-active .product-category-bar__label {
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  /* 再缩小；均分单行，避免第三项è¢?overflow:hidden 裁切 */
  .product-category-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: stretch;
    align-items: stretch;
    max-width: 100%;
    width: 100%;
    margin-bottom: var(--space-3);
    padding: 0 2px;
    box-sizing: border-box;
    overflow: visible;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-category-bar::-webkit-scrollbar {
    display: none;
  }

  .product-category-bar__item {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    min-width: 0;
  }

  .product-category-bar__item:not(:last-child)::after {
    top: 16%;
    bottom: 16%;
    right: 0;
    left: auto;
    width: 1px;
    height: auto;
  }

  .product-category-bar__icon {
    width: 22px;
    height: 22px;
  }

  .product-category-bar__icon img {
    width: 22px;
    height: 22px;
    max-width: none;
  }

  .product-category-bar__label {
    font-size: 10px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
  }

  .product-showcase .product-category-bar {
    margin-bottom: var(--space-3);
    overflow: visible;
  }
}

/* 新闻分类æ ?â€?纯文字标ç­?*/
.news-category-bar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto var(--space-6);
  background: transparent;
  flex-shrink: 0;
}

.news-category-bar__item {
  flex: 1;
  min-width: 0;
  padding: var(--space-4) var(--space-5);
  border: none;
  background: transparent;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
  text-align: center;
}

.news-category-bar__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: #d5d8de;
}

.news-category-bar__item:hover {
  background: rgba(43, 124, 211, 0.06);
  color: var(--color-primary);
}

.news-category-bar__item.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .news-category-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: stretch;
    max-width: 100%;
    width: 100%;
    margin-bottom: var(--space-3);
    overflow: visible;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .news-category-bar::-webkit-scrollbar {
    display: none;
  }

  .news-category-bar__item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 6px 4px;
    font-size: 10px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .news-category-bar__item:not(:last-child)::after {
    top: 16%;
    bottom: 16%;
    right: 0;
    left: auto;
    width: 1px;
    height: auto;
  }
}
