/* Projection comparison. Both images share one coordinate space. */
.cmb-wcu.home-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 596px;
  padding: 0;
  background: none;
}

.home-compare .compare-frame {
  --compare-position: 50%;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
}

.home-compare .compare-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.home-compare .compare-before {
  clip-path: inset(0 calc(100% - var(--compare-position)) 0 0);
}

.home-compare .compare-eyebrow,
.home-compare .compare-caption {
  position: absolute;
  z-index: 2;
  margin: 0;
  color: #fff;
  pointer-events: none;
}

.home-compare .compare-eyebrow {
  top: 24px;
  left: 24px;
}

.home-compare .compare-caption {
  bottom: 24px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  background: rgba(15, 25, 40, 0.8);
  font-size: 14px;
  line-height: 1.5;
}

.home-compare .compare-caption-before { left: 24px; }
.home-compare .compare-caption-after { right: 24px; }

.home-compare .compare-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  touch-action: pan-y;
}

.home-compare .compare-divider {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.home-compare .compare-divider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.home-compare .compare-handle {
  position: absolute;
  top: 50%;
  left: var(--compare-position);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.home-compare .compare-handle::before,
.home-compare .compare-handle::after {
  content: "";
  width: 8px;
  height: 8px;
  border: solid #173450;
  border-width: 0 2px 2px 0;
}

.home-compare .compare-handle::before { transform: rotate(135deg); }
.home-compare .compare-handle::after { transform: rotate(-45deg); }

.home-compare .compare-range:focus-visible ~ .compare-divider .compare-handle {
  outline: 3px solid var(--light-blue-color);
  outline-offset: 4px;
}

@media (max-width: 991.98px) {
  .cmb-wcu.home-compare { height: auto; }
  .home-compare .compare-frame {
    height: auto;
    aspect-ratio: 1524 / 596;
  }
}

@media (max-width: 575.98px) {
  .home-compare .compare-eyebrow {
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    font-size: 11px;
  }
  .home-compare .compare-caption {
    bottom: 10px;
    padding: 3px 8px;
    font-size: 11px;
  }
  .home-compare .compare-caption-before { left: 12px; }
  .home-compare .compare-caption-after { right: 12px; }
}

/* Product detail card; homepage comparison keeps its original layout. */
.cmb-wcu.home-compare.product-compare {
  --product-compare-height: 280px;
  height: var(--product-compare-height);
  overflow: hidden;
  border-radius: var(--border-radius, 16px);
}

.product-compare .compare-frame {
  height: 100%;
  aspect-ratio: auto;
}

@media (max-width: 991.98px) {
  .cmb-wcu.home-compare.product-compare { --product-compare-height: 264px; }
}

@media (min-width: 1200px) {
  .cmb-wcu.home-compare.product-compare { --product-compare-height: 298px; }
}
