/* ST Store · asistente virtual */
.sts-chatbot { --b-primary: #00247e; --b-accent: #ffc421; --b-line: #e1e7ef; --b-text: #1b2a3a; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
.sts-chatbot *, .sts-chatbot *::before, .sts-chatbot *::after { box-sizing: border-box; }

.sts-bot__fab { position: fixed; right: 22px; bottom: 22px; z-index: 9999; height: 60px; min-width: 60px; border: 0; border-radius: 999px; background: var(--b-accent); color: #0b1b2b; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; box-shadow: 0 8px 24px rgba(11, 27, 43, .35); font-weight: 700; font-size: 15px; transition: transform .15s; }
.sts-bot__fab:hover { transform: scale(1.05); }
.sts-bot__fab:focus-visible, .sts-bot__form input:focus-visible, .sts-bot__chips button:focus-visible { outline: 3px solid #0b3ba6; outline-offset: 2px; }

.sts-bot__panel { position: fixed; right: 22px; bottom: 96px; z-index: 9999; width: 380px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 130px)); background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(11, 27, 43, .35); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--b-line); }
.sts-bot__panel[hidden] { display: none; }
.sts-bot__head { background: var(--b-primary); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sts-bot__head strong { display: block; font-size: 16px; }
.sts-bot__head small { color: #b9c6ee; font-size: 12px; }
.sts-bot__close { background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.sts-bot__close:hover { background: rgba(255, 255, 255, .26); }

.sts-bot__msgs { flex: 1; overflow-y: auto; padding: 14px; background: #f4f6fb; display: flex; flex-direction: column; gap: 9px; }
.sts-bot__msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.sts-bot__msg.is-bot { background: #fff; color: var(--b-text); border: 1px solid var(--b-line); border-bottom-left-radius: 4px; align-self: flex-start; }
.sts-bot__msg.is-user { background: var(--b-primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }

.sts-bot__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sts-bot__chips button { background: #fff; border: 1px solid var(--b-primary); color: var(--b-primary); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit; }
.sts-bot__chips button:hover { background: var(--b-primary); color: #fff; }
.sts-bot__links { display: flex; flex-wrap: wrap; gap: 6px; }
.sts-bot__links a { background: var(--b-accent); color: #0b1b2b; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.sts-bot__links a:hover { background: #e6ad0f; }

.sts-bot__cards { display: grid; gap: 8px; }
.sts-bot__card { display: grid; grid-template-columns: 64px 1fr; gap: 10px; background: #fff; border: 1px solid var(--b-line); border-radius: 12px; padding: 9px; }
.sts-bot__card-media img, .sts-bot__ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--b-primary); color: var(--b-accent); font-weight: 800; font-size: 24px; }
.sts-bot__card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sts-bot__card-body strong { font-size: 13.5px; line-height: 1.25; color: var(--b-text); }
.sts-bot__price { font-weight: 800; color: var(--b-primary); font-size: 15px; }
.sts-bot__stock { font-size: 12px; font-weight: 700; width: fit-content; padding: 2px 8px; border-radius: 999px; }
.sts-bot__stock.is-ok { background: #dcfce7; color: #15803d; }
.sts-bot__stock.is-low { background: #fef3c7; color: #b45309; }
.sts-bot__stock.is-out { background: #fee2e2; color: #b91c1c; }
.sts-bot__actions { display: flex; gap: 6px; margin-top: 3px; }
.sts-bot__btn { font-size: 12.5px; font-weight: 700; text-decoration: none; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--b-primary); color: var(--b-primary); background: #fff; }
.sts-bot__btn.is-primary { background: var(--b-primary); color: #fff; }

.sts-bot__typing { align-self: flex-start; background: #fff; border: 1px solid var(--b-line); border-radius: 14px; padding: 11px 14px; display: flex; gap: 4px; }
.sts-bot__typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa9b8; animation: sts-bot-blink 1s infinite ease-in-out; }
.sts-bot__typing i:nth-child(2) { animation-delay: .15s; }
.sts-bot__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sts-bot-blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.sts-bot__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--b-line); background: #fff; }
.sts-bot__form input { flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 999px; padding: 10px 14px; font-size: 14.5px; font-family: inherit; }
.sts-bot__form button { border: 0; background: var(--b-primary); color: #fff; border-radius: 999px; padding: 0 18px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sts-bot__form button:hover { background: #0b3ba6; }

@media (max-width: 520px) {
	.sts-bot__panel { right: 8px; left: 8px; width: auto; bottom: 90px; height: calc(100vh - 120px); }
	.sts-bot__fab { right: 14px; bottom: 14px; }
	.sts-bot__fab-label { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.sts-bot__fab, .sts-bot__typing i { transition: none; animation: none; }
}
