/* Carrinho lateral — mesma animação suave do menu mobile (drawer) */
#cartOverlay.cart-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 25000;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cartOverlay.cart-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#cartOverlay .cart-panel {
    width: 100%;
    max-width: 440px;
    min-width: 0;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    position: relative;
    z-index: 25001;
    will-change: transform;
}

#cartOverlay.cart-overlay.open .cart-panel {
    transform: translateX(0);
}

body.cart-sidebar-open {
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 768px) {
    #cartOverlay .cart-panel {
        max-width: min(100%, 100vw);
    }
}

@media (max-width: 480px) {
    #cartOverlay .cart-panel {
        max-width: 100%;
    }
}

@media (min-width: 481px) {
    body.cart-sidebar-open .stelc-chat-bubble:not(.stelc-chat-bubble--in-header) {
        right: calc(440px + 20px);
    }
}
