/* 日本語・英語トップ共通：Before→After vitrine */
.home-hero__vitrine {
  position: relative;
  overflow: hidden;
  width: min(100%, 28rem);
  margin-inline: auto;
  aspect-ratio: 16 / 10;
  background-color: #f4f4f4;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.055) 0,
    rgba(0, 0, 0, 0.055) 1px,
    #f4f4f4 1px,
    #f4f4f4 4px
  );
  border: 1px solid rgba(168, 168, 168, 0.45);
}

.home-hero__vitrine--ba {
  aspect-ratio: 16 / 10;
}

.hero-slider {
  display: block;
  width: 100%;
}

.hero-slider__track {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slider__track .hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.hero-slider__track .hero-slide.is-active,
.hero-slider__track .hero-slide[data-active='true'] {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.hero-ba__labels {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.4rem 0.5rem;
  gap: 0.5rem;
}

.hero-ba__label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: #fff;
  background: rgba(43, 34, 28, 0.55);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  line-height: 1.3;
  max-width: 45%;
}

.hero-ba__category {
  position: absolute;
  left: 0.5rem;
  bottom: 0.45rem;
  z-index: 4;
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #fff;
  background: rgba(43, 34, 28, 0.45);
  padding: 0.12rem 0.35rem;
  pointer-events: none;
}

.hero-ba {
  --ba-reveal: 0;
  --ba-reveal-pct: 0%;
  --ba-divider-opacity: 0;
}

.hero-ba__stage {
  position: absolute;
  inset: 0;
}

.hero-ba__stack {
  position: absolute;
  inset: 0;
  --ba-reveal: 0;
}

.hero-ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-ba__img--before {
  z-index: 1;
}

.hero-ba__img--after {
  z-index: 2;
  /* 左＝原版（下層）、右＝仕上がり（上層を右から露出） */
  clip-path: inset(0 0 0 calc(100% - (var(--ba-reveal) * 1%)));
}

.hero-ba[data-ba-transition='fade'] .hero-ba__img--after {
  clip-path: none;
  opacity: 0;
}

.hero-ba__compare {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: none;
}

.hero-ba__compare:focus-visible {
  outline: 2px solid #2e4a72;
  outline-offset: -2px;
}

.hero-ba__compare::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 100%;
  cursor: ew-resize;
}

.hero-ba__compare::-moz-range-thumb {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}

.hero-ba__divider {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.hero-ba__divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-reveal-pct, 0%);
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(43, 34, 28, 0.5),
    -3px 0 8px rgba(0, 0, 0, 0.12),
    3px 0 8px rgba(0, 0, 0, 0.12);
  opacity: var(--ba-divider-opacity, 0);
  transition: opacity 0.15s ease;
}

.hero-ba--fade .hero-ba__divider {
  display: none;
}

.hero-ba--fade .hero-ba__compare {
  display: none;
}

.hero-ba--after-only .hero-ba__img--after {
  clip-path: none;
  opacity: 1;
}

.hero-ba--after-only .hero-ba__divider {
  display: none;
}

.hero-slide__link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  z-index: 1;
}

.hero-ba__toggle-before {
  position: absolute;
  right: 0.5rem;
  bottom: 0.45rem;
  z-index: 6;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(92, 83, 73, 0.45);
  background: rgba(250, 246, 238, 0.92);
  color: #5c5349;
  cursor: pointer;
  font-family: inherit;
}

.hero-slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
  color: #5c5349;
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
}

.hero-slider__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.hero-slider__dot.is-active {
  background: currentColor;
}

.hero-slider__prev,
.hero-slider__next,
.hero-slider__pause {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
}

.hero-slider--reduced .hero-ba__compare {
  pointer-events: none;
}

.hero-slider--reduced .hero-ba__divider {
  display: none;
}

@media (max-width: 375px) {
  .hero-ba__label {
    font-size: 0.58rem;
    padding: 0.12rem 0.3rem;
  }

  .hero-ba__category {
    max-width: 55%;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider__track .hero-slide {
    transition: none;
  }
}
