/* ============================================================================
 * slider.css — 轮播组件结构层
 *
 * 原站用 Swiper，重建版换成自研的 ~200 行引擎（assets/js/site.js 里的 Slider 类），
 * 但**保留同一套 DOM 约定与类名**（.swiper-container / .swiper-wrapper / .swiper-slide），
 * 这样原站主题里那些针对轮播的排版规则（间距、图片裁切、分页位置）不用改就能继续生效。
 *
 * 这里只放「结构」不碰「皮肤」：颜色、尺寸、间距仍由 site.css 决定。
 * ========================================================================== */

.swiper-container {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  list-style: none;
  padding: 0;
  z-index: 1;
}

.swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  box-sizing: content-box;
}

/* 纵向轮播靠 flex 方向切换，位移仍用 translate3d */
.swiper-container-vertical > .swiper-wrapper {
  flex-direction: column;
}

.swiper-container-vertical > .swiper-wrapper > .swiper-slide {
  width: 100%;
  height: auto;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
  position: relative;
  transition-property: transform;
}

/* 拖拽中禁掉过渡，松手再恢复（.is-dragging 由 site.js 加） */
.swiper-container.is-dragging .swiper-wrapper {
  transition-duration: 0ms !important;
}

.swiper-container.is-dragging {
  cursor: grabbing;
}

.swiper-container.is-draggable {
  cursor: grab;
}

/* ---- 分页点 ---- */
.swiper-pagination {
  position: absolute;
  text-align: center;
  transition: opacity .3s;
  z-index: 10;
  width: 100%;
  left: 0;
  bottom: 10px;
}

.swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: #000;
  opacity: .2;
  cursor: pointer;
  vertical-align: middle;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #ff7d1e;
}

/* ---- 滚动条（产品区在用） ---- */
.swiper-scrollbar {
  position: relative;
  background: rgba(0, 0, 0, .1);
}

.swiper-scrollbar-drag {
  position: relative;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  border-radius: 10px;
  cursor: grab;
}

/* ---- 淡入淡出模式（备用，当前页面未启用） ---- */
.swiper-container-fade .swiper-slide {
  transition-property: opacity;
  position: absolute;
  top: 0;
  left: 0;
}

.swiper-container-fade .swiper-slide-active {
  position: relative;
  z-index: 2;
}
