/* ================================================================
   JShoe Peek Carousel
   ABC Mart 风格：中间2张完整展示，两侧半露 + 暗色遮罩 + 居中箭头
   ================================================================ */

.jpc-wrapper {
  --jpc-peek: 12.5%;
  --jpc-overlay: rgba(0, 0, 0, 0.4);
  --jpc-gap: 16px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Swiper 容器：居中，两侧留出 peek 空间 */
.jpc-wrapper .jpc-swiper {
  width: calc(100% - var(--jpc-peek) * 2);
  margin-left: var(--jpc-peek);
  overflow: visible !important;
}

/* ── 单张卡片 ── */
.jpc-slide {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  width: 100%;
}

/* === 固定高度模式（默认，由 Elementor slider 控件写 height） === */
.jpc-slide-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jpc-wrapper:not(.jpc-auto-height) .jpc-slide-img {
  position: absolute;
  inset: 0;
}

/* === 自动高度模式 === */
.jpc-auto-height .jpc-slide {
  height: auto !important;
}

.jpc-auto-height .jpc-slide-img {
  position: relative;
  height: auto;
  aspect-ratio: auto;
}

/* ── 遮罩层 ── */
.jpc-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.jpc-wrapper .swiper-slide .jpc-slide-overlay {
  background: var(--jpc-overlay) !important;
  opacity: 1;
}

.jpc-wrapper .swiper-slide.jpc-center .jpc-slide-overlay {
  opacity: 0 !important;
}

/* ── 文字内容 ── */
.jpc-slide-content {
  position: absolute;
  z-index: 3;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
  transition: opacity 0.4s ease;
}

.jpc-wrapper .swiper-slide:not(.jpc-center) .jpc-slide-content {
  opacity: 0;
}

.jpc-pos-bottom-left {
  bottom: 0;
  left: 0;
  align-items: flex-start;
}

.jpc-pos-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
}

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

.jpc-pos-top-left {
  top: 0;
  left: 0;
  align-items: flex-start;
}

/* 标题和副标题：强制继承父级颜色，防止被 Woodmart 的 h3 全局样式覆盖 */
.jpc-slide-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: inherit !important;
}

.jpc-slide-subtitle {
  font-size: 13px;
  opacity: 0.85;
  margin: 0;
  color: inherit !important;
}

.jpc-slide-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 20px;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.25s, color 0.25s;
}

.jpc-slide-btn:hover {
  background: #333;
  color: #fff;
}

.jpc-slide-link {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* ── 导航箭头 ──
   用 > 子选择器 + button 标签 + 类名拉高优先级
   用 !important 防止 Woodmart/Swiper 的 CSS 覆盖定位 */
.jpc-wrapper > button.jpc-arrow {
  position: absolute !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  padding: 0;
}

.jpc-wrapper > button.jpc-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.jpc-wrapper > button.jpc-arrow-prev {
  left: calc(var(--jpc-peek) - 20px) !important;
  right: auto !important;
}

.jpc-wrapper > button.jpc-arrow-next {
  right: calc(var(--jpc-peek) - 20px) !important;
  left: auto !important;
}

.jpc-wrapper > button.jpc-arrow.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Swiper 的 button-lock 可能会隐藏箭头，强制覆盖 */
.jpc-wrapper > button.jpc-arrow.swiper-button-lock {
  display: flex !important;
}

/* ================================================================
   响应式
   ================================================================ */

@media (max-width: 1024px) {
  .jpc-wrapper {
    --jpc-peek: 8%;
  }

  .jpc-slide-title {
    font-size: 17px;
  }

  .jpc-slide-content {
    padding: 18px 20px;
  }
}

@media (max-width: 767px) {
  .jpc-wrapper {
    --jpc-peek: 6%;
  }

  .jpc-wrapper > button.jpc-arrow {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .jpc-wrapper > button.jpc-arrow-prev {
    left: calc(var(--jpc-peek) - 16px) !important;
  }

  .jpc-wrapper > button.jpc-arrow-next {
    right: calc(var(--jpc-peek) - 16px) !important;
  }

  .jpc-slide-title {
    font-size: 15px;
  }

  .jpc-slide-content {
    padding: 14px 16px;
    gap: 4px;
  }

  .jpc-slide-subtitle {
    font-size: 12px;
  }

  .jpc-slide-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}
