/* StudentGroup AI Search - Frontend */
.search-product-wrapper.sgai-active .product-row {
	display: block !important;
	padding: 0 !important;
}

.sgai-results {
	direction: rtl;
	text-align: right;
	max-height: 65vh;
	overflow-y: auto;
	padding: 8px 0;
}

.sgai-supplier-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border-bottom: 1px solid #eee;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s ease;
}

.sgai-supplier-row:hover {
	background: #fafafa;
	text-decoration: none;
	color: inherit;
}

.sgai-supplier-row:last-child {
	border-bottom: none;
}

.sgai-thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sgai-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sgai-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e5e5, #f5f5f5);
}

.sgai-body {
	flex: 1;
	min-width: 0;
}

.sgai-supplier-name {
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 4px;
	color: #222;
}

.sgai-coupon {
	background: #fff8e1;
	border-right: 3px solid #ffb300;
	padding: 6px 10px;
	border-radius: 4px;
	margin: 6px 0;
	font-size: 13px;
}

.sgai-coupon-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sgai-coupon-head strong {
	color: #6d4c00;
	font-size: 13px;
	line-height: 1.3;
}

.sgai-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 600;
}

.sgai-badge-exclusive {
	background: #d32f2f;
	color: #fff;
}

.sgai-coupon-code-wrap {
	font-size: 12px;
	margin-top: 4px;
	color: #555;
}

.sgai-coupon-code {
	display: inline-block;
	background: #fff;
	border: 1px dashed #ffb300;
	padding: 2px 8px;
	border-radius: 4px;
	font-family: monospace;
	font-weight: 700;
	color: #222;
	margin-inline-start: 4px;
}

.sgai-matches {
	list-style: none;
	padding: 0;
	margin: 6px 0 0 0;
	font-size: 12px;
	color: #666;
}

.sgai-matches li {
	margin: 0;
	padding: 2px 0;
}

.sgai-matches a {
	color: #666;
	text-decoration: none;
}

.sgai-matches a:hover {
	text-decoration: underline;
}

.sgai-cta {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 4px;
	color: #0066cc;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.sgai-cta i {
	font-size: 11px;
}

@media (max-width: 767px) {
	.sgai-supplier-row {
		gap: 10px;
		padding: 10px 12px;
	}
	.sgai-thumb {
		flex: 0 0 48px;
		width: 48px;
		height: 48px;
	}
	.sgai-supplier-name {
		font-size: 14px;
	}
	.sgai-cta {
		display: none;
	}
}
