/* 产品列表页面样式 */
.product-list {
    padding: 40px 0 60px;
}

.product-content {
    display: flex;
    gap: 30px;
}

/* 左侧产品分类 - 优化样式 */
.product-categories {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
}

    .product-categories h3 {
        color: var(--primary-color);
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--accent-color);
        font-size: 1.2rem;
        font-weight: 600;
    }

.category-list {
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
}

.category-item {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    border: none;
    background: #fafafa;
}

    .category-item:last-child {
        border-bottom: none;
    }

    .category-item.active {
        background: #f0f5ff;
        border-left: 3px solid var(--primary-color);
    }

.category-text {
    text-align: left;
    flex: 1;
}

.category-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
}

    .category-item > a:hover {
        background: #f0f0f0;
        color: var(--primary-color);
    }

.category-item.active > a {
    background: transparent;
    color: var(--primary-color);
}

.category-item > a i:first-child {
    margin-right: 12px;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/*.category-item.active .category-toggle .category-text {
    color: #c00;*/ 
    /*font-weight: 600;*/ 
/*}*/
/* 当前子分类链接样式 */
.subcategory-list li a.current-link {
    color: #c00; 
/*    font-weight: 600; */
    text-decoration: none; 
}
/* 2. 确保展开的分类显示子列表（配合JS逻辑） */
.category-item.active .subcategory-list {
    display: block !important; 
}
/* 3. 默认子分类列表隐藏（若原CSS未设置） */
.subcategory-list {
    display: none;
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
}

.dropdown-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: #888;
}

.category-item.active .dropdown-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.subcategory-list {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.category-item.active .subcategory-list {
    max-height: 500px;
}

.subcategory-list li {
    margin-bottom: 0;
    border-top: 1px solid #f9f9f9;
}

.subcategory-list a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.92rem;
    padding: 12px 18px 12px 50px;
    transition: all 0.3s ease;
}

    .subcategory-list a:hover {
        color: var(--primary-color);
        background-color: #f8faff;
        padding-left: 55px;
    }

.product-contact {
    background: #f9f9f9;
    padding: 22px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

    .product-contact h4 {
        color: var(--primary-color);
        margin-bottom: 12px;
        font-size: 1.05rem;
    }

    .product-contact p {
        color: #666;
        margin-bottom: 18px;
        font-size: 0.92rem;
        line-height: 1.6;
    }

.contact-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

    .contact-btn:hover {
        background: #a51c1c;
    }

/* 右侧产品展示 */
.product-showcase {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
}

    .product-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    }

/* 调整图片比例为1:1 */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 比例 */
    overflow: hidden;
}

    .product-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-info {
    padding: 15px;
}

    .product-info h3 {
        font-size: 1.1rem;
        color: var(--dark-color);
        margin-bottom: 10px;
    }

.product-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 产品链接样式 */
.product-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    text-indent: -9999px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: var(--transition);
}

    .page-item:hover,
    .page-item.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

/* 响应式设计 */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
    }

    .product-categories {
        flex: 1;
        margin-bottom: 30px;
        padding: 15px;
        display: none;
    }

    .product-grid {
        /*            grid-template-columns: 1fr;*/
        grid-template-columns: repeat(2, 1fr);
    }
}



