/* [REDISEÑO] Tsuki · asistente de la tienda (botón flotante + ventana de chat). Usa los colores del sitio (claro/oscuro). */
.tsk-fab{position:fixed;right:14px;bottom:142px;z-index:56;width:56px;height:56px;border-radius:50%;padding:0;background:var(--surface);
  box-shadow:0 10px 26px rgba(215,25,31,.35);border:2px solid var(--brand);display:grid;place-items:center;transition:transform .2s}
.tsk-fab img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.tsk-fab:hover{transform:scale(1.07)}
.tsk-fab:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.tsk-fab .tsk-dot{position:absolute;top:1px;right:1px;width:13px;height:13px;border-radius:50%;background:#1a9b62;border:2px solid var(--surface)}
.tsk-tip{position:fixed;right:78px;bottom:150px;z-index:56;background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow-lg);
  border-radius:14px 14px 4px 14px;padding:9px 12px;font-size:13px;max-width:210px;line-height:1.35;cursor:pointer;animation:tskIn .3s ease}
.tsk-tip b{color:var(--brand)}
@media(min-width:1024px){.tsk-fab{bottom:92px;right:24px;width:60px;height:60px}.tsk-tip{right:94px;bottom:104px}}
body.pdp-page .tsk-fab{bottom:212px} body.pdp-page .tsk-tip{bottom:220px}
@media(min-width:1024px){body.pdp-page .tsk-fab{bottom:92px} body.pdp-page .tsk-tip{bottom:104px}}
@media(max-width:1023px){body.cart-pg .tsk-fab,body.cart-pg .tsk-tip,body.od-pg .tsk-fab,body.od-pg .tsk-tip{display:none}}
body.checkout-pg .tsk-fab,body.checkout-pg .tsk-tip{display:none}

.tsk-win{position:fixed;z-index:96;right:24px;bottom:24px;width:390px;height:min(620px,calc(100vh - 48px));background:var(--surface);color:var(--text);
  border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden;
  opacity:0;visibility:hidden;transform:translateY(16px) scale(.98);transform-origin:bottom right;transition:opacity .2s,transform .2s,visibility .2s}
.tsk-win.open{opacity:1;visibility:visible;transform:none}
@media(max-width:600px){.tsk-win{inset:0;width:auto;height:100%;height:100dvh;border-radius:0;border:0}}
.tsk-hd{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;background:var(--ink,#121212);color:#fff}
.tsk-hd img{width:42px;height:42px;border-radius:50%;background:#fff;flex:none}
.tsk-hd .t{flex:1;min-width:0;line-height:1.2}
.tsk-hd .t b{display:block;font-size:16px}
.tsk-hd .t small{font-size:12px;opacity:.75;display:flex;align-items:center;gap:5px}
.tsk-hd .t small i{width:7px;height:7px;border-radius:50%;background:#2ecc71;display:inline-block}
.tsk-hd button{width:36px;height:36px;border-radius:10px;color:#fff;display:grid;place-items:center;font-size:20px;line-height:1}
.tsk-hd button:hover{background:rgba(255,255,255,.12)}
.tsk-hd button svg{width:18px;height:18px}

.tsk-msgs{flex:1;overflow-y:auto;padding:14px 12px 6px;display:flex;flex-direction:column;gap:10px;background:var(--bg);overscroll-behavior:contain}
.tsk-m{display:flex;gap:8px;align-items:flex-end;max-width:100%}
.tsk-m .av{width:28px;height:28px;border-radius:50%;flex:none;background:#fff}
.tsk-m .bb{padding:9px 12px;border-radius:16px;font-size:14px;line-height:1.45;max-width:84%;word-wrap:break-word;overflow-wrap:anywhere}
.tsk-m.bot .bb{background:var(--surface);border:1px solid var(--border);border-bottom-left-radius:4px}
.tsk-m.yo{justify-content:flex-end}
.tsk-m.yo .bb{background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.tsk-m .bb a{color:var(--brand);text-decoration:underline}
.tsk-m.yo .bb a{color:#fff}
.tsk-col{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:calc(100% - 36px)}
.tsk-col .bb{max-width:100%}

.tsk-cards{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.tsk-card{flex:0 0 148px;scroll-snap-align:start;background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.tsk-card .im{display:block;aspect-ratio:1/1;background:#f1f1f3;position:relative}
.tsk-card .im img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:6%}
.tsk-card .tg{position:absolute;top:6px;left:6px;font-size:10px;font-weight:700;padding:2px 7px;border-radius:20px;background:var(--brand);color:#fff}
.tsk-card .tg.st{background:#1a9b62}
.tsk-card .tg.no{background:#62636b}
.tsk-card .bd{padding:8px;display:flex;flex-direction:column;gap:4px;flex:1}
.tsk-card .nm{font-size:12px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:31px}
.tsk-card .pr{font-size:13px;font-weight:700}
.tsk-card .pr small{display:block;font-size:10.5px;font-weight:500;color:var(--muted)}
.tsk-card .ac{display:flex;gap:5px;margin-top:auto;padding-top:4px}
.tsk-card .ac a,.tsk-card .ac button{flex:1;font-size:11.5px;font-weight:600;padding:6px 4px;border-radius:9px;text-align:center;border:1px solid var(--border);background:var(--surface-2)}
.tsk-card .ac button{background:var(--brand);color:#fff;border-color:var(--brand)}
.tsk-card .ac button.loading{opacity:.6}

.tsk-acts{display:flex;flex-wrap:wrap;gap:6px}
.tsk-acts a{font-size:13px;font-weight:600;padding:7px 12px;border-radius:20px;border:1px solid var(--brand);color:var(--brand);background:var(--surface)}
.tsk-acts a.wa{border-color:#25d366;color:#128c4a}
:root[data-theme="dark"] .tsk-acts a.wa{color:#25d366}

.tsk-sug{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0 4px 36px}
.tsk-sug button{font-size:12.5px;padding:7px 11px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--text);text-align:left}
.tsk-sug button:hover{border-color:var(--brand);color:var(--brand)}

.tsk-typing .bb{display:flex;gap:4px;padding:12px 14px}
.tsk-typing .bb i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:tskDot 1.2s infinite}
.tsk-typing .bb i:nth-child(2){animation-delay:.15s}.tsk-typing .bb i:nth-child(3){animation-delay:.3s}
@keyframes tskDot{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@keyframes tskIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.tsk-ft{border-top:1px solid var(--border);padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:var(--surface)}
.tsk-in{display:flex;gap:8px;align-items:flex-end}
.tsk-in textarea{flex:1;resize:none;border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:14px;padding:9px 12px;font:inherit;font-size:14px;line-height:1.4;max-height:110px;min-height:40px;outline:none}
.tsk-in textarea:focus{border-color:var(--brand)}
.tsk-in button{width:42px;height:42px;border-radius:50%;background:var(--brand);color:#fff;display:grid;place-items:center;flex:none}
.tsk-in button:disabled{opacity:.45;cursor:default}
.tsk-in button svg{width:18px;height:18px}
.tsk-nota{font-size:10.5px;color:var(--muted);text-align:center;margin-top:5px;line-height:1.3}
.tsk-cnt{font-size:10.5px;color:var(--muted);text-align:right;min-height:0}
@media(prefers-reduced-motion:reduce){.tsk-win,.tsk-fab,.tsk-tip{transition:none;animation:none}}
