/* Store Assistant chat widget. Every selector is prefixed .wcaic to avoid theme clashes. */
.wcaic {
	--wcaic-accent: #7f54b3;
	--wcaic-header: #7f54b3;
	--wcaic-radius: 18px;
	--wcaic-x: 20px;
	--wcaic-y: 20px;
	--wcaic-w: 380px;
	--wcaic-h: 600px;
	--wcaic-bg: #ffffff;
	--wcaic-surface: #f5f5f7;
	--wcaic-fg: #1d1d1f;
	--wcaic-muted: #6e6e73;
	--wcaic-border: #e5e5ea;
	--wcaic-shadow: 0 18px 50px rgba(17, 17, 26, .18), 0 2px 8px rgba(17, 17, 26, .08);
	--wcaic-wa: #25d366;
	position: fixed;
	bottom: var(--wcaic-y);
	z-index: 999990;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--wcaic-fg);
	-webkit-font-smoothing: antialiased;
}
.wcaic *, .wcaic *::before, .wcaic *::after { box-sizing: border-box; }
.wcaic-font-system { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
.wcaic-font-theme { font-family: inherit; }
.wcaic-pos-right { right: var(--wcaic-x); }
.wcaic-pos-left { left: var(--wcaic-x); }
.wcaic-size-compact { --wcaic-w: 340px; --wcaic-h: 520px; }
.wcaic-size-large { --wcaic-w: 430px; --wcaic-h: 680px; }

.wcaic-theme-dark {
	--wcaic-bg: #18181c; --wcaic-surface: #26262d; --wcaic-fg: #f2f2f5; --wcaic-muted: #a1a1aa; --wcaic-border: #34343c;
	--wcaic-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
@media (prefers-color-scheme: dark) {
	.wcaic-theme-auto {
		--wcaic-bg: #18181c; --wcaic-surface: #26262d; --wcaic-fg: #f2f2f5; --wcaic-muted: #a1a1aa; --wcaic-border: #34343c;
		--wcaic-shadow: 0 18px 50px rgba(0, 0, 0, .55);
	}
}

.wcaic button, .wcaic input, .wcaic textarea { font: inherit; color: inherit; margin: 0; }
.wcaic a { text-decoration: none; }
.wcaic-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wcaic-ico-wa { fill: currentColor; stroke: none; }
.wcaic-ico-sparkle { fill: currentColor; stroke: none; }
.wcaic :focus-visible { outline: 2px solid var(--wcaic-accent); outline-offset: 2px; }

/* ---------- Launcher ---------- */
.wcaic-launcher {
	position: relative; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
	height: 58px; min-width: 58px; padding: 0 19px; border-radius: 999px;
	background: var(--wcaic-header); color: #fff; font-weight: 600; font-size: 15px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .22); transition: transform .2s ease, box-shadow .2s ease;
}
.wcaic-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .26); }
.wcaic-launcher .wcaic-ico { width: 24px; height: 24px; }
.wcaic-launcher-icon .wcaic-launcher { width: 58px; padding: 0; justify-content: center; }
.wcaic-badge { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #ff3b30; border: 2px solid #fff; }
.wcaic.is-open .wcaic-launcher-text { display: none; }
.wcaic.is-open .wcaic-launcher { width: 58px; padding: 0; justify-content: center; }

.wcaic-teaser {
	position: absolute; bottom: 72px; display: flex; align-items: flex-start; gap: 4px; max-width: 260px;
	background: var(--wcaic-bg); border: 1px solid var(--wcaic-border); border-radius: 16px; box-shadow: var(--wcaic-shadow);
	animation: wcaic-pop .35s ease both;
}
.wcaic-pos-right .wcaic-teaser { right: 0; }
.wcaic-pos-left .wcaic-teaser { left: 0; }
.wcaic-teaser[hidden] { display: none; }
.wcaic-teaser-text { background: none; border: 0; padding: 12px 4px 12px 14px; text-align: left; cursor: pointer; font-weight: 500; }
.wcaic-teaser-x { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--wcaic-muted); }
.wcaic-teaser-x .wcaic-ico { width: 14px; height: 14px; }

