/* Botão e menu de atendimento (WhatsApp) */
.cw { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: grid; justify-items: end; gap: 14px; font-family: inherit; }
.cw-fab { position: relative; width: 62px; height: 62px; display: grid; place-items: center; border: 0; border-radius: 50%; background: linear-gradient(135deg, #ffc233, #ff9d00); color: #1a1200; cursor: pointer; box-shadow: 0 10px 28px rgba(255, 160, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.2s, box-shadow 0.2s; }
.cw-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 34px rgba(255, 160, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35); }
.cw-fab::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 194, 51, 0.7); animation: cwPulse 2.4s ease-out infinite; pointer-events: none; }
.cw.is-open .cw-fab::after { animation: none; opacity: 0; }
@keyframes cwPulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
.cw-fab svg { grid-area: 1 / 1; transition: transform 0.25s, opacity 0.2s; }
.cw-ico-x { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.cw.is-open .cw-ico-chat { opacity: 0; transform: rotate(90deg) scale(0.6); }
.cw.is-open .cw-ico-x { opacity: 1; transform: none; }

.cw-panel { width: min(360px, calc(100vw - 32px)); overflow: hidden; border-radius: 22px; border: 1px solid var(--line-2, rgba(255, 255, 255, 0.12)); background: var(--panel, #10151f); color: var(--tx, #e9edf3); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); transform-origin: bottom right; animation: cwIn 0.22s ease; }
.cw-panel[hidden] { display: none; }
@keyframes cwIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg, rgba(255, 194, 51, 0.22), rgba(255, 157, 0, 0.08)), var(--panel-2, #141b27); border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08)); }
.cw-head strong { display: block; font-size: 1.02rem; }
.cw-head small { color: var(--tx-3, #8b97ab); font-size: 0.8rem; }
.cw-av { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--panel, #10151f); border: 1px solid var(--line-2, rgba(255, 255, 255, 0.12)); }
.cw-av img { border-radius: 50%; }
.cw-av i { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #34d399; border: 2px solid var(--panel-2, #141b27); }
.cw-close { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--tx-2, #9aa6b8); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cw-close:hover { background: var(--line, rgba(255, 255, 255, 0.08)); color: var(--tx, #fff); }
.cw-body { padding: 16px 16px 8px; display: grid; gap: 12px; max-height: min(470px, 62vh); overflow-y: auto; }
.cw-bubble { margin: 0; padding: 12px 14px; border-radius: 4px 16px 16px 16px; background: var(--panel-2, #141b27); border: 1px solid var(--line, rgba(255, 255, 255, 0.08)); color: var(--tx-2, #b4bdcb); font-size: 0.92rem; line-height: 1.5; }
.cw-topics { display: grid; gap: 8px; }
.cw-panel a.cw-topic { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line, rgba(255, 255, 255, 0.08)); background: var(--panel, #10151f); color: var(--tx, #e9edf3); text-decoration: none; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.cw-panel a.cw-topic:hover { border-color: var(--accent, #ffc233); background: rgba(255, 168, 0, 0.07); transform: translateX(3px); color: var(--tx, #e9edf3); }
.cw-topic i { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 194, 51, 0.24), rgba(255, 168, 0, 0.1)); border: 1px solid rgba(255, 168, 0, 0.3); color: var(--accent-2, #ffd98a); }
.cw-topic span { flex: 1; min-width: 0; display: grid; }
.cw-topic strong { font-size: 0.94rem; }
.cw-topic small { color: var(--tx-3, #8b97ab); font-size: 0.78rem; }
.cw-topic b { color: var(--tx-3, #8b97ab); font-size: 1.3rem; font-weight: 400; }
.cw-form { display: flex; gap: 8px; padding: 12px 16px 16px; }
.cw-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2, rgba(255, 255, 255, 0.12)); background: var(--panel-2, #141b27); color: var(--tx, #e9edf3); font: inherit; font-size: 0.92rem; }
.cw-form input:focus { outline: none; border-color: var(--accent, #ffc233); }
.cw-form button { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: linear-gradient(135deg, #ffc233, #ff9d00); color: #1a1200; cursor: pointer; }
.cw-form button:hover { filter: brightness(1.08); }
html[data-theme="light"] .cw-panel { box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25); }
@media (max-width: 560px) { .cw { right: 14px; bottom: 14px; } .cw-fab { width: 56px; height: 56px; } }
@media print { .cw { display: none; } }
@media (prefers-reduced-motion: reduce) { .cw-fab::after { animation: none; } }

/* painéis e janelas abertos têm prioridade: o botão some para não cobrir nada */
body.loja-detail-lock .cw, body.mu-lock .cw, body.ev-lock .cw { opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.2s, transform 0.2s; }
