/* 右侧广告横幅样式 */
.right-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 0;
  border-radius: 8px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
}

.right-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.right-banner img {
  width: 288px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.close-btn:hover {
  opacity: 1;
  background-color: rgba(255, 107, 107, 0.9);
  transform: scale(1.1);
}

.countdown-timer {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 轮播图 */
.banner-swiper {
  position: relative;
  width: 288px;
  height: auto;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.swiper-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
  width: 100%;
}

.swiper-slide {
  width: 288px;
  min-width: 288px;
  max-width: 288px;
  flex-shrink: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* 轮播图导航 */
.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
  z-index: 102;
  user-select: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  opacity: 0.8;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(255, 196, 81, 0.9);
  color: #000;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.swiper-button-next {
  right: 6px;
}

.swiper-button-prev {
  left: 6px;
}

/* 轮播图分页器 */
.swiper-pagination {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 12px;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
}

.swiper-pagination-bullet.active {
  background: #ffc451;
  width: 24px;
  border-radius: 4px;
  border-color: #ffc451;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .right-banner {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 90%;
    max-width: 100%;
    z-index: 85;
    pointer-events: auto;
  }

  .right-banner.show {
    transform: translate(-50%, -50%);
    opacity: 1;
  }

  .right-banner:not(.show) {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
  }

  .banner-swiper {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    height: 50vh;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .swiper-wrapper {
    width: 100%;
    height: 100%;
  }

  .swiper-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .swiper-slide img {
    border-radius: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
  }

  .right-banner img {
    width: 100%;
    height: 100%;
  }

  /* 调整关闭按钮位置到右上角 */
  .close-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: -12px;
    right: 5px;
    background: rgba(255, 107, 107, 0.9);
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
  }

  .close-btn:active {
    transform: scale(0.9);
    background: rgba(255, 80, 80, 1);
  }

  /* 调整倒计时样式 */
  .countdown-timer {
    width: 32px;
    height: 32px;
    font-size: 10px;
    top: 8px;
    left: 8px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .swiper-button-next {
    right: 10px;
  }

  .swiper-button-prev {
    left: 10px;
  }

  .swiper-pagination {
    bottom: 5px;
    padding: 2px 8px;
    background: transparent;
    box-shadow: none;
  }
}

/* 小屏手机适配 - 保持与大屏手机一致的居中显示 */
@media (max-width: 480px) {
  .right-banner {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 90%;
    max-width: 100%;
    z-index: 85;
    pointer-events: auto;
  }

  .right-banner.show {
    transform: translate(-50%, -50%);
    opacity: 1;
  }

  .right-banner:not(.show) {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
  }

  .banner-swiper {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    height: 50vh;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .swiper-wrapper {
    width: 100%;
    height: 100%;
  }

  .swiper-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .swiper-slide img {
    border-radius: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
  }

  .right-banner img {
    width: 100%;
    height: 100%;
  }

  /* 调整关闭按钮位置到右上角 */
  .close-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: -12px;
    right: 5px;
    background: rgba(255, 107, 107, 0.9);
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
  }

  .close-btn:active {
    transform: scale(0.9);
    background: rgba(255, 80, 80, 1);
  }

  /* 调整倒计时样式 */
  .countdown-timer {
    width: 30px;
    height: 30px;
    font-size: 9px;
    top: 8px;
    left: 8px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .swiper-button-next:active,
  .swiper-button-prev:active {
    transform: translateY(-50%) scale(0.9);
  }

  .swiper-button-next {
    right: 10px;
  }

  .swiper-button-prev {
    left: 10px;
  }

  .swiper-pagination {
    bottom: 5px;
    padding: 2px 8px;
    background: transparent;
    box-shadow: none;
  }

  .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
  }

  .swiper-pagination-bullet.active {
    width: 20px;
  }
}
