/* 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);
    }
}

/* ===== Meu carrinho — mesma linguagem do site (botão Finalizar intocado) ===== */
html body .cart-panel { background: var(--ap-bg, #f7f6f3) !important; font-family: var(--ap-body, 'Geist'), system-ui, sans-serif; }
html body .cart-header { background: #fff !important; color: var(--ap-ink, #111112) !important; border-bottom: 1px solid var(--ap-line-soft, rgba(17,17,18,.07)) !important;
    padding: 16px 18px !important; justify-content: space-between !important; }
html body .cart-header h2 { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; color: var(--ap-ink, #111112) !important;
    font: 800 1.1rem var(--ap-display, 'Bricolage Grotesque'), sans-serif !important; letter-spacing: -.02em; text-transform: none !important; }
html body .cart-header h2 .cart-header-icon { width: 34px; height: 34px; padding: 7px; box-sizing: border-box; border-radius: 10px;
    background: var(--ap-accent-08, color-mix(in srgb, var(--ap-accent, #1e3370) 8%, transparent)); filter: brightness(0) !important; opacity: .85; }
html body .cart-header .cart-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ap-accent, #1e3370) !important;
    color: #fff !important; font: 700 .72rem var(--ap-body, 'Geist'), sans-serif !important; display: inline-flex; align-items: center; justify-content: center; }
html body .cart-close { width: 36px !important; height: 36px !important; border-radius: 12px !important; border: 1px solid var(--ap-line-soft, rgba(17,17,18,.07)) !important;
    background: #fff !important; color: var(--ap-ink, #111112) !important; display: inline-flex !important; align-items: center; justify-content: center; }

html body .cart-items { padding: 14px !important; display: flex !important; flex-direction: column; gap: 10px; }
html body .cart-item { background: #fff !important; border: 1px solid var(--ap-line-soft, rgba(17,17,18,.07)) !important; border-radius: 16px !important;
    padding: 12px !important; gap: 12px !important; box-shadow: 0 1px 2px rgba(17,17,18,.03); }
html body .cart-item-img { width: 72px !important; height: 72px !important; border-radius: 12px !important; border: 1px solid var(--ap-line-soft, rgba(17,17,18,.07)) !important;
    object-fit: contain; background: #fff; }
html body .cart-item-name { font: 600 .88rem/1.35 var(--ap-body, 'Geist'), sans-serif !important; color: var(--ap-ink, #111112) !important; }
html body .cart-item .price-value, html body .cart-item .cart-item-price { font: 800 1rem var(--ap-display, 'Bricolage Grotesque'), sans-serif !important; color: var(--ap-accent, #1e3370) !important; }
html body .cart-item-actions { gap: 10px !important; }
html body .cart-qty { border: 1px solid var(--ap-line, rgba(17,17,18,.12)) !important; border-radius: 12px !important; overflow: hidden; background: #fff !important; }
html body .cart-qty .ch-qty-btn { width: 32px !important; height: 32px !important; border: 0 !important; background: var(--ap-bg, #f7f6f3) !important;
    color: var(--ap-ink, #111112) !important; font-size: .9rem; }
html body .cart-qty .ch-qty-btn:disabled { color: var(--ap-ink-3, #77777f) !important; opacity: .6; }
html body .cart-item .ch-item-remove-text { color: var(--ap-danger, #d92d20) !important; font: 600 .78rem var(--ap-body, 'Geist'), sans-serif !important;
    background: none !important; border: 0 !important; }

html body .cart-empty { padding: 48px 20px !important; text-align: center; }
html body .cart-empty i { width: 72px; height: 72px; border-radius: 22px; display: inline-flex !important; align-items: center; justify-content: center;
    background: var(--ap-accent-08, color-mix(in srgb, var(--ap-accent, #1e3370) 8%, transparent)); color: var(--ap-accent, #1e3370) !important; font-size: 1.8rem !important; margin-bottom: 14px; }
html body .cart-empty p { font: 600 .95rem var(--ap-body, 'Geist'), sans-serif !important; color: var(--ap-ink-2, #4a4a52) !important; margin: 0 0 16px !important; }
html body .cart-empty .btn { display: inline-flex !important; align-items: center; justify-content: center; height: 46px; padding: 0 22px !important;
    border-radius: 12px !important; background: var(--ap-accent, #1e3370) !important; color: #fff !important; border: 0 !important;
    font: 700 .9rem var(--ap-body, 'Geist'), sans-serif !important; text-decoration: none !important; box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--ap-accent, #1e3370) 70%, transparent); }

html body .cart-footer { background: #fff !important; border-top: 1px solid var(--ap-line-soft, rgba(17,17,18,.07)) !important; }
html body .cart-subtotal { font-family: var(--ap-body, 'Geist'), sans-serif !important; color: var(--ap-ink-2, #4a4a52) !important; }
html body .cart-subtotal strong { font: 800 1.25rem var(--ap-display, 'Bricolage Grotesque'), sans-serif !important; color: var(--ap-accent, #1e3370) !important; }
html body .cart-shipping-note { color: var(--ap-ink-3, #77777f) !important; font-size: .76rem !important; }

html body.cart-sidebar-open .stelc-chat-bubble { display: none !important; }

/* Finalizar compra: o hover mantém exatamente o estado normal (preto) */
html body .cart-checkout-btn:hover, html body .cart-checkout-btn:hover:not(:disabled), html body .cart-checkout-btn:focus {
    background: #000 !important; color: #fff !important; border-color: #000 !important; transform: none !important; }
html body .cart-checkout-btn:hover .cart-checkout-btn-icon { filter: brightness(0) invert(1) !important; }

/* Excluir: botão vermelho com texto branco */
html body .cart-item .ch-item-remove-text, html body .ch-cart-item .ch-item-remove-text {
    display: inline-flex !important; align-items: center; justify-content: center; height: 32px; padding: 0 12px !important;
    border: 1px solid #d92d20 !important; border-radius: 10px !important; background: #d92d20 !important; color: #fff !important;
    font: 700 .76rem var(--ap-body, 'Geist'), sans-serif !important; text-decoration: none !important; cursor: pointer; transition: background .15s; }
html body .cart-item .ch-item-remove-text:hover, html body .ch-cart-item .ch-item-remove-text:hover { background: #b42318 !important; border-color: #b42318 !important; color: #fff !important; }
