/* 文件职责：商品分类侧栏样式。 */
.page-product-list {
  .product-category-sidebar-card {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    width: 220px;
  }

  .product-category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .product-category-item {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
    color: #4b5563;
    cursor: pointer;
    background: #fff;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .product-category-item:hover {
    background: #f8fafc;
  }

  .product-category-item.active {
    color: #1677ff;
    background: #f0f6ff;
    border-left-color: #1677ff;
  }

  .category-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
  }

  .category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 999px;
  }

  .product-category-item.active .category-count {
    color: #1677ff;
    background: #dbeafe;
  }
}
