/*
 * Home · categorías por carrocería
 *
 * Las siluetas de los vehículos deben verse completas y conservar una escala
 * visual coherente con el tamaño de cada carrocería. Esta capa también elimina
 * los fondos degradados que tomaban el color del vehículo.
 */

html body.public-site-v2 .ae-v2-category--vehicle {
    --ae-category-vehicle-width: 86%;
    background: #0b0d0f !important;
}

/* No teñir la tarjeta con el color de la unidad ni oscurecerla con overlays. */
html body.public-site-v2 .ae-v2-category--vehicle::after {
    background: none !important;
}

/*
 * El auto vive dentro de una zona segura real: nunca usa cover ni un zoom que
 * pueda sacar llantas, defensas o espejos fuera de la tarjeta.
 */
html body.public-site-v2 .ae-v2-category--vehicle > img {
    inset: auto !important;
    top: 44% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: var(--ae-category-vehicle-width) !important;
    max-width: calc(100% - 32px) !important;
    height: auto !important;
    max-height: 56% !important;
    object-fit: contain !important;
    object-position: center !important;
    filter: saturate(1.03) contrast(1.03) drop-shadow(0 15px 14px rgba(0, 0, 0, .44)) !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
}

html body.public-site-v2 .ae-v2-category--vehicle:hover > img,
html body.public-site-v2 .ae-v2-category--vehicle:focus-visible > img {
    filter: saturate(1.06) contrast(1.04) drop-shadow(0 18px 16px rgba(0, 0, 0, .48)) !important;
    transform: translate(-50%, -50%) scale(1.012) !important;
}

/*
 * Escala visual por carrocería.
 * No pretende igualar longitudes reales en centímetros; evita que un hatchback
 * parezca tan grande como una pickup/SUV dentro de tarjetas del mismo tamaño.
 */
html body.public-site-v2 .ae-v2-category--pickup {
    --ae-category-vehicle-width: 88%;
}

/* La toma original de la Hilux quedaba al límite inferior. Esta composición
 * deja una zona de respiro real bajo las llantas, sin hacer pequeña la pickup. */
html body.public-site-v2 .ae-v2-category--pickup > img {
    top: 42% !important;
    max-height: 52% !important;
}

html body.public-site-v2 .ae-v2-category--van {
    --ae-category-vehicle-width: 90%;
}

html body.public-site-v2 .ae-v2-category--suv {
    --ae-category-vehicle-width: 88%;
}

html body.public-site-v2 .ae-v2-category--offroad {
    --ae-category-vehicle-width: 86%;
}

html body.public-site-v2 .ae-v2-category--sedan {
    --ae-category-vehicle-width: 82%;
}

html body.public-site-v2 .ae-v2-category--coupe,
html body.public-site-v2 .ae-v2-category--supercar {
    --ae-category-vehicle-width: 80%;
}

html body.public-site-v2 .ae-v2-category--hatchback {
    --ae-category-vehicle-width: 72%;
}

@media (max-width: 640px) {
    html body.public-site-v2 .ae-v2-category--vehicle > img {
        top: 43% !important;
        max-width: calc(100% - 24px) !important;
        max-height: 54% !important;
    }

    html body.public-site-v2 .ae-v2-category--vehicle:hover > img,
    html body.public-site-v2 .ae-v2-category--vehicle:focus-visible > img {
        transform: translate(-50%, -50%) scale(1.008) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.public-site-v2 .ae-v2-category--vehicle > img,
    html body.public-site-v2 .ae-v2-category--vehicle:hover > img,
    html body.public-site-v2 .ae-v2-category--vehicle:focus-visible > img {
        transform: translate(-50%, -50%) !important;
    }
}
