/* Carrinho flutuante isolado para evitar cache e manter o visual no desktop/mobile. */

.floating-cart {
    position: fixed !important;
    right: 22px !important;
    bottom: 22px !important;
    width: min(370px, calc(100vw - 44px));
    background: rgba(255, 255, 255, .98);
    color: var(--dark, #071427);
    border: 1px solid rgba(219, 229, 244, .95);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(6, 29, 63, .24);
    padding: .92rem;
    align-items: center;
    gap: .85rem;
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
    display: flex;
    overflow: hidden;
}

.floating-cart::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary, #08aeea), var(--magenta, #e0007a), var(--yellow, #ffd200));
}

.floating-cart.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.floating-cart.is-pulse {
    animation: cartPulseFixed .6s ease;
}

.floating-cart-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary, #061d3f), #0b3f86 55%, var(--secondary, #08aeea));
    color: #fff;
    font-size: 1.45rem;
    box-shadow: 0 12px 26px rgba(6, 29, 63, .18);
}

.floating-cart-content {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: .12rem;
}

.floating-cart-content span {
    color: var(--muted, #64748b);
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-cart-content strong {
    color: var(--primary, #061d3f);
    font-size: .98rem;
}

.floating-cart-content small {
    color: var(--magenta, #e0007a);
    font-weight: 800;
}

.floating-cart-link {
    flex: 0 0 auto;
    text-decoration: none;
    color: #fff;
    background: var(--primary, #061d3f);
    border-radius: 999px;
    padding: .62rem .86rem;
    font-size: .82rem;
    font-weight: 900;
}

.floating-cart-link:hover {
    color: #fff;
    filter: brightness(1.08);
}

.cart-toast {
    position: fixed !important;
    left: 50% !important;
    bottom: 24px !important;
    top: auto !important;
    transform: translate(-50%, 18px);
    background: var(--primary, #061d3f);
    color: #fff;
    border-radius: 999px;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    box-shadow: 0 18px 45px rgba(6, 29, 63, .26);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
}

.cart-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.cart-toast i {
    color: #22c55e;
}

@keyframes cartPulseFixed {
    0% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-4px) scale(1.025); }
    100% { transform: translateY(0) scale(1); }
}

@media (min-width: 992px) {
    .floating-whatsapp {
        bottom: 118px !important;
        z-index: 1030;
    }
}

@media (max-width: 991.98px) {
    .floating-cart,
    .floating-cart.is-visible {
        display: flex !important;
    }

    .floating-cart {
        right: 12px !important;
        bottom: 12px !important;
        width: min(340px, calc(100vw - 24px));
        padding: .72rem;
        gap: .62rem;
        border-radius: 20px;
        z-index: 1060;
    }

    .floating-cart-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 14px;
        font-size: 1.22rem;
    }

    .floating-cart-content span { font-size: .76rem; }
    .floating-cart-content strong { font-size: .9rem; }

    .floating-cart-link {
        padding: .55rem .72rem;
        font-size: .78rem;
        white-space: nowrap;
    }

    .floating-whatsapp {
        bottom: 104px !important;
        right: 18px !important;
        z-index: 1030;
    }

    .cart-toast {
        bottom: 106px !important;
        z-index: 1070;
    }
}

@media (max-width: 575px) {
    .floating-cart { width: calc(100vw - 24px); }
    .cart-toast {
        width: calc(100vw - 28px);
        justify-content: center;
        border-radius: 18px;
    }
}