/* ---------- Panel ---------- */
.wcaic-panel {
	position: absolute; bottom: 74px; width: var(--wcaic-w); height: var(--wcaic-h);
	max-width: calc(100vw - 24px); max-height: calc(100vh - 110px);
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--wcaic-bg); border-radius: var(--wcaic-radius); box-shadow: var(--wcaic-shadow);
	animation: wcaic-pop .25s ease both; transform-origin: bottom right;
}
.wcaic-pos-right .wcaic-panel { right: 0; }
.wcaic-pos-left .wcaic-panel { left: 0; transform-origin: bottom left; }
.wcaic-panel[hidden] { display: none; }
@keyframes wcaic-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wcaic-panel, .wcaic-teaser, .wcaic-row { animation: none !important; } }

.wcaic-header { display: flex; align-items: center; gap: 11px; padding: 14px 12px 14px 16px; background: var(--wcaic-header); color: #fff; }
.wcaic-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wcaic-title { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcaic-subtitle { font-size: 12.5px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.wcaic-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.wcaic-head-actions { display: flex; gap: 2px; }
.wcaic-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.wcaic-icon-btn:hover { background: rgba(255, 255, 255, .18); }
.wcaic-icon-btn .wcaic-ico { width: 18px; height: 18px; }

.wcaic-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: rgba(255, 255, 255, .22); color: #fff; }
.wcaic-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wcaic-avatar .wcaic-ico { width: 18px; height: 18px; }
.wcaic-row-bot .wcaic-avatar { width: 28px; height: 28px; background: var(--wcaic-accent); align-self: flex-end; }
.wcaic-row-bot .wcaic-avatar .wcaic-ico { width: 15px; height: 15px; }

/* ---------- Messages ---------- */
.wcaic-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; background: var(--wcaic-bg); scroll-behavior: smooth; }
.wcaic-row { display: flex; gap: 8px; animation: wcaic-pop .25s ease both; }
.wcaic-row-user { justify-content: flex-end; }
.wcaic-stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(100% - 36px); }
.wcaic-bubble { padding: 10px 13px; border-radius: calc(var(--wcaic-radius) * .85); word-wrap: break-word; max-width: 100%; }
.wcaic-bot { background: var(--wcaic-surface); border-bottom-left-radius: 6px; align-self: flex-start; }
.wcaic-user { background: var(--wcaic-accent); color: #fff; border-bottom-right-radius: 6px; max-width: 82%; white-space: pre-wrap; }
.wcaic-bubble p { margin: 0 0 6px; }
.wcaic-bubble p:last-child { margin-bottom: 0; }
.wcaic-bubble ul { margin: 4px 0 6px; padding-left: 18px; }
.wcaic-bubble li { margin: 2px 0; }
.wcaic-bubble a { color: inherit; text-decoration: underline; }
.wcaic-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.wcaic-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--wcaic-muted); animation: wcaic-blink 1.2s infinite ease-in-out; }
.wcaic-typing i:nth-child(2) { animation-delay: .15s; }
.wcaic-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes wcaic-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Product cards ---------- */
.wcaic-products { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: thin; }
.wcaic-card {
	flex: 0 0 190px; scroll-snap-align: start; display: flex; flex-direction: column;
	background: var(--wcaic-bg); border: 1px solid var(--wcaic-border); border-radius: calc(var(--wcaic-radius) * .8); overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
.wcaic-products.is-single .wcaic-card { flex: 1 1 auto; flex-direction: row; max-width: 100%; }
.wcaic-products.is-single .wcaic-card-img { width: 112px; flex: none; aspect-ratio: auto; }
.wcaic-card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--wcaic-surface); }
.wcaic-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcaic-sale { position: absolute; top: 8px; left: 8px; background: #e11d48; color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.wcaic-card-body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.wcaic-card-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; color: var(--wcaic-fg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcaic-card-name:hover { color: var(--wcaic-accent); }
.wcaic-rating { font-size: 12px; color: var(--wcaic-muted); }
.wcaic-stars { color: #f5a623; letter-spacing: 1px; }
.wcaic-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.wcaic-price strong { font-size: 15px; color: var(--wcaic-fg); }
.wcaic-price s { font-size: 12.5px; color: var(--wcaic-muted); }
.wcaic-stock { font-size: 12px; font-weight: 600; color: #c2410c; }
.wcaic-stock.is-out { color: var(--wcaic-muted); }
.wcaic-summary { font-size: 12.5px; color: var(--wcaic-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcaic-card-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.wcaic-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto;
	padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
	background: var(--wcaic-accent); color: #fff !important; font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap;
	transition: filter .15s ease, transform .1s ease;
}
.wcaic-btn:hover { filter: brightness(1.08); }
.wcaic-btn:active { transform: scale(.98); }
.wcaic-btn .wcaic-ico { width: 16px; height: 16px; }
.wcaic-btn[disabled] { opacity: .7; cursor: default; }
.wcaic-btn.is-done { background: #16a34a; }
.wcaic-btn-ghost { background: transparent; color: var(--wcaic-fg) !important; border-color: var(--wcaic-border); }
.wcaic-btn-ghost:hover { border-color: var(--wcaic-accent); color: var(--wcaic-accent) !important; filter: none; }
.wcaic-btn-wa { flex: 0 0 36px; padding: 8px; background: var(--wcaic-wa); }
.wcaic-btn-wa-full { background: var(--wcaic-wa); }
.wcaic-btn-disabled { background: var(--wcaic-surface); color: var(--wcaic-muted) !important; cursor: default; }
.wcaic-link { background: none; border: 0; color: var(--wcaic-muted); text-decoration: underline; cursor: pointer; font-size: 13px; }

/* ---------- Cart bar, contact, forms ---------- */
.wcaic-cartbar {
	display: flex; align-items: center; gap: 8px; padding: 10px; flex-wrap: wrap;
	background: var(--wcaic-surface); border: 1px solid var(--wcaic-border); border-radius: calc(var(--wcaic-radius) * .8);
	animation: wcaic-pop .25s ease both;
}
.wcaic-cartbar-info { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 100%; font-size: 13.5px; }
.wcaic-cartbar-info .wcaic-ico { width: 17px; height: 17px; color: var(--wcaic-accent); }
.wcaic-contact, .wcaic-leadform {
	display: flex; flex-direction: column; gap: 8px; padding: 13px;
	background: var(--wcaic-surface); border-radius: calc(var(--wcaic-radius) * .85); border-bottom-left-radius: 6px;
}
.wcaic-contact small, .wcaic-leadform small { color: var(--wcaic-muted); }
.wcaic-contact-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wcaic-leadform input[type="text"], .wcaic-leadform input[type="tel"], .wcaic-leadform input[type="email"] {
	width: 100%; padding: 9px 11px; border: 1px solid var(--wcaic-border); border-radius: 10px; background: var(--wcaic-bg);
}
.wcaic-consent { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--wcaic-muted); }
.wcaic-form-actions { display: flex; align-items: center; gap: 12px; }
.wcaic-form-actions .wcaic-btn { flex: 0 1 auto; }
.wcaic-form-error { color: #dc2626; font-size: 12.5px; margin: 0; }

/* ---------- Footer ---------- */
.wcaic-footer { border-top: 1px solid var(--wcaic-border); background: var(--wcaic-bg); padding: 8px 10px 6px; }
.wcaic-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.wcaic-chips:empty { display: none; }
.wcaic-chip {
	flex: none; border: 1px solid var(--wcaic-accent); color: var(--wcaic-accent); background: transparent;
	border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.wcaic-chip:hover { background: var(--wcaic-accent); color: #fff; }
.wcaic-composer { display: flex; align-items: flex-end; gap: 8px; background: var(--wcaic-surface); border-radius: 14px; padding: 6px 6px 6px 12px; }
.wcaic-input { flex: 1; resize: none; border: 0; background: transparent; outline: none; padding: 7px 0; max-height: 120px; line-height: 1.4; }
.wcaic-input::placeholder { color: var(--wcaic-muted); }
.wcaic-send { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--wcaic-accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.wcaic-send[disabled] { opacity: .5; cursor: default; }
.wcaic-send .wcaic-ico { width: 18px; height: 18px; }
.wcaic-note { text-align: center; font-size: 10.5px; color: var(--wcaic-muted); padding-top: 5px; }

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
	.wcaic { bottom: max(12px, var(--wcaic-y)); }
	.wcaic-pos-right { right: 12px; }
	.wcaic-pos-left { left: 12px; }
	.wcaic-launcher { height: 54px; min-width: 54px; }
	.wcaic.is-open .wcaic-launcher { display: none; }
	.wcaic-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; bottom: 0; }
	.wcaic-card { flex-basis: 170px; }
}
