.compare-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 675px;
  width: 100%;
  margin-inline: auto;
  background: var(--charcoal-soft);
  cursor: ew-resize;
}

.compare-frame__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.compare-frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.compare-frame__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-frame__grip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 1px solid var(--charcoal-soft);
}

.compare-frame__label {
  position: absolute;
  top: 12px;
  z-index: 2;
  font-family: var(--heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11px;
  color: #fff;
  background: rgba(74, 65, 57, 0.75);
  padding: 6px 12px;
  border-radius: var(--radius);
  pointer-events: none;
}

.compare-frame__label--before { left: 12px; }
.compare-frame__label--after { right: 12px; }

.compare-frame__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  -webkit-appearance: none;
  appearance: none;
}

.compare-frame__range::-webkit-slider-thumb { -webkit-appearance: none; width: 100%; height: 100%; }
.compare-frame__range::-moz-range-thumb { width: 2px; height: 100%; border: none; background: transparent; }
.compare-frame__range::-moz-range-track { width: 100%; height: 100%; background: transparent; border: none; }
