/* ============================================================
   ASELAB — Burbujas flotantes v2
   Blue Ark Solutions | Efecto 3D mejorado + Glow
   ============================================================ */

.aselab-bubbles {
    position: fixed !important;
    bottom: 28px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
}

/* Position variants */
.aselab-bubbles--right {
    right: 28px !important;
    left: auto !important;
    align-items: flex-end !important;
}
.aselab-bubbles--left {
    left: 28px !important;
    right: auto !important;
    align-items: flex-start !important;
}

/* Wrap */
.aselab-bbl-wrap {
    position: relative;
    display: flex;
    align-items: center;
    pointer-events: all;
}
.aselab-bubbles--right .aselab-bbl-wrap { justify-content: flex-end; }
.aselab-bubbles--left  .aselab-bbl-wrap { justify-content: flex-start; }

/* ── Tooltip ── */
.aselab-bbl-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    right: calc(100% + 14px);
    left: auto;
    background: rgba(8, 18, 32, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 10;
}
/* Arrow pointing right (default — bubbles on right) */
.aselab-bbl-tooltip::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-right: none;
    border-left-color: rgba(8, 18, 32, 0.92);
}
/* Tooltip on right side (bubbles on left) */
.aselab-bbl-tooltip--right {
    left: calc(100% + 14px);
    right: auto;
    transform: translateY(-50%) translateX(6px);
}
.aselab-bbl-tooltip--right::after {
    left: -7px;
    right: auto;
    border-left: none;
    border-right-color: rgba(8, 18, 32, 0.92);
}
.aselab-bbl-wrap:hover .aselab-bbl-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ── Base bubble ── */
.aselab-bbl {
    position: relative;
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer;
    box-sizing: border-box !important;
    overflow: visible !important;
    /* 3D base transition */
    transition:
        transform 0.25s cubic-bezier(.34,1.56,.64,1),
        box-shadow 0.25s ease !important;
}
.aselab-bbl:hover {
    transform: scale(1.13) translateY(-4px) !important;
    text-decoration: none !important;
}
.aselab-bbl:active {
    transform: scale(0.95) !important;
    transition-duration: 0.1s !important;
}

/* ── Shine (top gloss highlight — key for 3D) ── */
.aselab-bbl-shine {
    position: absolute;
    top: 5px;
    left: 9px;
    width: 40px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(
        170deg,
        rgba(255,255,255,0.55) 0%,
        rgba(255,255,255,0.08) 60%,
        rgba(255,255,255,0.00) 100%
    );
    pointer-events: none;
    z-index: 4;
    transform: rotate(-15deg);
}

/* ── Bottom shadow fill (enhances 3D depth) ── */
.aselab-bbl::before {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 8px;
    width: 42px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}

/* ── Glow ring ── */
.aselab-bbl-glow {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    animation: aselab-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes aselab-glow-pulse {
    0%   { transform: scale(1);    opacity: 0.5; }
    50%  { transform: scale(1.55); opacity: 0;   }
    100% { transform: scale(1);    opacity: 0.5; }
}

/* ── Icon ── */
.aselab-bbl-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    display: block !important;
    position: relative;
    z-index: 3;
    pointer-events: none;
    flex-shrink: 0;
}

/* ============================================================
   COTIZACIÓN — Azul ASELAB
   ============================================================ */
.aselab-bbl--quote {
    background: linear-gradient(
        160deg,
        #2060b0 0%,
        #0d4a8a 40%,
        #03325E 100%
    ) !important;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.12) inset,
        0 -3px 0 rgba(0,0,0,0.25) inset,
        0 8px 24px rgba(3,50,94,0.5),
        0 3px 8px rgba(3,50,94,0.35),
        0 1px 2px rgba(0,0,0,0.3) !important;
    color: #fff !important;
}
.aselab-bbl--quote:hover {
    box-shadow:
        0 2px 0 rgba(255,255,255,0.15) inset,
        0 -3px 0 rgba(0,0,0,0.25) inset,
        0 14px 36px rgba(3,50,94,0.6),
        0 5px 14px rgba(3,50,94,0.4),
        0 1px 3px rgba(0,0,0,0.3) !important;
}
.aselab-bbl--quote .aselab-bbl-glow {
    background: radial-gradient(circle, rgba(24,145,174,0.8), transparent 68%);
}
.aselab-bbl--quote .aselab-bbl-icon { stroke: #fff; }

/* Quote badge */
.aselab-bbl-badge {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    width: 22px !important;
    height: 22px !important;
    background: #e74c3c !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 22px !important;
    text-align: center !important;
    border: 2px solid #fff !important;
    display: none;
    z-index: 10 !important;
    box-sizing: border-box !important;
}
.aselab-bbl-badge--on { display: block !important; }
.aselab-bbl-badge-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: #e74c3c;
    opacity: 0.55;
    z-index: -1;
    animation: aselab-badge-ring 1.9s ease-in-out infinite;
}
@keyframes aselab-badge-ring {
    0%   { transform: scale(1);    opacity: 0.55; }
    50%  { transform: scale(2.0);  opacity: 0;    }
    100% { transform: scale(1);    opacity: 0.55; }
}
.aselab-bbl-badge--bump {
    animation: aselab-badge-bump 0.35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes aselab-badge-bump {
    0%   { transform: scale(1);   }
    50%  { transform: scale(1.7); }
    100% { transform: scale(1);   }
}

/* ============================================================
   WHATSAPP — Verde
   ============================================================ */
.aselab-bbl--wa {
    background: linear-gradient(
        160deg,
        #3dda7f 0%,
        #20c060 40%,
        #128c3e 100%
    ) !important;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.15) inset,
        0 -3px 0 rgba(0,0,0,0.2) inset,
        0 8px 24px rgba(18,140,62,0.5),
        0 3px 8px rgba(18,140,62,0.3),
        0 1px 2px rgba(0,0,0,0.25) !important;
    color: #fff !important;
}
.aselab-bbl--wa:hover {
    box-shadow:
        0 2px 0 rgba(255,255,255,0.18) inset,
        0 -3px 0 rgba(0,0,0,0.2) inset,
        0 14px 36px rgba(18,140,62,0.65),
        0 5px 14px rgba(18,140,62,0.4),
        0 1px 3px rgba(0,0,0,0.25) !important;
}
.aselab-bbl--wa .aselab-bbl-glow {
    background: radial-gradient(circle, rgba(37,211,102,0.8), transparent 68%);
}
.aselab-bbl--wa .aselab-bbl-icon {
    fill: #fff;
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
}

