/* amg-instant-search — custom as-you-type dropdown. On-brand (ink/amber, Nunito
   inherited). Sitewide; scoped to .amg-is-* so it can't leak into the theme. */

/* Suppress the Searchanise autocomplete panel — our dropdown wins. */
#snize-instant-search-results,
.snize-ac-results,
.snize-instant-search-results { display: none !important; }

/* a11y live region */
.amg-is-live {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------------- desktop panel ---------------- */
.amg-is-panel {
	position: fixed; z-index: 2147483000; display: none;
	background: #fff; border: 1px solid #ece9e3; border-radius: 14px;
	box-shadow: 0 18px 48px rgba(25,10,3,.16), 0 2px 8px rgba(25,10,3,.06);
	overflow-y: auto; overscroll-behavior: contain;
	font-family: inherit; color: #190a03; -webkit-font-smoothing: antialiased;
}
.amg-is-panel.is-open { display: block; }
.amg-is-panel__in { padding: 8px; }

/* ---------------- sections ---------------- */
.amg-is-sec { padding: 4px 4px 6px; }
.amg-is-sec + .amg-is-sec { border-top: 1px solid #f1eee8; margin-top: 2px; padding-top: 8px; }
.amg-is-sec__hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 8px; }
.amg-is-sec__hd > span {
	font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #a39d92;
}
.amg-is-clear {
	appearance: none !important; -webkit-appearance: none !important; background: none !important;
	border: 0 !important; box-shadow: none !important; min-height: 0 !important; border-radius: 0 !important;
	cursor: pointer; color: #190a03; font: inherit; font-size: 12.5px; font-weight: 700; padding: 2px 4px;
}
.amg-is-clear:hover { color: #b06d10; text-decoration: underline; }

.amg-is-panel b, .amg-is-ov b { font-weight: 800; color: #190a03; }

/* ---------------- products ---------------- */
.amg-is-prods { display: flex; flex-direction: column; }
.amg-is-prod {
	display: flex; gap: 12px; align-items: center; padding: 8px;
	border-radius: 10px; text-decoration: none; color: #190a03; transition: background .12s;
}
.amg-is-prod:hover, .amg-is-prod.is-hl { background: #fff7e6; }
.amg-is-prod__img {
	width: 52px; height: 52px; flex: none; border-radius: 9px; object-fit: contain;
	background: #f7f5f0; border: 1px solid #efece6; display: inline-flex; align-items: center; justify-content: center;
}
.amg-is-prod__img--ph { color: #cfc8bb; }
.amg-is-prod__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.amg-is-prod__name {
	font-size: 13.5px; line-height: 1.3; font-weight: 600; color: #2a2017;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.amg-is-prod__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.amg-is-prod__price { font-size: 13.5px; font-weight: 800; color: #190a03; font-variant-numeric: tabular-nums; }
.amg-is-prod__price--soft { font-size: 12.5px; font-weight: 700; color: #6b6b6b; }
.amg-is-prod__stock { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #2e7d32; }
.amg-is-prod__stock--out { color: #a0978c; }
.amg-is-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------- categories ---------------- */
.amg-is-cats { display: flex; flex-direction: column; }
.amg-is-cat {
	display: flex; align-items: center; gap: 10px; padding: 9px 8px;
	border-radius: 9px; text-decoration: none; color: #3a342c; transition: background .12s;
}
.amg-is-cat:hover, .amg-is-cat.is-hl { background: #fff7e6; }
.amg-is-cat > svg { flex: none; color: #b3ada2; }
.amg-is-cat__t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amg-is-cat__n { font-style: normal; font-size: 12px; color: #a39d92; font-variant-numeric: tabular-nums; flex: none; }

/* ---------------- chips (popular / brands) ---------------- */
.amg-is-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 4px 6px; }
.amg-is-chip {
	display: inline-flex; align-items: center; min-height: 34px; padding: 7px 14px;
	border: 1px solid #e6e2da; border-radius: 999px; background: #fff;
	color: #3a342c; font-size: 13px; font-weight: 600; text-decoration: none;
	transition: border-color .12s, background .12s, color .12s;
}
.amg-is-chip:hover, .amg-is-chip.is-hl { border-color: #ffba00; background: #fff7e6; color: #b06d10; }

/* ---------------- recent searches: compact chips (AliExpress-style history tags) ---------------- */
.amg-is-recents { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 4px 6px; }
.amg-is-recent {
	display: inline-flex; align-items: center; max-width: 230px;
	background: #f2efe9; border: 1px solid #e7e2d8; border-radius: 999px;
	transition: background .12s, border-color .12s;
}
.amg-is-recent:hover, .amg-is-recent:has(.is-hl) { background: #fff7e6; border-color: #ffd980; }
.amg-is-recent__q {
	min-width: 0; display: inline-flex; align-items: center; gap: 0;
	padding: 5px 3px 5px 12px; text-decoration: none; color: #4a443b; font-size: 13px; font-weight: 500; border-radius: 999px;
}
.amg-is-recent__q:hover, .amg-is-recent__q.is-hl { background: transparent; }
.amg-is-recent__q > svg { display: none; }
.amg-is-recent__q > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amg-is-recent__x {
	appearance: none !important; -webkit-appearance: none !important; background: none !important;
	border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
	min-width: 0 !important; min-height: 0 !important;
	cursor: pointer; color: #a39c8f; padding: 0 8px 0 2px; display: inline-flex; align-items: center; flex: none; transition: color .12s;
}
.amg-is-recent__x:hover { color: #e8762d !important; background: none !important; }
.amg-is-recent__x svg { width: 12px; height: 12px; }

/* ---------------- footer CTA ---------------- */
.amg-is-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	margin: 6px 4px 2px; padding: 12px 14px; border-radius: 11px;
	background: #fff7e6; border: 1px solid #ffe2a6; color: #190a03;
	font-size: 13.5px; font-weight: 800; text-decoration: none; transition: background .12s, border-color .12s;
}
.amg-is-cta:hover, .amg-is-cta.is-hl { background: #ffba00; border-color: #ffba00; }
.amg-is-cta > svg { flex: none; }

/* ---------------- empty / skeleton ---------------- */
.amg-is-empty { padding: 18px 10px 8px; text-align: center; color: #6b6b6b; font-size: 13.5px; }
.amg-is-empty p { margin: 0; }
.amg-is-prod--sk { pointer-events: none; }
.amg-is-sk {
	display: block; border-radius: 8px;
	background: linear-gradient(90deg, #f2efe9 25%, #e9e6df 37%, #f2efe9 63%);
	background-size: 480px 100%; animation: amgissh 1.2s infinite linear;
}
.amg-is-sk--img { width: 52px; height: 52px; flex: none; }
.amg-is-sk--line { height: 12px; width: 80%; margin: 3px 0; }
.amg-is-sk--line.short { width: 45%; }
@keyframes amgissh { 0% { background-position: -240px 0; } 100% { background-position: 240px 0; } }

/* ---------------- mobile takeover overlay ---------------- */
.amg-is-ov {
	position: fixed; inset: 0; z-index: 2147483001; display: none; flex-direction: column;
	background: #fff; font-family: inherit; color: #190a03; -webkit-font-smoothing: antialiased;
}
.amg-is-ov.is-open { display: flex; }
html.amg-is-lock, html.amg-is-lock body { overflow: hidden !important; }
.amg-is-ov__bar {
	display: flex; align-items: center; gap: 8px; flex: none;
	padding: calc(8px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid #f0ede7;
}
.amg-is-ov__back {
	appearance: none; background: none; border: 0; width: 44px; height: 44px; flex: none; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; color: #190a03; border-radius: 10px;
}
.amg-is-ov__back:active { background: #f3f0ea; }
.amg-is-ov__field {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
	background: #f6f4ef; border: 1px solid #ece9e3; border-radius: 12px; padding: 0 10px;
}
.amg-is-ov__field > svg { flex: none; color: #b3ada2; }
/* type=search input + !important: defeat theme `input[type=search]` rules (else 14px → iOS focus-zoom) */
.amg-is-ov input.amg-is-ov__input {
	flex: 1; min-width: 0; border: 0; background: none; outline: none; font-family: inherit;
	font-weight: 600; font-size: 16px !important; line-height: 1.3; padding: 12px 4px; color: #190a03;
	-webkit-appearance: none; appearance: none; border-radius: 0;
}
.amg-is-ov input.amg-is-ov__input::-webkit-search-cancel-button { display: none; }
.amg-is-ov__clear {
	appearance: none; background: none; border: 0; cursor: pointer; color: #b3ada2;
	width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center;
}
.amg-is-ov__body {
	flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
	padding: 6px 8px calc(40px + env(safe-area-inset-bottom));
}
/* ≥44px touch targets on mobile */
.amg-is-ov .amg-is-prod { padding: 11px 8px; }
.amg-is-ov .amg-is-prod__img { width: 56px; height: 56px; }
.amg-is-ov .amg-is-cat { min-height: 48px; }
.amg-is-ov .amg-is-recent__q { min-height: 30px; }
.amg-is-ov .amg-is-chip { min-height: 44px; padding-left: 16px; padding-right: 16px; }
.amg-is-ov .amg-is-cta { position: sticky; bottom: 0; }

@media (prefers-reduced-motion: reduce) {
	.amg-is-sk { animation: none; }
	.amg-is-prod, .amg-is-cat, .amg-is-chip, .amg-is-recent__q, .amg-is-cta, .amg-is-recent__x { transition: none; }
}
