/* ==================== 产品列表页面 ==================== */

/* Banner区域 */
.product-banner {
    width: 100%;
    max-height: 700px;
    overflow: hidden;
}

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

.banner-content {
    text-align: center;
    z-index: 1;
}

.banner-title {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 面包屑导航 */
.pl-breadcrumb {
    padding: 20px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.pl-breadcrumb-content {
    font-size: 14px;
    color: #6c757d;
}

.pl-breadcrumb-content a {
    color: #6c757d;
    text-decoration: none;
}

.pl-breadcrumb-content a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.pl-breadcrumb-current {
    font-weight: 500;
    color: #343a40;
}

/* 分类导航栏 */
.category-nav {
    border: 1px solid #e0e0e0;
    padding: 15px 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 0 auto;
    margin-top: 10px;
    width: 98%;
}

/* 分类导航容器 */
.category-nav .container {
    max-width: 1600px;
}

/* 分类导航层级 */
.category-nav-level {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-nav-level:last-child {
    margin-bottom: 0;
}

/* 分类导航标签 */
.category-nav-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-right: 15px;
    white-space: nowrap;
}

/* 第一级分类 */
.category-nav-level-1 {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

/* 分类导航列表 */
.category-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
    margin-top: 10px;
}

/* 产品小类的分类导航列表 */
.category-nav-level-2 .category-nav-list {
    margin-top: 10px;
}

/* 分类导航项 */
.category-nav-item {
    position: relative;
    white-space: nowrap;
}

/* 分类导航链接 */
.category-nav-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

/* 第一级分类链接 */
.category-nav-level-1 .category-nav-link {
    font-size: 18px;
}

/* 悬停效果 */
.category-nav-link:hover {
    color: #d32f2f;
}

/* 激活状态 */
.category-nav-link.active {
    color: #fff;
    background-color: #d32f2f;
}

/* 移除激活状态的下划线 */
.category-nav-link.active::after {
    display: none;
}

/* 产品列表区域 */
.product-list-section {
    padding: 40px 0;
    background-color: #fafafa;
}

/* 产品列表容器 */
.product-list-section .container {
    max-width: 1600px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    padding-top: 10px;
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.6);
}

.product-image {
    width: calc(100% - 20px);
    margin: 0 10px;
    padding-top: 100%; /* 1:1 宽高比 */
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 15px;
    z-index: 1;
}

.product-title {
    color: #fff;
    background-color: #262626;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 15px;
    margin: 0;
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #D81617;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    position: absolute;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    margin-bottom: 10px;
}

.product-details {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    padding: 0 20px;
    padding-top: 15px;
    text-align: center;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 9;
    -webkit-box-orient: vertical;
}

.product-details p {
    margin: 5px 0;
    word-wrap: break-word;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    line-height: 1.6;
}

.product-details p:first-child {
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 24px;
}

/* 移动端产品链接 */
.mobile-product-link {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* PC端鼠标悬停效果 */
@media (min-width: 992px) {
    .product-item:hover .product-overlay {
        opacity: 1;
    }
    
    .product-item:hover .product-title {
        opacity: 0;
        visibility: hidden;
    }
    
    .product-item:hover .product-btn {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        opacity: 1;
        visibility: visible;
    }
    
    .product-item:hover .product-details {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 1;
        visibility: visible;
    }
}

/* 分页区域 */
.pagination-section {
    padding: 40px 0;
    background-color: #fafafa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li {
    margin: 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

.pagination a:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

.pagination .active a {
    background-color: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .product-banner {
        height: 150px;
    }
    
    .banner-title {
        font-size: 28px;
    }
    
    .pl-breadcrumb {
        padding: 15px 0;
    }
    
    .pl-breadcrumb-content {
        font-size: 13px;
    }
    
    .category-nav-list {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .category-nav-link {
        font-size: 14px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-title {
        font-size: 14px;
        padding: 10px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    /* 显示移动端产品链接 */
    .mobile-product-link {
        display: block;
    }
}

/* 平板端适配 */
@media (min-width: 768px) and (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 大屏PC适配 */
@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* 小屏移动端适配 */
@media (max-width: 480px) {
    .product-banner {
        height: 150px;
    }
}

/* 平板端适配 */
@media (max-width: 991px) {
    .product-banner {
        height: 200px;
    }
}
