/* 7.3 · Chat y buscador IA (SHOPMIND by Estudio Ideas) */
@property --smang{syntax:'<angle>';inherits:false;initial-value:0deg}
@keyframes smspin{to{--smang:360deg}}
@keyframes smdot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@keyframes smin{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

/* Buscador estándar: el mismo de la web; al hacer clic, un resplandor suave del color de la web por todo el borde (sin giros) */
.sm-sbox{position:relative;border-radius:var(--smr,999px);transition:box-shadow .35s ease}
.sm-sbox:focus-within{box-shadow:0 0 0 2px color-mix(in srgb,var(--smc) 28%,transparent),0 0 18px 2px color-mix(in srgb,var(--smc) 32%,transparent)}
@media (prefers-reduced-motion:reduce){.sm-sbox{transition:none}}
.sm-ia{position:absolute;right:58px;top:50%;transform:translateY(-50%);font:800 10px/1 system-ui,sans-serif;letter-spacing:.06em;color:#fff;background:var(--smc);border-radius:6px;padding:4px 6px;pointer-events:none;z-index:3;opacity:.9}
.sm-res{position:absolute;left:0;right:0;top:calc(100% + 10px);z-index:9999;background:#fff;color:#1b1d22;border-radius:16px;box-shadow:0 22px 60px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.06);padding:8px;max-height:min(70vh,520px);overflow:auto;text-align:left;animation:smin .2s ease-out}
.sm-res[hidden]{display:none}
.sm-res__h{display:flex;align-items:center;gap:8px;font:700 12px/1.3 system-ui,sans-serif;color:#6b7080;padding:6px 8px 8px}
.sm-res__h i{width:8px;height:8px;border-radius:50%;background:var(--smc);flex:none}
.sm-res a.sm-it{display:flex;align-items:center;gap:12px;padding:8px;border-radius:12px;color:inherit;text-decoration:none}
.sm-res a.sm-it:hover,.sm-res a.sm-it.is-on{background:rgba(0,0,0,.05)}
.sm-it img,.sm-it .sm-ph{width:48px;height:48px;border-radius:10px;object-fit:cover;background:#f1f2f4;flex:none}
.sm-it b{display:block;font:600 14px/1.3 system-ui,sans-serif}
.sm-it span{font:700 13px/1.3 system-ui,sans-serif;color:var(--smc)}
.sm-it small{font:500 11px system-ui,sans-serif;color:#b03030;margin-left:6px}
.sm-res__all{display:block;text-align:center;padding:10px;margin-top:4px;border-top:1px solid #eee;font:700 13px system-ui,sans-serif;color:var(--smc);text-decoration:none}
.sm-res__none{padding:14px 10px;font:500 14px/1.4 system-ui,sans-serif;color:#555}
.sm-dots{display:inline-flex;gap:4px}.sm-dots i{width:6px;height:6px;border-radius:50%;background:currentColor;animation:smdot 1s infinite}.sm-dots i:nth-child(2){animation-delay:.15s}.sm-dots i:nth-child(3){animation-delay:.3s}

/* Chat: el asistente dentro del MISMO botón de WhatsApp (un solo botón) */
.sm-chat{font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.sm-chat .wafab{cursor:pointer;border:0}
.sm-tip{position:fixed;right:96px;bottom:34px;z-index:2147482000;white-space:nowrap;background:#fff;color:#1b1d22;font:600 13px system-ui,sans-serif;padding:9px 12px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.16);animation:smin .3s ease-out}
.sm-tip[hidden]{display:none}
.sm-win{position:fixed;z-index:2147482000;right:22px;bottom:100px;width:min(390px,calc(100vw - 32px));height:min(620px,calc(100vh - 130px));display:flex;flex-direction:column;background:#fff;color:#1b1d22;border-radius:20px;overflow:hidden;box-shadow:0 28px 80px rgba(0,0,0,.3);animation:smin .22s ease-out}
.sm-win[hidden]{display:none}
.sm-hd{display:flex;align-items:center;gap:10px;padding:14px 16px;background:var(--smc);color:#fff}
.sm-hd i{width:36px;height:36px;border-radius:50%;background:#fff;color:var(--smc);display:grid;place-items:center;flex:none;font:800 15px/1 system-ui;font-style:normal}
.sm-hd i svg{width:20px;height:20px}
.sm-hd b{display:block;font-size:15px}.sm-hd small{opacity:.85;font-size:12px}
.sm-hd button{margin-left:auto;background:none;border:0;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:4px}
.sm-log{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#f6f7f9}
.sm-m{max-width:86%;padding:10px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word}
.sm-m--a{background:#fff;align-self:flex-start;border-bottom-left-radius:6px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.sm-m--u{background:var(--smc);color:#fff;align-self:flex-end;border-bottom-right-radius:6px}
.sm-m a{color:var(--smc);font-weight:700}
.sm-m--u a{color:#fff}
.sm-m--e{background:#fff4f4;color:#8a1f1f;align-self:flex-start}
.sm-wa{display:inline-flex;align-items:center;gap:6px;margin-top:6px;background:#25d366;color:#fff!important;text-decoration:none;font:700 13px system-ui;padding:7px 11px;border-radius:999px}
.sm-sug{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px;background:#f6f7f9}
.sm-sug button{border:1px solid rgba(0,0,0,.12);background:#fff;border-radius:999px;padding:6px 10px;font:600 12px system-ui;cursor:pointer;color:#333}
.sm-in{position:relative;display:flex;gap:8px;padding:12px;border-top:1px solid #eee;background:#fff;isolation:isolate}
.sm-in textarea{flex:1;resize:none;border:1px solid #dcdfe4;border-radius:14px;padding:10px 12px;font:15px/1.4 inherit;font-family:inherit;max-height:110px;outline:0;background:#fff;color:#1b1d22}
.sm-in textarea:focus{border-color:var(--smc);box-shadow:0 0 0 3px color-mix(in srgb,var(--smc) 18%,transparent)}
.sm-in button{border:0;border-radius:14px;background:var(--smc);color:#fff;width:46px;cursor:pointer;display:grid;place-items:center}
.sm-in button svg{width:20px;height:20px}
.sm-in button:disabled{opacity:.5;cursor:default}
.sm-team{border-top:1px solid #eee;background:#fff;padding:8px 12px 4px}
.sm-team p{margin:0 0 6px;font:700 11px/1.3 system-ui;letter-spacing:.04em;text-transform:uppercase;color:#6b7080}
.sm-ag{display:flex;align-items:center;gap:10px;padding:6px 0}
.sm-ag__av{position:relative;width:32px;height:32px;border-radius:50%;background:#e8f8ee;color:#128c4a;display:grid;place-items:center;font:800 13px system-ui;flex:none}
.sm-ag__av::after{content:"";position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border-radius:50%;background:#25d366;border:2px solid #fff}
.sm-ag b{display:block;font:700 14px/1.2 system-ui;color:#1b1d22}.sm-ag em{font:600 12px/1.2 system-ui;font-style:normal;color:#128c4a}
.sm-ag a{margin-left:auto;background:#25d366;color:#fff;text-decoration:none;font:700 13px system-ui;padding:7px 12px;border-radius:999px}
.sm-ft{font:600 10px system-ui;color:#9aa0ac;text-align:center;padding:0 0 8px;background:#fff}
@media (max-width:640px){.sm-chat.is-open .wafab{display:none!important}.sm-win{right:8px;left:8px;bottom:8px;width:auto;height:min(84vh,640px)}.sm-tip{display:none}.sm-ia{display:none}}


/* 7.9 · Chat con aspecto de WhatsApp (encabezado verde, fondo de conversación y burbujas como en WhatsApp) */
.sm-win{background:#efeae2}
.sm-hd{background:#008069;color:#fff}
.sm-hd i{color:#008069}
.sm-log{background:#efeae2 radial-gradient(rgba(0,0,0,.035) 1px,transparent 1px) 0 0/14px 14px}
.sm-m{box-shadow:0 1px .5px rgba(11,20,26,.13);border-radius:8px;color:#111b21}
.sm-m--a{background:#fff;border-top-left-radius:0}
.sm-m--u{background:#d9fdd3;color:#111b21;border-top-right-radius:0;border-bottom-right-radius:8px}
.sm-m--u a,.sm-m a{color:#027eb5}
.sm-sug{background:#efeae2}
.sm-sug button{border-color:#d1d7db;color:#008069}
.sm-in{background:#f0f2f5;border-top:0}
.sm-in textarea{border:0;border-radius:22px;background:#fff}
.sm-in textarea:focus{box-shadow:none}
.sm-in button{background:#00a884;border-radius:50%;width:44px;height:44px;align-self:flex-end}
.sm-team{background:#fff}
@media (max-width:640px){.sm-win{left:0;right:0;bottom:0;top:0;width:auto;height:auto;border-radius:0}}

/* 8.0 · webs sin teléfonos de WhatsApp: asistente a tamaño completo (como WhatsApp Web en PC, pantalla completa en celular) */
.sm-chat--full .sm-win{top:16px;bottom:16px;height:auto;width:min(460px,calc(100vw - 32px))}
@media (max-width:640px){.sm-chat--full .sm-win{top:0;bottom:0;right:0;left:0;width:auto}}
