/* 全部商品页面样式 */
.breadcrumb {
    padding: 15px 0;
    color: #666;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #e4393c;
}

.breadcrumb .separator {
    margin: 0 8px;
}

.product-page {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.sidebar {
    flex: 0 0 240px;
    margin-right: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 992px) {
    .product-page {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
}

.filter-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    padding: 15px;
}

.filter-title {
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.category-list {
    margin-bottom: 20px;
}

.category-item {
    margin-bottom: 12px;
}

.category-item a {
    display: block;
    color: #666;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-item a:hover, 
.category-item a.active {
    background-color: #f5f5f5;
    color: #e4393c;
}

.category-item a.active {
    font-weight: 700;
}

.filter-section {
    margin-bottom: 15px;
}

.filter-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-option {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option:hover, 
.filter-option.active {
    border-color: #e4393c;
    background-color: #fff0f0;
    color: #e4393c;
}

.price-range {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.price-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 5px;
}

.price-separator {
    margin: 0 5px;
    color: #999;
}

.price-filter-btn {
    padding: 6px 15px;
    background-color: #e4393c;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.price-filter-btn:hover {
    background-color: #c7222a;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-label {
    margin-right: 10px;
    color: #666;
}

.sort-item {
    margin-right: 15px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.sort-item:hover, 
.sort-item.active {
    background-color: #fff0f0;
    color: #e4393c;
}

.sort-item.active {
    font-weight: 700;
}

.view-options {
    display: flex;
    align-items: center;
}

.view-option {
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.view-option:hover, 
.view-option.active {
    background-color: #f1f1f1;
    color: #e4393c;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-item:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    color: #e4393c;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.desc {
    color: #666;
    font-size: 14px;
    height: 40px;
    overflow: hidden;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.btn {
    display: block;
    width: 100%;
    padding: 8px 0;
    background-color: #e4393c;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c7222a;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: #e4393c;
    color: #e4393c;
}

.page-item.active .page-link {
    background-color: #e4393c;
    border-color: #e4393c;
    color: #fff;
}

.page-item.disabled .page-link {
    color: #ccc;
    cursor: not-allowed;
}

/* 列表视图样式 */
.product-list-view .product-item {
    display: flex;
    margin-bottom: 20px;
}

.product-list-view .product-img {
    flex: 0 0 200px;
    height: 200px;
}

.product-list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-list-view .product-info h3 {
    height: auto;
    margin-bottom: 15px;
}

.product-list-view .desc {
    height: auto;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-list-view .btn {
    width: 150px;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .product-list-view .product-item {
        flex-direction: column;
    }
    
    .product-list-view .product-img {
        flex: 0 0 auto;
        height: 200px;
    }
    
    .product-list-view .btn {
        width: 100%;
    }
} 