/* IntercoWhatsApp — botón flotante */

.iwa-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0,0,0,0.18);
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.iwa-fab:hover,
.iwa-fab:focus {
    background: #1ebe5d;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55), 0 3px 8px rgba(0,0,0,0.22);
    outline: none;
}
.iwa-fab:active { transform: translateY(0) scale(.98); }

.iwa-fab__icon {
    width: 32px;
    height: 32px;
    display: block;
    position: relative;
    z-index: 2;
}

/* Pulso animado para llamar la atención sin ser molesto */
.iwa-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    z-index: 1;
    animation: iwaPulse 2.4s ease-out infinite;
    opacity: 0;
}
@keyframes iwaPulse {
    0%   { transform: scale(1);    opacity: .55; }
    80%  { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* Respetar usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .iwa-fab__pulse { animation: none; }
    .iwa-fab { transition: background .2s ease; }
    .iwa-fab:hover { transform: none; }
}

/* Móvil */
@media (max-width: 575px) {
    .iwa-fab {
        right: 14px;
        bottom: 14px;
        width: 54px;
        height: 54px;
    }
    .iwa-fab__icon { width: 28px; height: 28px; }
}

/* Por si el theme tiene cualquier elemento flotante muy abajo a la derecha
   (banner de cookies, scroll-to-top), nos mantenemos por encima */
.alcacookiealert ~ .iwa-fab,
.iwa-fab { z-index: 9998; }

/* En móvil, fichas de producto: el theme muestra un bar sticky de añadir al
   carrito. Subimos el botón WhatsApp para no tapar el corazón de favoritos.
   La clase la añade el JS de abajo cuando detecta el bar visible. */
@media (max-width: 767.98px) {
    .iwa-fab.iwa-fab--above-bar {
        bottom: 90px;
        transition: bottom .25s ease, transform .2s ease, background .2s ease;
    }
}
