/* 产品中心页面专用样式 */

/* CSS变量定义 */
:root {
    --primary-red: #d32f2f;
    --light-red: rgba(211, 47, 47, 0.1);
    --primary-white: #ffffff;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f8f9fa;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(211, 47, 47, 0.15);
}

/* 页面容器 */
.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 产品分类导航 */
.category-nav {
    background: var(--primary-white);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin: 2rem auto 3rem;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.category-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), #ff6b6b);
}

.nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.nav-btn {
    padding: 1rem 2rem;
    background: var(--light-gray);
    border: 2px solid #eee;
    border-radius: 15px;
    color: var(--medium-gray);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
}

.nav-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary-red);
    color: var(--primary-red);
    box-shadow: var(--shadow-medium);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-red), #e53935);
    border-color: var(--primary-red);
    color: var(--primary-white);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.25);
}

.nav-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(211, 47, 47, 0.35);
}

/* 推荐产品区域 */
.featured-section {
    margin-bottom: 4rem;
    transition: all 0.3s ease;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title {
    color: var(--dark-gray);
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title i {
    color: var(--primary-red);
}

.section-subtitle {
    color: var(--medium-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.product-count {
    color: var(--primary-red);
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--light-red);
    border-radius: 20px;
    margin-top: 1rem;
}

.featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    background: var(--primary-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.featured-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.1);
}

.featured-content {
    padding: 2rem;
    text-align: center;
}

.featured-content h3 {
    color: var(--dark-gray);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.featured-card:hover .featured-content h3 {
    color: var(--primary-red);
}

/* 产品核心优势区域 */
.features-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 2rem;
    border-radius: 25px;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.feature-card {
    background: var(--primary-white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-red), #e53935);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-white);
    font-size: 1.8rem;
}

.feature-card h3 {
    color: var(--dark-gray);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--medium-gray);
    line-height: 1.6;
}

/* 产品网格布局 */
.products-section {
    margin-bottom: 4rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--primary-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-icon {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-icon i {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-content {
    padding: 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-content h3 {
    color: var(--dark-gray);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-content .category-name {
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 查看更多按钮 */
.load-more-container {
    text-align: center;
    margin: 3rem 0;
    display: none;
}

.load-more-btn {
    padding: 1rem 2.5rem;
    background: var(--primary-white);
    border: 2px solid var(--primary-red);
    border-radius: 30px;
    color: var(--primary-red);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.1);
}

.load-more-btn:hover {
    background: var(--primary-red);
    color: var(--primary-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.2);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

/* 加载状态 */
.loading-products {
    text-align: center;
    padding: 3rem;
    color: var(--medium-gray);
    grid-column: 1 / -1;
}

.loading-spinner {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .product-container {
        padding: 0 1.5rem;
    }

    .featured-products {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .nav-container {
        gap: 0.8rem;
    }

    .nav-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .product-container {
        padding: 0 1rem;
    }

    .category-nav {
        padding: 1.5rem 1rem;
    }

    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-btn {
        justify-content: center;
    }

    .featured-products,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        height: 200px;
    }

    .featured-image {
        height: 200px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .featured-products,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .product-content {
        padding: 1.5rem;
    }

    .featured-content {
        padding: 1.5rem;
    }
}

/* 模态框样式 */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--primary-white);
    border-radius: 25px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.product-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h3 {
    color: var(--dark-gray);
    font-size: 1.8rem;
    margin: 0;
    flex: 1;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--medium-gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-red);
}

.modal-body {
    padding: 2rem 2.5rem;
}

.modal-image {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-details {
    margin-bottom: 2rem;
}

.modal-details p {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* 产品特点横排展示 */
.features-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-tag {
    padding: 0.6rem 1.2rem;
    background: var(--light-red);
    color: var(--primary-red);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: var(--primary-red);
    color: var(--primary-white);
    transform: translateY(-2px);
}

.feature-tag i {
    font-size: 0.9rem;
}

.modal-contact {
    background: var(--light-gray);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-contact i {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.modal-contact h4 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.modal-contact p {
    color: var(--primary-red);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.modal-close-btn {
    padding: 0.8rem 2rem;
    background: var(--primary-red);
    color: var(--primary-white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .featured-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

/* 隐藏类 */
.hidden {
    display: none !important;
}
