/* 轮播图样式 */
.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
}

.carousel-slide {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 箭头样式 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .carousel-arrow {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }

  .carousel-dots {
    bottom: 15px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .carousel-prev {
    left: 5px;
  }

  .carousel-next {
    right: 5px;
  }

  .carousel-dots {
    bottom: 10px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }
}

/* 确保轮播图在容器中正确显示 */
.ant-carousel,
.slick-slider {
  position: relative;
}

.slick-slide {
  position: relative;
}

.slick-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* 轮播图加载状态 */
.carousel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: #f5f5f5;
  color: #999;
}

/* 轮播图错误状态 */
.carousel-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: #f5f5f5;
  color: #ff4d4f;
}

/* 无障碍访问支持 */
.carousel-arrow:focus,
.carousel-dot:focus {
  outline: 2px solid #1890ff;
  outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .carousel-arrow {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }

  .carousel-dot {
    border: 2px solid white;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .carousel-slide,
  .carousel-dot,
  .carousel-arrow {
    transition: none;
  }
}
