/* ==========================================================================
   E6A BEFORE / AFTER SLIDER — comparador de imágenes arrastrable
   ========================================================================== */

.e6a-cmp {
    --e6a-cmp-radius: 0px;
    --e6a-cmp-pos: 50%;

    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
    border-radius: var(--e6a-cmp-radius);
    touch-action: pan-y;
}

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

.e6a-cmp:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 3px;
}

.e6a-cmp__despues {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--e6a-cmp-pos);
    height: 100%;
    overflow: hidden;
}

.e6a-cmp__despues img {
    width: auto;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.e6a-cmp__linea {
    position: absolute;
    top: 0;
    left: var(--e6a-cmp-pos);
    width: 2px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
    pointer-events: none;
}

.e6a-cmp__control {
    position: absolute;
    top: 50%;
    left: var(--e6a-cmp-pos);
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.e6a-cmp__control svg {
    width: 22px;
    height: 22px;
    fill: #222;
}

/* ---- Pista visual automática (balanceo cada 5s hasta que el usuario
   interactúa): solo aquí se anima con transición; el arrastre manual
   sigue siendo instantáneo para no sentirse "con retardo". ---- */
.e6a-cmp--animar .e6a-cmp__despues {
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.e6a-cmp--animar .e6a-cmp__linea,
.e6a-cmp--animar .e6a-cmp__control {
    transition: left .6s cubic-bezier(.4, 0, .2, 1);
}

.e6a-cmp__etiqueta {
    position: absolute;
    bottom: 16px;
    font-size: 12px;
    font-family: inherit;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 10px;
    border-radius: 2px;
    pointer-events: none;
}

.e6a-cmp__etiqueta--antes {
    right: 16px;
}

.e6a-cmp__etiqueta--despues {
    left: 16px;
}

@media (max-width: 560px) {
    .e6a-cmp__control {
        width: 36px;
        height: 36px;
    }
    .e6a-cmp__control svg {
        width: 18px;
        height: 18px;
    }
    .e6a-cmp__etiqueta {
        font-size: 10px;
        padding: 3px 8px;
        bottom: 10px;
    }
}
