/* ============================================================
   template1/css/index.css — 供应商首页专属样式
   依赖：../../css/variables.css, ../../css/common.css, ./common.css
   ============================================================ */

/* -------------------- 1. Banner -------------------- */
.banner-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

.banner-section img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
}

/* -------------------- 2. 优势模块（Banner 下方浮起） -------------------- */
.advantage-bar {
    position: relative;
    margin-top: -80px;
    z-index: 10;
    background: transparent;
}

.advantage-bar__modules {
    display: flex;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.advantage-bar__item {
    flex: 1;
    padding: 32px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    transition: var(--transition-base);
    cursor: default;
    position: relative;
}

.advantage-bar__item:hover {
    transform: translateY(-4px);
    filter: brightness(1.05);
}

.advantage-bar__item--dark {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    text-align: left;
    align-items: flex-start;
}

.advantage-bar__item--teal1 {
    background: linear-gradient(135deg, #0F2557 0%, #1A3A7E 100%);
}

.advantage-bar__item--teal2 {
    background: linear-gradient(135deg, #1A3A7E 0%, #2B5CB0 100%);
}

.advantage-bar__item:not(.advantage-bar__item--dark):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 25%;
    bottom: 25%;
    right: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.advantage-bar__icon {
    height: 44px;
    margin-bottom: 12px;
    object-fit: contain;
}

.advantage-bar__title-main {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.2;
    text-transform: uppercase;
}

.advantage-bar__title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: #fff;
    margin-bottom: 0;
}

.advantage-bar__desc {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin-bottom: 0;
}

/* -------------------- 3. 国旗展示 -------------------- */
.country-showcase {
    padding: 40px 0;
}

.country-list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    overflow-x: hidden;
    gap: 8px;
}

.country-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
    max-width: calc(100% / 17);
}

.country-item__flag {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-item__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.country-item__link:hover .country-item__flag {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.country-item__link:hover .country-item__name {
    color: var(--color-primary);
}

.country-item__name {
    font-size: 12px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.3s ease;
}

/* -------------------- 4. 产品分类（大字标题 + 卡片网格） -------------------- */
.product-classification {
    position: relative;
    padding: 80px 0 60px;
    overflow-x: visible;
}

.classification-bg {
    position: absolute;
    width: 335px;
    height: 473px;
    background: var(--color-primary);
    border-radius: 20px;
    top: -50px;
    left: -48px;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-classification:hover .classification-bg {
    transform: rotate(2deg) scale(1.02);
}

.classification-title {
    font-family: Impact, sans-serif;
    font-size: 72px;
    color: #fff;
    line-height: 1;
    margin-bottom: 56px;
    position: relative;
    z-index: 2;
}

.classification-title span {
    color: #000;
}

.product-classification__cards {
    position: relative;
    z-index: 2;
}

.product-classification__card {
    background: var(--color-bg-white);
    padding: 15px;
    text-align: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid transparent;
    transition: var(--transition-base);
}

.product-classification__card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--color-primary);
}

.product-classification__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 14px;
    display: block;
    transition: transform 0.3s;
}

.product-classification__card:hover .product-classification__img {
    transform: scale(1.03);
}

.product-classification__name {
    font-size: var(--font-size-base);
    color: var(--color-text);
    margin-bottom: 16px;
    flex: 1;
}

.product-classification__name a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

.product-classification__name a:hover {
    color: var(--color-primary);
}

/* -------------------- 5. 公司介绍 (Company Profile) -------------------- */
.company-profile {
    background-image: url('../image/company-bg.png');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    padding: 60px 0 0;
    /* 顶部间距缩小，底部为0 */
    overflow: hidden;
    position: relative;
    background-color: #fff;
}

.company-profile-container {
    padding-bottom: 40px;
}

