/* ============================================================
 * PeptidePower CRO — Algolia autocomplete card styling
 * Rich product suggestions: thumb · title · price · stock · category.
 * Scoped to the Algolia dropdown (.aa-dropdown-menu) + .ppcro-suggestion
 * markup from templates/autocomplete.php.
 * ============================================================ */

.aa-dropdown-menu {
	background: #fff;
	border: 1px solid #e6e4f0;
	border-top: none;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 18px 40px -12px rgba(38, 26, 92, .25);
	overflow: hidden;
	z-index: 1001;
}

/* Section header (PRODUCTS / PAGES) */
.aa-dropdown-menu .autocomplete-header {
	padding: 12px 16px 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #9a96b0;
	border-top: 1px solid #f0eff6;
}
.aa-dropdown-menu .aa-dataset-1 .autocomplete-header { border-top: none; }

/* Suggestion row: image left · info right, on a single row.
 * Selector intentionally specific (a.suggestion-link.ppcro-suggestion) to beat
 * the plugin's `.aa-dropdown-menu a.suggestion-link { display:block }`. */
.aa-dropdown-menu a.suggestion-link.ppcro-suggestion {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 11px 16px;
	text-decoration: none;
	color: #2b2740;
	transition: background .12s ease;
}
/* Light divider between rows */
.aa-dropdown-menu .aa-suggestion + .aa-suggestion a.suggestion-link.ppcro-suggestion {
	border-top: 1px solid #f1eef8;
}
.aa-dropdown-menu a.suggestion-link.ppcro-suggestion:hover,
.aa-dropdown-menu .aa-suggestion.aa-cursor a.suggestion-link.ppcro-suggestion {
	background: #f6f4fd;
}

/* Thumbnail */
.ppcro-suggestion__thumb {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	border: 1px solid #eceaf4;
	background: #fafafe;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ppcro-suggestion__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Body */
.ppcro-suggestion__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1 1 auto;
}
.ppcro-suggestion__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	color: #211d3b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ppcro-suggestion__title em {
	font-style: normal;
	background: linear-gradient(transparent 60%, #ece7ff 0);
	color: inherit;
}

/* Meta row: price + stock pill */
.ppcro-suggestion__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.ppcro-suggestion__price {
	font-size: 13.5px;
	font-weight: 700;
	color: #5a45c9;
}
.ppcro-suggestion__stock {
	font-size: 11px;
	font-weight: 600;
	padding: 1px 8px;
	border-radius: 20px;
	line-height: 1.6;
}
.ppcro-suggestion__stock.is-in   { color: #1c8a4d; background: #e7f6ec; }
.ppcro-suggestion__stock.is-back { color: #9a6b00; background: #fbf2dd; }
.ppcro-suggestion__stock.is-out  { color: #b03636; background: #fbe9e9; }

/* Category line */
.ppcro-suggestion__cat {
	font-size: 11.5px;
	color: #908ca6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Pages: title + snippet */
.ppcro-suggestion__content {
	font-size: 12px;
	color: #8b879f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ppcro-suggestion__content em {
	font-style: normal;
	font-weight: 700;
	color: #5a45c9;
}

/* Empty state */
.aa-dropdown-menu .autocomplete-empty {
	padding: 18px 16px;
	font-size: 13px;
	color: #8b879f;
}
.aa-dropdown-menu .autocomplete-empty .empty-query {
	font-weight: 700;
	color: #2b2740;
}

/* Mobile */
@media (max-width: 480px) {
	.ppcro-suggestion__thumb { flex-basis: 44px; width: 44px; height: 44px; }
	.ppcro-suggestion__title { white-space: normal; }
	.ppcro-suggestion__cat { display: none; }
}
