.hib-ts-dropdown {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.16);
	font-size: 14px;
	color: #0f172a;
	z-index: 9999;
	overflow: hidden;
	display: none;
}

.hib-ts-dropdown[style*="flex"] {
	display: flex !important;
}

.hib-ts-col {
	padding: 22px 26px;
	box-sizing: border-box;
}

.hib-ts-col-popular {
	flex: 0 0 320px;
	border-right: 1px solid #f1f5f9;
}

.hib-ts-col-products {
	flex: 1 1 auto;
	max-height: 640px;
	overflow-y: auto;
	min-width: 0;
}

@media (max-width: 760px) {
	.hib-ts-dropdown {
		flex-direction: column;
	}
	/* Hide popular suggestions on mobile — screen too small to be useful */
	.hib-ts-col-popular {
		display: none;
	}
	.hib-ts-col-products {
		max-height: 72vh;
		padding: 14px 16px;
	}
}

.hib-ts-col-heading {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2563eb;
	padding-bottom: 10px;
	margin-bottom: 12px;
	border-bottom: 1px solid #e2e8f0;
}

.hib-ts-popular-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hib-ts-popular-list li {
	margin: 0;
	padding: 0;
}

.hib-ts-suggestion {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 10px 8px;
	font-size: 16px;
	color: #0f172a;
	cursor: pointer;
	text-align: left;
	border-radius: 6px;
	font-weight: 500;
}

.hib-ts-suggestion:hover,
.hib-ts-suggestion.is-active {
	background: #f1f5f9;
	color: #2563eb;
}

.hib-ts-suggestion-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	flex-shrink: 0;
}

.hib-ts-suggestion:hover .hib-ts-suggestion-icon,
.hib-ts-suggestion.is-active .hib-ts-suggestion-icon {
	color: #2563eb;
}

.hib-ts-empty-message {
	color: #64748b;
	font-size: 14px;
	padding: 8px 4px;
}

/* Product card grid (right panel) */

.hib-ts-pgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (min-width: 1100px) {
	.hib-ts-pgrid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.hib-ts-pcard {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 120ms ease-out, transform 120ms ease-out;
}

.hib-ts-pcard:hover {
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
	transform: translateY(-1px);
}

.hib-ts-pcard-link {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 14px 14px 8px;
	text-decoration: none !important;
	color: #0f172a !important;
}

.hib-ts-pcard-link:hover,
.hib-ts-pcard-link:focus,
.hib-ts-pcard-link.is-active {
	text-decoration: none !important;
	color: #0f172a !important;
}

.hib-ts-pcard-thumb {
	aspect-ratio: 1 / 1;
	background: #f8fafc;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-bottom: 10px;
}

.hib-ts-pcard-thumb img {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
}

.hib-ts-pcard-thumb-empty {
	width: 50%;
	height: 50%;
	background: #cbd5e1;
	border-radius: 8px;
	opacity: 0.4;
}

.hib-ts-pcard-title {
	font-weight: 500;
	line-height: 1.35;
	font-size: 14px;
	color: #0f172a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 6px;
}

.hib-ts-pcard-title mark {
	background: #fef08a;
	color: inherit;
	padding: 0 1px;
}

.hib-ts-pcard-sku {
	font-size: 12px;
	color: #64748b;
	margin-bottom: 6px;
}

.hib-ts-pcard-price {
	font-weight: 700;
	color: #0f172a;
	font-size: 16px;
	margin-top: auto;
}

.hib-ts-pcard-cta {
	display: block;
	margin: 0;
	padding: 10px 14px;
	background: #0f172a;
	color: #fff !important;
	text-align: center;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none !important;
	border-top: 1px solid #e2e8f0;
	transition: background 120ms ease-out;
	letter-spacing: 0.01em;
}

.hib-ts-pcard-cta:hover,
.hib-ts-pcard-cta:focus,
.hib-ts-pcard-cta.is-active {
	background: #2563eb;
	color: #fff !important;
}

/* WooCommerce's wc-add-to-cart.js toggles `added` / `loading` classes on
   .add_to_cart_button when an AJAX add fires; surface those visually. */
.hib-ts-pcard-cta.loading {
	opacity: 0.7;
	pointer-events: none;
}

.hib-ts-pcard-cta.added {
	background: #15803d;
}

.hib-ts-pcard-oos {
	opacity: 0.85;
}

/* Mobile product cards: 1-col horizontal list instead of 2-col thumb grid */
@media (max-width: 640px) {
	.hib-ts-pgrid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.hib-ts-pcard {
		flex-direction: row;
		align-items: stretch;
	}

	/* Use CSS grid so thumb spans left column and title/sku/price stack in right column
	   without needing a wrapper element in the JS-generated HTML */
	.hib-ts-pcard-link {
		display: grid;
		grid-template-columns: 60px 1fr;
		grid-template-rows: auto auto auto;
		align-items: start;
		column-gap: 12px;
		row-gap: 2px;
		padding: 10px 12px;
		flex: 1;
	}

	.hib-ts-pcard-thumb {
		grid-column: 1;
		grid-row: 1 / 4;
		align-self: center;
		width: 60px;
		height: 60px;
		aspect-ratio: 1 / 1;
		margin-bottom: 0;
	}

	.hib-ts-pcard-title {
		grid-column: 2;
		grid-row: 1;
		font-size: 13px;
		margin-bottom: 0;
		-webkit-line-clamp: 2;
	}

	.hib-ts-pcard-sku {
		grid-column: 2;
		grid-row: 2;
		font-size: 11px;
		margin-bottom: 0;
	}

	.hib-ts-pcard-price {
		grid-column: 2;
		grid-row: 3;
		font-size: 14px;
		margin-top: 0;
	}

	.hib-ts-pcard-cta {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0 14px;
		border-top: 0;
		border-left: 1px solid #e2e8f0;
		font-size: 12px;
		min-width: 68px;
		border-radius: 0 8px 8px 0;
	}
}
