/* Shop assistant (Assistant\Assistant): floating button + chat panel. Colours from the ds/kc tokens. */
.ds-ai-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 998; display: inline-flex; align-items: center; gap: .45rem; height: 46px; padding: 0 1.1rem 0 .9rem; border: 0; border-radius: 999px; background: var(--ds-ink); color: #fff; font-family: var(--kc-body, inherit); font-size: .92rem; font-weight: 800; line-height: 1; box-shadow: 0 12px 28px -10px rgba(30, 42, 68, .55); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ds-ai-fab:hover, .ds-ai-fab:focus { background: var(--ds-ink); color: #fff; transform: translateY(-2px); }
.ds-ai-fab svg { width: 20px; height: 20px; flex: none; fill: var(--ds-sun); }
.ds-ai-fab[aria-expanded="true"] { display: none; }

.ds-ai { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 1001; display: flex; flex-direction: column; width: 390px; height: min(620px, calc(100vh - 32px)); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(30, 42, 68, .45); overflow: hidden; font-family: var(--kc-body, inherit); color: var(--ds-ink); }
.ds-ai[hidden] { display: none; }
.ds-ai__head { display: flex; align-items: center; gap: .35rem; padding: .8rem .7rem .8rem 1rem; background: var(--ds-ink); color: #fff; }
.ds-ai__head > div { flex: 1; min-width: 0; }
.ds-ai__title { margin: 0; font-family: var(--kc-display, inherit); font-size: 1.05rem; font-weight: 700; line-height: 1.2; color: #fff; }
.ds-ai__sub { margin: .1rem 0 0; font-size: .78rem; color: rgba(255, 255, 255, .72); line-height: 1.3; }
button.ds-ai__icon, button.ds-ai__icon:hover, button.ds-ai__icon:focus { display: grid; place-items: center; flex: none; width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; cursor: pointer; transform: none; }
button.ds-ai__icon:hover { background: rgba(255, 255, 255, .22); }
.ds-ai__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.ds-ai__log { position: relative; flex: 1; overflow-y: auto; padding: 1rem .9rem .5rem; background: var(--ds-sand); overscroll-behavior: contain; }
.ds-ai__msg { max-width: 88%; margin: 0 0 .7rem; padding: .65rem .85rem; border-radius: 16px; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.ds-ai__msg p { margin: 0 0 .45rem; }
.ds-ai__msg p:last-child { margin-bottom: 0; }
.ds-ai__msg ul { margin: .25rem 0 .45rem; padding-left: 1.1rem; }
.ds-ai__msg li { margin: 0 0 .3rem; }
.ds-ai__msg--bot { background: var(--ds-surface); border: 1px solid var(--ds-line); border-bottom-left-radius: 6px; }
.ds-ai__msg--user { margin-left: auto; background: var(--ds-ink); color: #fff; border-bottom-right-radius: 6px; }
.ds-ai__msg--typing { display: inline-flex; align-items: center; gap: .5rem; color: var(--ds-muted); font-size: .86rem; }
.ds-ai__dots { display: inline-flex; gap: 3px; }
.ds-ai__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ds-muted); animation: ds-ai-dot 1s infinite ease-in-out; }
.ds-ai__dots i:nth-child(2) { animation-delay: .15s; }
.ds-ai__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ds-ai-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }

.ds-ai__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
button.ds-ai__chip, button.ds-ai__chip:hover, button.ds-ai__chip:focus { min-height: 0; height: auto; padding: .45rem .75rem; border: 1.5px solid var(--ds-line); border-radius: 999px; background: var(--ds-surface); color: var(--ds-ink); font-family: inherit; font-size: .8rem; font-weight: 700; line-height: 1.25; text-align: left; box-shadow: none; cursor: pointer; transform: none; }
button.ds-ai__chip:hover { border-color: var(--ds-primary); color: var(--ds-primary-deep); }

.ds-ai__cards { display: flex; gap: .55rem; margin: -.2rem 0 .8rem; padding: 0 0 .25rem; overflow-x: auto; scrollbar-width: thin; }
.ds-ai__card { flex: 0 0 150px; display: flex; flex-direction: column; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 14px; padding: .45rem; }
.ds-ai__card a.ds-ai__card-link { display: block; color: var(--ds-ink); text-decoration: none; }
.ds-ai__card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; background: var(--ds-sand); }
.ds-ai__card-age { display: block; margin: .4rem 0 0; font-size: .68rem; font-weight: 800; color: var(--ds-muted); text-transform: uppercase; letter-spacing: .06em; }
.ds-ai__card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .2rem 0 0; font-size: .8rem; font-weight: 700; line-height: 1.3; min-height: 2.6em; }
.ds-ai__card-price { display: block; margin: .25rem 0 .45rem; font-family: var(--kc-display, inherit); font-size: .98rem; font-weight: 700; }
button.ds-ai__add, button.ds-ai__add:hover, button.ds-ai__add:focus, a.ds-ai__add { display: flex; align-items: center; justify-content: center; width: 100%; height: 32px; min-height: 0; margin-top: auto; padding: 0 .4rem; border: 0; border-radius: 999px; background: var(--ds-primary); color: #fff; font-family: inherit; font-size: .74rem; font-weight: 800; line-height: 1; white-space: nowrap; text-decoration: none; box-shadow: none; cursor: pointer; transform: none; }
button.ds-ai__add:hover { background: var(--ds-primary-deep); }
button.ds-ai__add.is-added { background: var(--ds-primary); }
button.ds-ai__add:disabled { cursor: default; }
button.ds-ai__add { gap: .35em; }
.ds-ai__add .ds-btn__spinner { width: 1.15em; height: 1.15em; }
a.ds-ai__add { background: var(--ds-sand); color: var(--ds-ink); }

.ds-ai__form { display: flex; align-items: flex-end; gap: .45rem; padding: .6rem .7rem .7rem; border-top: 1px solid var(--ds-line); background: var(--ds-surface); }
.ds-ai__form textarea { flex: 1; min-height: 42px; max-height: 120px; margin: 0; padding: .6rem .85rem; border: 1.5px solid var(--ds-line); border-radius: 21px; background: var(--ds-sand); color: var(--ds-ink); font: inherit; font-size: 16px; line-height: 1.35; resize: none; box-shadow: none; }
.ds-ai__form textarea:focus { outline: none; border-color: var(--ds-primary); background: var(--ds-surface); }
button.ds-ai__send, button.ds-ai__send:hover, button.ds-ai__send:focus { display: grid; place-items: center; flex: none; width: 42px; height: 42px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: var(--ds-primary); color: #fff; box-shadow: none; cursor: pointer; transform: none; }
button.ds-ai__send:disabled { opacity: .5; cursor: default; }
.ds-ai__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Phones: the panel takes the whole screen; the button keeps a short label. */
@media (max-width: 600px) {
	.ds-ai { inset: 0; width: auto; height: auto; max-height: none; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
	.ds-ai-fab { height: 44px; font-size: .86rem; padding: 0 1rem 0 .8rem; }
	.ds-ai__msg { max-width: 92%; }
}
body.ds-ai-open { overflow: hidden; }
@media (min-width: 601px) { body.ds-ai-open { overflow: auto; } }
@media (prefers-reduced-motion: reduce) { .ds-ai__dots i { animation: none; } .ds-ai-fab { transition: none; } }
