/* 轮播容器 - 精简+兼容优化 */
.yd-carousel-container {
  position: relative;
  width: 100%;
  overflow: auto hidden; /* 简写 overflow-x:auto;overflow-y:hidden */
  -webkit-scroll-behavior: smooth; /* 补充前缀 */
  scroll-behavior: smooth;
}

/* 滚动条样式 - 保持但精简 */
.yd-carousel-container::-webkit-scrollbar {
  height: 6px;
}
.yd-carousel-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

/* 轮播包裹层 - 补充触摸行为兼容 */
.yd-carousel-wrapper {
  display: flex;
  -ms-touch-action: pan-x; /* 补充IE/Edge前缀 */
  touch-action: pan-x pinch-zoom; /* 增强移动端支持，允许缩放 */
}

/* 轮播项 - 删除无用的max-width（若需限制可保留，否则精简） */
.yd-carousel-item {
  flex-shrink: 0;
  padding-right: 16px;
}

/* 轮播图片 - 补充width保证自适应，优化兼容性 */
.yd-carousel-image {
  width: 100%; /* 补充width，配合max-width生效 */
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

/* 响应式适配 - 保持但统一单位逻辑 */
@media (max-width: 850px) {
    .yd-carousel-container::-webkit-scrollbar {
  height: 0px;
}
.yd-carousel-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.0);
  border-radius: 0px;
}
  .yd-carousel-image {
    max-height: 44.4444vw;
  }
  .yd-carousel-item {
    padding-right: 2.22222vw;
  }
}

/* 图片查看器 - 替换inset为兼容写法，补充过渡动画 */
.yd-image-viewer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0; /* 替换inset:0，兼容老旧浏览器 */
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  -webkit-transition: opacity 0.2s ease; /* 补充过渡动画 */
  transition: opacity 0.2s ease;
}

.yd-image-viewer.active {
  display: flex;
}

/* 查看器图片 - 补充cursor优化交互 */
.yd-image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-out; /* 语义化，提示可关闭/缩小 */
}

/* 查看器导航按钮 - 合并重复样式，精简代码 */
.yd-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  -webkit-user-select: none; /* 补充前缀 */
  user-select: none;
  opacity: 0.7;
}

.yd-viewer-nav:hover {
  opacity: 1;
}

.yd-viewer-nav.disabled {
  opacity: 0.3;
  pointer-events: none; /* 新增：禁用点击，提升交互体验 */
}

.yd-viewer-prev {
  left: 20px;
}

.yd-viewer-next {
  right: 20px;
}