/* 商品列表页面样式 */

/* 页面头部 */
.page-header {
    margin: 30px 0;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--light-text);
}

.breadcrumb a {
    color: var(--light-text);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* 商品列表容器 */
.product-list-container {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
}

/* 筛选侧边栏 */
.filters {
    flex: 0 0 250px;
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.filter-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 18px;
    background-color: var(--primary-color);
}

/* 分类列表 */
.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background-color: rgba(255, 87, 34, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

/* 价格范围 */
.price-range {
    margin-top: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
}

.price-inputs span {
    margin: 0 10px;
}

/* 品牌筛选 */
.brand-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input {
    margin-right: 8px;
}

/* 商品内容区域 */
.products-content {
    flex: 1;
}

/* 排序选项 */
.sort-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.view-options {
    display: flex;
}

.view-options button {
    background: none;
    border: none;
    font-size: 18px;
    padding: 5px 10px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.view-options button.active,
.view-options button:hover {
    color: var(--primary-color);
}

.sort-dropdown {
    display: flex;
    align-items: center;
}

.sort-dropdown label {
    margin-right: 10px;
    font-size: 14px;
}

.sort-dropdown select {
    padding: 8px 15px 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    outline: none;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* 列表视图 */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-item {
    display: flex;
    align-items: center;
}

.products-grid.list-view .product-image {
    flex: 0 0 200px;
    margin-right: 20px;
    margin-bottom: 0;
}

.products-grid.list-view .product-details {
    flex: 1;
    text-align: left;
    padding: 0;
}

.products-grid.list-view .product-meta {
    margin-bottom: 10px;
}

.products-grid.list-view .product-actions {
    justify-content: flex-start;
}

/* 商品项 */
.product-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    position: relative;
    padding: 20px;
    background-color: var(--secondary-color);
    margin-bottom: 15px;
    overflow: hidden;
}

.product-image img {
    display: block;
    margin: 0 auto;
    max-height: 150px;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.view-btn {
    background-color: white;
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.view-btn i {
    margin-right: 5px;
}

.product-details {
    padding: 0 15px 15px;
    text-align: center;
}

.product-details h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--light-text);
}

.rating {
    display: flex;
    align-items: center;
}

.rating i {
    color: #FFD700;
    margin-right: 2px;
    font-size: 12px;
}

.rating span {
    margin-left: 5px;
}

.brand {
    background-color: #f1f1f1;
    padding: 2px 8px;
    border-radius: 10px;
}

.product-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.wishlist-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background-color: #f8f8f8;
    color: #ff5252;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* 响应式设计 */
@media (max-width: 992px) {
    .product-list-container {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
    }
    
    .brand-filters {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .brand-filters {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .products-grid.list-view .product-item {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .products-grid.list-view .product-details {
        width: 100%;
        text-align: center;
        padding: 0 15px 15px;
    }
    
    .products-grid.list-view .product-actions {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .sort-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-dropdown {
        margin-top: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        margin: 0 3px;
        font-size: 12px;
    }
} 