/* ============================================================
   LLAMADA — Turqueza ASELAB
   ============================================================ */
.aselab-bbl--phone {
    background: linear-gradient(
        160deg,
        #28c8e8 0%,
        #1299bc 40%,
        #0d6f8a 100%
    ) !important;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.15) inset,
        0 -3px 0 rgba(0,0,0,0.2) inset,
        0 8px 24px rgba(24,145,174,0.5),
        0 3px 8px rgba(24,145,174,0.3),
        0 1px 2px rgba(0,0,0,0.25) !important;
    color: #fff !important;
    animation: aselab-phone-ring 5s ease-in-out infinite;
}
.aselab-bbl--phone:hover {
    animation: none !important;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.18) inset,
        0 -3px 0 rgba(0,0,0,0.2) inset,
        0 14px 36px rgba(24,145,174,0.65),
        0 5px 14px rgba(24,145,174,0.4),
        0 1px 3px rgba(0,0,0,0.25) !important;
}
.aselab-bbl--phone .aselab-bbl-glow {
    background: radial-gradient(circle, rgba(24,145,174,0.8), transparent 68%);
}
.aselab-bbl--phone .aselab-bbl-icon { stroke: #fff; }

@keyframes aselab-phone-ring {
    0%,80%,100% { transform: rotate(0deg); }
    82%          { transform: rotate(14deg); }
    84%          { transform: rotate(-12deg); }
    86%          { transform: rotate(9deg); }
    88%          { transform: rotate(-6deg); }
    90%          { transform: rotate(0deg); }
}

/* ============================================================
   FIX: Botones +/− de cantidad
   Alineación vertical correcta
   ============================================================ */
.aselab-qty-control {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}
.aselab-qty-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    line-height: 1 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #c8d8e4 !important;
    border-radius: 50% !important;
    background: #f0f6fa !important;
    color: #03325E !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    /* Reset any theme interference */
    box-shadow: none !important;
    text-align: center !important;
}
.aselab-qty-btn:hover {
    background: #1891AE !important;
    border-color: #1891AE !important;
    color: #fff !important;
}
.aselab-qty-input {
    display: inline-block !important;
    width: 48px !important;
    height: 32px !important;
    text-align: center !important;
    border: 1px solid #c8d8e4 !important;
    border-radius: 8px !important;
    padding: 0 6px !important;
    font-size: 14px !important;
    line-height: 32px !important;
    color: #333 !important;
    background: #fff !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
}
.aselab-qty-input::-webkit-inner-spin-button,
.aselab-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.aselab-qty-input:focus {
    border-color: #1891AE !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(24,145,174,0.15) !important;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
    .aselab-bubbles {
        bottom: 18px !important;
        gap: 10px !important;
    }
    .aselab-bubbles--right { right: 16px !important; }
    .aselab-bubbles--left  { left: 16px !important;  }
    .aselab-bbl {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
    }
    .aselab-bbl-icon {
        width: 22px !important;
        height: 22px !important;
        max-width: 22px !important;
    }
    .aselab-bbl--wa .aselab-bbl-icon {
        width: 26px !important;
        height: 26px !important;
        max-width: 26px !important;
    }
    .aselab-bbl-tooltip { display: none !important; }
}

/* ============================================================
   MÓVIL — Burbujas: mostrar las 3 pero más pequeñas
   ============================================================ */
@media (max-width: 768px) {
    /* Mostrar todas las burbujas pero reducidas */
    .aselab-bbl-wrap {
        display: flex !important;
    }

    /* Subir burbujas para no tapar controles de producto */
    .aselab-bubbles {
        bottom: 88px !important;
        gap: 0 !important;
    }
    .aselab-bubbles--right { right: 14px !important; }
    .aselab-bubbles--left  { left: 14px !important; }

    .aselab-bbl {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }
    .aselab-bbl-icon {
        width: 22px !important;
        height: 22px !important;
        max-width: 22px !important;
    }
    /* Mostrar label debajo de la burbuja en móvil */
    .aselab-bbl-wrap {
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px;
    }
    .aselab-bbl-wrap[data-bubble="quote"]::after {
        content: 'Cotización';
        font-size: 9px;
        font-weight: 700;
        color: #03325E;
        letter-spacing: 0.3px;
        text-align: center;
        background: rgba(255,255,255,0.92);
        border-radius: 20px;
        padding: 2px 7px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.12);
        white-space: nowrap;
    }
    /* Tooltip oculto en móvil */
    .aselab-bbl-tooltip {
        display: none !important;
    }
}
