/* ==============================> Estilos de WhatsApp Flotante */

/* ANIMACIONES */

@keyframes pulso-wsp-footer {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgb(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* BOTON WHATSAPP FLOTANTE */

.boton-wsp-izquierdo {
    position: fixed;
    bottom: 36px;
    left: 36px;
    z-index: 1000;
    padding: 8px;
    background: #25d366;
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    color: #fff;
    font-size: 32px;
    animation: pulso-wsp-footer 1.6s infinite;
    transition: .4s all ease-in-out;
}

.boton-wsp-izquierdo:after {
    content: "Comprar por WhatsApp";
    position: absolute;
    left: 70px;
    width: max-content;
    padding: 12px;
    background: #000;
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    line-height: 18px;
}

.boton-wsp-izquierdo:hover {
    color: #fff;
    background: #128c7e;
}

@media(max-width: 768px) {
    .boton-wsp-izquierdo {
        bottom: 28px;
        left: 28px;
    }
}

/* ==============================> Estilos del Shortcode de WhatsApp */

/* WSP Predeterminado */

.whatsapp-predeterminado {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--wd-brd-radius);
    background: var(--e-global-color-secondary);
    font-size: var(--wd-text-font-size);
    line-height: calc(var(--wd-text-font-size) + 4px);
    color: #fff;
    transition: .4s all ease-in-out;
}

.whatsapp-predeterminado i {
    font-size: calc(var(--wd-text-font-size) + 4px);
    transition: .4s all ease-in-out;
}

.whatsapp-predeterminado:hover {
    background: var(--e-global-color-primary);
}

/* ---- Botón WhatsApp cabecera ---- */
.whatsapp-cabecera {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 20px 6px 6px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2ecc6a 0%, #21b95a 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
    color: #fff;
    line-height: 1;
    text-decoration: none;
    overflow: visible;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.whatsapp-cabecera:hover,
.whatsapp-cabecera:focus-visible {
    background: linear-gradient(180deg, #34d977 0%, #24c561 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .24);
    transform: translateY(-1px);
    color: #fff;
}

/* Círculo blanco del icono */
.whatsapp-cabecera .wa-cab-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #21b95a;
}

.whatsapp-cabecera .wa-cab-icono i {
    font-size: 20px;
    line-height: 1;
}

/* Texto */
.whatsapp-cabecera .wa-cab-texto {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}

/* Badge "En línea" */
.whatsapp-cabecera .wa-cab-estado {
    position: absolute;
    top: -12px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    color: #128c4a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* Punto verde parpadeante */
.whatsapp-cabecera .wa-cab-punto {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #21b95a;
    animation: waCabPulso 1.8s ease-in-out infinite;
}

@keyframes waCabPulso {
    0%, 100% { opacity: 1;  transform: scale(1); }
    50%      { opacity: .35; transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-cabecera,
    .whatsapp-cabecera .wa-cab-punto { transition: none; animation: none; }
}

/* Móvil */
@media (max-width: 767px) {
    .whatsapp-cabecera { padding-right: 18px; gap: 8px; }
    .whatsapp-cabecera .wa-cab-icono { width: 34px; height: 34px; }
    .whatsapp-cabecera .wa-cab-icono i { font-size: 20px; }
    .whatsapp-cabecera .wa-cab-texto { font-size: 15px; }
}

/* WSP Icono */

.whatsapp-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--wd-brd-radius);
    font-size: var(--wd-text-font-size);
    width: 20px;
    height: 20px;
    background: #25d366;
    color: #fff;
    transition: .4s all ease-in-out;
}

.whatsapp-icono:hover {
    color: #fff;
}


/* ==============================> BOTON DE WHATSAPP EN FICHA DE PRODUCTO */

.btn-wsp-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: var(--btn-accented-brd-radius);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    vertical-align: middle;
    transition: background 0.3s;
    height: auto;
    max-width: fit-content;
}

.btn-wsp-product:hover {
    background-color: #128C7E;
    color: white;
}

.btn-wsp-product i {
    margin-right: 5px;
    font-size: 16px;
}

/* RESPONSIVE */

@media(max-width: 768px) {
    .single-product form.cart {
        flex-wrap: wrap;
    }
}