/* NovaShop · chat de la tienda. Toma el color principal del tema. */
.nsch { --nsch-c: var(--primary, var(--accent, #1a1a1a)); --nsch-bg: var(--surface, var(--bg, #fff)); --nsch-ink: #1d1d1f; --nsch-soft: #f2f2f3; --nsch-line: rgba(0, 0, 0, .1);
  position: fixed; right: 20px; bottom: 20px; z-index: 950; font: 400 14.5px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--nsch-ink); }
.nsch *, .nsch *::before, .nsch *::after { box-sizing: border-box; }
.nsch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nsch-launch { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--nsch-c); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .22); transition: transform .15s ease; margin-left: auto; }
.nsch-launch:hover { transform: scale(1.05); }
.nsch-launch:focus-visible { outline: 3px solid var(--nsch-c); outline-offset: 3px; }
.nsch-dot { position: absolute; right: 3px; bottom: 3px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: #9a9a9a; }
.nsch.is-online .nsch-dot { background: #1a9e5c; }
.nsch-count { position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: #d92d20; color: #fff; font-size: 12px; font-weight: 700; line-height: 21px; text-align: center; }
.nsch.is-open .nsch-launch { transform: none; }

.nsch-panel { position: absolute; right: 0; bottom: 70px; width: min(380px, calc(100vw - 32px)); height: min(580px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--nsch-bg); border-radius: 16px; box-shadow: 0 18px 60px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .05); overflow: hidden; }
.nsch-panel[hidden] { display: none; }
.nsch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 14px; background: var(--nsch-c); color: #fff; }
.nsch-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: 0; color: inherit; line-height: 1.3; }
.nsch-status { margin: 2px 0 0; font-size: 12.5px; opacity: .88; display: flex; align-items: center; gap: 6px; }
.nsch-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9c9c9; flex: none; }
.nsch.is-online .nsch-status::before { background: #4ade80; }
.nsch-close { width: 34px; height: 34px; margin: -6px -6px 0 0; border: 0; border-radius: 8px; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.nsch-close:hover { background: rgba(255, 255, 255, .15); }
.nsch-close:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.nsch-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.nsch-msg { display: flex; flex-direction: column; max-width: 86%; }
.nsch-me { align-self: flex-end; align-items: flex-end; }
.nsch-bot, .nsch-team { align-self: flex-start; }
.nsch-bubble { padding: 9px 13px; border-radius: 16px; overflow-wrap: anywhere; }
.nsch-me .nsch-bubble { background: var(--nsch-c); color: #fff; border-bottom-right-radius: 5px; }
.nsch-me .nsch-bubble a { color: #fff; }
.nsch-bot .nsch-bubble, .nsch-team .nsch-bubble { background: var(--nsch-soft); border-bottom-left-radius: 5px; }
.nsch-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.nsch-who { font-size: 11.5px; color: #6b6b6b; margin-top: 3px; padding: 0 4px; }
.nsch-greeting .nsch-who { display: none; }
.nsch-failed .nsch-bubble { opacity: .6; } .nsch-failed .nsch-who { color: #b42318; }
.nsch-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: #6b6b6b; }
.nsch-ask button, .nsch-suggest button { border: 1px solid var(--nsch-line); background: var(--nsch-bg); color: var(--nsch-ink); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.nsch-ask button:hover, .nsch-suggest button:hover { border-color: var(--nsch-c); }
.nsch-ask button:focus-visible, .nsch-suggest button:focus-visible { outline: 2px solid var(--nsch-c); outline-offset: 2px; }
.nsch-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.nsch-products { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; width: 100%; }
.nsch-product { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--nsch-line); border-radius: 12px; background: var(--nsch-bg); color: inherit; text-decoration: none; }
.nsch-product:hover { border-color: var(--nsch-c); }
.nsch-product img, .nsch-noimg { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--nsch-soft); flex: none; }
.nsch-product > span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.nsch-product strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsch-more { font-size: 13px; color: inherit; padding-left: 4px; }
.nsch-email { display: flex; gap: 6px; align-self: stretch; }
.nsch-email input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--nsch-line); border-radius: 10px; padding: 0 12px; font: inherit; color: var(--nsch-ink); background: #fff; }
.nsch-email input:focus { outline: 2px solid var(--nsch-c); outline-offset: -1px; }
.nsch-email button { height: 40px; border: 0; border-radius: 10px; padding: 0 12px; background: var(--nsch-c); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.nsch-note { margin: 0; font-size: 13px; color: #1a7f4b; }
.nsch-typing .nsch-bubble { display: flex; gap: 4px; padding: 12px 14px; }
.nsch-typing span { width: 6px; height: 6px; border-radius: 50%; background: #9a9a9a; animation: nsch-b 1s infinite ease-in-out; }
.nsch-typing span:nth-child(2) { animation-delay: .15s; } .nsch-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes nsch-b { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.nsch-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 12px 14px; border-top: 1px solid var(--nsch-line); }
.nsch-form textarea { flex: 1; resize: none; border: 0; background: transparent; font: inherit; color: var(--nsch-ink); padding: 9px 0; max-height: 120px; min-height: 40px; outline: none; }
.nsch-form:focus-within { box-shadow: inset 0 2px 0 var(--nsch-c); }
.nsch-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--nsch-c); color: #fff; display: grid; place-items: center; cursor: pointer; }
.nsch-send:focus-visible { outline: 2px solid var(--nsch-c); outline-offset: 2px; }

@media (max-width: 560px) {
  .nsch { right: 14px; bottom: 14px; }
  .nsch.is-open .nsch-launch { display: none; }
  .nsch-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; bottom: 0; }
  html.nsch-lock { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .nsch-launch, .nsch-typing span { transition: none; animation: none; } }
@media print { .nsch { display: none; } }
