/* =========================================================
   Default 1.0.0 — slideshow.css（B1 重写）
   由 sections/slideshow.liquid 经 {{ 'slideshow.css' | asset_url }} 加载
   视觉沿用 default 主题 Hero 风格（暗色渐变 + accent 强调）
   ========================================================= */

/* ===== 容器与高度 ===== */
.slideshow {
  position: relative;
  height: 560px; /* medium 默认 */
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
}
.slideshow--small {
  height: 380px;
}
.slideshow--large {
  height: 720px;
}
.slideshow--adapt_image {
  height: auto;
}
.slideshow--adapt_image .slideshow-viewport {
  aspect-ratio: 16 / 7;
}

/* ===== 视口与轨道 ===== */
.slideshow-viewport {
  position: relative;
  width: 100%;
  height: 100%;
}
.slideshow-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.slideshow-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
}

/* ===== 图片媒体 ===== */
.slideshow-media {
  position: absolute;
  inset: 0;
}
.slideshow-media--fallback {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}
.slideshow-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slideshow-img--mobile {
  display: none;
}
.slideshow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.65) 0%, rgba(26, 26, 26, 0.45) 100%);
}
.slideshow-fallback-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(201, 169, 97, 0.16) 0%, transparent 50%);
}

/* ===== 内容 9 宫格定位 ===== */
/* max-width + margin auto：9 宫格定位以全站内容容器(--container-width)为基准，
   left/right 对齐时面板对齐内容网格左/右缘，而非贴死浏览器视口边缘 */
.slideshow-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  padding: 40px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
}
.slideshow-content--top-left { align-items: flex-start; justify-content: flex-start; }
.slideshow-content--top-center { align-items: flex-start; justify-content: center; }
.slideshow-content--top-right { align-items: flex-start; justify-content: flex-end; }
.slideshow-content--middle-left { align-items: center; justify-content: flex-start; }
.slideshow-content--middle-center { align-items: center; justify-content: center; }
.slideshow-content--middle-right { align-items: center; justify-content: flex-end; }
.slideshow-content--bottom-left { align-items: flex-end; justify-content: flex-start; }
.slideshow-content--bottom-center { align-items: flex-end; justify-content: center; }
.slideshow-content--bottom-right { align-items: flex-end; justify-content: flex-end; }

/* ===== 文本框 ===== */
.slideshow-box {
  max-width: 620px;
  padding: 40px 48px;
  border-radius: 12px;
}
.slideshow-box--dark {
  background: rgba(10, 10, 10, 0.45);
  color: #fff;
}
.slideshow-box--light {
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
}
.slideshow-box--transparent {
  background: transparent;
}

/* ===== 文本元素 ===== */
.slideshow-subheading {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent, #c9a961);
  margin-bottom: 14px;
}
.slideshow-box--light .slideshow-subheading {
  color: var(--color-accent, #c9a961);
}
.slideshow-heading {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.slideshow-heading--h0 { font-size: 68px; }
.slideshow-heading--h1 { font-size: 56px; }
.slideshow-heading--h2 { font-size: 44px; }
.slideshow-desc {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
}
.slideshow-box--light .slideshow-desc {
  color: rgba(17, 24, 39, 0.78);
}
.slideshow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 按钮配色（暗色幻灯上 outline 按钮转白色，对齐 theme.css .hero .btn-outline 行为） */
.slideshow .btn-outline {
  color: #fff;
  border-color: #fff;
}
.slideshow .btn-outline:hover,
.slideshow .btn-outline:focus-visible {
  background: #fff;
  color: var(--color-text, #1a1a1a);
}
.slideshow-box--light .btn-outline {
  color: var(--color-text, #1a1a1a);
  border-color: var(--color-text, #1a1a1a);
}
.slideshow-box--light .btn-outline:hover,
.slideshow-box--light .btn-outline:focus-visible {
  background: var(--color-text, #1a1a1a);
  color: #fff;
}

/* ===== 文字对齐（桌面） ===== */
.slideshow-text--left { text-align: left; }
.slideshow-text--center { text-align: center; }
.slideshow-text--right { text-align: right; }

/* ===== 导航控件 ===== */
.slideshow-controls {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.slideshow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.slideshow-btn svg {
  width: 18px;
  height: 18px;
}
.slideshow-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.slideshow-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
.slideshow-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slideshow-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.slideshow-dot.is-active {
  background: var(--color-accent, #c9a961);
  transform: scale(1.3);
}
/* numbers 样式：方形数字标签 */
.slideshow-controls--numbers .slideshow-dot {
  width: auto;
  height: auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
}
.slideshow-controls--numbers .slideshow-dot.is-active {
  background: var(--color-accent, #c9a961);
  transform: none;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .slideshow {
    height: 480px;
  }
  .slideshow--small {
    height: 320px;
  }
  .slideshow--large {
    height: 560px;
  }
  .slideshow--adapt_image .slideshow-viewport {
    aspect-ratio: 4 / 5;
  }
  .slideshow-img--desktop {
    display: none;
  }
  .slideshow-img--mobile {
    display: block;
  }
  .slideshow-content {
    padding: 24px 16px;
  }
  .slideshow-box {
    max-width: 100%;
    padding: 24px;
  }
  .slideshow-heading--h0 { font-size: 44px; }
  .slideshow-heading--h1 { font-size: 36px; }
  .slideshow-heading--h2 { font-size: 30px; }
  .slideshow-desc {
    font-size: 16px;
  }

  /* 移动端文字对齐（覆盖桌面对齐） */
  .slideshow-text-mobile--left { text-align: left; }
  .slideshow-text-mobile--center { text-align: center; }
  .slideshow-text-mobile--right { text-align: right; }

  /* 移动端文字下移：图片在上、文字在下（show_text_below 开启时） */
  .slideshow-track--text-below .slideshow-slide {
    display: flex;
    flex-direction: column;
  }
  .slideshow-track--text-below .slideshow-media {
    position: relative;
    flex: 0 0 52%;
  }
  .slideshow-track--text-below .slideshow-content {
    position: relative;
    inset: auto;
    flex: 1;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }
  .slideshow-track--text-below .slideshow-box {
    background: transparent;
  }
}

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .slideshow-track {
    transition: none;
  }
}
