/* 首页专用样式 */

/* ========== Banner 幻灯片 (Swiper) ========== */
.banner {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    min-height: 500px;
    margin-top: var(--header-height);
}

.banner-swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-swiper .swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-swiper .swiper-slide a {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

/* Swiper 分页器样式 */
.banner-swiper .swiper-pagination {
    position: absolute;
    bottom: 10%;
    right: 10%;
    left: auto;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    z-index: 10;
}

.banner-swiper .swiper-pagination-bullet {
    width: 4px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    margin: 0 !important;
}

.banner-swiper .swiper-pagination-bullet-active {
    height: 48px;
    background-color: #ffffff;
}

.slide-content {
    text-align: left;
    color: #ffffff;
    max-width: 800px;
    padding: 0 var(--space-6);
    margin-left: 10%;
    pointer-events: none;
}

.slide-content > * {
    pointer-events: auto;
}

.slide-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.slide-content h2 {
    font-size: var(--text-5xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: #ffffff;
}

.slide-content p {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    opacity: 0.9;
}

.slide-actions {
    display: flex;
    gap: var(--gap-md);
}

.btn-primary {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    background-color: #ffffff;
    color: var(--color-brand);
    font-size: var(--text-base);
    font-weight: 400;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-brand-dark);
}

.btn-outline {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: var(--text-base);
    font-weight: 400;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.banner-dots {
    position: absolute;
    bottom: var(--space-5);
    right: var(--space-6);
    display: flex;
    flex-direction: column-reverse;
    gap: var(--gap-xs);
    z-index: 10;
}

.dot-bar {
    width: 2px;
    height: 6px;
    background: rgba(255, 255, 255, 1);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot-bar.active {
    height: 60px;
    background-color: #ffffff;
}

/* ========== 产品中心模块 ========== */
.product-center {
    padding: var(--space-16) 0;
    background-color: transparent;
}

.product-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.product-header-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    text-align: left;
    color: var(--color-text);
    margin-bottom: 0;
}

.section-slogan {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.more-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-brand);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.more-tag:hover {
    background: var(--color-brand);
    color: #ffffff;
    border-color: var(--color-brand);
}

.product-container {
    display: grid;
    grid-template-columns: calc(30% - var(--gap-3xl)) 1fr;
    gap: var(--gap-3xl);
    align-items: stretch;
}

.product-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    height: 100%;
}

.product-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.product-desc {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: justify;
    text-indent: 2em;
}

.btn-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-1) var(--space-5);
    background: var(--color-brand);
    color: #ffffff;
    font-size: var(--text-base);
    font-weight: 400;
    border-radius: var(--radius-full);
    text-decoration: none;
    align-self: flex-start;
    margin-top: auto;
    margin-bottom: var(--space-8);
}

.btn-product:hover {
    color: #ffffff;
}

.product-list-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-right: calc(-30% - var(--gap-3xl));
    min-width: 0;
}

/* 产品 Swiper */
.product-swiper {
    width: 100%;
    height: auto;
    touch-action: none;
}

.product-swiper .swiper-wrapper {
    gap: var(--gap-xl);
    padding: var(--space-2) 0;
    will-change: transform;
}

.product-swiper .swiper-slide {
    flex-shrink: 0;
    width: calc(25% - 0.75 * var(--gap-xl));
    height: auto;
    position: relative;
}

.product-item {
    width: 100%;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0.6;
    position: relative;
}

.product-swiper .swiper-slide-active.product-item {
    opacity: 1;
}

.product-swiper .swiper-slide:not(.swiper-slide-active).product-item {
    opacity: 0.5;
}

.product-swiper .swiper-slide.clicked.product-item {
    opacity: 1 !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--color-gray-100);
    border-radius: var(--radius-lg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-item:hover .product-image img {
    transform: none;
}

.product-info {
    border-radius: var(--radius-lg);
    position: absolute;
    bottom: var(--space-4);
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.product-info h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-1);
}

.product-info h3::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--color-bg);
    margin-top: var(--space-3);
    border-radius: var(--radius-sm);
}


/* ========== 工厂实力模块 ========== */
.factory-section {
    padding: var(--space-16) 0;
    background-color: var(--color-bg-subtle);
}

.section-header {

    margin-bottom: var(--space-8);
}

.section-header .section-title {
    text-align: center;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}

.section-header .section-slogan {
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.factory-content {
    display: flex;
    gap: var(--gap-3xl);
    align-items: stretch;
}

.factory-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gap-xl);
}

.factory-about {
    flex: 1;
}

.about-content {
    text-align: left;
}

.about-content p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    margin-bottom: 0;
    text-align: justify;
    text-indent: 2em;
}

.factory-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.stat-item {
    background: var(--color-bg);
    padding: var(--space-3);
    border-radius: var(--radius-xl);
    text-align: center;
}

.stat-number,
.stat-year {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-brand);
}

.stat-unit {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-text-muted);
}

.stat-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.factory-right {
    flex: 2;
}

.factory-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    min-height: 465px;
}

