/* ===== FLOATING BUTTONS STYLES ===== */
/* Botones flotantes reutilizables */

.floating-buttons-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.floating-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    z-index: 9999;
    pointer-events: auto;
    will-change: transform;
}

.floating-btn.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.floating-btn:active {
    transform: scale(0.95);
}

/* WhatsApp Button */
.floating-whatsapp {
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #25d366 0%, #1ebe57 100%);
}

.floating-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #128c7e 100%);
}

/* Quote Button */
.floating-quote {
    bottom: 90px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff8757 100%);
}

.floating-quote:hover {
    background: linear-gradient(135deg, #ff8757 0%, var(--primary-color) 100%);
}

/* Compare Button */
.floating-compare {
    bottom: 160px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.floating-compare:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Badge para contador */
.floating-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Tooltip */
.floating-tooltip {
    position: absolute;
    right: 75px;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.floating-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid rgba(0,0,0,0.85);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.floating-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

/* Animación de rebote al aparecer */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .floating-whatsapp {
        bottom: 15px;
        right: 15px;
    }

    .floating-quote {
        bottom: 75px;
        right: 15px;
    }

    .floating-compare {
        bottom: 135px;
        right: 15px;
    }

    .floating-tooltip {
        right: 65px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .floating-btn:hover .floating-tooltip {
        right: 68px;
    }

    .floating-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .floating-whatsapp {
        bottom: 10px;
        right: 10px;
    }

    .floating-quote {
        bottom: 65px;
        right: 10px;
    }

    .floating-compare {
        bottom: 120px;
        right: 10px;
    }

    /* En móviles pequeños, ocultar tooltip en hover */
    .floating-tooltip {
        display: none;
    }
}

/* Animación de onda cuando se hace click */
.floating-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
}

.floating-btn:active::before {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

/* Estado de carga/deshabilitado */
.floating-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.floating-btn.loading {
    pointer-events: none;
}

.floating-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
