/* ==================== 双卡片轮播组件 ==================== */
.ds-carousel {
  position: relative;
  width: 100%;
}

.ds-window {
  width: 100%;
  overflow: hidden;
  height: 480px;
}

.ds-track {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.ds-card {
  position: relative;
  height: 480px;
  overflow: hidden;
  transition:
    flex-basis 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    height 0.5s ease;
  cursor: default;
}

.ds-card.is-small {
  height: 320px;
}

.ds-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.ds-card:hover .ds-card-img {
  transform: scale(1.03);
}

.ds-card-label {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 切换按钮 */
.ds-nav {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  gap: 10px;
}

.ds-prev,
.ds-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #d1c5b0;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  /* no mobile tap highlight block */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

/* press feedback: slight shrink (transition all 0.3s covers it) */
.ds-prev:active,
.ds-next:active {
  transform: scale(0.9);
}

.ds-prev:hover,
.ds-next:hover {
  background: #d1c5b0;
}

.ds-prev::before,
.ds-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #d1c5b0;
  border-right: 1.5px solid #d1c5b0;
  transition: border-color 0.3s;
}

.ds-prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.ds-next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.ds-prev:hover::before,
.ds-next:hover::before {
  border-color: #fff;
}

/* 手机端 */
@media (max-width: 860px) {
  .ds-track {
    gap: 0;
  }
  .ds-card {
    flex: 0 0 100% !important;
    aspect-ratio: 2 / 3;
    height: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
  }
  .ds-card.is-active {
    opacity: 1;
    position: relative;
  }
  /* slide 切换效果：卡片同层横排，由轨道平移切换（覆盖 absolute 叠放） */
  .ds-carousel.ds-effect-slide .ds-card {
    opacity: 1;
    position: relative;
    top: auto;
    left: auto;
  }
  .ds-window {
    position: relative;
    aspect-ratio: 2 / 3;
    height: auto;
    max-height: 80vh;
  }
  .ds-nav {
    position: relative;
    margin-top: 16px;
    justify-content: flex-end;
    bottom: auto;
    right: auto;
  }
  .ds-card-label {
    top: 16px;
    left: 16px;
    font-size: 16px;
  }
}
