/* Product List Page Styles - 自动适配显示器大小 */
.product-layout {
    display: flex;
    flex-wrap: wrap;
    width: 95%;
    margin: 30px auto;
    padding: 0 15px;
    gap: 30px;
    box-sizing: border-box;
}

/* Categories Section */
.product-categories {
    width: 240px;
    background: #fff;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    flex-shrink: 0;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e1e1e1;
}

.categories-title {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.toggle-icon:hover {
    transform: scale(1.1);
}

.categories-list {
    padding: 15px 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin: 2px 10px;
    border-radius: 6px;
}

.nav-link:hover {
    color: #FF5E00;
    background-color: #fff5f0;
    border-left-color: #FF5E00;
    transform: translateX(5px);
}

.sub-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.sub-nav-list, .sub-sub-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.sub-nav-list {
    margin-left: 20px;
}

.sub-sub-nav-list {
    margin-left: 15px;
}

.sub-nav-item, .sub-sub-nav-item {
    margin-bottom: 3px;
}

.sub-nav-link, .sub-sub-nav-link {
    display: block;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 2px 10px;
    border-radius: 4px;
}

.sub-nav-link:hover, .sub-sub-nav-link:hover {
    color: #FF5E00;
    background-color: #fff5f0;
    border-left-color: #FF5E00;
    transform: translateX(3px);
}

/* Product List Section */
.product-list-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    min-width: 0;
    background: #fff;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 默认产品项宽度 - 根据容器自动适配 */
.product-item {
    width: calc(33.333% - 10px);
    background: #fff;
    border: 2px solid #f0f3f5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 94, 0, 0.15);
    border-color: #FF5E00;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF5E00, #FF8C42);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

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

/* 产品图片区域优化 - 确保图片完全显示 */
.product-image {
    height: 0;
    padding-bottom: 95%; /* 4:3 比例 */
    overflow: hidden;
    border-bottom: 2px solid #f8f9fa;
    position: relative;
    background: #f8f9fa;
}

.zoomimgs {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* 关键：确保图片完全显示，不会被裁剪 */
    background-position: center center;
    background-repeat: no-repeat;
    transition: all 0.5s ease;
    background-color: #fff;
}

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

/* 产品标题 - 正常字重 */
.product-title {
    margin: 0;
    padding: 12px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    border-top: 1px solid #f8f9fa;
    background: #fafbfc;
    color: #333;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.product-title a:hover {
    color: #FF5E00;
    transform: scale(1.02);
}

.product-description {
    padding: 0 12px 12px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    border-top: 1px solid #f8f9fa;
    padding-top: 10px;
    font-weight: 300;
}

/* Pagination */
.pagination-container {
    text-align: center;
    padding: 40px 0;
    margin-top: 30px;
}

.pagebar {
    display: inline-block;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-item {
    display: inline-block;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-item:hover {
    background: #FF5E00;
    color: #fff;
    border-color: #FF5E00;
    transform: translateY(-2px);
}

.no-data {
    color: #666;
    font-size: 16px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 400;
}

/* 响应式设计 */

/* 手机端 (小于576px) */
@media (max-width: 575px) {
    .product-layout {
        flex-direction: column;
        width: 95%;
        padding: 0 10px;
        gap: 20px;
    }
    
    .product-categories {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-list-container {
        padding: 15px;
        gap: 15px;
    }
    
    .product-item {
        width: 100%;
    }
    
    .product-image {
        padding-bottom: 60%;
    }
    
    .zoomimgs {
        background-size: contain; /* 确保手机端图片也完全显示 */
    }
    
    .product-title {
        font-size: 16px;
        padding: 15px;
    }
}

/* 小屏幕手机横屏 (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .product-layout {
        flex-direction: column;
        width: 95%;
        padding: 0 15px;
        gap: 25px;
    }
    
    .product-categories {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-list-container {
        padding: 20px;
        gap: 15px;
    }
    
    .product-item {
        width: calc(50% - 8px);
    }
    
    .product-image {
        padding-bottom: 70%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 平板竖屏 (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .product-layout {
        width: 95%;
    }
    
    .product-categories {
        width: 220px;
    }
    
    .product-list-container {
        padding: 20px;
        gap: 15px;
    }
    
    .product-item {
        width: calc(33.333% - 10px);
    }
    
    .product-image {
        padding-bottom: 75%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 平板横屏 (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .product-layout {
        width: 95%;
    }
    
    .product-categories {
        width: 240px;
    }
    
    .product-list-container {
        padding: 25px;
        gap: 20px;
    }
    
    .product-item {
        width: calc(33.333% - 14px);
    }
    
    .product-image {
        padding-bottom: 75%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 小桌面屏幕 (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .product-layout {
        width: 95%;
    }
    
    .product-categories {
        width: 240px;
    }
    
    .product-list-container {
        padding: 25px;
        gap: 20px;
    }
    
    .product-item {
        width: calc(25% - 15px);
    }
    
    .product-image {
        padding-bottom: 95%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 标准桌面屏幕 (1440px - 1599px) */
@media (min-width: 1440px) and (max-width: 1599px) {
    .product-layout {
        width: 95%;
    }
    
    .product-categories {
        width: 260px;
    }
    
    .product-list-container {
        padding: 30px;
        gap: 25px;
    }
    
    .product-item {
        width: calc(25% - 19px);
    }
    
    .product-image {
        padding-bottom: 95%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 大桌面屏幕 (1600px - 1919px) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .product-layout {
        width: 95%;
    }
    
    .product-categories {
        width: 280px;
    }
    
    .product-list-container {
        padding: 30px;
        gap: 20px;
    }
    
    .product-item {
        width: calc(25% - 15px);
    }
    
    .product-image {
        padding-bottom: 95%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 全高清屏幕 (1920px - 2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .product-layout {
        width: 95%;
        max-width: 2200px;
    }
    
    .product-categories {
        width: 300px;
    }
    
    .product-list-container {
        padding: 35px;
        gap: 20px;
    }
    
    .product-item {
        width: calc(20% - 16px);
    }
    
    .product-image {
        padding-bottom: 95%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}

/* 2K/4K超高清屏幕 (2560px+) */
@media (min-width: 2560px) {
    .product-layout {
        width: 95%;
        max-width: 2800px;
    }
    
    .product-categories {
        width: 320px;
    }
    
    .product-list-container {
        padding: 40px;
        gap: 25px;
    }
    
    .product-item {
        width: calc(16.666% - 21px);
    }
    
    .product-image {
        padding-bottom: 65%;
    }
    
    .zoomimgs {
        background-size: contain;
    }
}