.asb-chat {
	position: relative;
	--asb-primary: #2271b1;
	--asb-width: 100%;
	--asb-height: 480px;
	width: var(--asb-width);
	max-width: 100%;
	border: 1px solid #ddd;
	border-radius: 12px;
	overflow: hidden;
	font-size: 15px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
}
/* Fill mode: stretch to the parent section. Give the parent a height. */
.asb-chat--fill {
	height: 100%;
	min-height: 320px;
}
.asb-chat__header {
	background: var(--asb-primary);
	color: #fff;
	padding: 12px 16px;
	font-weight: 600;
	flex: 0 0 auto;
}
.asb-chat__messages {
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafafa;
	height: var(--asb-height);
	flex: 0 0 auto;
}
.asb-chat--fill .asb-chat__messages {
	height: auto;
	flex: 1 1 auto;
	min-height: 0;
}
@media (max-width: 782px) {
	.asb-chat:not(.asb-chat--fill) .asb-chat__messages {
		height: var(--asb-height-mobile, var(--asb-height));
	}
}
.asb-msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.asb-msg--user {
	align-self: flex-end;
	background: var(--asb-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.asb-msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-bottom-left-radius: 4px;
}
/* Bubbles containing cards span the full width and stack their parts. */
.asb-msg--cards {
	white-space: normal;
	width: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 14px;
}
.asb-msg__text {
	white-space: pre-wrap;
}
.asb-msg--bot a {
	color: var(--asb-primary);
	text-decoration: underline;
}
/* Highlighted key values (order IDs, prices, statuses…). */
.asb-msg--bot strong,
.asb-msg--bot code {
	background: #f0f0f1; /* fallback */
	background: color-mix(in srgb, var(--asb-primary) 12%, #fff);
	color: var(--asb-primary);
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 5px;
	font-family: inherit;
	font-size: inherit;
}
.asb-msg--typing {
	align-self: flex-start;
	color: #555;
	font-weight: 700;
	background: transparent;
	border: 0;
	animation: asbPulse 1.2s ease-in-out infinite;
}
@keyframes asbPulse {
	0%, 100% { opacity: 0.45; }
	50% { opacity: 1; }
}

/* ---------- Product card grid (2 per row) ---------- */
.asb-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
@media (max-width: 640px) {
	.asb-products {
		grid-template-columns: 1fr;
	}
}

/* ---------- Product card ---------- */
.asb-product {
	display: flex;
	gap: 10px;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	padding: 10px;
	text-decoration: none !important;
	color: inherit;
	transition: box-shadow 0.15s, border-color 0.15s;
	min-width: 0;
}
.asb-product:hover {
	border-color: var(--asb-primary);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
.asb-product__img {
	width: 64px;
	height: 64px;
	flex: 0 0 64px;
	object-fit: cover;
	border-radius: 8px;
	background: #f2f2f2;
}
.asb-product__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.asb-product__title {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	color: #1d2327;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.asb-product__price {
	color: var(--asb-primary);
	font-weight: 700;
	font-size: 14px;
}
.asb-product__price s {
	color: #999;
	font-weight: 400;
	margin-right: 6px;
}
.asb-product__stock {
	font-size: 12px;
	font-weight: 600;
}
.asb-product__stock--in { color: #00a32a; }
.asb-product__stock--out { color: #b32d2e; }
.asb-product__cta {
	margin-top: 1px;
	font-size: 12px;
	color: var(--asb-primary);
	font-weight: 600;
}

/* ---------- Coupon chip ---------- */
.asb-coupon {
	max-width: 420px;
	border: 2px dashed var(--asb-primary);
	border-radius: 12px;
	background: #fafafa; /* fallback */
	background: color-mix(in srgb, var(--asb-primary) 6%, #fff);
	padding: 10px 14px;
}
.asb-coupon__label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #777;
	margin-bottom: 4px;
}
.asb-coupon__row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.asb-coupon__code {
	font-family: monospace;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--asb-primary);
	flex: 1;
	word-break: break-all;
}
.asb-coupon__copy {
	border: 0;
	background: var(--asb-primary);
	color: #fff;
	padding: 6px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}
.asb-coupon__copy:hover { opacity: 0.9; }
.asb-coupon__desc {
	font-size: 13px;
	color: #555;
	margin-top: 5px;
}

/* ---------- Input row ---------- */
.asb-chat__form {
	display: flex;
	border-top: 1px solid #e3e3e3;
	margin: 0;
	flex: 0 0 auto;
}
.asb-chat__input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	padding: 12px 14px;
	font-size: 15px;
	outline: none;
	background: #fff;
	box-shadow: none !important;
	border-radius: 0;
}
.asb-chat__send {
	border: 0;
	background: var(--asb-primary);
	color: #fff;
	padding: 0 22px;
	cursor: pointer;
	font-size: 15px;
	border-radius: 0;
}
.asb-chat__send:disabled {
	opacity: 0.6;
	cursor: default;
}
.asb-chat__footnote {
	font-size: 11px;
	color: #999;
	text-align: center;
	padding: 6px;
	background: #fff;
	flex: 0 0 auto;
}

/* ---------- Suggested question chips ---------- */
.asb-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-self: flex-start;
	max-width: 95%;
}
.asb-suggestion {
	border: 1px solid var(--asb-primary);
	color: var(--asb-primary);
	background: #fff;
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13px;
	line-height: 1.3;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s, color 0.15s;
}
.asb-suggestion:hover {
	background: var(--asb-primary);
	color: #fff;
}

/* ---------- Lead capture (inline chat bubble form) ---------- */
.asb-gatecard {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 640px;
	white-space: normal;
	padding: 12px 14px;
}
.asb-gate-name,
.asb-gate-email {
	flex: 1 1 170px;
	min-width: 0;
	border: 1px solid #ccc !important;
	border-radius: 8px !important;
	padding: 9px 12px !important;
	font-size: 14px !important;
	background: #fff !important;
	box-sizing: border-box;
	box-shadow: none !important;
}
.asb-gate-name:focus,
.asb-gate-email:focus {
	border-color: var(--asb-primary) !important;
	outline: none;
}
.asb-gate-start {
	flex: 0 0 auto;
	border: 0;
	background: var(--asb-primary);
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.asb-gate-start:hover { opacity: 0.92; }
.asb-gate-start:disabled { opacity: 0.6; cursor: default; }
.asb-gate-error {
	flex-basis: 100%;
	color: #b32d2e;
	font-size: 13px;
}
@media (max-width: 640px) {
	.asb-gatecard {
		flex-direction: column;
		align-items: stretch;
	}
	.asb-gate-name,
	.asb-gate-email {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* ---------- Header (close button support) ---------- */
.asb-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.asb-chat__close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	opacity: 0.9;
}
.asb-chat__close:hover { opacity: 1; }

/* ---------- Floating bubble ---------- */
.asb-bubble-wrap {
	position: fixed;
	bottom: 20px;
	z-index: 99998;
}
.asb-bubble-wrap--br { right: 20px; }
.asb-bubble-wrap--bl { left: 20px; }
.asb-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	background: var(--asb-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
	padding: 0;
	overflow: hidden;
}
.asb-bubble:hover { transform: scale(1.06); }
.asb-bubble svg { width: 30px; height: 30px; }
.asb-bubble img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
.asb-float {
	display: none;
	position: absolute;
	bottom: 74px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: min(620px, calc(100vh - 140px));
}
.asb-bubble-wrap--br .asb-float { right: 0; }
.asb-bubble-wrap--bl .asb-float { left: 0; }
.asb-bubble-wrap--open .asb-float {
	display: block;
	animation: asbFloatIn 0.18s ease-out;
}
@keyframes asbFloatIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
.asb-float .asb-chat { height: 100%; }
@media (max-width: 480px) {
	.asb-bubble-wrap { bottom: 12px; }
	.asb-bubble-wrap--br { right: 12px; }
	.asb-bubble-wrap--bl { left: 12px; }
	.asb-bubble { width: 54px; height: 54px; }
}

/* ---------- Card cell (caption + card) ---------- */
.asb-products > .asb-cell {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.asb-cell__caption {
	font-size: 13px;
	color: #444;
	line-height: 1.35;
}
.asb-cell .asb-product {
	flex: 1;
}
/* A lone card spans the full row. */
.asb-products .asb-cell:only-child,
.asb-products .asb-product:only-child {
	grid-column: 1 / -1;
	max-width: 520px;
}
