/**
 * お客様の声（Showcase）カルーセル＋ビフォーアフター・スライダー
 * クラス接頭辞は hhf-showcase-*（旧 ENARC 接頭辞は使わない）
 */

.hhf-showcase-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.hhf-showcase-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  box-sizing: border-box;
}

.hhf-showcase-strip.hhf-showcase-dragging {
  scroll-behavior: auto;
  cursor: grabbing;
}

.hhf-showcase-strip::-webkit-scrollbar {
  height: 8px;
}

.hhf-showcase-strip::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
}

.hhf-showcase-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 320px;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  box-sizing: border-box;
}

.hhf-showcase-ba {
  position: relative;
  background: #f6f7f8;
}

.hhf-showcase-ba__wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid #eee;
}

.hhf-showcase-ba__img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

/* 下地が作業前。after は右半分から現す（左 50% をクリップ） */
.hhf-showcase-ba__img--after {
  position: absolute;
  left: 0;
  top: 0;
  clip-path: inset(0 0 0 50%);
}

/* 画像内の左右に常時出す作業前／作業後ラベル */
.hhf-showcase-ba__label {
  position: absolute;
  top: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.hhf-showcase-ba__label--before {
  left: 8px;
}

.hhf-showcase-ba__label--after {
  right: 8px;
}

/* kind に応じたカード上バッジ（メタ先頭。写真ラベルと重ねない） */
.hhf-showcase-badge {
  display: inline-block;
  margin: 0 0 8px 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
}

.hhf-showcase-badge--voice {
  background: #33789c;
}

.hhf-showcase-badge--case {
  background: #64748b;
}

.hhf-showcase-ba__slider {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  z-index: 2;
  appearance: none;
  height: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  /* タッチのパンをブラウザに渡さず、つまみ操作をカルーセルドラッグから守る */
  touch-action: none;
}

.hhf-showcase-ba__slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hhf-showcase-ba__slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hhf-showcase-meta {
  padding: 12px 14px;
}

.hhf-showcase-title {
  font-size: 16px;
  margin: 0 0 4px 0;
}

.hhf-showcase-voice {
  font-size: 14px;
  color: #333;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.hhf-showcase-customer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #64748b;
}

/* 1件は中央寄せ、2件は左寄せ（クローン無し時） */
.hhf-showcase-center .hhf-showcase-strip {
  justify-content: center;
}

.hhf-showcase-start .hhf-showcase-strip {
  justify-content: flex-start;
}

/* 列に収まる件数のときは横スクロールバーを出さない */
.hhf-showcase-no-scroll .hhf-showcase-strip {
  overflow-x: hidden;
}

.hhf-showcase-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hhf-showcase-nav[hidden] {
  display: none;
}

.hhf-showcase-prev,
.hhf-showcase-next {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  pointer-events: auto;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
}

.hhf-showcase-prev {
  left: 6px;
}

.hhf-showcase-next {
  right: 6px;
}

/* 空状態は従来文言・クラスを維持 */
.showcase-empty {
  color: #64748b;
  text-align: center;
  padding: 2rem 1rem;
}

/* 600px以下ではカードが画面幅に収まる */
@media (max-width: 600px) {
  .hhf-showcase-card {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hhf-showcase-strip {
    scroll-behavior: auto;
  }
}
