/* 轮播图统一高度修复样式 */

/* 基础轮播图容器 */
.slider-pic {
  height: 4.5rem !important;
  overflow: hidden !important;
  position: relative;
  width: 100%;
}

/* Swiper容器统一高度 */
.swiper-container {
  height: 4.5rem !important;
  width: 100% !important;
  position: relative;
  overflow: hidden;
}

.swiper-wrapper {
  height: 4.5rem !important;
  width: 100%;
  position: relative;
}

.swiper-slide {
  height: 4.5rem !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 图片样式优化 */
.slider-image,
.swiper-slide img {
  width: 100% !important;
  height: 4.5rem !important;
  object-fit: cover !important; /* 保持比例，裁剪多余部分 */
  object-position: center !important; /* 居中显示 */
  display: block !important;
  border-radius: 0;
  border: none;
  outline: none;
}

/* 链接样式 */
.swiper-slide a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  text-decoration: none;
}

/* 分页器样式 */
.swiper-pagination {
  bottom: 10px !important;
  z-index: 10;
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5) !important;
  opacity: 1 !important;
  width: 8px;
  height: 8px;
  margin: 0 4px;
}

.swiper-pagination-bullet-active {
  background: #fec80d !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .slider-pic,
  .swiper-container,
  .swiper-wrapper,
  .swiper-slide {
    height: 3.5rem !important;
  }
  
  .slider-image,
  .swiper-slide img {
    height: 3.5rem !important;
  }
}

@media (max-width: 480px) {
  .slider-pic,
  .swiper-container,
  .swiper-wrapper,
  .swiper-slide {
    height: 3.0rem !important;
  }
  
  .slider-image,
  .swiper-slide img {
    height: 3.0rem !important;
  }
}

@media (max-width: 375px) {
  .slider-pic,
  .swiper-container,
  .swiper-wrapper,
  .swiper-slide {
    height: 2.5rem !important;
  }
  
  .slider-image,
  .swiper-slide img {
    height: 2.5rem !important;
  }
}

/* 加载状态 */
.swiper-slide img {
  transition: opacity 0.3s ease;
}

.swiper-slide img:not([src]),
.swiper-slide img[src=""] {
  opacity: 0;
  background: #f0f0f0;
}

/* 防止图片拖拽和选择 */
.slider-image,
.swiper-slide img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto;
}

/* 确保容器不会被内联样式覆盖 */
.swiper-slide[style*="width"] {
  width: 100% !important;
}

.swiper-slide[style*="height"] {
  height: 4.5rem !important;
}

/* 移动端特殊处理 */
@media (max-width: 768px) {
  .swiper-slide[style*="height"] {
    height: 3.5rem !important;
  }
}

@media (max-width: 480px) {
  .swiper-slide[style*="height"] {
    height: 3.0rem !important;
  }
}

@media (max-width: 375px) {
  .swiper-slide[style*="height"] {
    height: 2.5rem !important;
  }
}