/* 商品列表页样式 */

/* 页面标题区域 */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to right bottom, transparent 49%, white 50%);
}

.page-header-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.page-header-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.page-header-content p {
    font-size: 18px;
    opacity: 0.9;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.breadcrumb ul {
    display: flex;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius);
}

.breadcrumb li {
    margin: 0 5px;
    position: relative;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    opacity: 0.7;
}

.breadcrumb a {
    color: white;
}

.breadcrumb span {
    opacity: 0.8;
}

/* 商品区域布局 */
.products-section {
    padding: 60px 0;
}

.products-container {
    display: flex;
    gap: 30px;
}

/* 左侧筛选区 */
.product-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    background-color: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    padding: 8px 0;
    transition: var(--transition);
}

.category-list li a:hover,
.category-list li.active a {
    color: var(--primary-color);
    padding-left: 5px;
}

.category-list li a span {
    color: var(--text-light);
    font-size: 14px;
}

.price-range {
    margin-bottom: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
}

.price-inputs span {
    color: var(--text-light);
}

.btn-filter {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-filter:hover {
    background-color: var(--secondary-color);
}

.price-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.price-tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f2f5;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.price-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.tech-list li,
.rating-list li {
    margin-bottom: 10px;
}

.tech-list label,
.rating-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.tech-list input[type="checkbox"],
.rating-list input[type="radio"] {
    margin-right: 10px;
}

.stars {
    color: #ffc107;
    margin: 0 5px;
}

.rating-list span {
    font-size: 14px;
    color: var(--text-light);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f0f2f5;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 右侧商品区域 */
.product-main {
    flex: 1;
}

.product-toolbar {
    background-color: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.product-count {
    font-size: 14px;
    color: var(--text-light);
}

.product-count span {
    font-weight: 600;
    color: var(--text-color);
}

.product-filters {
    display: flex;
    align-items: center;
}

.view-options {
    display: flex;
    margin-right: 15px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    transition: var(--transition);
}

.view-btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.view-btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
    border-left: none;
}

.view-btn.active,
.view-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sort-select {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
}

/* 商品网格扩展样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 列表视图样式 */
.product-grid.list-view {
    grid-template-columns: 1fr;
}

.product-grid.list-view .product-card {
    display: flex;
    align-items: flex-start;
}

.product-grid.list-view .product-thumb {
    width: 280px;
    flex-shrink: 0;
}

.product-grid.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-grid.list-view .product-description {
    display: block;
    margin-top: 10px;
    color: var(--text-light);
    font-size: 14px;
}

.product-grid.list-view .product-tech-tags {
    margin-top: auto;
    padding-top: 15px;
}

/* 产品卡片扩展样式 */
.product-card {
    position: relative;
    transition: var(--transition);
}

.product-description {
    display: none;
    margin: 10px 0;
    line-height: 1.5;
}

.product-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tech-tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: rgba(77, 97, 252, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius);
    font-size: 12px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:not(.prev-page):not(.next-page) {
    background-color: white;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination a.active,
.pagination a:not(.prev-page):not(.next-page):hover {
    background-color: var(--primary-color);
    color: white;
}

.pagination .dots {
    color: var(--text-light);
}

.pagination .page-numbers {
    display: flex;
}

.prev-page,
.next-page {
    background-color: white;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.prev-page:hover,
.next-page:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .products-container {
        flex-direction: column;
    }

    .product-sidebar {
        width: 100%;
        order: 2;
    }

    .product-main {
        order: 1;
    }

    .sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-header-content h1 {
        font-size: 28px;
    }

    .page-header::after {
        height: 40px;
    }

    .product-toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .product-count {
        width: 100%;
    }

    .product-filters {
        width: 100%;
        justify-content: space-between;
    }

    .product-grid.list-view .product-card {
        flex-direction: column;
    }

    .product-grid.list-view .product-thumb {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 30px 0;
    }

    .page-header-content p {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .pagination a,
    .pagination span {
        width: 35px;
        height: 35px;
        margin: 0 2px;
        font-size: 14px;
    }
}
