


.compare {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 48px rgba(30, 58, 138, 0.24);
  user-select: none;
  

  touch-action: pan-y;
}


.compare img { display: block; width: 100%; }
.compare__after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 var(--compare-split, 50%));
}



.compare__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}
.compare__range:focus { outline: none; }
.compare__range::-webkit-slider-runnable-track { height: 100%; background: transparent; border: 0; }
.compare__range::-moz-range-track { height: 100%; background: transparent; border: 0; }
.compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 46px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.compare__range::-moz-range-thumb {
  width: 46px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
}



.compare:has(.compare__range)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-split, 50%);
  z-index: 1;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.25);
  pointer-events: none;
}
.compare:has(.compare__range)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--compare-split, 50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94) no-repeat center / 20px 20px
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m9 7-5 5 5 5'/%3e%3cpath d='m15 7 5 5-5 5'/%3e%3c/svg%3e");
  border: 2px solid var(--brand, #2563eb);
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.32);
  pointer-events: none;
}


.compare:has(.compare__range:focus-visible)::before {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.5), 0 8px 22px rgba(30, 58, 138, 0.32);
}
