/* Estilos customizados para o efeito de comparação */
.case-compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.compare-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 55 / 68;
  cursor: ew-resize;
  user-select: none;
}

.compare-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  /* O clip-path será controlado pelo JS */
  clip-path: inset(0 50% 0 0);
}

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
  pointer-events: none;
  transform: translateX(-50%);
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 20;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.compare-hero:hover .compare-handle {
  transform: translate(-50%, -50%) scale(1.1);
}

.compare-arrows {
  color: #666;
  font-weight: bold;
  font-size: 18px;
}

/* Input range invisível que cobre toda a área */
.compare-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 30;
  margin: 0;
  padding: 0;
}

/* Ajuste para o input range em diferentes navegadores */
.compare-range::-webkit-slider-runnable-track {
  height: 100%;
}
.compare-range::-moz-range-track {
  height: 100%;
}
.compare-range::-ms-track {
  height: 100%;
}
