/* Autos Esquivel — /vende-tu-auto · tarjetas de operación v2
 * Capa final y aislada para las tres rutas comerciales del configurador.
 * Mantiene intacta la lógica React, tracking y selección de operación.
 */

.ae-sell-page--refresh .ae-sale-routes {
    gap: clamp(14px, 1.4vw, 20px) !important;
    margin-top: 28px !important;
}

.ae-sell-page--refresh .ae-sale-route {
    --route-card-accent: #c3b5a9;
    position: relative !important;
    isolation: isolate !important;
    min-height: 286px !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: clamp(22px, 2vw, 28px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 0 !important;
    background: #0d1014 !important;
    color: #f7f7f5 !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .16) !important;
    transition:
        transform .28s cubic-bezier(.2, .8, .2, 1),
        border-color .28s ease,
        box-shadow .28s ease,
        background-color .28s ease !important;
}

.ae-sell-page--refresh .ae-sale-route:nth-child(2) {
    --route-card-accent: #c9c9c6;
}

.ae-sell-page--refresh .ae-sale-route:nth-child(3) {
    --route-card-accent: #b49d8c;
}

/* Capa de contraste: elimina los adornos geométricos anteriores y da profundidad. */
.ae-sell-page--refresh .ae-sale-route::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    width: auto !important;
    height: auto !important;
    background:
        linear-gradient(90deg, rgba(13, 16, 20, .98) 0%, rgba(13, 16, 20, .94) 46%, rgba(13, 16, 20, .58) 74%, rgba(13, 16, 20, .38) 100%),
        linear-gradient(180deg, transparent 56%, rgba(0, 0, 0, .34) 100%) !important;
    transform: none !important;
    transform-origin: center !important;
    pointer-events: none !important;
}

/* Fotografía propia de cada ruta, deliberadamente tenue para no competir con el texto. */
.ae-sell-page--refresh .ae-sale-route::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    z-index: -2 !important;
    width: 64% !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    opacity: .26 !important;
    filter: grayscale(1) saturate(.55) contrast(1.06) !important;
    box-shadow: none !important;
    transform: scale(1.015) !important;
    transform-origin: center !important;
    transition: opacity .32s ease, transform .5s cubic-bezier(.2, .8, .2, 1), filter .32s ease !important;
    pointer-events: none !important;
}

.ae-sell-page--refresh .ae-sale-route:nth-child(1)::after {
    background-image: url('/images/comercial/3.webp') !important;
}

.ae-sell-page--refresh .ae-sale-route:nth-child(2)::after {
    background-image: url('/images/comercial/2.webp') !important;
}

.ae-sell-page--refresh .ae-sale-route:nth-child(3)::after {
    background-image: url('/images/comercial/1.webp') !important;
}

.ae-sell-page--refresh .ae-sale-route:hover,
.ae-sell-page--refresh .ae-sale-route:focus-visible {
    transform: translateY(-6px) !important;
    border-color: rgba(255, 255, 255, .34) !important;
    background: #11151a !important;
    box-shadow: 0 26px 64px rgba(0, 0, 0, .28) !important;
}

.ae-sell-page--refresh .ae-sale-route:hover::after,
.ae-sell-page--refresh .ae-sale-route:focus-visible::after {
    opacity: .38 !important;
    filter: grayscale(.72) saturate(.72) contrast(1.08) !important;
    transform: scale(1.055) !important;
}

.ae-sell-page--refresh .ae-sale-route:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 4px !important;
}

.ae-sell-page--refresh .ae-sale-route.is-active {
    border-color: rgba(255, 255, 255, .62) !important;
    background: #15191f !important;
    color: #fff !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .16),
        0 26px 64px rgba(0, 0, 0, .30) !important;
}

.ae-sell-page--refresh .ae-sale-route.is-active::after {
    opacity: .34 !important;
}

.ae-sell-page--refresh .ae-sale-route__top,
.ae-sell-page--refresh .ae-sale-route__body,
.ae-sell-page--refresh .ae-sale-route__cta {
    position: relative !important;
    z-index: 2 !important;
}

.ae-sell-page--refresh .ae-sale-route__top {
    min-height: 46px !important;
    margin: 0 !important;
}

.ae-sell-page--refresh .ae-sale-route__icon {
    width: 46px !important;
    height: 46px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid rgba(255, 255, 255, .24) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .055) !important;
    color: var(--route-card-accent) !important;
    opacity: 1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: border-color .24s ease, background-color .24s ease, color .24s ease !important;
}

.ae-sell-page--refresh .ae-sale-route:hover .ae-sale-route__icon,
.ae-sell-page--refresh .ae-sale-route:focus-visible .ae-sale-route__icon,
.ae-sell-page--refresh .ae-sale-route.is-active .ae-sale-route__icon {
    border-color: rgba(255, 255, 255, .46) !important;
    background: rgba(255, 255, 255, .10) !important;
    color: #fff !important;
}

