/* carousel.css — 全屏轮播图样式 */

/* 容器 */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 600px;
  min-height: 400px;
}

/* 滑轨 */
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

/* 单张幻灯片 */
.carousel__slide {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
}

/* 背景图 */
.carousel__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 文字覆盖层 */
.carousel__caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.carousel__caption img {
  max-width: 80%;
  height: auto;
}

/* 箭头按钮（公共） */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  z-index: 10;
}

.carousel__btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.carousel__btn--prev {
  left: var(--spacing-md);
}

.carousel__btn--next {
  right: var(--spacing-md);
}

/* 指示点容器 */
.carousel__dots {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-xs);
  z-index: 10;
}

/* 单个指示点 */
.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast);
}

.carousel__dot--active {
  background: white;
}
