.ags-search-wrap {
	--ags-primary: #9c1f5c;
	--ags-border-radius: 14px;
	--ags-text: #16181c;
	--ags-muted: #6b7280;
	--ags-divider: #eef0f2;
	--ags-hover: #f7f8fa;
	--ags-title: #767676;

	position: relative;
	width: 100%;
	max-width: 682px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.ags-search-wrap * {
	box-sizing: border-box;
}

.ags-search-box {
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid var(--ags-divider);
	border-radius: var(--ags-border-radius);
	padding: 2px 6px 2px 20px;
	transition: border-radius 0.1s ease;
}

.ags-search-wrap.is-open .ags-search-box {
	border-radius: var(--ags-border-radius) var(--ags-border-radius) 0 0;
	border-bottom-color: var(--ags-divider);
}

.ags-search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0!important;
	outline: none;
	background: transparent;
	box-shadow: none;
	font-size: 16px;
	color: var(--ags-text);
	padding: 12px 0;
}

.ags-search-input::placeholder {
	color: #9aa0a6;
}

.ags-search-btn,
.ags-clear-btn {
	padding:0!important;
	box-shadow: none;
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 10px;
	color: var(--ags-primary);
	cursor: pointer;
}

.ags-clear-btn {
	color: #9aa0a6;
	width: 32px;
	height: 32px;
}

.ags-search-btn:hover,
.ags-clear-btn:hover {
	background: var(--ags-hover);
}

.ags-hidden {
	display: none !important;
}

.ags-results-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: #fff;
	border: 2px solid var(--ags-divider);
	border-top: none;
	border-radius: 0 0 var(--ags-border-radius) var(--ags-border-radius);
	box-shadow: 0 16px 32px rgba(16, 24, 40, 0.08);
	max-height: 75vh;
	overflow-y: auto;
	z-index: 9999;
}

.ags-section {
	border-top: 1px solid var(--ags-divider);
	padding: 6px 0;
}

.ags-section.ags-no-divider {
	border-top: none;
}

.ags-item {
	display: block;
	padding: 10px 20px;
	color: var(--ags-text);
	font-size: 15px;
	text-decoration: none;
	line-height: 1.4;
}

.ags-item:hover {
	background: var(--ags-hover);
}

.ags-item strong {
	font-weight: 700;
}

.ags-advice-header {
	padding: 12px 20px 2px;
	font-weight: 700;
	font-size: 15px;
	color: var(--ags-text);
}

.ags-product-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 20px;
	text-decoration: none;
}

.ags-product-item:hover {
	background: var(--ags-hover);
}

.ags-product-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f6f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8.5' cy='8.5' r='2' fill='%23c7ccd1'/%3E%3Cpath d='M4 18l4.5-5.5L12 16l3-3.5L20 18H4z' fill='%23c7ccd1'/%3E%3C/svg%3E") no-repeat center/50% 50%;
}

.ags-product-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ags-product-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ags-product-title {
	color: var(--ags-title);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.ags-product-title strong {
	font-weight: 800;
}

.ags-product-rating-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.ags-product-reviews {
	color: var(--ags-primary);
	text-decoration: none;
}

.ags-product-reviews:hover {
	text-decoration: underline;
}

.ags-product-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--ags-text);
}

/* Circular badge-style partial-fill star rating */
.ags-stars {
	position: relative;
	display: inline-block;
	width: 90px;
	height: 18px;
	line-height: 0;
}

.ags-star-row {
	display: block;
	width: 90px;
	height: 18px;
}

.ags-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	height: 18px;
}

.ags-loading,
.ags-no-results {
	padding: 18px 20px;
	font-size: 14px;
	color: var(--ags-muted);
	text-align: center;
}

@media (max-width: 480px) {
	.ags-search-input {
		font-size: 15px;
	}
}
