/* Ask Buyfo — AI shopping assistant */
.ask { max-width: 760px; }
.ask-head { text-align: center; margin: 8px 0 18px; }
.ask-badge { display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--c-brand); background: var(--c-brand-soft); border-radius: 999px; padding: 4px 12px; }
.ask-head h1 { margin: 10px 0 6px; font-size: clamp(24px, 4.5vw, 34px); line-height: 1.15; }
.ask-head h1 em { font-style: normal; color: var(--c-brand); }
.ask-head p { margin: 0 auto; max-width: 560px; color: var(--c-muted); }
.ask-chat { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.ask-msg { max-width: 92%; border-radius: 16px; padding: 12px 15px; line-height: 1.55; font-size: 15px; overflow-wrap: anywhere; }
.ask-msg.me { align-self: flex-end; background: var(--c-brand); color: #fff; border-bottom-right-radius: 4px; }
.ask-msg.bot { align-self: flex-start; background: var(--c-surface); border: 1px solid var(--c-line); border-bottom-left-radius: 4px; }
.ask-msg.bot p { margin: 0 0 8px; } .ask-msg.bot p:last-child { margin-bottom: 0; }
.ask-msg.bot ul { margin: 4px 0 8px; padding-left: 20px; } .ask-msg.bot li { margin: 3px 0; }
.ask-msg.bot a { color: var(--c-brand); font-weight: 700; }
.ask-msg.is-wait { color: var(--c-muted); display: inline-flex; align-items: center; gap: 10px; }
.ask-msg.is-err { border-color: #fecaca; background: #fff5f5; color: #9f1239; }
.ask-dots { display: inline-flex; gap: 4px; } .ask-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-logo); animation: askb 1s infinite ease-in-out; }
.ask-dots i:nth-child(2) { animation-delay: .15s; } .ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes askb { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ask-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.ask-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--c-line); border-radius: 12px; padding: 8px; text-decoration: none; color: var(--c-text); background: var(--c-surface); font-size: 13px; }
.ask-card:hover { border-color: var(--c-logo); }
.ask-card img { width: 100%; height: 100px; object-fit: contain; background: #fff; border-radius: 8px; }
.ask-card-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.ask-card-p small { color: var(--c-muted); }
.ask-score { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--c-brand); border-radius: 999px; padding: 1px 6px; }
.ask-ex { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 14px; }
.ask-ex[hidden] { display: none; }
.ask-ex .chip { cursor: pointer; font: inherit; font-size: 13.5px; }
.ask-form { position: sticky; bottom: 10px; display: flex; gap: 8px; align-items: flex-end; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; padding: 8px; box-shadow: 0 8px 28px rgba(15, 23, 42, .1); }
.ask-form textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--c-text); font: inherit; font-size: 15.5px; padding: 8px 6px; min-height: 24px; max-height: 160px; }
.ask-form .btn-p { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.ask-form .btn-p:disabled { opacity: .6; }
.ask-note { text-align: center; font-size: 12.5px; color: var(--c-faint); margin: 10px 0 0; }
.ask-note button { border: 0; background: none; color: var(--c-brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
[data-theme="dark"] .ask-msg.is-err { background: rgba(225, 29, 72, .12); border-color: rgba(225, 29, 72, .35); color: #fda4af; }
.ask-ex .chip { white-space: normal; height: auto; min-height: 36px; padding: 7px 14px; text-align: left; }
.ask-msg.bot a.ask-card { color: var(--c-text); font-weight: 400; } .ask-msg.bot a.ask-card .ask-card-t { font-weight: 600; } .ask-msg.bot a.ask-card .ask-card-p b { color: var(--c-text); }
