/* 产品列表页样式 - 用于 index.html 和 category.html */

/* 左侧分类侧边栏样式 */
.category-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 1.5rem;
    position: sticky;
    top: var(--sticky-offset);
}

.category-sidebar h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.category-list a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.category-list i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.category-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 选型步骤条 — 紧凑横向胶囊 */
.selection-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
}

.selection-steps-track {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.step-pill i {
    font-size: 1rem;
    color: var(--accent-color);
}

.step-pill:hover {
    background: var(--accent-color);
    color: #fff;
    cursor: default;
}

.step-pill:hover i {
    color: #fff;
}

.step-arrow {
    font-size: 0.75rem;
    color: #cbd5e1;
    flex-shrink: 0;
}

.selection-steps-btn {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 0.4rem 1.25rem;
    font-weight: 600;
    font-size: 0.82rem;
}

.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-card .card-img-wrapper {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .product-category {
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.product-card .product-model {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.product-card .product-price {
    margin-bottom: 0.75rem;
}

.product-card .product-price .price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e74c3c;
}

.product-card .product-price .price-contact {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    font-style: italic;
}

.product-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em;
    max-height: 4.5em;
}

.product-card .btn-outline-primary {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .category-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .selection-steps {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .selection-steps-btn {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .selection-steps-track {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .step-arrow {
        display: none;
    }
}
