/* AI shopping assistant: clean white surface with accents that follow the shop theme. Colours follow the shop theme (Admin > Appearance) with safe fallbacks. */
.mbot { --mb-lilac: var(--c-button-bg, #ffc20e); --mb-lilac-deep: var(--c-accent-text, #b83f00); --mb-grad: var(--c-gold-deep, #f7941d); --mb-on: var(--c-button-text, #2b2b2b); --mb-lilac-soft: var(--c-bg-alt, #fff8e6); --mb-gold: var(--c-gold, #ffc20e); --mb-text: var(--c-text, #2b2b2b); --mb-muted: var(--c-muted, #5f5a52); --mb-border: var(--c-border, #f0e2b8);
  font-family: var(--font-body, 'Jost', system-ui, sans-serif); color: var(--mb-text); }
.mbot *, .mbot *::before, .mbot *::after { box-sizing: border-box; }
.mbot [hidden] { display: none !important; }

.mbot-launch { position: fixed; left: calc(1rem + env(safe-area-inset-left, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 56; display: inline-flex; align-items: center; gap: .55rem; height: 52px; padding: 0 1.05rem 0 .85rem; border: 1px solid var(--mb-gold); border-radius: 999px; background: linear-gradient(135deg, var(--mb-lilac), var(--mb-grad)); color: var(--mb-on); font-weight: 600; font-size: .92rem; line-height: 1; font-family: inherit; letter-spacing: .02em; cursor: pointer; box-shadow: 0 8px 24px rgba(247, 148, 29, .35), 0 0 0 3px rgba(255, 194, 14, .3); transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease; }
.mbot-launch:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(247, 148, 29, .4), 0 0 0 3px rgba(255, 194, 14, .3); }
.mbot-launch:focus-visible { outline: 3px solid var(--mb-gold); outline-offset: 3px; }
.mbot-launch svg { width: 24px; height: 24px; flex: none; }
.mbot-launch .mbot-dot { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--mb-gold); border: 2px solid #fff; }
.mbot.is-open .mbot-launch { opacity: 0; pointer-events: none; transform: scale(.9); }

.mbot-panel { position: fixed; left: calc(1rem + env(safe-area-inset-left, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; width: min(392px, calc(100vw - 2rem)); height: min(640px, calc(100vh - 2rem)); background: #fff; border: 1px solid var(--mb-border); border-radius: 18px; box-shadow: 0 24px 60px rgba(42, 29, 41, .22), 0 0 0 1px rgba(255, 194, 14, .3); overflow: hidden; opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.mbot.is-open .mbot-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }

.mbot-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: linear-gradient(135deg, var(--mb-lilac), var(--mb-grad)); color: var(--mb-on); border-bottom: 2px solid var(--mb-gold); }
.mbot-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 194, 14, .3); }
.mbot-avatar svg { width: 20px; height: 20px; }
.mbot-title { flex: 1; min-width: 0; }
.mbot-title strong { display: block; font: 600 1.18rem/1.1 var(--font-heading, 'Cormorant Garamond', Georgia, serif); letter-spacing: .02em; }
.mbot-title span { display: block; margin-top: .15rem; font-size: .76rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbot-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .10); color: var(--mb-on); cursor: pointer; }
.mbot-x:hover { background: rgba(255, 255, 255, .26); }
.mbot-x:focus-visible { outline: 2px solid var(--mb-gold); outline-offset: 2px; }
.mbot-x svg { width: 18px; height: 18px; }

.mbot-log { flex: 1; overflow-y: auto; padding: 1rem .9rem .4rem; background: linear-gradient(#fff, var(--mb-lilac-soft)); scroll-behavior: smooth; overscroll-behavior: contain; }
.mbot-msg { display: flex; flex-direction: column; max-width: 92%; margin: 0 0 .8rem; animation: mbot-in .22s ease both; }
.mbot-msg.is-bot { align-items: flex-start; }
.mbot-msg.is-me { align-items: flex-end; margin-left: auto; }
.mbot-bubble { padding: .65rem .85rem; border-radius: 14px; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.is-bot .mbot-bubble { background: #fff; border: 1px solid var(--mb-border); border-top-left-radius: 4px; }
.is-me .mbot-bubble { background: var(--mb-lilac); color: var(--mb-on); border-top-right-radius: 4px; }
.mbot-rate { display: flex; gap: .3rem; margin-top: .25rem; }
.mbot-rate button { border: 0; background: transparent; padding: .15rem .3rem; color: var(--mb-muted); cursor: pointer; border-radius: 6px; font-size: .78rem; }
.mbot-rate button:hover, .mbot-rate button.is-on { color: var(--mb-lilac-deep); background: var(--mb-lilac-soft); }
@keyframes mbot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mbot-typing { display: inline-flex; gap: 4px; padding: .7rem .9rem; background: #fff; border: 1px solid var(--mb-border); border-radius: 14px; border-top-left-radius: 4px; }
.mbot-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mb-lilac); opacity: .35; animation: mbot-dot 1s infinite; }
.mbot-typing i:nth-child(2) { animation-delay: .15s; } .mbot-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mbot-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.mbot-msg:has(.mbot-cards) { width: 100%; max-width: 100%; }
.mbot-cards { display: flex; align-items: stretch; gap: .65rem; width: calc(100% + .9rem); margin: .55rem 0 0; padding: 0 .9rem .5rem 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--mb-border) transparent; }
.mbot-cards::-webkit-scrollbar { height: 4px; } .mbot-cards::-webkit-scrollbar-thumb { background: var(--mb-border); border-radius: 4px; }
.mbot-card { flex: 0 0 clamp(150px, 46%, 184px); min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mb-border); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(42, 29, 41, .05); }
.mbot-card a.mbot-pic { display: block; position: relative; flex: none; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mb-lilac-soft); }
.mbot-cards.is-few .mbot-card { flex: 1 1 0; }
.mbot-card img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.mbot-card-body { display: flex; flex: 1; flex-direction: column; gap: .2rem; padding: .55rem .6rem .65rem; }
.mbot-card-name { color: var(--mb-text); font-weight: 600; font-size: .84rem; line-height: 1.25; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mbot-card-name:hover { color: var(--mb-lilac-deep); }
.mbot-price { font-weight: 700; font-size: .92rem; color: var(--mb-lilac-deep); }
.mbot-price s { margin-left: .3rem; font-weight: 400; font-size: .78rem; color: var(--mb-muted); }
.mbot-stock { font-size: .72rem; color: #2e7d4f; } .mbot-stock.is-low { color: #b26a00; } .mbot-stock.is-out { color: #b3261e; }
.mbot-card-actions { display: flex; gap: .3rem; margin-top: auto; padding-top: .35rem; }
.mbot-btn { flex: 1 1 0; min-width: 0; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 .5rem; border-radius: 8px; border: 1px solid var(--mb-lilac); background: var(--mb-lilac); color: var(--mb-on); font-weight: 600; font-size: .78rem; line-height: 1; font-family: inherit; text-decoration: none; cursor: pointer; text-align: center; }
.mbot-btn:hover { background: var(--mb-grad); border-color: var(--mb-grad); }
.mbot-btn.is-ghost { background: #fff; color: var(--mb-lilac-deep); }
.mbot-btn.is-ghost:hover { background: var(--mb-lilac-soft); }
.mbot-btn.is-done { background: #2e7d4f; border-color: #2e7d4f; }
.mbot-btn:disabled { opacity: .6; cursor: default; }
.mbot-btn:focus-visible, .mbot-chip:focus-visible, .mbot-send:focus-visible, .mbot-input:focus-visible, .mbot-rate button:focus-visible { outline: 2px solid var(--mb-gold); outline-offset: 2px; }

.mbot-form { margin: .55rem 0 0; padding: .75rem; width: 100%; background: #fff; border: 1px solid var(--mb-border); border-radius: 12px; display: grid; gap: .5rem; }
.mbot-form label { font-size: .78rem; color: var(--mb-muted); display: grid; gap: .2rem; }
.mbot-form input { width: 100%; min-height: 40px; padding: 0 .65rem; border: 1px solid var(--mb-border); border-radius: 8px; font: inherit; font-size: .92rem; background: #fff; color: var(--mb-text); }
.mbot-form input:focus { outline: 2px solid var(--mb-lilac); outline-offset: 0; border-color: var(--mb-lilac); }
.mbot-note { font-size: .8rem; color: var(--mb-muted); } .mbot-note.is-error { color: #b3261e; }
.mbot-steps { display: grid; gap: .25rem; margin: .4rem 0 0; padding: 0; list-style: none; font-size: .82rem; }
.mbot-steps li { display: flex; align-items: center; gap: .45rem; color: var(--mb-muted); }
.mbot-steps li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--mb-border); background: #fff; flex: none; }
.mbot-steps li.is-done::before { background: var(--mb-lilac); border-color: var(--mb-lilac); }
.mbot-steps li.is-current { color: var(--mb-text); font-weight: 600; } .mbot-steps li.is-current::before { background: var(--mb-gold); border-color: var(--mb-gold); }
.mbot-contact { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }

.mbot-chips { display: flex; gap: .4rem; padding: .5rem .8rem; overflow-x: auto; background: var(--mb-lilac-soft); border-top: 1px solid var(--mb-border); scrollbar-width: none; }
.mbot-chips::-webkit-scrollbar { display: none; }
.mbot-chip { flex: none; padding: .38rem .75rem; border-radius: 999px; border: 1px solid var(--mb-gold); background: #fff; color: var(--mb-lilac-deep); font-weight: 500; font-size: .8rem; line-height: 1.2; font-family: inherit; cursor: pointer; white-space: nowrap; }
.mbot-chip:hover { background: var(--mb-lilac); color: var(--mb-on); border-color: var(--mb-lilac); }
.mbot-foot { display: flex; gap: .5rem; padding: .65rem .8rem calc(.65rem + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--mb-border); }
.mbot-input { flex: 1; min-width: 0; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--mb-border); border-radius: 999px; font: inherit; font-size: 16px; color: var(--mb-text); background: #fff; }
.mbot-input:focus { border-color: var(--mb-lilac); outline: 0; box-shadow: 0 0 0 3px rgba(255, 194, 14, .35); }
.mbot-send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--mb-lilac); color: var(--mb-on); cursor: pointer; }
.mbot-send:hover { background: var(--mb-lilac-deep); } .mbot-send:disabled { opacity: .5; cursor: default; }
.mbot-send svg { width: 20px; height: 20px; }
.mbot-legal { padding: 0 .9rem .5rem; background: #fff; font-size: .68rem; text-align: center; color: var(--mb-muted); }

@media (max-width: 640px) {
  body.has-mbn .mbot-launch { bottom: calc(var(--mbn-h, 60px) + 1rem + env(safe-area-inset-bottom, 0px)); }
  .mbot-launch { height: 48px; padding: 0 .95rem 0 .75rem; }
  .mbot-launch .mbot-label { display: none; } .mbot-launch { width: 52px; padding: 0; justify-content: center; }
  .mbot-panel { inset: 0; left: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .mbot *, .mbot *::before, .mbot *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .mbot { display: none; } }
html.mbot-lock, html.mbot-lock body { overflow: hidden; }

.mbot-chip.is-primary { background: var(--mb-lilac); color: var(--mb-on); border-color: var(--mb-lilac); font-weight: 600; }
.mbot-chip.is-primary:hover { background: var(--mb-lilac-deep); }
.mbot-box { width: 100%; margin: .55rem 0 0; padding: .6rem .7rem; background: #fff; border: 1px solid var(--mb-border); border-radius: 12px; }
.mbot-box.is-review, .mbot-box.is-done { border-color: var(--mb-gold); box-shadow: 0 0 0 2px rgba(255, 194, 14, .3); }
.mbot-line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--mb-border); }
.mbot-line:last-of-type { border-bottom: 0; }
.mbot-line-name { display: grid; gap: .1rem; font-size: .85rem; min-width: 0; overflow-wrap: anywhere; }
.mbot-line-name span { font-size: .74rem; color: var(--mb-muted); }
.mbot-line-name .mbot-issue { color: #b3261e; font-weight: 600; }
.mbot-line-price { font-weight: 700; font-size: .86rem; color: var(--mb-lilac-deep); text-align: right; }
.mbot-qty { display: inline-flex; align-items: center; gap: .35rem; }
.mbot-qty button, .mbot-remove { min-width: 30px; min-height: 30px; padding: 0 .4rem; border: 1px solid var(--mb-border); border-radius: 8px; background: #fff; color: var(--mb-lilac-deep); font: inherit; font-size: .85rem; cursor: pointer; }
.mbot-qty button:hover:not(:disabled), .mbot-remove:hover { background: var(--mb-lilac-soft); }
.mbot-qty button:disabled { opacity: .4; cursor: default; }
.mbot-qty span { min-width: 1.2rem; text-align: center; font-weight: 600; font-size: .88rem; }
.mbot-remove { font-size: .74rem; color: var(--mb-muted); justify-self: end; }
.mbot-line.is-plain { grid-template-columns: 1fr auto; }
.mbot-sum { display: grid; gap: .25rem; margin: .4rem 0 0; padding: 0; font-size: .86rem; }
.mbot-row { display: flex; justify-content: space-between; gap: .8rem; }
.mbot-row dt { color: var(--mb-muted); } .mbot-row dd { margin: 0; font-weight: 600; text-align: right; }
.mbot-row.is-total { margin-top: .2rem; padding-top: .4rem; border-top: 2px solid var(--mb-gold); font-size: 1rem; }
.mbot-row.is-total dt { color: var(--mb-text); font-weight: 700; } .mbot-row.is-total dd { color: var(--mb-lilac-deep); font-weight: 800; }
.mbot-to { display: grid; gap: .1rem; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--mb-border); font-size: .82rem; overflow-wrap: anywhere; }
.mbot-to span { color: var(--mb-muted); }
.mbot-box .mbot-note { margin: .5rem 0 0; }

/* Card buttons stay on one line; the card text never pushes past the card edge. */
.mbot-card-actions .mbot-btn { padding: 0 .3rem; font-size: .76rem; }
.mbot-price { white-space: nowrap; }
/* While the chat is open, the sale popup stays hidden so it never covers the chat (it returns when the chat is closed). */
html.mbot-open .salepop { display: none !important; }
/* Every product picture is the same square size, whatever shape the original photo has. */
.mbot-card-actions .mbot-btn { font-size: .74rem; }

/* ---- Product cards: the buttons sit on their own lines so "Add to cart" is never squeezed; contact/cart-added buttons wrap instead of overlapping ---- */
.mbot-card-actions { flex-direction: column; gap: .35rem; }
.mbot-card-actions .mbot-btn { flex: none; width: 100%; min-height: 36px; padding: 0 .6rem; font-size: .82rem; letter-spacing: .01em; }
.mbot-card-actions .mbot-btn:not(.is-ghost) { order: -1; }
.mbot-card-actions .mbot-btn.is-ghost { min-height: 32px; font-size: .78rem; }
.mbot-contact { width: 100%; }
.mbot-contact .mbot-btn { flex: 1 1 auto; white-space: normal; min-height: 36px; padding: .45rem .8rem; line-height: 1.2; font-size: .82rem; }
.mbot-contact .mbot-btn.is-wide { flex-basis: 100%; }

/* ---- First screen form (name, mobile, email, city) ---- */
.mbot-panel.is-gate .mbot-foot, .mbot-panel.is-gate .mbot-chips, .mbot-panel.is-gate .mbot-legal { display: none; }
.mbot-msg:has(.mbot-lead) { width: 100%; max-width: 100%; }
.mbot-lead { gap: .7rem; padding: .9rem; box-shadow: 0 2px 10px rgba(42, 29, 41, .05); }
.mbot-lead label { font-weight: 600; font-size: .8rem; color: var(--mb-text); }
.mbot-lead input { min-height: 44px; font-size: 16px; }
.mbot-lead input.is-bad { border-color: #b3261e; }
.mbot-lead .mbot-btn { flex: none; width: 100%; min-height: 46px; font-size: .95rem; }
.mbot-err { font-size: .74rem; font-weight: 500; color: #b3261e; }
.mbot-err:empty { display: none; }
.mbot-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; }
