@charset "UTF-8";

.content-main {
    min-width: 1px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.content-main .desktop-layout {
    flex: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
}

.content-main .mobile-layout {
    display: none;
}

/* 上部显示区域 */
.content-main .main-display {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 5px;
    background: #EFEFEF;
}

.content-main .main-display .main-link {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.content-main .main-display img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.content-main .main-display h3 {
    display: block;
    width: 100%;
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
    color: #333333;
    font-size: 16px;
    font-weight: normal;
    margin: 0;
    background-color: #EFEFEF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* 轮播外层包裹 - 全宽 */
.carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* 轮播容器 */
.carousel-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    flex-wrap: nowrap;
    position: relative;
}

/* 轮播按钮 */
.carousel-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d7000f;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    z-index: 10;
}

.carousel-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* 轮播轨道 */
#desktop-swiper {
    flex: 0 0 100%;
    width: 100%;
    max-width: calc(100% - 110px);
    overflow: hidden;
    position: relative;
}

/* 轮播包装器 */
#desktop-swiper .swiper-wrapper {
    display: flex;
    width: max-content;
    max-width: 100%;
    transition: transform 0.5s ease;
    will-change: transform;
    flex-wrap: nowrap;
    overflow: visible;
    position: relative;
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    gap: 10px;
}

/* 轮播项 */
#desktop-swiper .swiper-slide {
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: auto;
    width: calc((100% - 20px) / 3);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    background-color: #EFEFEF;
    overflow: visible;
    box-sizing: border-box;
    padding: 5px 5px 0;
}


#desktop-swiper .swiper-slide:hover {
    transform: translateY(-5px);
}

#desktop-swiper .swiper-slide.active-slide {
    box-shadow: 0 4px 16px rgba(100, 100, 100, 0.3);
}

#desktop-swiper .swiper-slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    overflow: hidden;
}

#desktop-swiper .swiper-slide span {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 40px;
    line-height: 40px;
    padding: 0 10px;
    color: #333333;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    /* 隐藏桌面端布局 */
    .carousel-wrapper,
    .content-main .desktop-layout {
        display: none;
    }

    .content-main .mobile-layout {
        display: block;
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* 移动端轮播容器 */
    .content-main .mobile-carousel-container {
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* 移动端轮播轨道 */
    .content-main .mobile-carousel-track {
        display: flex;
        flex-wrap: nowrap;
        will-change: transform;
        gap: 3px;
    }

    /* 移动端轮播控制按钮 */
    .content-main .mobile-carousel-btn {
        position: absolute;
        top: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #d7000f;
        color: #fff;
        border: none;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transform: translateY(-50%);
    }

    .content-main .mobile-prev-btn {
        left: 10px;
    }

    .content-main .mobile-next-btn {
        right: 10px;
    }

    /* 轮播项 - JS 动态设置宽高和边距实现前后露出效果 */
    .content-main .mobile-carousel-item {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        background-color: #FFFFFF;
        box-sizing: border-box;
        padding: 5px;
        border: 1px solid #ccc;
        position: relative;
    }

    /* 轮播项内容样式 */
    .content-main .mobile-carousel-item img {
        width: 100%;
        height: auto;
        max-height: 375px;
        object-fit: contain;
        display: block;
    }

    .content-main .mobile-carousel-item h3 {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #d7000f;
        text-align: center;
        margin: 5px 0 0;
        padding: 0;
        background-color: #FFFFFF;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 图片懒加载占位 */
    .content-main .mobile-carousel-item img[loading="lazy"] {
        background-color: #f0f0f0;
    }
}

