/**
 * TheGoodWine — Custom Algolia Autocomplete Styles
 *
 * Enqueue this in your theme's functions.php, e.g.:
 *
 *   add_action( 'wp_enqueue_scripts', function() {
 *       wp_enqueue_style(
 *           'tgw-algolia-autocomplete',
 *           get_stylesheet_directory_uri() . '/algolia/autocomplete.css',
 *           [ 'algolia-autocomplete' ]
 *       );
 *   } );
 */

/* ── Dropdown container ───────────────────────────────────────────── */
.aa-dropdown-menu {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-top: none;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	z-index: 9999;
}

/* ── Section header ───────────────────────────────────────────────── */
.autocomplete-header {
	padding: 8px 14px 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #999;
	border-bottom: 1px solid #f0f0f0;
}

/* ── Individual suggestion row ────────────────────────────────────── */
.aa-suggestion {
	padding: 0;
	border-bottom: 1px solid #f5f5f5;
}

.aa-suggestion:last-child {
	border-bottom: none;
}

.aa-suggestion.aa-cursor {
	background: #f9f6f0;
}

/* ── Suggestion link (the whole clickable row) ────────────────────── */
.tgw-suggestion-link {
	display: flex !important;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s ease;
}

.tgw-suggestion-link:hover {
	background: #f9f6f0;
	text-decoration: none;
	color: inherit;
}

/* ── Product image ────────────────────────────────────────────────── */
.tgw-suggestion-image {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border-radius: 3px;
	background: #f5f5f5;
}

.tgw-suggestion-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tgw-suggestion-no-image {
	width: 56px;
	height: 56px;
	background: #efefef;
}

/* ── Text details block ───────────────────────────────────────────── */
.tgw-suggestion-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

/* ── Product title ────────────────────────────────────────────────── */
.tgw-suggestion-title {
	display: block;
	font-family: 'RockwellStd-Bold';
	font-size: 15px;
	color: #2C2C2E;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.tgw-suggestion-title em {
	font-style: normal;
	background: #FFF;
	border-radius: 2px;
	font-family: 'RockwellStd-Bold';
}

/* ── Description excerpt ──────────────────────────────────────────── */
.tgw-suggestion-excerpt {
	display: block;
	font-size: 13px;
	color: #999;
	font-family: "Open Sans";
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-height: 1.4;
}

.tgw-suggestion-excerpt em {
	font-style: normal;
	background: #FFF;
	border-radius: 2px;
}

/* ── Price ────────────────────────────────────────────────────────── */
.tgw-suggestion-price {
	display: block;
	font-family: "Open Sans";
	font-size: 13px;
	color: #666;
	margin-top: 2px;
}

.tgw-suggestion-price s,
.tgw-price-regular s {
	color: #aaa;
	text-decoration: line-through;
	margin-right: 4px;
}

.tgw-price-sale {
	color: #c0392b;
	font-weight: 600;
}

.tgw-price-separator {
	margin: 0 2px;
	color: #aaa;
}

/* ── No-results message ───────────────────────────────────────────── */
.autocomplete-empty {
	padding: 14px;
	color: #888;
	font-size: 13px;
}

.empty-query {
	font-style: italic;
}

