/* 产品中心页面样式 */

/* 产品中心横幅 */
.product-banner {
    padding: 80px 0;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.product-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-banner p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 产品分类板块 */
.category-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 20px;
}

.category-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    height: 60px; /* 固定高度，确保整齐 */
    overflow: hidden;
}

.category-content .btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-content .btn:hover {
    background: var(--secondary-color);
}

/* 最新产品板块 */
.latest-products {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-image {
    height: 240px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.product-features span {
    background: #f2f2f2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
}

.product-content .btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.product-content .btn:hover {
    background: var(--secondary-color);
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 36px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.load-more-btn.loading {
    padding-right: 50px;
    opacity: 0.8;
}

.load-more-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* 产品加载动画 */
#product-container .product-card {
    transition: all 0.5s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-banner {
        padding: 60px 0;
    }
    
    .product-banner h1 {
        font-size: 2rem;
    }
    
    .product-banner p {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-content .btn {
        padding: 10px 15px;
    }
}