﻿/* 网站首页样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 中间内容区域样式 */
.content-wrapper {
    margin-top: 80px; /* 为固定导航留出空间 */
    min-height: calc(100vh - 120px - 300px); /* 确保内容区域足够高 */
}

/* 横幅样式 */
.banner {
    height: 615px;
    background: url(../images/product_header.jpg) center/cover no-repeat #f2f2f2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .34)
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2
}

.banner p {
    font-size: 20px;
    position: relative;
    z-index: 2
}

.breadcrumb {
    position: absolute;
    bottom: 20px;
    left: 5%;
    font-size: 15px;
    display: flex;
    align-items: center;
    z-index: 2
}

.breadcrumb a {
    color: #fff;
    margin: 0 4px
}

/* 设备图片网格 */
.grid-box {
    width: 90%;
    max-width: 1120px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-top: 1px solid #cacaca;
    padding-top: 34px;
}

.grid-box img {
    width: 100%;
    height: 238px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    transition: transform 0.3s ease;
}

.grid-box img:hover {
    transform: scale(1.03);
}

.pager {
    text-align: center;
    margin: 40px 0
}

.pager button {
    width: 129px;
    height: 36px;
    margin: 0 26px;
    border: 1px solid #0a6bb9;
    background: #0a6bb9;
    color: #fff;
    border-radius: 100px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pager button:hover {
    background: #fff;
    color: #0a6bb9
}

/* 生产设备小屏轮播样式 */
.equipment-swiper-container {
    display: none;
    width: 100%;
    max-width: 1120px;
    margin: 30px auto 0;
    overflow: hidden;
    border-top: 1px solid #cacaca;
    padding-top: 34px;
}

/* 小屏轮播标题 */
.equipment-swiper-title {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: normal;
    display: none;
}

.equipment-swiper-slide {
    text-align: center;
    padding: 0 10px;
}

.equipment-swiper-slide img {
    width: 100%;
    height: 238px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

/* 轮播导航按钮样式 */
.equipment-swiper-button-next,
.equipment-swiper-button-prev {
    color: #0a6bb9;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.equipment-swiper-button-next:after,
.equipment-swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.equipment-swiper-button-next:hover,
.equipment-swiper-button-prev:hover {
    background: #0a6bb9;
    color: white;
}

/* 分页器样式 */
.equipment-swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.equipment-swiper-pagination .swiper-pagination-bullet {
    background-color: #ccc;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.equipment-swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #0a6bb9;
    transform: scale(1.2);
}

/* 飞行效果相关样式 */
.fly-in-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fly-in-element.fly-in-left {
    transform: translateX(-100px);
}

.fly-in-element.fly-in-right {
    transform: translateX(100px);
}

.fly-in-element.fly-in-top {
    transform: translateY(-50px);
}

.fly-in-element.fly-in-bottom {
    transform: translateY(50px);
}

.fly-in-element.fly-in-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* 延迟效果 */
.fly-in-delay-1 {
    transition-delay: 0.1s;
}

.fly-in-delay-2 {
    transition-delay: 0.2s;
}

.fly-in-delay-3 {
    transition-delay: 0.3s;
}

.fly-in-delay-4 {
    transition-delay: 0.4s;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .grid-box {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        margin-top: 84px;
    }

    .banner {
        height: 300px;
    }

    .banner h1 {
        font-size: 28px
    }

    .banner p {
        font-size: 16px
    }

    /* 在小屏下隐藏网格，显示轮播 */
    .grid-box {
        display: none;
    }

    .equipment-swiper-container {
        display: block;
        width: 346px !important;
        border-top: 0;
        margin: 0 auto;
    }

    .equipment-swiper-title {
        display: block;
    }

    .equipment-swiper-slide img {
        height: 200px;
    }

    /* 小屏下隐藏分页器 */
    .equipment-swiper-pagination {
        display: none;
    }

    /* 小屏下隐藏上一页下一页按钮 */
    .pager {
        display: none;
    }
}

@media (max-width: 480px) {
    .equipment-swiper-slide img {
        height: 254px;
    }

    .equipment-swiper-title {
        font-size: 26px;
        margin-bottom: 20px;
        color: #000;
        padding-bottom: 18px;
        border-bottom: 1px solid #cacaca;
    }
}
