/* ===========================================
 * DP Slider - 完整樣式
 * =========================================== */

.dp-slider {
  position: relative;
  background: #dfe0d8;
  padding: 0;
  overflow: hidden;
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
  color: #2f3135;
  width: 100%;
  max-width: 100%;
  margin: 0;
  touch-action: pan-y pinch-zoom;
}

/* 桌面版：全屏高度 */
.dp-slider {
  height: 100vh;
  min-height: 600px;
}

.dp-slider-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: pan-y pinch-zoom;
}

.dp-slide {
  position: absolute;
  inset: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  background: var(--dp-slide-bg, #dfe0d8);
  touch-action: pan-y pinch-zoom;
}

.dp-slide.is-active {
  opacity: 1;
  visibility: visible;
}

/* 隱藏不需要的元素 */
.dp-slide-bg,
.dp-badge,
.dp-hero-ghost,
.dp-desc-block,
.dp-meta {
  display: none !important;
}

.dp-hero {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.dp-slide-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: pan-y pinch-zoom;
}

.dp-hero-img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  touch-action: pan-y pinch-zoom;
}

/* 隱藏圖片 alt 文字 */
.dp-slider img {
  font-size: 0 !important;
  color: transparent !important;
}

/* ===========================================
 * 導航箭頭
 * =========================================== */
.dp-slider-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 20px;
  z-index: 3;
}

.dp-arrow {
  pointer-events: auto;
  width: 64px;
  height: 64px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: relative;
  z-index: 5;
  padding: 0;
  line-height: 0;
  box-shadow: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  color: transparent;
  user-select: none;
  outline: none;
}

.dp-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color 0.2s ease;
}

.dp-arrow-next::before {
  transform: translate(-50%, -50%) rotate(225deg);
}

.dp-arrow:hover {
  transform: translateY(-2px);
}

.dp-arrow:hover::before {
  border-color: rgba(255, 255, 255, 0.7);
}

/* 防主題覆蓋 */
.dp-slider .dp-arrow,
.dp-slider .dp-arrow:hover,
.dp-slider .dp-arrow:focus,
.dp-slider .dp-thumb,
.dp-slider .dp-thumb:hover,
.dp-slider .dp-thumb:focus {
  background: transparent !important;
  border-color: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

/* ===========================================
 * 縮圖導航
 * =========================================== */
.dp-thumbs {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 0;
  margin: 0;
  z-index: 4;
}

.dp-thumb {
  border: none;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dp-thumb:hover {
  transform: translateY(-2px);
}

.dp-thumb.is-active {
  transform: none;
}

.dp-thumb-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 78px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #696c6e;
  background: #f2f2ed;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.dp-thumb:hover .dp-thumb-chip {
  background: #f2f2ed;
}

.dp-thumb.is-active .dp-thumb-chip {
  background: #e7e479 !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.12);
}

.dp-thumb img {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

/* ===========================================
 * 動畫
 * =========================================== */
.dp-slide.enter-from-right { animation: dp-enter-right 0.65s ease forwards; }
.dp-slide.enter-from-left { animation: dp-enter-left 0.65s ease forwards; }
.dp-slide.exit-to-left { animation: dp-exit-left 0.65s ease forwards; }
.dp-slide.exit-to-right { animation: dp-exit-right 0.65s ease forwards; }

@keyframes dp-enter-right {
  from { opacity: 0; transform: translateX(8%) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes dp-enter-left {
  from { opacity: 0; transform: translateX(-8%) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes dp-exit-left {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-6%) scale(0.98); }
}

@keyframes dp-exit-right {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(6%) scale(0.98); }
}

/* ===========================================
 * 手機版 (< 768px)
 * =========================================== */
@media (max-width: 767px) {
  .dp-slider {
    height: 75vh;
    min-height: 450px;
  }

  .dp-slider-nav {
    padding: 0 10px;
  }

  .dp-arrow {
    width: 44px;
    height: 44px;
  }

  .dp-arrow::before {
    width: 14px;
    height: 14px;
  }

  .dp-thumbs {
    bottom: 15px;
    gap: 8px;
  }

  .dp-thumb-chip {
    width: 70px;
    height: 50px;
    border-radius: 8px;
  }
}

/* ===========================================
 * 平板版 (768px - 1024px)
 * =========================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .dp-slider {
    height: 80vh;
    min-height: 500px;
  }

  .dp-thumbs {
    bottom: 20px;
  }

  .dp-thumb-chip {
    width: 90px;
    height: 65px;
  }
}
