a {
    display: block;
}
body {
    font-family: diy_font;
}
section {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 50px;
    background-size: contain;
    margin-top: 30px;
}
section img {
    width: 100%;
}

/*pc端轮播图+标题*/
.swiper_and_title {
    width: 86%;
    margin: 0 auto;
    margin-top: 60px;
    margin-bottom: 20px;
    position: relative;
}
.swiper_and_title .swiper-container {
    width: 37%;
    float: left;
}
.swiper_and_title .title_price_desc {
    width: 54%;
    float: right;
}
.swiper_and_title .clear {
    clear: both;
}
/*pc端轮播图+标题*/

h1 {
    height: 80px;
    line-height: 80px;
    text-align: center;
    font-size: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 2;
}
.title_price_desc h2{
    font-size: 26px;
}
.title_price_desc h2 small {
    display: block;
    font-size: 14px;
    font-weight: normal;
}
.title_price_desc .price {
    font-size: 2rem;
    margin-top: 20px;
    font-weight: 600;
}

.title_price_desc .des,.title_price_desc .size {
    margin: 0 auto;
    border-top: 1px solid #ccc;
    margin-top: 15px;
    font-size: 14px;
    color: #656C7B;
}
.title_price_desc .des span,.title_price_desc .size span {
    display: block;
    font-weight: 500;
    font-size: 18px;
    margin-top: 10px;
    color: #000;
}
.title_price_desc .size a{
    display: inline-block;
    padding: 5px 10px;
    background: #5B1FFF;
    color: #fff;
    border-radius: 10px;
    margin-top: 10px;
}

.title_price_desc .attr a {
    background: none;
    border: 1px solid #5B1FFF;
    color: #5B1FFF;
    margin-right: 10px;
}
.title_price_desc .attr a.this {
    background: #5B1FFF;
    color: #fff;
}

/*轮播图*/
/* 主轮播容器 - 限制最大宽度并居中 */
.swiper-container {
    max-width: 800px;
    margin: 0 auto;
    position: fixed;
}

/* 主轮播图容器 - 1:1 比例 */
.main-swiper {
    width: 100%;
    aspect-ratio: 1/1; /* 核心：设置 1:1 比例 */
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 主轮播图片 - 保持 1:1 比例并覆盖容器 */
.main-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，裁剪超出部分 */
    display: block;
}

/* 缩略图轮播容器 */
.thumb-swiper {
    width: 100%;
    margin: 0 auto;
}

/* 缩略图样式 */
.thumb-swiper .swiper-slide {
    width: calc(12.5% - 10px); /* 一行显示5个缩略图，间距10px */
    height: 100%;
    opacity: 1; /* 未激活的缩略图透明度 */
    transition: opacity 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #fff;
}

/* 激活的缩略图样式 */
.thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #5B1FFF;
}

/* 缩略图图片 */
.thumb-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 自定义分页器样式 */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #999!important;
    opacity: 1!important;
}

.swiper-pagination-bullet-active {
    background-color: #5B1FFF!important;
    opacity: 1;
}

.buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 12px;
    width: 480px;
    margin: 0 auto;
    text-align: center;
}
.buy button {
    display: block;
    width: 100%;
    background: #5B1FFF;
    color: #fff;
    border: none;
    font-size: 20px;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
}

.logistics_payment {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}
.logistics_payment img{
    max-width: 49%;
    border-radius: 10px;
}

/*移动端适配*/
@media screen and (max-width: 1024px) {
    .swiper_and_title {
        width: auto;
        margin-top: 60px;
    }
    .swiper_and_title .swiper-container {
        width: auto;
        float: none;
        position: static;
        max-width: none;
    }
    .swiper_and_title .title_price_desc {
        width: 100%;
        margin: 0 auto;
        float: none;
    }
    .thumb-swiper {
        width: 95%;
    }
    h2.title {
        margin: 0 auto;
        margin-top: 10px;
        width: 95%;
    }
    .price {
        font-size: 2rem;
        width: 95%;
        margin: 0 auto;
    }
    .title_price_desc .des, .title_price_desc .size {
        width: 95%;
    }

    section {
        width: 100%;
        margin: 0 auto;
        margin-top: 10px;
    }
    .buy {
        width: 70%;
    }
    .logistics_payment {
        display: block;
    }
    .logistics_payment img {
        max-width: 100%;
        border-radius: 0;
        margin-top: 10px;
        width: 100%;
    }
}