/* ============================================================
 * AI超市 - 列表页样式（工具/技能/定制服务共用）
 * ============================================================ */

/* 分类导航条 */
.shelf-nav {
    margin: 8px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.shelf-nav .shelf-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.shelf-nav .shelf-label i { color: var(--brand-primary); }
.shelf-category {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.shelf-category .cat-btn {
    padding: 8px 20px;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}
.shelf-category .cat-btn i { font-size: 13px; }
.shelf-category .cat-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.shelf-category .cat-btn.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.30);
}
.shelf-category .cat-btn.active i { color: #fff; }
.shelf-category .cat-btn .cat-count {
    background: rgba(255,255,255,0.25);
    padding: 1px 8px;
    border-radius: 60px;
    font-size: 11px;
    font-weight: 600;
}
.shelf-category .cat-btn:not(.active) .cat-count {
    background: #f1f5f9;
    color: var(--text-light);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.filter-bar .result-count { font-size: 15px; color: var(--text-secondary); }
.filter-bar .result-count strong { color: var(--text-primary); }

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-group .filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    margin-right: 2px;
}
.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-tags .tag-filter {
    padding: 4px 16px;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-tags .tag-filter:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.filter-tags .tag-filter.active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.filter-tags .tag-filter .dot { width: 8px; height: 8px; border-radius: 10px; display: inline-block; }
.dot-tool { background: var(--tag-tool); }
.dot-skill { background: var(--tag-skill); }
.dot-custom { background: var(--tag-custom); }

/* 技能类型筛选（带颜色） */
.skill-type-bar {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #f1f5f9;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
}
.skill-type-bar .bar-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.type-filter {
    padding: 4px 16px;
    border-radius: 60px;
    border: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-secondary);
}
.type-filter:hover { transform: translateY(-2px); }
.type-filter.active { border-color: currentColor; background: rgba(0, 0, 0, 0.04); }
.type-filter.type-official { color: var(--type-official); }
.type-filter.type-official.active { background: var(--type-official); color: #fff; border-color: var(--type-official); }
.type-filter.type-opensource { color: var(--type-opensource); }
.type-filter.type-opensource.active { background: var(--type-opensource); color: #fff; border-color: var(--type-opensource); }
.type-filter.type-thirdparty { color: var(--type-thirdparty); }
.type-filter.type-thirdparty.active { background: var(--type-thirdparty); color: #fff; border-color: var(--type-thirdparty); }
.type-filter.type-optimized { color: var(--type-optimized); }
.type-filter.type-optimized.active { background: var(--type-optimized); color: #fff; border-color: var(--type-optimized); }
.type-filter.type-all { color: var(--text-secondary); }
.type-filter.type-all.active { background: var(--text-secondary); color: #fff; border-color: var(--text-secondary); }

.filter-divider { color: var(--border-light); font-size: 18px; font-weight: 300; padding: 0 2px; }

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
}

/* 卡片入场动画 */
.product-card {
    opacity: 0;
    animation: fadeUp 0.45s ease forwards;
}
.product-card:nth-child(1) { animation-delay: 0.02s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.10s; }
.product-card:nth-child(4) { animation-delay: 0.14s; }
.product-card:nth-child(5) { animation-delay: 0.18s; }
.product-card:nth-child(6) { animation-delay: 0.22s; }
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 分页 */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination button {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 12px;
}
.pagination button:hover:not(:disabled) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.pagination button.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 700px) {
    .product-grid { grid-template-columns: 1fr; }
    .shelf-nav { flex-direction: column; align-items: stretch; }
    .shelf-category { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
    .shelf-category .cat-btn { white-space: nowrap; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-group { flex-wrap: wrap; }
    .filter-tags { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
}
@media (min-width: 701px) and (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
