﻿body {
    margin: 0;
    padding: 0;
}

.layout {
    width: 100%;
    /* opacity: 0; */
    /* animation: fadeIn 1s ease-in forwards; */
}



.jCenter {
    justify-content: center;
}

.layout .image-item {
    width: 100%;
    /* min-height: 100vh; */
    position: relative;

    /* transition: transform 0.3s ease, opacity 0.8s ease;
    will-change: transform, opacity;
    opacity: 0; 
    transform: translateY(50px);  */
}

/* 页面加载淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* 视差滚动效果 */
.layout .image-item .item-content {
    max-width: 75vw;
    /* min-height: 100vh; */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-content: center;
}


/* 滚动渐显动画 */
.image-item.reveal {
    /* animation: reveal 1s ease-out forwards; */
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 鼠标悬停缩放效果 */
.layout .image-item:hover {
    /* transform: scale(1.02); */
}

/* 修正背景样式，确保只作用于image-item本身 */
.layout .image-item:nth-child(1) {
    background-size: cover !important;
    min-height: 46.875vw;
    background: url('../images/new/cp.png') no-repeat center;
}

.layout .image-item:nth-child(2) {
    background: #fff;
    /* 确保背景为白色，避免影响内部section */
}


.first {
    width: 100%;
    min-height: 46.875vw !important;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center !important;

}

.first img {
    width: 66.6667vw;
    position: absolute;
    bottom: -1.0412vw;
    z-index: 3;
    animation: product 1s ease-out forwards;
}

@keyframes product {
    from {
        /* bottom: -100px; */
        visibility: hidden;
        opacity: 0;
    }

    to {
        /* bottom: -20px; */
        visibility: visible;
        opacity: 1;
    }
}

.second {
    margin-top: 10.4167vw;
}



.nav-tabs {
    display: flex;
    gap: 7.8125vw;
    margin-bottom: 5.7292vw;
    padding-bottom: 0;
    border-bottom: 0.0521vw solid #e0e0e0;
}

.nav-tabs .nav-tab {
    position: relative;
    padding: 1.0417vw 0;
    font-size: 1.25vw;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    font-weight: normal;
    font-family: FZZhengHeiS-DB-GB;
}

/* .nav-tabs .nav-tab:hover {
    color: #666 !important;
}
.nav-tabs .nav-tab.active {
    color: #333;
    font-weight: 600;
}
.nav-tabs .nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
} */


.nav-tab:hover {
    color: #666;
}

.nav-tab.active {
    color: #333;
}

/* 选中标签的下划线 */
.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.0521vw;
    left: 0;
    width: 100%;
    height: 0.3125vw;
    background-color: #333;
    border-radius: 0.1042vw;
}

/* 产品网格布局 */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    /* grid-template-columns: repeat(5, 1fr); */
    gap: 1.4323vw;
    /* margin-top: 8.3333vw; */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 产品卡片 */
.product-card {
    width: 13.8542vw;
    background: white;
    overflow: hidden;
    /*box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin-bottom: 3.6458vw;
    border-radius: 0.4167vw;
    border: 0.0521vw solid #E5E5E5;
}

.product-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 产品图片区域 */
.product-image {
    width: 100%;
    height: 13.75vw;
    background: linear-gradient(135deg, #a2d5f2 0%, #7fb3d3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 产品图片 */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* border-radius: 8px; */
    background: rgba(255, 255, 255, 0.9);
    /* padding: 10px; */
}

/* 跨境购标签 */
.cross-border-tag {
    position: absolute;
    top: 0;
    left: 0;
    background: #8dd4bd;
    color: white;
    padding: 0 16px;
    height: 32px;
    line-height: 32px;
    border-radius: 0 0 12px 0;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /*overflow: hidden;*/
}

/* 跨境购标签的切角效果 */
.cross-border-tag::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    /* 调整三角形位置到右侧 */
    width: 0;
    height: 0;
    border-right: 10px solid transparent;
    /* 右侧透明 */
    border-left: 0 solid transparent;
    /* 左侧透明 */
    border-top: 21px solid #8dd4bd;
    /* 绿色顶部，与图片底部颜色匹配 */
    z-index: 1;
    /* 确保三角形在文字上方 */
}

/* 跨境标签选中时显示跨境购标签 */
.nav-tab[data-tab="cross-border"].active~.product-grid .cross-border-tag,
.cross-border-active .cross-border-tag {
    opacity: 1;
    visibility: visible;
}

/* 跨境标签选中时隐藏小标题 */
.cross-border-active .product-subtitle {
    display: none;
}

/* 产品信息区域 */
.product-info {
    padding: 1.3021vw 1.0417vw;
    text-align: center;
}

.product-title {
    display: -webkit-box;
    /* 关键：使用旧版Flexbox布局（兼容性写法） */
    -webkit-line-clamp: 2;
    /* 限制显示2行 */
    -webkit-box-orient: vertical;
    /* 垂直方向排列 */
    overflow: hidden;
    /* 隐藏超出部分 */
    text-overflow: ellipsis;
    /* 超出时显示省略号 */
    white-space: normal;
    /* 取消 nowrap（允许多行） */

    font-size: 1.0417vw;
    font-family: FZZhengHeiS-DB-GB;
    font-weight: normal;
    line-height: 1.5625vw;
    color: #767676;
}


/* 加载动画效果 */
.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.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;
}

.bottom_txt {
    width: 100%;
    text-align: center;
    font-size: 0.7292vw;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 0.9375vw;
    color: #B2B2B2;
    margin: 1.5625vw 0 2.0833vw;
}

.bottom_txt span {
    color: #333;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.5625vw);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}






@media (min-width: 1440px) and (max-width: 1680px) {}

/* 1281px ~ 1440px */
@media (min-width: 1280px) and (max-width: 1440px) {}




@media (min-width: 1000px) and (max-width: 1279px) {}


@media (max-width: 768px) {

    .layout .image-item {
        min-height: auto !important;
        max-width: 100% !important;
    }

    .item-content.first {
        height: 300px !important;
    }

    .item-content.first img {
        width: 100%;
        height: 100px;
        object-fit: contain;
    }

    .item-content {
        min-height: auto !important;
        max-width: 100% !important;
    }

    /* 产品网格两列显示 */
    .product-grid {

        gap: 16px;
        padding: 0 10px;
        margin-top: 30px;
    }

    .product-card {
        width: 45vw;
        margin-bottom: 24px;
    }

    .product-image {
        width: 45vw;
        height: 45vw;
    }



    .product-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .product-info {
        padding: 12px 8px;
    }

    /* 标签栏横滑 */
    .nav-tabs {
        gap: 20px;
        overflow-x: auto;
        white-space: nowrap;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .nav-tab {
        font-size: 23px !important;
        padding: 12px 0 !important;
        flex-shrink: 0;
        display: inline-block;
    }

    /* 二级内容间距 */
    .second {
        margin-top: 30px;
    }

    .bottom_txt{
        font-size: 10px !important;
        line-height: 14px !important;
    }
}