/* Shared palette and typography deliberately match the existing store. */
.assistant-launch { position: fixed; z-index: 60; right: 84px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 4px 17px 4px 4px; border: 1px solid var(--line-strong); border-radius: 36px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); font: 600 13px 'Sora',sans-serif; cursor: pointer; }
.mazo-label { display: grid; text-align: left; gap: 2px; }
.mazo-label strong { font-size: 15px; }
.mazo-label small { font: 500 10px 'Inter',sans-serif; color: var(--muted); }
.mazo-orb { --orb-size: 62px; position: relative; display: inline-flex; flex: 0 0 var(--orb-size); width: var(--orb-size); height: var(--orb-size); align-items: center; justify-content: center; transform-origin: center bottom; }
.mazo-robot { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 5px #ff651f30); }
.mazo-signal { position: absolute; right: 5%; bottom: 8%; width: 7px; height: 7px; border-radius: 50%; background: #67df9b; border: 2px solid var(--surface); box-sizing: content-box; }
.assistant-launch { padding-left: 2px; }
.assistant-launch .mazo-orb { transition: transform .2s; }
.assistant-launch:hover .mazo-orb { transform: translateY(-3px) rotate(-5deg); }
.mazo-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mazo-identity .mazo-orb { --orb-size: 68px; }
#tmzAssistant[data-mood="thinking"] .mazo-signal { background: #ffbd59; animation: mazo-signal 1s ease-in-out infinite alternate; }
#tmzAssistant[data-mood="happy"] .mazo-signal { background: #67df9b; box-shadow: 0 0 6px #67df9b70; }
@keyframes mazo-signal { from { opacity: .35; } to { opacity: 1; box-shadow: 0 0 7px #ffbd5970; } }
@media(prefers-reduced-motion:reduce) { #tmzAssistant[data-mood="thinking"] .mazo-signal { animation: none; } .assistant-launch .mazo-orb { transition: none; } }
.assistant-launch .ico { color: var(--neon); width: 23px; height: 23px; }
@media(max-width:899px) { body:has(#nav) .assistant-launch { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; } }
.assistant-dialog .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body:has(.cart-bar:not(.hidden)) .assistant-launch { bottom: calc(84px + env(safe-area-inset-bottom)); }
body:has(#cart[open]) .assistant-launch { display: none; }
.assistant-dialog { position: fixed; inset: auto 16px 16px auto; margin: 0; padding: 0; width: min(420px,calc(100vw - 32px)); max-width: none; height: min(740px,calc(100dvh - 32px)); max-height: none; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.assistant-dialog[open] { display: flex; flex-direction: column; }
.assistant-dialog::backdrop,.help-review::backdrop { background: rgba(0,0,0,.45); }
.assistant-head { padding: 22px 20px 16px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.assistant-head h2 { font-size: 20px; margin: 4px 0; font-family: 'Sora',sans-serif; }
.assistant-head p { font-size: 12px; color: var(--muted); margin: 0; }
.assistant-close { border: 0; color: var(--text); background: var(--elevated); padding: 9px; border-radius: 50%; cursor: pointer; }
.assistant-log { flex: 1; min-height: 70px; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.assistant-message { padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.6; background: var(--elevated); margin-bottom: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message.is-user { margin-left: 30px; border: 1px solid var(--line-strong); background: rgba(255,95,31,.08); }
.assistant-source { display: block; color: var(--muted); font-size: 10px; margin-top: 8px; }
.assistant-tools { padding: 10px 16px 4px; border-top: 1px solid var(--line); flex-shrink: 0; }
.assistant-menu { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-menu button { border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--surface); font-size: 11px; padding: 8px 10px; cursor: pointer; }
.assistant-more summary { cursor: pointer; color: var(--muted); font-size: 11px; padding: 8px 0 3px; }
.assistant-menu-more { padding: 8px 0; max-height: 140px; overflow-y: auto; }
.assistant-form { display: flex; gap: 8px; padding: 8px 16px; }
.assistant-form .input { min-width: 0; flex: 1; font-size: 16px; }
.assistant-form .btn { flex-shrink: 0; padding: 10px; }
.assistant-note { color: var(--muted); font-size: 10px; padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.assistant-actions:empty { display: none; }
.assistant-actions .btn-primary { width: 100%; justify-content: center; }
.assistant-product { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: start; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); margin-top: 12px; white-space: normal; }
.assistant-product-copy { min-width: 0; }
.assistant-product strong { display: block; font-size: 13px; line-height: 1.4; }
.assistant-product p { margin: 4px 0 6px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.assistant-product b { display: block; margin-bottom: 6px; color: var(--neon); font-size: 14px; }
.assistant-product .btn { min-height: 32px; padding: 5px 11px; font-size: 11px; }
.assistant-offer-note { display: block; font-size: 10px; line-height: 1.5; margin-bottom: 8px; color: var(--ok-text); }
.assistant-sorts { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; margin: 12px 0; }
.assistant-sorts .btn { min-height: 34px; padding: 6px 9px; font-size: 10px; }
.assistant-sorts [aria-pressed="true"] { border-color: var(--neon); color: var(--neon); }
.assistant-product-media { width: 52px; height: 52px; border-radius: 13px; overflow: hidden; background: var(--surface); }
.assistant-product-media img { width: 100%; height: 100%; object-fit: cover; }
.assistant-product-media.is-mosaic { display: grid; grid-template-columns: repeat(2,1fr); gap: 2px; }
.assistant-product-media.is-mosaic img { min-height: 0; border-radius: 4px; }
.assistant-product.is-combo { border: 1px solid var(--line-strong); padding: 12px; border-radius: 12px; background: rgba(255,95,31,.04); }
.assistant-quote { padding: 12px; margin-top: 12px; border-radius: 12px; background: var(--surface); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; white-space: normal; }
.assistant-quote span { font-size: 11px; color: var(--muted); }
.assistant-quote strong { color: var(--neon); font-size: 19px; }
.assistant-quote small { grid-column: 1/-1; font-size: 10px; color: var(--ok-text); }
.assistant-launch:focus-visible,.assistant-dialog button:focus-visible,.help-page button:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.assistant-dialog button:disabled { opacity: .5; cursor: wait; }
@media(min-width:900px) { body:has(.cart-bar:not(.hidden)) .assistant-launch { bottom: 16px; } }
@media(max-width:480px) { .assistant-dialog { inset: auto 0 0; width: 100%; height: min(780px,100dvh); border-radius: 20px 20px 0 0; } }
.help-page { max-width: 1100px; margin: 40px auto 120px; padding: 0 20px; }
.help-heading { margin-bottom: 28px; }
.help-heading h1 { margin: 8px 0; font: 700 clamp(26px,5vw,40px) 'Sora',sans-serif; }
.help-heading p { color: var(--muted); max-width: 650px; }
.help-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.help-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 22px; min-width: 0; }
.help-panel h2 { font-size: 20px; margin-bottom: 16px; }
.help-panel form { display: grid; gap: 16px; }
.help-panel textarea { resize: vertical; min-height: 100px; }
.help-panel label { display: grid; gap: 6px; font-size: 13px; }
.help-list { display: grid; gap: 10px; margin-top: 16px; }
.help-ticket { text-align: left; display: grid; gap: 5px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--elevated); color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.help-ticket small,.help-message small { color: var(--muted); font-size: 11px; }
.help-thread { margin-top: 24px; }
.help-messages { display: grid; gap: 10px; max-height: 450px; overflow-y: auto; margin: 16px 0; }
.help-message { border-left: 3px solid var(--line-strong); padding: 12px; background: var(--elevated); border-radius: 8px; }
.help-message p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.help-message.is-staff { border-left-color: var(--ok); }
.help-review { width: min(480px,calc(100vw - 32px)); color: var(--text); background: var(--surface); padding: 24px; border-radius: 18px; border: 1px solid var(--line-strong); }
.help-review p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0; }
.help-error { color: var(--err); font-size: 13px; min-height: 20px; }
@media(max-width:760px) { .help-layout { grid-template-columns: 1fr; } }

/* WhatsApp flotante (páginas sin el de la tienda: panel cliente, centro de ayuda) */
.tmz-wa { position: fixed; z-index: 60; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--wa, #25D366); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 4px rgba(37,211,102,.18); transition: transform .15s; }
.tmz-wa:hover { transform: scale(1.06); }
.tmz-wa .ico, .tmz-wa svg { width: 30px; height: 30px; }
@media(max-width:899px) { body:has(#nav) .tmz-wa { bottom: calc(156px + env(safe-area-inset-bottom)); } }
@media print { .tmz-wa { display: none; } }
