/* ── Wrapper principal ── */
.before-after-wrapper {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 8px;
  line-height: 0;
}

/* ── Imagen DESPUÉS (base, ocupa todo) ── */
.ba-after {
  display: block;
  width: 100%;
}

.ba-after img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* ── Imagen ANTES (encima, se recorta por width) ── */
.ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;        /* JS mueve este valor */
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.ba-before img {
  display: block;
  width: auto;       /* ancho natural = ancho del wrapper */
  height: 100%;
  max-width: none;
  pointer-events: none;
}

/* ── Línea divisora ── */
.ba-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: #ffffff;
  z-index: 10;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ── Handle circular ── */
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  z-index: 11;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ── Labels ANTES / DESPUÉS ── */
.ba-lbl {
  position: absolute;
  top: 12px;
  z-index: 12;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
}

.ba-lbl-before { left: 12px; }
.ba-lbl-after  { right: 12px; }