/**
 * OBOOT 首页轮播 — 与站点酒红/鎏金主色协调
 */

.obhc {
  --obhc-wine: #4b0024;
  --obhc-wine-mid: #6b1f32;
  --obhc-gold: #e7d39a;
  --obhc-gold-dim: rgba(215, 185, 106, 0.55);
  --obhc-bg: #0a0508;
  --obhc-radius: 14px;
  --obhc-arrow: 44px;
  --obhc-aspect-desktop: 42 / 9;
  --obhc-aspect-mobile: 4 / 5;
  --obhc-mobile-crop-top: 20px;
  --obhc-mobile-crop-bottom: 50px;
  --obhc-transition-ms: 680ms;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
}

.obhc *,
.obhc *::before,
.obhc *::after {
  box-sizing: border-box;
}

.obhc__stage {
  position: relative;
  border-radius: var(--obhc-radius);
  overflow: hidden;
  background:
    radial-gradient(900px 280px at 18% 0%, rgba(122, 40, 64, 0.35), transparent 55%),
    linear-gradient(180deg, #12080e 0%, var(--obhc-bg) 100%);
  border: 1px solid rgba(215, 185, 106, 0.18);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 桌面：撑满视口宽度（--obhc-viewport-w 由 JS 设为 clientWidth，避免 100vw scrollbar 缝隙） */
html body .obhc.obhc--fullwidth {
  --obhc-viewport-w: 100vw;
  width: var(--obhc-viewport-w) !important;
  max-width: var(--obhc-viewport-w) !important;
  margin-left: calc(50% - var(--obhc-viewport-w) / 2) !important;
  margin-right: calc(50% - var(--obhc-viewport-w) / 2) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html body .obhc.obhc--fullwidth .obhc__stage {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
  background: var(--obhc-bg) !important;
}

html body .obhc.obhc--fullwidth .obhc__track,
html body .obhc.obhc--fullwidth .obhc__slides {
  width: 100% !important;
  max-width: 100% !important;
}

.obhc__track {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: var(--obhc-aspect-desktop);
}

.obhc__track--mobile {
  aspect-ratio: var(--obhc-aspect-mobile);
}

/* 桌面：整张可见、不裁切；宽度铺满，高度随图（JS 同步轨道高度） */
html body .obhc.obhc--desktop-contain .obhc__track--desktop {
  aspect-ratio: auto !important;
  height: auto;
  min-height: 80px;
  background: var(--obhc-bg);
}

html body .obhc.obhc--desktop-contain .obhc__track--desktop .obhc__slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

html body .obhc.obhc--desktop-contain .obhc__track--desktop .obhc__slide {
  display: block;
  background: var(--obhc-bg);
}

html body .obhc.obhc--desktop-contain .obhc__track--desktop .obhc__link {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  line-height: 0;
}

html body .obhc.obhc--desktop-contain .obhc__track--desktop .obhc__img {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: unset !important;
  object-position: center top !important;
  vertical-align: top;
  background: transparent !important;
}

html body .obhc.obhc--desktop-contain.obhc-effect-ken-burns .obhc__slide .obhc__img,
html body .obhc.obhc--desktop-contain.obhc-effect-ken-burns .obhc__slide.is-active .obhc__img {
  transform: none !important;
}

/* 手机版轨道：整张可见、高度随手机版配图（JS 同步） */
html body .obhc.obhc--mobile-contain .obhc__track--mobile {
  aspect-ratio: auto !important;
  height: auto;
  min-height: clamp(300px, 68vw, 580px);
  background: var(--obhc-bg);
}

html body .obhc.obhc--mobile-contain .obhc__track--mobile .obhc__slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

html body .obhc.obhc--mobile-contain .obhc__track--mobile .obhc__slide {
  display: block;
  background: var(--obhc-bg);
}

html body .obhc.obhc--mobile-contain .obhc__track--mobile .obhc__link {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  line-height: 0;
  overflow: hidden;
}

html body .obhc.obhc--mobile-contain .obhc__track--mobile .obhc__img {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: calc(-1 * var(--obhc-mobile-crop-top)) 0 0 !important;
  padding: 0 !important;
  object-fit: unset !important;
  object-position: center top !important;
  vertical-align: top;
  background: transparent !important;
}

html body .obhc.obhc--mobile-contain.obhc-effect-ken-burns .obhc__track--mobile .obhc__slide .obhc__img,
html body .obhc.obhc--mobile-contain.obhc-effect-ken-burns .obhc__track--mobile .obhc__slide.is-active .obhc__img {
  transform: none !important;
}

@media (min-width: 768px) {
  .obhc__track--desktop {
    display: block;
  }
  .obhc__track--mobile {
    display: none;
  }

  html body .obhc.obhc--fullwidth .obhc__arrow--prev {
    left: 20px;
  }

  html body .obhc.obhc--fullwidth .obhc__arrow--next {
    right: 20px;
  }
}

@media (max-width: 767px) {
  .obhc__track--desktop {
    display: none;
  }
  .obhc__track--mobile {
    display: block;
  }

  html body .obhc.obhc--fullwidth {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body .obhc .obhc__stage,
  html body .obhc.obhc--fullwidth .obhc__stage {
    border-radius: 0 !important;
  }

  html body .obhc .obhc__track--mobile,
  html body .obhc .obhc__track--mobile .obhc__slides {
    border-radius: 0 !important;
  }
}

.obhc__slides {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.obhc__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition:
    opacity var(--obhc-transition-ms) ease,
    transform var(--obhc-transition-ms) ease,
    filter var(--obhc-transition-ms) ease,
    visibility 0s linear var(--obhc-transition-ms);
}

.obhc__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
  transition:
    opacity var(--obhc-transition-ms) ease,
    transform var(--obhc-transition-ms) ease,
    filter var(--obhc-transition-ms) ease,
    visibility 0s;
}

.obhc__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.obhc__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.obhc__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  max-width: min(88%, 520px);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 244, 212, 0.96);
  background: linear-gradient(135deg, rgba(75, 0, 36, 0.82), rgba(0, 0, 0, 0.55));
  border: 1px solid var(--obhc-gold-dim);
  backdrop-filter: blur(6px);
}

html body .obhc.obhc--desktop-contain .obhc__track--desktop .obhc__caption {
  bottom: 28px;
}

/* —— 效果：水平滑动 —— */
.obhc-effect-slide .obhc__slide {
  transform: translateX(8%);
}
.obhc-effect-slide .obhc__slide.is-active {
  transform: translateX(0);
}
.obhc-effect-slide .obhc__slide.is-leaving {
  transform: translateX(-8%);
  opacity: 0;
}

/* —— 效果：垂直滑动 —— */
.obhc-effect-slide-up .obhc__slide {
  transform: translateY(10%);
}
.obhc-effect-slide-up .obhc__slide.is-active {
  transform: translateY(0);
}
.obhc-effect-slide-up .obhc__slide.is-leaving {
  transform: translateY(-10%);
  opacity: 0;
}

/* —— 效果：缩放 —— */
.obhc-effect-zoom .obhc__slide {
  transform: scale(1.08);
  filter: brightness(0.92);
}
.obhc-effect-zoom .obhc__slide.is-active {
  transform: scale(1);
  filter: brightness(1);
}
.obhc-effect-zoom .obhc__slide.is-leaving {
  transform: scale(0.96);
  opacity: 0;
}

/* —— 效果：肯伯恩斯（仅非 desktop-contain） —— */
.obhc-effect-ken-burns:not(.obhc--desktop-contain) .obhc__slide .obhc__img {
  transform: scale(1.06);
  transition: transform calc(var(--obhc-interval-ms) * 1.1) ease-out;
}
.obhc-effect-ken-burns:not(.obhc--desktop-contain) .obhc__slide.is-active .obhc__img {
  transform: scale(1.14);
}

/* —— 效果：模糊 —— */
.obhc-effect-blur .obhc__slide,
.obhc-effect-crossfade-blur .obhc__slide {
  filter: blur(10px);
}
.obhc-effect-blur .obhc__slide.is-active,
.obhc-effect-crossfade-blur .obhc__slide.is-active {
  filter: blur(0);
}
.obhc-effect-crossfade-blur .obhc__slide.is-leaving {
  filter: blur(6px);
}

/* —— 效果：翻转 —— */
.obhc-effect-flip .obhc__slides {
  perspective: 1200px;
}
.obhc-effect-flip .obhc__slide {
  transform: rotateY(-88deg);
  transform-origin: center center;
  backface-visibility: hidden;
}
.obhc-effect-flip .obhc__slide.is-active {
  transform: rotateY(0);
}
.obhc-effect-flip .obhc__slide.is-leaving {
  transform: rotateY(88deg);
  opacity: 0;
}

/* —— 效果：立方 —— */
.obhc-effect-cube .obhc__slides {
  perspective: 1400px;
}
.obhc-effect-cube .obhc__slide {
  transform: rotateY(90deg) translateZ(120px);
  transform-origin: center center;
  backface-visibility: hidden;
}
.obhc-effect-cube .obhc__slide.is-active {
  transform: rotateY(0) translateZ(0);
}
.obhc-effect-cube .obhc__slide.is-leaving {
  transform: rotateY(-90deg) translateZ(120px);
  opacity: 0;
}

/* —— 效果：叠卡 —— */
.obhc-effect-stack .obhc__slide {
  transform: scale(0.94) translateY(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.obhc-effect-stack .obhc__slide.is-active {
  transform: scale(1) translateY(0);
}
.obhc-effect-stack .obhc__slide.is-leaving {
  transform: scale(0.9) translateY(-18px);
  opacity: 0;
}

/* —— 效果：流畅滑入 —— */
.obhc-effect-glide .obhc__slide {
  transform: translateX(16%) scale(0.98);
  opacity: 0;
}
.obhc-effect-glide .obhc__slide.is-active {
  transform: translateX(0) scale(1);
  opacity: 1;
}
.obhc-effect-glide .obhc__slide.is-leaving {
  transform: translateX(-12%) scale(0.98);
  opacity: 0;
}

/* —— 效果：幕布擦除 —— */
.obhc-effect-wipe .obhc__slide {
  clip-path: inset(0 100% 0 0);
  opacity: 1;
  visibility: hidden;
}
.obhc-effect-wipe .obhc__slide.is-active {
  clip-path: inset(0 0 0 0);
  visibility: visible;
}
.obhc-effect-wipe .obhc__slide.is-leaving {
  clip-path: inset(0 0 0 100%);
  visibility: visible;
  z-index: 3;
}

/* 左右切换 — 毛玻璃圆形按钮 */
html body .obhc .obhc__arrow,
html body .obhc button.obhc__arrow {
  position: absolute;
  top: 50%;
  z-index: 12;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: var(--obhc-arrow) !important;
  min-width: var(--obhc-arrow) !important;
  height: var(--obhc-arrow) !important;
  min-height: var(--obhc-arrow) !important;
  margin-top: calc(var(--obhc-arrow) / -2);
  padding: 0 !important;
  border: 1px solid rgba(255, 244, 212, 0.26) !important;
  border-radius: 50% !important;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(75, 0, 36, 0.22) 42%,
    rgba(10, 5, 8, 0.38) 100%
  ) !important;
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  color: #fff4d4 !important;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
  appearance: none;
  -webkit-appearance: none;
}

html body .obhc .obhc__arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.2), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

html body .obhc .obhc__arrow span {
  position: relative;
  z-index: 1;
  display: block;
  width: 9px;
  height: 9px;
  margin: 0;
  border-top: 2px solid #fff4d4 !important;
  border-right: 2px solid #fff4d4 !important;
  border-bottom: none !important;
  border-left: none !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

html body .obhc .obhc__arrow--prev {
  left: 16px;
}

html body .obhc .obhc__arrow--prev span {
  transform: rotate(-135deg) translate(1px, -1px);
}

html body .obhc .obhc__arrow--next {
  right: 16px;
}

html body .obhc .obhc__arrow--next span {
  transform: rotate(45deg) translate(-1px, 1px);
}

html body .obhc .obhc__arrow:hover,
html body .obhc button.obhc__arrow:hover {
  transform: scale(1.08);
  border-color: rgba(231, 211, 154, 0.62) !important;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(107, 31, 50, 0.28) 45%,
    rgba(20, 8, 14, 0.45) 100%
  ) !important;
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(245, 215, 110, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

html body .obhc .obhc__arrow:active {
  transform: scale(1.02);
}

html body .obhc .obhc__arrow:focus-visible {
  outline: 2px solid rgba(231, 211, 154, 0.85);
  outline-offset: 2px;
}

/* 指示点 — 精美小巧（高优先级覆盖主题/Elementor） */
html body .obhc .obhc__dots {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 14px;
  z-index: 12;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 7px !important;
  width: auto !important;
  max-width: calc(100% - 32px);
  margin: 0 !important;
  padding: 5px 10px !important;
  transform: translateX(-50%);
  pointer-events: none;
  border-radius: 999px;
  background: rgba(10, 5, 8, 0.42);
  border: 1px solid rgba(215, 185, 106, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  line-height: 0 !important;
}

html body .obhc .obhc__dot,
html body .obhc button.obhc__dot {
  pointer-events: auto;
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 6px !important;
  min-width: 6px !important;
  max-width: 6px !important;
  height: 6px !important;
  min-height: 6px !important;
  max-height: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer;
  opacity: 0.88;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

html body .obhc .obhc__dot.is-active,
html body .obhc button.obhc__dot.is-active {
  width: 6px !important;
  min-width: 6px !important;
  max-width: 6px !important;
  height: 6px !important;
  min-height: 6px !important;
  max-height: 6px !important;
  background: linear-gradient(180deg, #fff4d4 0%, #e7d39a 45%, #c99a2e 100%) !important;
  border-color: rgba(255, 244, 212, 0.85) !important;
  box-shadow:
    0 0 0 1px rgba(75, 0, 36, 0.55),
    0 0 8px rgba(245, 215, 110, 0.45) !important;
  opacity: 1;
  transform: scale(1.2);
}

html body .obhc .obhc__dot:hover,
html body .obhc button.obhc__dot:hover {
  opacity: 1;
  background: rgba(231, 211, 154, 0.72) !important;
  transform: scale(1.15);
}

@media (max-width: 767px) {
  .obhc {
    --obhc-arrow: 38px;
  }

  html body .obhc .obhc__arrow--prev {
    left: 10px;
  }

  html body .obhc .obhc__arrow--next {
    right: 10px;
  }
  .obhc__caption {
    left: 10px;
    bottom: 10px;
    font-size: 12px;
  }

  html body .obhc .obhc__dots {
    bottom: 10px;
    padding: 4px 8px !important;
    gap: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .obhc__slide,
  .obhc__slide .obhc__img,
  .obhc__arrow,
  .obhc__dot {
    transition: none !important;
  }
  .obhc-effect-ken-burns:not(.obhc--desktop-contain) .obhc__slide.is-active .obhc__img {
    transform: none !important;
  }
}