.ae-sell-page--refresh .ae-sale-route__icon svg {
    width: 21px !important;
    height: 21px !important;
}

.ae-sell-page--refresh .ae-sale-route__number {
    min-width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255, 255, 255, .42) !important;
    opacity: 1 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .12em !important;
}

.ae-sell-page--refresh .ae-sale-route__body {
    display: block !important;
    margin-top: clamp(38px, 3.8vw, 54px) !important;
}

.ae-sell-page--refresh .ae-sale-route__eyebrow {
    display: block !important;
    margin: 0 0 9px !important;
    color: var(--route-card-accent) !important;
    opacity: .78 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

.ae-sell-page--refresh .ae-sale-route__title {
    display: block !important;
    max-width: 12.5ch !important;
    color: #fff !important;
    font-size: clamp(24px, 2vw, 31px) !important;
    font-weight: 760 !important;
    line-height: .98 !important;
    letter-spacing: -.048em !important;
    text-wrap: balance !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .28) !important;
}

.ae-sell-page--refresh .ae-sale-route__cta {
    margin-top: auto !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(255, 255, 255, .18) !important;
    color: #fff !important;
    opacity: 1 !important;
}

.ae-sell-page--refresh .ae-sale-route__cta b {
    color: rgba(255, 255, 255, .72) !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    transition: color .22s ease !important;
}

.ae-sell-page--refresh .ae-sale-route__cta > span {
    width: 34px !important;
    height: 34px !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 34px !important;
    border: 1px solid rgba(255, 255, 255, .26) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
    box-shadow: none !important;
    transition: transform .22s ease, background-color .22s ease, border-color .22s ease !important;
}

.ae-sell-page--refresh .ae-sale-route__cta svg {
    width: 16px !important;
    height: 16px !important;
}

.ae-sell-page--refresh .ae-sale-route:hover .ae-sale-route__cta b,
.ae-sell-page--refresh .ae-sale-route:focus-visible .ae-sale-route__cta b,
.ae-sell-page--refresh .ae-sale-route.is-active .ae-sale-route__cta b {
    color: #fff !important;
}

.ae-sell-page--refresh .ae-sale-route:hover .ae-sale-route__cta > span,
.ae-sell-page--refresh .ae-sale-route:focus-visible .ae-sale-route__cta > span,
.ae-sell-page--refresh .ae-sale-route.is-active .ae-sale-route__cta > span {
    transform: translateX(3px) !important;
    border-color: rgba(255, 255, 255, .58) !important;
    background: #fff !important;
    color: #0d1014 !important;
}

/* En light mode conservamos las tarjetas oscuras como bloque de decisión,
 * para separar visualmente las rutas del resto del configurador. */
html[data-theme="light"] .ae-sell-page--refresh .ae-sale-route {
    border-color: rgba(255, 255, 255, .12) !important;
    background: #0d1014 !important;
    color: #f7f7f5 !important;
}

@media (max-width: 980px) {
    .ae-sell-page--refresh .ae-sale-routes {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .ae-sell-page--refresh .ae-sale-route {
        min-height: 264px !important;
        padding: 21px !important;
    }

    .ae-sell-page--refresh .ae-sale-route__body {
        margin-top: 34px !important;
    }

    .ae-sell-page--refresh .ae-sale-route__title {
        font-size: clamp(21px, 2.5vw, 27px) !important;
    }
}

@media (max-width: 760px) {
    .ae-sell-page--refresh .ae-sale-routes {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .ae-sell-page--refresh .ae-sale-route {
        min-height: 222px !important;
        padding: 20px !important;
    }

    .ae-sell-page--refresh .ae-sale-route::after {
        width: 72% !important;
        opacity: .30 !important;
    }

    .ae-sell-page--refresh .ae-sale-route__body {
        margin-top: 28px !important;
    }

    .ae-sell-page--refresh .ae-sale-route__title {
        max-width: 13ch !important;
        font-size: clamp(25px, 7.4vw, 31px) !important;
    }

    .ae-sell-page--refresh .ae-sale-route__cta {
        padding-top: 15px !important;
    }
}

@media (max-width: 430px) {
    .ae-sell-page--refresh .ae-sale-route {
        min-height: 214px !important;
        padding: 18px !important;
    }

    .ae-sell-page--refresh .ae-sale-route__icon {
        width: 42px !important;
        height: 42px !important;
    }

    .ae-sell-page--refresh .ae-sale-route__body {
        margin-top: 24px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-sell-page--refresh .ae-sale-route,
    .ae-sell-page--refresh .ae-sale-route::after,
    .ae-sell-page--refresh .ae-sale-route__icon,
    .ae-sell-page--refresh .ae-sale-route__cta > span {
        transition: none !important;
    }

    .ae-sell-page--refresh .ae-sale-route:hover,
    .ae-sell-page--refresh .ae-sale-route:focus-visible {
        transform: none !important;
    }
}
