/* ============================================================
   EFECTO OPTIMIZADO: ZOOM (Limpio) + BOTONES (Forzado)
   ============================================================ */

/* --- 1. ZOOM DE LA IMAGEN (Sin !important) --- */

/* Selector de alta especificidad para el contenedor */
.elementor-widget-loop-grid .e-loop-item a.e-loop-item-figure, 
.elementor-widget-loop-grid .e-loop-item .e-loop-item-figure {
    overflow: hidden;
    display: block;
}

/* Estado base de la imagen */
.elementor-widget-loop-grid .e-loop-item img {
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

/* Zoom al hacer hover */
.elementor-widget-loop-grid .e-loop-item img:hover {
    transform: scale(1.1);
}


/* --- 2. BOTÓN "VER MÁS" (Manteniendo !important en diseño) --- */

.elementor-widget-loop-grid .e-loop-item .elementor-button:not(.add_to_cart_button) {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.elementor-widget-loop-grid .e-loop-item .elementor-button:not(.add_to_cart_button)::after {
    content: '→' !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(-10px) !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    font-size: 1.4rem !important;
}

/* Efecto de estirado y flecha */
.elementor-widget-loop-grid .e-loop-item .elementor-button:not(.add_to_cart_button):hover {
    padding-right: 45px !important;
}

.elementor-widget-loop-grid .e-loop-item .elementor-button:not(.add_to_cart_button):hover::after {
    opacity: 1 !important;
    transform: translateY(-50%) translateX(0) !important;
    animation: hpArrowBounce 0.8s infinite ease-in-out !important;
}


/* --- 3. BOTÓN CARRITO (Mantiene colores y "+" forzados) --- */

.elementor-widget-loop-grid .e-loop-item .add_to_cart_button {
    position: relative !important;
    transition: all 0.3s ease !important;
}

.elementor-widget-loop-grid .e-loop-item .add_to_cart_button::before {
    content: '+' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
}

/* Color y transparencia forzados */
.elementor-widget-loop-grid .e-loop-item .add_to_cart_button:hover {
    background-color: #27ae60 !important; 
    color: transparent !important; 
}

.elementor-widget-loop-grid .e-loop-item .add_to_cart_button:hover::before {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
    color: #fff !important;
}


/* --- 4. ANIMACIÓN --- */
@keyframes hpArrowBounce {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
}

/* --- 5. CORRECCIÓN DE SIMETRÍA Y LÍMITES (Skyline Media Agency Edition) --- */

/* Forzar que el ítem del loop sea un bloque sólido y no se desborde */
.elementor-widget-loop-grid .e-loop-item {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important; /* Corta cualquier cosa que intente salirse */
    box-sizing: border-box !important;
}

/* Evitar que los botones se salgan por los lados debido a paddings o anchos fijos */
.elementor-widget-loop-grid .e-loop-item .elementor-button {
    width: 100% !important; /* Asegura que el botón se ajuste al ancho del contenedor */
    max-width: 100% !important; 
    box-sizing: border-box !important; /* El padding interno no suma al ancho total */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ajuste fino para el contenedor del botón si Elementor le añade márgenes */
.elementor-widget-loop-grid .e-loop-item .elementor-widget-add-to-cart,
.elementor-widget-loop-grid .e-loop-item .elementor-widget-button {
    width: 100% !important;
    padding: 0 5px !important; /* Pequeño margen interno de seguridad */
}


/* --- 6. AJUSTE DE CALCE PERFECTO (ESQUINAS INFERIORES) --- */

.elementor-widget-loop-grid .e-loop-item {
    border-radius: 7px !important; /* El radio de tu caja */
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 0 !important; /* Eliminamos el padding inferior de la caja para que el botón toque el borde */
    overflow: hidden !important; /* Esto "corta" el botón para que respete los 7px de la caja madre */
}

/* Forzar que el botón ocupe el fondo y calce con la curva */
.elementor-widget-loop-grid .e-loop-item .add_to_cart_button,
.elementor-widget-loop-grid .e-loop-item .elementor-button {
    margin: 0 !important; /* Sin espacios alrededor */
    width: 100% !important;
    border-radius: 0 0 7px 7px !important; /* Redondeamos solo abajo: Izquierda y Derecha */
    border: none !important; /* Evita que bordes extra rompan la simetría */
}

/* Si usas un contenedor de Elementor envolviendo el botón, quitamos su margen */
.elementor-widget-loop-grid .e-loop-item .elementor-widget-add-to-cart {
    margin-bottom: 0 !important;
    margin-top: auto !important; /* Empuja el botón al final de la caja */
}