.company-title-wrap {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.company-title-main {
    font-family: Impact, sans-serif;
    font-size: 64px;
    color: #000;
    line-height: 1;
    position: relative;
    z-index: 10;
    text-transform: uppercase;
}

.company-title-shadow {
    font-family: Impact, sans-serif;
    font-size: 140px;
    color: #F0F0F0;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    white-space: nowrap;
    pointer-events: none;
}

.company-title-shadow--left {
    left: -20px;
}

.company-title-shadow--right {
    left: 480px;
}

.company-description {
    max-width: 800px;
    font-size: var(--font-size-base);
    color: #333;
    line-height: 1.8;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* 无缝滚动图库 (Seamless Gallery Scroller) */
.gallery-scroller {
    width: 82%;
    /* 使其不达到浏览器边缘，也不达到 container 边缘 */
    overflow: hidden;
    position: relative;
    margin-top: 50px;
    padding-left: 0;
    /* 从浏览器最左侧开始 */
    margin-left: 0;
}

.gallery-scroller-track {
    display: flex;
    width: max-content;
    animation: scrollGallery 40s linear infinite;
}

.gallery-scroller:hover .gallery-scroller-track {
    animation-play-state: paused;
    /* 鼠标悬停时暂停 */
}

.gallery-item-box {
    flex: 0 0 380px;
    /* 固定图片宽度 */
    border: 4px solid var(--color-primary);
    /* 边框加宽 */
    background: #fff;
    margin: 0;
    /* 消除间距 */
    padding: 0;
}

.gallery-item-box img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

@keyframes scrollGallery {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 响应式调整 */
@media (max-width: 1399px) {
    .gallery-scroller {
        width: 85%;
    }
}

@media (max-width: 1199px) {
    .gallery-scroller {
        width: 90%;
    }

    .gallery-item-box {
        flex: 0 0 300px;
    }
}

/* -------------------- 6. 热门产品 -------------------- */
.hot-products {
    background: #f5f5f5;
    padding: 40px 0;
}

.hot-products__title {
    font-family: Impact, sans-serif;
    font-size: 68px;
    color: var(--color-text-strong);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.hot-products__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 2px;
}

/* 通用水平卡片样式 */
.hot-products__card-horizontal {
    background: #fff;
    display: flex;
    overflow: hidden;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hot-products__card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.hot-products__card-horizontal .hot-products__img-box {
    flex: 0 0 42%;
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    display: block;
}

.hot-products__card-horizontal .hot-products__img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-products__card-horizontal .hot-products__info {
    flex: 1;
    padding-left: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hot-products__name {
    font-size: var(--font-size-base);
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 400;
}

.hot-products__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.hot-products__name a:hover {
    color: var(--color-primary);
}

.hot-products__price {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.hot-products__moq {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

/* View More 按钮 */
.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-accent);
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    padding: 9px 26px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: var(--transition-base);
    width: fit-content;
    box-shadow: var(--shadow-accent);
}

.btn-view-more::after {
    content: "→";
    transition: transform 0.25s ease;
}

.btn-view-more:hover {
    background: var(--color-accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(255, 106, 0, 0.35);
}

.btn-view-more:hover::after {
    transform: translateX(3px);
}

.btn-view-more--small {
    padding: 5px 20px;
    font-size: var(--font-size-sm);
}

/* 第 1 级布局 */
.hot-products__tier1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.hot-products__card--large {
    padding: 30px;
}

.hot-products__card--large .hot-products__img-box {
    flex: 0 0 48%;
}

.hot-products__card--large .hot-products__name {
    font-size: var(--font-size-md);
}

.hot-products__card--large .btn-view-more {
    padding: 12px 40px;
}

.hot-products__right-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hot-products__card--small {
    padding: 15px;
    height: calc(50% - 10px);
}

.hot-products__card--small .hot-products__name {
    font-size: var(--font-size-sm);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-products__card--small .hot-products__price {
    font-size: var(--font-size-base);
}

.hot-products__card--small .hot-products__moq {
    font-size: var(--font-size-xs);
    margin-bottom: 10px;
}

/* 第 2 级布局 */
.hot-products__tier2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.hot-products__card--medium {
    padding: 15px;
}

.hot-products__card--medium .hot-products__name {
    font-size: var(--font-size-sm);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-products__card--medium .hot-products__price {
    font-size: var(--font-size-base);
}

/* 第 3、4 级布局 (垂直卡片) */
.hot-products__tier3,
.hot-products__tier4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.hot-products__card-vertical {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
}

.hot-products__card-vertical:hover {
    transform: translateY(-5px);
}

.hot-products__card-img {
    width: 100%;
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    margin-bottom: 15px;
    display: block;
}

.hot-products__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-products__card-name {
    font-size: var(--font-size-sm);
    color: #444;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.hot-products__card-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.hot-products__card-name a:hover {
    color: var(--color-primary);
}

.hot-products__card-price {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.hot-products__card-moq {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* 响应式调整 */
@media (max-width: 991px) {
    .hot-products__tier1 {
        grid-template-columns: 1fr;
    }

    .hot-products__tier2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hot-products__tier3,
    .hot-products__tier4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .hot-products__title {
        font-size: 48px;
    }

    .hot-products__card-horizontal {
        flex-direction: column;
    }

    .hot-products__card-horizontal .hot-products__img-box {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 15px;
    }

    .hot-products__card-horizontal .hot-products__info {
        padding-left: 0;
    }

    .hot-products__tier2,
    .hot-products__tier3,
    .hot-products__tier4 {
        grid-template-columns: 1fr;
    }
}

/* -------------------- 7. 客户 Logo 滚动 -------------------- */
.customers-section {
    background: var(--color-bg-gray);
    padding: 40px 0;
}

.customers-section__title {
    font-family: Impact, sans-serif;
    font-size: 68px;
    color: var(--color-text-strong);
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    padding-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.customers-section__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 2px;
}

.customers-slider {
    overflow: hidden;
}

.customers-row {
    display: flex;
    gap: 20px;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    margin-bottom: 20px;
}

.customers-row--left {
    animation: scrollLeft 22s linear infinite;
}

.customers-row--right {
    animation: scrollRight 22s linear infinite;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.customers-row__img {
    flex: 0 0 auto;
    width: 440px;
    height: 280px;
}

.customers-row__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: block;
}

/* -------------------- 8. 证书模块 -------------------- */
.certificate-section {
    background-color: #f8f8f8;
    padding: 40px 0 0;
    /* 底部间距由背景图片决定 */
    overflow: hidden;
}

.certificate-section__title {
    font-family: Impact, sans-serif;
    font-size: 68px;
    color: var(--color-text-strong);
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 18px;
    letter-spacing: 0.01em;
}
.certificate-section__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 2px;
}

.certificate-container {
    position: relative;
    background-image: url('../image/cert-bg.png');
    background-size: auto 100%;
    /* 高度撑满，宽度自适应以保持比例 */
    background-position: bottom center;
    background-repeat: no-repeat;
    min-height: 600px;
    width: 100%;
    /* 已在 section 下，设为 100% 即可 */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* 证书容器：限制在右侧，避开左侧奖杯 */
.certificate-grid {
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    padding-bottom: 180px;
    /* 再次向上移动，增加底部偏移量 */
    width: 100%;
}

.certificate-item {
    width: 200px;
    /* 进一步增加宽度 */
    height: 280px;
    /* 进一步增加高度 */
    flex-shrink: 0;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
}

.certificate-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 去掉 padding、background 和 border */
    display: block;
}

.certificate-item:hover {
    transform: translateY(-10px);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .certificate-container {
        min-height: 500px;
    }

    .certificate-grid {
        gap: 20px;
        padding-bottom: 80px;
    }

    .certificate-item {
        width: 160px;
        height: 220px;
    }
}

@media (max-width: 991px) {
    .certificate-section__title {
        font-size: 48px;
    }

    .certificate-container {
        background-size: cover;
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .certificate-grid {
        justify-content: center;
        padding-right: 0;
        padding-bottom: 20px;
        flex-wrap: wrap;
    }

    .certificate-item {
        width: 140px;
        height: 200px;
    }
}

/* -------------------- 9. 响应式 -------------------- */
@media (max-width: 1199px) {
    .gallery-track__item {
        flex: 0 0 300px;
        height: 220px;
    }
}

@media (max-width: 991px) {
    .advantage-bar {
        background: none;
    }

    .advantage-bar__modules {
        flex-wrap: wrap;
    }

    .advantage-bar__item--dark {
        flex: 0 0 100%;
        text-align: center;
        align-items: center;
    }

    .advantage-bar__item--teal1,
    .advantage-bar__item--teal2 {
        flex: 0 0 50%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .advantage-bar__item--teal1:nth-child(2) {
        border-left: none;
    }

    .classification-bg {
        display: none;
    }

    .hot-products__grid {
        grid-template-columns: 1fr 1fr;
    }

    .hot-products__large {
        grid-column: 1 / span 2;
        grid-row: auto;
    }

    .hot-products__grid-2x4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .customers-row__img {
        width: 300px;
        height: 200px;
    }

    .country-item {
        max-width: calc(100% / 9);
    }
}

@media (max-width: 767px) {
    .advantage-bar {
        margin-top: 0;
    }

    .advantage-bar__item {
        flex: 0 0 100%;
    }

    .hot-products {
        padding: 40px 0;
    }

    .hot-products__title {
        font-size: 40px;
    }

    .hot-products__grid {
        grid-template-columns: 1fr;
    }

    .hot-products__large {
        grid-column: auto;
        grid-row: auto;
    }

    .hot-products__grid-2x4 {
        grid-template-columns: 1fr 1fr;
    }

    .certificate-section__title {
        font-size: 36px;
    }

    .certificate-item {
        width: 140px;
        height: 200px;
    }

    .customers-row__img {
        width: 220px;
        height: 150px;
    }

    .country-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .country-item {
        max-width: 60px;
    }
}