﻿@charset "utf-8";

/* ===== 产品展示分类页面 ===== */

/* 页面主体区域 */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.product-page-wrap {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ===== 左侧分类导航 ===== */
.product-sidebar {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-sidebar h3 {
    font-size: 18px;
    color: #fff;
    background: #c00;
    padding: 16px 20px;
    margin: 0;
    font-weight: bold;
    text-align: center;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    display: block;
    padding: 14px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.category-list li a:hover {
    background: #f5f5f5;
    color: #c00;
    padding-left: 26px;
}

.category-list li.active a {
    background: #0066cc;
    color: #fff;
    font-weight: bold;
}

.category-list li.active a:hover {
    background: #004999;
    color: #fff;
    padding-left: 20px;
}

/* ===== 右侧产品内容 ===== */
.product-content {
    flex: 1;
    min-width: 0;
}

/* 面包屑导�?*/
.product-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.product-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.product-breadcrumb a:hover {
    color: #c00;
}

.product-breadcrumb span {
    color: #c00;
    font-weight: bold;
}

/* 覆盖父级产品网格样式，保�?�?*/
.product-content .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-content .product-item {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
}

.product-content .product-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    border-color: #0066cc;
}

.product-content .product-img {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.product-content .product-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.product-content .product-img:hover img {
    transform: scale(1.1);
}

.product-content .product-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(200, 0, 0, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 0 0 6px 0;
}

.product-content .product-name {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

/* ===== 分页控件 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 10px;
}

.pagination a:hover {
    border-color: #0066cc;
    color: #0066cc;
}

.pagination a.active {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

.pagination a.disabled {
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.pagination a.disabled:hover {
    color: #ccc;
    border-color: #eee;
}

.pagination .page-ellipsis {
    display: inline-block;
    min-width: 30px;
    text-align: center;
    font-size: 14px;
    color: #999;
    user-select: none;
}

/* ===== 响应�?===== */
@media (max-width: 992px) {
    .product-page-wrap {
        flex-direction: column;
    }

    .product-sidebar {
        width: 100%;
        min-width: auto;
    }

    .product-sidebar h3 {
        text-align: left;
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
    }

    .category-list li {
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
    }

    .category-list li a {
        padding: 10px 16px;
        font-size: 13px;
    }

    .product-content .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-content .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-content .product-img img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .product-content .product-grid {
        grid-template-columns: 1fr;
    }

    .product-sidebar h3 {
        font-size: 16px;
        padding: 12px 16px;
    }
}


