.echi-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.echi-carousel-wrapper {
  display: flex;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.echi-carousel-slide {
  flex: 0 0 100%;
  position: relative;
}

.echi-carousel-slide picture,
.echi-carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.echi-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 5;
}

.echi-carousel-arrow-left {
  left: 10px;
}

.echi-carousel-arrow-right {
  right: 10px;
}

/* 文本框初始状态 */
.echi-carousel-textbox {
  position: absolute;
  z-index: 2;
  max-width: 90%;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
  opacity: 0;
}

/* 动画显示激活时 */
.echi-carousel-slide.active .echi-carousel-textbox {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* 九宫格定位优化：避免贴边，保持边缘留白 */
.pos-top-left {
  top: 10%;
  left: 10%;
  transform: translate(0, 0);
  text-align: left;
}

.pos-top-center {
  top: 10%;
  left: 50%;
  transform: translate(-50%, 0);
  text-align: center;
}

.pos-top-right {
  top: 10%;
  right: 10%;
  left: auto;
  transform: translate(0, 0);
  text-align: right;
}

.pos-center-left {
  top: 50%;
  left: 10%;
  transform: translate(0, -50%);
  text-align: left;
}

.pos-center-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.pos-center-right {
  top: 50%;
  right: 10%;
  left: auto;
  transform: translate(0, -50%);
  text-align: right;
}

.pos-bottom-left {
  bottom: 10%;
  left: 10%;
  transform: translate(0, 0);
  text-align: left;
}

.pos-bottom-center {
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, 0);
  text-align: center;
}

.pos-bottom-right {
  bottom: 10%;
  right: 10%;
  left: auto;
  transform: translate(0, 0);
  text-align: right;
}

/* 响应式字体调整 */
@media (max-width: 768px) {
  .echi-carousel-textbox h3 {
    font-size: 1.4rem;
  }

  .echi-carousel-textbox p {
    font-size: 0.9rem;
  }
}

.echi-carousel-inner {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.echi-carousel-inner:hover {
  opacity: 0.95;
}


