/* WhatsApp chat button (design A). Fixed bottom-right; card above it (bottom sheet on phones).
   Sits under the stock-alert sheet (z 99998+) and above normal page content. */
.mm-wa, .mm-wa-backdrop {
	--wa: #25D366;
	--wa-hover: #1FBE5B;
	--wa-dark: #128C4A;
	--wa-head: #0B5E3A;
	--wa-soft: #E7F8EE;
	--wa-chat: #EFEAE2;
	--wa-ink: #111318;
	--wa-muted: #8A8F99;
}
.mm-wa [hidden], .mm-wa-backdrop[hidden] { display: none !important; }
.mm-wa { position: fixed; right: 15px; bottom: 15px; z-index: 9990; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: inherit; color: var(--wa-ink); line-height: 1.45; }
.mm-wa-i { width: 30px; height: 30px; flex: none; }

.mm-wa__fab { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff !important; box-shadow: 0 6px 18px rgba(18, 140, 74, .35), 0 2px 4px rgba(17, 19, 24, .12); text-decoration: none !important; transition: transform .15s, background .15s; }
.mm-wa__fab:hover { background: var(--wa-hover); transform: translateY(-2px); }
.mm-wa__fab:focus-visible, .mm-wa__x:focus-visible, .mm-wa__topic:focus-visible, .mm-wa__go:focus-visible { outline: 2px solid #2B4FB8; outline-offset: 2px; }
.mm-wa__dot { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #33D17A; border: 2px solid #fff; }
.mm-wa.is-closed .mm-wa__dot { background: #C9CDD6; }

.mm-wa__card { width: 340px; max-width: calc(100vw - 30px); overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(17, 19, 24, .22); text-align: right; animation: mm-wa-pop .18s ease-out; }
@keyframes mm-wa-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mm-wa__card { animation: none; } .mm-wa__fab { transition: none; } }
.mm-wa__head { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--wa-head); color: #fff; }
.mm-wa__av { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: #111318; color: #FFC22E; font-size: 13px; font-weight: 800; }
.mm-wa__av .mm-wa__dot { top: auto; bottom: 0; left: 0; }
.mm-wa__who { min-width: 0; }
.mm-wa__who b { display: block; font-size: 15px; font-weight: 600; }
.mm-wa__who small { display: block; font-size: 12.5px; opacity: .85; }
.mm-wa__x { display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; margin: 0 auto 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; }
.mm-wa__x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.mm-wa__body { display: grid; gap: 10px; padding: 14px; background: var(--wa-chat); }
.mm-wa__bubble { max-width: 90%; margin: 0; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: #fff; font-size: 14px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.mm-wa__bubble small { display: block; margin-top: 2px; font-size: 11px; color: var(--wa-muted); text-align: left; }
.mm-wa__topics { display: grid; gap: 7px; }
.mm-wa__topic { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border: 1px solid #BFE3CD; border-radius: 999px; background: #fff; color: var(--wa-dark) !important; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.mm-wa__topic:hover { background: var(--wa-soft); }
.mm-wa__topic small { font-size: 12px; font-weight: 400; color: var(--wa-muted); }
.mm-wa__foot { display: grid; gap: 6px; padding: 12px 14px; background: #fff; }
.mm-wa__go { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--wa); color: #fff !important; font-size: 15px; font-weight: 600; text-decoration: none !important; }
.mm-wa__go:hover { background: var(--wa-hover); }
.mm-wa__go .mm-wa-i { width: 20px; height: 20px; }
.mm-wa__foot small { font-size: 11.5px; color: var(--wa-muted); text-align: center; }
.mm-wa__num { direction: ltr; unicode-bidi: isolate; }

.mm-wa-backdrop { position: fixed; inset: 0; z-index: 9989; background: rgba(17, 19, 24, .35); }

/* Phones */
@media (max-width: 600px) {
	.mm-wa { right: 10px; bottom: 10px; }
	.mm-wa__fab { width: 54px; height: 54px; }
	.mm-wa.is-open .mm-wa__fab { display: none; }
	.mm-wa__card { position: fixed; right: 0; left: 0; bottom: 0; width: auto; max-width: none; max-height: 85vh; overflow: auto; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
	/* Above the cart's pay bar and the checkout's sticky step buttons. */
	body.mm-cart-page .mm-wa, body.mm-co-page .mm-wa { bottom: 84px; }
	body.mm-cart-page .mm-wa.is-open, body.mm-co-page .mm-wa.is-open { bottom: 10px; }
}
