/* ===== WhatsApp Floating Bubble ===== */
#whatsapp-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.50);
    z-index: 9999;
    text-decoration: none;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    pointer-events: none;
}

#whatsapp-bubble.wa-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#whatsapp-bubble:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
}

#whatsapp-bubble svg {
    width: 34px;
    height: 34px;
    fill: #ffffff;
    display: block;
}

@media (max-width: 640px) {
    #whatsapp-bubble {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }
    #whatsapp-bubble svg {
        width: 30px;
        height: 30px;
    }
}

/* ===== Lazy Loading de Productos ===== */
.product-card {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.product-card.product-loaded {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===== Utilitarios ===== */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Clase necesaria para el menú móvil */
.top-20 { top: 5rem; }

/* ===== Corrección de scroll con headers fijos ===== */
/* Compensa nav (80px) + barra de pestañas sticky (~52px) */
section[id] {
    scroll-margin-top: 8.5rem;
}

/* ===== Button Hover Animations ===== */

/* --- Botones primarios (azul oscuro relleno) --- */
a.bg-primary, button.bg-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                background-color 0.2s ease !important;
}

/* Destello de brillo que cruza el botón al hacer hover */
a.bg-primary::before, button.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 1;
}

a.bg-primary:hover, button.bg-primary:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 18px 45px rgba(0, 30, 64, 0.55),
                0 0 0 2px rgba(0, 180, 200, 0.35),
                0 0 28px rgba(0, 180, 200, 0.2) !important;
}

a.bg-primary:hover::before, button.bg-primary:hover::before {
    left: 160%;
}

a.bg-primary:active, button.bg-primary:active {
    transform: translateY(-1px) scale(0.98) !important;
    transition-duration: 0.08s !important;
}

/* --- Botones fantasma (fondo transparente sobre hero oscuro) --- */
a.bg-white\/10 {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                background-color 0.2s ease !important;
}

a.bg-white\/10:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.4) !important;
}

a.bg-white\/10:active {
    transform: translateY(-1px) scale(0.98) !important;
    transition-duration: 0.08s !important;
}

/* --- Botones outline-to-fill en tarjetas de productos/servicios --- */
a.bg-primary\/10 {
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s ease,
                background-color 0.2s ease,
                color 0.2s ease !important;
}

a.bg-primary\/10:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 10px 28px rgba(0, 30, 64, 0.38) !important;
}

/* ===== Before/After Glass Comparison ===== */
.glass-comparison {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.glass-comparison .label-before,
.glass-comparison .label-after {
    position: absolute;
    top: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 10;
}

.glass-comparison .label-before {
    left: 1rem;
    background-color: #ba1a1a;
    color: #fff;
}

.glass-comparison .label-after {
    right: 1rem;
    background-color: #00b4c8;
    color: #001e40;
}
