/* ============================================================
   Eterlens ホームバナー カルーセル — KENPOGEN 風 5 連画
   PC: 5 枚フルブリード（横並び 100vw）
   モバイル: 1 枚フル幅 + サムネイルバー
   ============================================================ */

.etl-hbc {
  --hbc-gold: #C7A77A;
  --hbc-olive: #8A9A6B;
  --hbc-cream: #F4ECE0;
  --hbc-ink: #2E2A26;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* full-bleed: no max-width, no padding */
.etl-hbc__container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  position: relative;
}

/* viewport (horizontal scroll area) */
.etl-hbc__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.etl-hbc__viewport::-webkit-scrollbar { display: none; }

/* track (flex row, gap matches KENPOGEN) */
.etl-hbc__track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

/* Shopline が挿入する block wrapper を flex item として扱う */
.etl-hbc__track > * {
  flex: 0 0 100vw;
  width: 100vw;
  display: block;
  box-sizing: border-box;
}

/* slide (<a>) — display:block 必須。inline のままだと width 効かない */
.etl-hbc__slide {
  display: block;
  width: 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  text-decoration: none;
}

.etl-hbc__link {
  display: block;
  width: 100%;
  text-decoration: none;
  background: var(--hbc-cream);
}

.etl-hbc__image {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--hbc-cream);
  border-radius: 10px;
}
.etl-hbc__image > * {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.etl-hbc__image picture {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.etl-hbc__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}
.etl-hbc__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hbc-cream) 0%, #EADFCB 100%);
}

/* ===== arrows (PC only) ===== */
.etl-hbc__arrows { display: none; }
.etl-hbc__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 236, 224, 0.92);
  color: var(--hbc-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 4px 14px rgba(46, 42, 38, 0.16);
  transition: background 0.25s, color 0.25s, transform 0.25s, opacity 0.25s;
}
.etl-hbc__arrow svg { width: 22px; height: 22px; }
.etl-hbc__arrow:hover {
  background: var(--hbc-gold);
  color: var(--hbc-cream);
}
.etl-hbc__arrow.prev { left: 16px; }
.etl-hbc__arrow.next { right: 16px; }
.etl-hbc__arrow.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ===== dots (PC only) — refined / 胶囊式 ===== */
.etl-hbc__dots { display: none; }
.etl-hbc__dot {
  /* hit area >= 44px for 适老化 */
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  margin: 0 1px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.etl-hbc__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(46, 42, 38, 0.22);
  transition: background 0.3s ease, width 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
}
.etl-hbc__dot:hover::before {
  background: rgba(46, 42, 38, 0.42);
}
.etl-hbc__dot:focus-visible {
  outline: none;
}
.etl-hbc__dot:focus-visible::before {
  box-shadow: 0 0 0 3px rgba(199, 167, 122, 0.35);
}
.etl-hbc__dot.is-active::before {
  /* 胶囊形：active dot 横向拉长 */
  width: 26px;
  height: 8px;
  background: var(--hbc-gold);
  box-shadow: 0 1px 4px rgba(199, 167, 122, 0.4);
}

/* ===== mobile thumbnails bar ===== */
.etl-hbc__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.etl-hbc__thumbs::-webkit-scrollbar { display: none; }
.etl-hbc__thumb {
  flex: 0 0 auto;
  width: 18%;
  min-width: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.4;
  transition: opacity 0.25s, box-shadow 0.25s;
}
.etl-hbc__thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--hbc-gold);
}
.etl-hbc__thumb-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--hbc-cream);
}
.etl-hbc__thumb-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--hbc-cream) 0%, #EADFCB 100%);
}

/* ============================================================
   DESKTOP (>= 800px): KENPOGEN 風（aspect 3/4、gap 20px、~23vw）
   ============================================================ */
@media (min-width: 800px) {
  .etl-hbc__track { gap: 20px; }
  .etl-hbc__track > * {
    flex: 0 0 23vw;
    width: 23vw;
  }
  /* PC は scroll-snap を解除（dot を比率で散らすため）。
     5 連画レイアウトではスナップが余計に効いて dot 3+ が
     同位置にスナップされる問題を回避。 */
  .etl-hbc__viewport { scroll-snap-type: none; }
  .etl-hbc__slide { scroll-snap-align: none; }
  /* aspect 3/4 はベースから継承 */
  .etl-hbc__arrows { display: block; }
  .etl-hbc__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
  }
  /* PC はサムネイルバー非表示 */
  .etl-hbc__thumbs { display: none !important; }
}

/* mobile: 矢印/ドット非表示 */
@media (max-width: 799px) {
  .etl-hbc__arrows,
  .etl-hbc__dots { display: none !important; }
}
