.bq-rag-search {
	max-width: 680px;
	margin: 0 auto 2rem;
	font-family: var(--font-body, 'Lato', sans-serif);
}

.bq-rag-input-wrap {
	display: flex;
	gap: 8px;
}

.bq-input-field {
	position: relative;
	flex: 1;
	min-width: 0;
}

.bq-rag-input {
	width: 100%;
	padding: 12px 36px 12px 16px;
	border: 2px solid var(--teal, #0e6d73);
	border-radius: 6px;
	font-size: 1rem;
	outline: none;
	transition: border-color .2s;
	box-sizing: border-box;
}

.bq-input-clear {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #aaa;
	cursor: pointer;
	font-size: .85rem;
	line-height: 1;
	padding: 4px;
	transition: color .15s;
}

.bq-input-clear:hover {
	color: #444;
}

.bq-rag-input:focus {
	border-color: var(--teal-dark, #084f54);
}

.bq-rag-btn {
	padding: 12px 24px;
	background: var(--teal, #0e6d73);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s;
	white-space: nowrap;
}

.bq-rag-btn:hover:not(:disabled) {
	background: var(--teal-dark, #084f54);
}

.bq-rag-btn:disabled {
	opacity: .65;
	cursor: not-allowed;
}

/* Resultados */
.bq-rag-results {
	margin-top: 1.5rem;
}

/* AI answer bubble — chat-bubble style, visually differentiated */
.bq-rag-answer {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: var(--teal-pale, #ddf0f1);
	border-radius: 0 10px 10px 10px;
	padding: 12px 14px;
	font-size: .88rem;
	line-height: 1.6;
	margin-bottom: 12px;
	color: #1a1a1a;
	position: relative;
}

/* AI sparkle icon prefix — decorative, not an image */
.bq-rag-answer::before {
	content: '✦';
	flex-shrink: 0;
	font-size: .85rem;
	color: var(--teal, #0e6d73);
	margin-top: 1px;
	line-height: 1.6;
}

.bq-rag-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

.bq-rag-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}

.bq-rag-card:hover {
	box-shadow: 0 4px 16px rgba(14,109,115,.18);
	transform: translateY(-2px);
}

.bq-rag-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

.bq-rag-card img,
.bq-rag-card__no-img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background: var(--cream, #f7f4ef);
}

.bq-rag-card__body {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bq-rag-card__name {
	font-size: .85rem;
	font-weight: 600;
	margin: 0 0 4px;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bq-rag-card__price {
	font-size: .9rem;
	color: var(--teal-dark, #084f54);
	font-weight: 700;
	margin: 0;
}

/* Add to cart button */
.bq-rag-card__add {
	width: 100%;
	padding: 8px 12px;
	background: var(--teal, #0e6d73);
	color: #fff;
	border: none;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .03em;
	cursor: pointer;
	transition: background .2s;
	position: relative;
}

.bq-rag-card__add:hover:not(:disabled) {
	background: var(--teal-dark, #084f54);
}

.bq-rag-card__add:disabled {
	opacity: .7;
	cursor: not-allowed;
}

.bq-rag-card__add.is-added {
	background: #00a32a;
}

.bq-rag-card__add.is-loading {
	color: transparent;
}

.bq-rag-card__add.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bqSpin .65s linear infinite;
}

/* Loading dots */
.bq-rag-loading {
	display: flex;
	gap: 6px;
	padding: 16px 0;
}

.bq-rag-loading span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--teal, #0e6d73);
	animation: bqBounce .9s infinite ease-in-out;
}

.bq-rag-loading span:nth-child(2) { animation-delay: .15s; }
.bq-rag-loading span:nth-child(3) { animation-delay: .30s; }

@keyframes bqBounce {
	0%, 80%, 100% { transform: scale(0); opacity: .4; }
	40%            { transform: scale(1); opacity: 1;   }
}

.bq-rag-error {
	color: #c0392b;
	font-size: .9rem;
}

/* No results empty state */
.bq-no-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 24px 16px;
	text-align: center;
	color: #666;
}

.bq-no-results svg {
	opacity: .35;
}

.bq-no-results p {
	margin: 0;
	font-size: .88rem;
	font-weight: 600;
	color: #444;
}

.bq-no-results small {
	font-size: .78rem;
	color: #888;
}

@media (max-width: 480px) {
	.bq-rag-input-wrap {
		flex-direction: column;
	}

	.bq-rag-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── Floating widget ──────────────────────────────────────── */
.bq-float-widget {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 9999;
	font-family: var(--font-body, 'Lato', sans-serif);
}

.bq-float-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: linear-gradient(135deg, var(--teal, #0e6d73) 0%, #12909a 100%);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(14,109,115,.45);
	transition: transform .2s, box-shadow .2s;
	position: relative;
	overflow: hidden;
}

/* Shimmer effect */
.bq-float-trigger::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.18) 50%, transparent 100%);
	transform: translateX(-100%);
	animation: bqShimmer 3s infinite 1s;
}

@keyframes bqShimmer {
	0%   { transform: translateX(-100%); }
	40%  { transform: translateX(100%); }
	100% { transform: translateX(100%); }
}

.bq-sparkle-icon {
	animation: bqSparkle 2.5s infinite ease-in-out;
	flex-shrink: 0;
}

@keyframes bqSparkle {
	0%, 100% { transform: scale(1) rotate(0deg);   opacity: 1;   }
	50%       { transform: scale(1.25) rotate(15deg); opacity: .85; }
}

.bq-float-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 28px rgba(14,109,115,.55);
}

.bq-float-trigger[aria-expanded="true"] {
	border-radius: 50px 50px 0 50px;
	background: linear-gradient(135deg, var(--teal-dark, #084f54) 0%, var(--teal, #0e6d73) 100%);
}

/* Panel */
.bq-float-panel {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 0;
	width: 360px;
	background: #fff;
	border-radius: 12px 12px 12px 0;
	box-shadow: 0 8px 40px rgba(0,0,0,.18);
	overflow: hidden;
	animation: bqSlideUp .22s ease;
}

@keyframes bqSlideUp {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.bq-float-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 16px;
	background: linear-gradient(135deg, var(--teal-dark, #084f54) 0%, var(--teal, #0e6d73) 100%);
	color: #fff;
}

.bq-float-header-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bq-float-title {
	margin: 0;
	font-size: .9rem;
	font-weight: 700;
	letter-spacing: .02em;
}

/* Suggestion chips */
.bq-float-chips {
	background: var(--teal-pale, #ddf0f1);
	padding: 10px 14px 12px;
	border-bottom: 1px solid #c8e8e9;
}

.bq-float-chips[hidden] { display: none; }

.bq-chips-label {
	margin: 0 0 7px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--teal-dark, #084f54);
	opacity: .7;
}

.bq-chips-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bq-chip {
	padding: 5px 13px;
	border: none;
	border-radius: 50px;
	background: #fff;
	color: var(--teal-dark, #084f54);
	font-size: .78rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(14,109,115,.12);
	transition: background .15s, color .15s, box-shadow .15s;
	white-space: nowrap;
}

.bq-chip:hover {
	background: var(--teal, #0e6d73);
	color: #fff;
	box-shadow: 0 2px 8px rgba(14,109,115,.25);
}

.bq-float-close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 2px;
	display: flex;
	align-items: center;
	opacity: .8;
	transition: opacity .15s;
}

.bq-float-close:hover {
	opacity: 1;
}

.bq-float-input-wrap {
	display: flex;
	gap: 0;
	border-bottom: 1px solid #eee;
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}

.bq-float-input-wrap .bq-input-field {
	flex: 1 1 0;
	min-width: 0;
}

.bq-float-input {
	width: 100%;
	padding: 12px 34px 12px 14px;
	border: none;
	font-size: .9rem;
	outline: none;
	color: #1a1a1a;
	box-sizing: border-box;
}

.bq-float-btn {
	padding: 10px 16px;
	background: var(--teal, #0e6d73);
	color: #fff;
	border: none;
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s;
	white-space: nowrap;
	/* Loading state support */
	position: relative;
	min-width: 68px;
}

.bq-float-btn:hover:not(:disabled) {
	background: var(--teal-dark, #084f54);
}

.bq-float-btn:disabled {
	opacity: .65;
	cursor: not-allowed;
}

/* Button loading spinner — hides label text, shows spinner overlay */
.bq-float-btn.is-loading {
	color: transparent;
}

.bq-float-btn.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bqSpin .65s linear infinite;
}

@keyframes bqSpin { to { transform: rotate(360deg); } }

.bq-float-results {
	max-height: 380px;
	overflow-y: auto;
	padding: 12px;
	scroll-behavior: smooth;
	/* Custom scrollbar — thin teal-pale track */
	scrollbar-width: thin;
	scrollbar-color: var(--teal-pale, #ddf0f1) transparent;
}

.bq-float-results::-webkit-scrollbar { width: 4px; }
.bq-float-results::-webkit-scrollbar-track { background: transparent; }
.bq-float-results::-webkit-scrollbar-thumb { background: var(--teal-pale, #ddf0f1); border-radius: 4px; }

.bq-float-results .bq-rag-answer {
	font-size: .88rem;
	margin-bottom: 12px;
}

.bq-float-results .bq-rag-cards {
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.bq-float-results .bq-rag-card__name {
	font-size: .78rem;
}

.bq-float-results .bq-rag-card__price {
	font-size: .82rem;
}

@media (max-width: 480px) {
	.bq-float-widget {
		bottom: 16px;
		left: 16px;
	}

	.bq-float-panel {
		width: calc(100vw - 32px);
	}

	.bq-float-trigger span {
		display: none;
	}

	.bq-float-trigger {
		padding: 13px;
		border-radius: 50%;
	}

	.bq-float-trigger[aria-expanded="true"] {
		border-radius: 50%;
	}
}