.factory-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== 国际认证模块 ========== */
.certifications-section {
    padding: var(--space-16) 0;
    background-color: var(--color-bg);
}

.certifications-section .section-header {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: 0;
    width: 100%;
}

.cert-title {
    text-align: center;
    white-space: nowrap;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-text);
}

.certifications-section .section-header::before,
.certifications-section .section-header::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
    background-color: var(--color-border);
    flex-shrink: 0;
}

.cert-slogan {
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.cert-logos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap-lg);
    margin-bottom: var(--space-8);
    padding: 0 12%;
}

.cert-item {
    text-align: center;
    flex: 0 0 auto;
}


.cert-logo {
    width: 80%;
    aspect-ratio: 1 / 1;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    margin: var(--space-1) auto ;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-name {
    display: block;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
}

.cert-desc {
    display: block;
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
}

.cert-certificates {
    margin-top: var(--space-8);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap-xl);
}

.certificate-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 7 / 10;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certificate-name {
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0;
}

/* ========== 合作伙伴模块 ========== */
.partners-section {
    padding: var(--space-16) 0;
    background-color: var(--color-bg-subtle);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--gap-sm);
    align-items: center;
}

.partner-logo {
    padding: var(--space-1);
    background-color: #ffffff;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* ========== 响应式样式 ========== */

/* ===== 1200px 响应式 ===== */
@media (max-width: 1200px) {
    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== 1024px 响应式 ===== */
@media (max-width: 1024px) {
    /* 产品中心 */
    .product-desc{margin-bottom:var(--space-4);}
    .product-container {
        grid-template-columns: 1fr;
        gap: var(--gap-xs);
    }
    .product-intro {
        width: 100%;
        min-height: 240px;
    }
    .product-list-wrapper {
        margin-right: 0;
        max-width: 100%;
    }

    /* 工厂实力 */
    .factory-content {
        flex-direction: column;
    }
    .factory-right {
        max-width: 100%;
        width: 100%;
    }
    .factory-hero {
        width: 100%;
        aspect-ratio: 16 / 9;
		min-height:auto;
    }
    .factory-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
	.cert-logos {
    gap: var(--gap-xs);
    padding: 0 var(--gap-xs);
}
}

/* ===== 1024px 响应式 ===== */
@media (max-width: 1024px) {
    .banner {
        height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
    }
}

/* ===== 768px 响应式 ===== */
@media (max-width: 768px) {
    .section-title{font-size: var(--text-3xl);}
    .banner {
        height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
        min-height: 400px;
    }
    /* Swiper 分页器响应式 */
    .banner-swiper .swiper-pagination {
        bottom: var(--space-4);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        flex-direction: row;
        gap: var(--gap-xs);
    }
    .banner-swiper .swiper-pagination-bullet {
        width: 6px;
        height: 2px;
    }
    .banner-swiper .swiper-pagination-bullet-active {
        width: 60px;
        height: 2px;
    }
    .slide-content {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        max-width: 100%;
    }
    .slide-content h2 {
        font-size: var(--text-3xl);
    }
    .slide-content p {
        font-size: var(--text-base);
    }
    .slide-actions {
        flex-direction: column;
    gap: var(--gap-xs);
    }
    .btn-primary,
    .btn-outline {
        width: 100%;
        text-align: center;
    }
    .banner-arrow {
        width: 40px;
        height: 40px;
        bottom: calc(var(--space-4) + 40px);
    }
    .banner-arrow.prev {
        right: calc(var(--space-4) + 50px);
    }
    .banner-arrow.next {
        right: var(--space-4);
    }

    /* 产品中心 */
    .more-tag {display:none;}
    .product-desc {
        margin-bottom: var(--space-4);
    }
    .section-header {
        margin-bottom: var(--space-4);
    }
    .product-header {
        margin-bottom: var(--space-4);
    }
    .product-center {
        padding: var(--space-8) 0;
    }
    .product-swiper .swiper-slide {
        width: calc(50% - 0.5 * var(--gap-xl));
    }

    /* 工厂实力 */
    .factory-section {
        padding: var(--space-8) 0;
    }
    .factory-hero {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
    .factory-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .factory-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-header .section-title {
        font-size: var(--text-3xl);
    }
    .stat-year,
    .stat-number {
        font-size: var(--text-2xl);
    }

    /* 国际认证 */
	.cert-logos {
        grid-template-columns: repeat(4, 1fr);
    }
	.cert-logo{margin-top: var(--space-4)}
    /* 让第5个元素位于第2列 */
    .cert-item:nth-child(5) {
        grid-column: 2 / 3;
    }
    
    /* 让第6个元素位于第3列 */
    .cert-item:nth-child(6) {
        grid-column: 3 / 4;
    }

    .certifications-section {
        padding: var(--space-8) 0;
    }
    .cert-title {
        font-size: var(--text-3xl);
    }
    .cert-slogan {
        font-size: var(--text-sm);
		margin-bottom: var(--space-4);
    }

    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 合作伙伴 */
    .partners-section {
        padding: var(--space-8) 0;
    }
}
