﻿.my-slider {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    transition: height 0.4s ease; /* 可选：加动画 */
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-list {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-item.active {
    opacity: 1;
    z-index: 2;
    position: relative;
}
.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    line-height: 40px;
    text-decoration: none;
    font-size: 20px;
    border-radius: 50%;
    z-index: 2;
    cursor: pointer;
    opacity: 0.7;
}

.slider-prev:hover, .slider-next:hover {
    opacity: 1;
    color: white;
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
}

.slider-indicator:hover {
    background: rgba(15, 82, 186, 0.8);
}

.slider-indicator.active {
    background: rgba(15, 82, 186, 0.8);
}

/* 缩略图样式 */
.slider-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    /* 默认隐藏，如果不需要缩略图 */
    /* display: none; */
}

.slider-thumbnail {
    width: 80px;
    height: 80px;
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.slider-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-thumbnail.active {
    border-color: #fff;
}