.amin-live-search,
.amin-live-search__panel {
	--als-accent: #f74506;
	--als-accent-dark: #d63c05;
	--als-accent-deep: #b83304;
	--als-accent-soft: rgba(247, 69, 6, 0.14);
	--als-accent-mist: #fff4f0;
	--als-accent-tint: #ffece6;
	--als-text: #1c2434;
	--als-muted: #8b95a7;
	--als-line: #eef1f6;
	--als-chip: #f4f6fa;
	--als-danger: #e11d48;
	--als-ok: #16a34a;
	--als-shadow: 0 18px 50px rgba(247, 69, 6, 0.12);
	font-family: Vazirmatn, Tahoma, Arial, sans-serif;
	text-align: right;
	direction: rtl;
}

.amin-live-search {
	position: relative;
	width: 100%;
	max-width: 100%;
	z-index: 50;
}

.amin-live-search *,
.amin-live-search *::before,
.amin-live-search *::after,
.amin-live-search__panel *,
.amin-live-search__panel *::before,
.amin-live-search__panel *::after {
	box-sizing: border-box;
}

.elementor-widget-shortcode .amin-live-search,
.elementor-shortcode .amin-live-search {
	width: 100%;
}

.elementor-element:has(.amin-live-search),
.elementor-widget:has(.amin-live-search),
.elementor-widget-container:has(.amin-live-search) {
	overflow: visible !important;
}

.amin-live-search .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.amin-live-search__form {
	margin: 0;
}

.amin-live-search__field {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 52px;
	padding: 5px 6px 5px 5px;
	border: 1px solid #e8edf3;
	border-radius: 999px;
	background: #f4f6f8;
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.amin-live-search.is-focused .amin-live-search__field,
.amin-live-search__field:focus-within {
	background: #fff;
	border-color: #ffd0c2;
	box-shadow: 0 0 0 4px var(--als-accent-soft);
}

.amin-live-search input.amin-live-search__input,
.amin-live-search input.amin-live-search__input[type="search"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0 16px 0 8px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	color: var(--als-text);
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 42px;
	-webkit-appearance: none;
	appearance: none;
}

.amin-live-search input.amin-live-search__input::placeholder {
	color: #9aa3b2;
	font-weight: 400;
	opacity: 1;
}

.amin-live-search input.amin-live-search__input::-webkit-search-decoration,
.amin-live-search input.amin-live-search__input::-webkit-search-cancel-button,
.amin-live-search input.amin-live-search__input::-webkit-search-results-button,
.amin-live-search input.amin-live-search__input::-webkit-search-results-decoration {
	display: none;
	-webkit-appearance: none;
}

.amin-live-search__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #e8edf3;
	color: #6b7287;
	cursor: pointer;
	flex: 0 0 auto;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.amin-live-search__clear[hidden] {
	display: none !important;
}

.amin-live-search__clear:hover {
	background: #dce3ec;
	color: var(--als-text);
}

.amin-live-search__clear svg {
	width: 13px;
	height: 13px;
}

.amin-live-search__submit,
.elementor-element .amin-live-search__submit,
.elementor-widget .amin-live-search__submit,
.elementor-widget-shortcode .amin-live-search__submit {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--als-accent) !important;
	color: #fff !important;
	cursor: pointer;
	flex: 0 0 42px;
	box-shadow: 0 8px 16px rgba(247, 69, 6, 0.28) !important;
	transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.amin-live-search__submit:hover,
.amin-live-search__submit:focus-visible,
.elementor-element .amin-live-search__submit:hover {
	background: var(--als-accent-dark) !important;
	box-shadow: 0 10px 18px rgba(184, 51, 4, 0.32) !important;
	transform: translateY(-1px);
}

.amin-live-search__submit:active {
	transform: translateY(0);
}

.amin-live-search__submit svg {
	width: 18px;
	height: 18px;
	display: block;
}

.amin-live-search.is-loading .amin-live-search__icon--search,
.amin-live-search__icon[hidden] {
	display: none;
}

.amin-live-search.is-loading .amin-live-search__icon--spin {
	display: block;
}

.amin-live-search__icon--spin svg {
	animation: amin-live-spin 0.7s linear infinite;
}

.amin-live-search__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	left: 0;
	width: 100%;
	min-width: 0;
	height: auto;
	min-height: 0;
	padding: 0;
	border: 1px solid #ffe0d4;
	border-radius: 22px;
	background: #fff;
	box-shadow: var(--als-shadow);
	overflow: hidden;
	z-index: 99999;
	opacity: 0;
	transform: translateY(-6px) scale(0.985);
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.amin-live-search__panel.is-open,
.amin-live-search.is-open .amin-live-search__panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.amin-live-search__panel[hidden] {
	display: none !important;
}

.amin-live-search__panel.is-fixed {
	position: fixed;
	margin: 0;
	height: auto !important;
	bottom: auto !important;
}

.amin-live-search__panel-inner {
	width: 100%;
	max-height: min(70vh, 540px);
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #ffd0c2 transparent;
}

.amin-live-search__panel-inner::-webkit-scrollbar {
	width: 8px;
}

.amin-live-search__panel-inner::-webkit-scrollbar-thumb {
	background: #d5dbe6;
	border-radius: 8px;
}

.amin-live-search__hint,
.amin-live-search__empty {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 16px 18px;
	color: var(--als-muted);
	text-align: center;
}

.amin-live-search__empty {
	flex-direction: column;
	padding: 22px 18px;
}

.amin-live-search__empty-icon,
.amin-live-search__hint-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	border-radius: 12px;
	background: var(--als-accent-tint);
	color: var(--als-accent);
}

.amin-live-search__empty-icon {
	width: 48px;
	height: 48px;
	flex-basis: 48px;
	border-radius: 14px;
}

.amin-live-search__empty-icon svg,
.amin-live-search__hint-icon svg {
	width: 18px;
	height: 18px;
}

.amin-live-search__empty-icon svg {
	width: 22px;
	height: 22px;
}

.amin-live-search__empty strong,
.amin-live-search__hint strong {
	display: block;
	width: auto;
	max-width: 100%;
	color: var(--als-text);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.7;
}

.amin-live-search__empty span,
.amin-live-search__hint span:not(.amin-live-search__hint-icon):not(.amin-live-search__empty-icon) {
	font-size: 12.5px;
	line-height: 1.8;
}

.amin-live-search__section {
	padding: 12px 10px 6px;
}

.amin-live-search__section + .amin-live-search__section {
	border-top: 1px solid var(--als-line);
}

.amin-live-search__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 10px 10px;
}

.amin-live-search__section-head h3 {
	margin: 0;
	color: #647187;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: -0.2px;
}

.amin-live-search__count,
.amin-live-search__clear-recent {
	border: 0;
	background: none;
	color: var(--als-accent);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

.amin-live-search__count {
	color: #90a0b5;
	cursor: default;
}

.amin-live-search__list {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amin-live-search__item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 9px 10px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.amin-live-search__item:hover,
.amin-live-search__item.is-active {
	background: var(--als-accent-mist);
	text-decoration: none;
	color: inherit;
}

.amin-live-search__thumb {
	position: relative;
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	border: 1px solid #eef2f7;
	border-radius: 14px;
	background: #f7f9fc;
	overflow: hidden;
}

.amin-live-search__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.amin-live-search__badge {
	position: absolute;
	top: 5px;
	right: 5px;
	padding: 2px 6px;
	border-radius: 999px;
	background: var(--als-danger);
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	line-height: 1.4;
}

.amin-live-search__body {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	gap: 3px;
}

.amin-live-search__title {
	margin: 0;
	color: var(--als-text);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.55;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.amin-live-search__title mark {
	background: #ffe0d4;
	color: var(--als-accent-deep);
	padding: 0 2px;
	border-radius: 4px;
}

.amin-live-search__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--als-muted);
	font-size: 11.5px;
}

.amin-live-search__dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #c5cedb;
}

.amin-live-search__stock {
	color: var(--als-ok);
	font-weight: 700;
}

.amin-live-search__stock.is-out {
	color: var(--als-danger);
}

.amin-live-search__price {
	flex: 0 0 auto;
	color: var(--als-text);
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	text-align: left;
}

.amin-live-search__price del {
	display: block;
	color: #9aa3b2;
	font-size: 11px;
	font-weight: 500;
	text-decoration: line-through;
}

.amin-live-search__price ins {
	text-decoration: none;
	color: var(--als-danger);
}

.amin-live-search__price .woocommerce-Price-amount {
	font-weight: 800;
}

.amin-live-search__icon-wrap,
.amin-live-search__swatch {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 12px;
	background: var(--als-accent-tint);
	color: var(--als-accent);
	overflow: hidden;
	border: 1px solid transparent;
}

.amin-live-search__icon-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.amin-live-search__icon-wrap svg {
	width: 18px;
	height: 18px;
}

.amin-live-search__swatch {
	border-color: #e6ebf2;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.amin-live-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 10px 12px;
}

.amin-live-search__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 8px 12px;
	border: 1px solid #e7edf5;
	border-radius: 999px;
	background: var(--als-chip);
	color: var(--als-text);
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.amin-live-search__chip:hover,
.amin-live-search__chip.is-active {
	background: #fff;
	border-color: #ffc4b0;
	color: var(--als-accent);
	text-decoration: none;
	transform: translateY(-1px);
}

.amin-live-search__chip-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.08);
	flex: 0 0 12px;
}

.amin-live-search__chip-count {
	color: var(--als-muted);
	font-size: 11px;
	font-weight: 600;
}

.amin-live-search__footer {
	position: sticky;
	bottom: 0;
	padding: 10px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), #fff 28%);
}

.amin-live-search__all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	border-radius: 14px;
	background: var(--als-accent-mist);
	color: var(--als-accent);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 800;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.amin-live-search__all:hover,
.amin-live-search__all.is-active {
	background: var(--als-accent);
	color: #fff;
	text-decoration: none;
}

.amin-live-search__all svg {
	width: 16px;
	height: 16px;
}

.amin-live-search__skeleton {
	display: grid;
	gap: 8px;
	padding: 12px;
}

.amin-live-search__skel-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
}

.amin-live-search__skel-box,
.amin-live-search__skel-line {
	background: linear-gradient(90deg, #f1f4f8 25%, #e7edf5 50%, #f1f4f8 75%);
	background-size: 200% 100%;
	animation: amin-live-shimmer 1.1s ease infinite;
	border-radius: 10px;
}

.amin-live-search__skel-box {
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	border-radius: 14px;
}

.amin-live-search__skel-lines {
	flex: 1;
	display: grid;
	gap: 8px;
}

.amin-live-search__skel-line {
	height: 10px;
}

.amin-live-search__skel-line.is-short {
	width: 46%;
}

@keyframes amin-live-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes amin-live-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

@media (max-width: 720px) {
	.amin-live-search__field {
		height: 48px;
	}

	.amin-live-search__submit,
	.amin-live-search input.amin-live-search__input,
	.amin-live-search input.amin-live-search__input[type="search"] {
		height: 38px;
		line-height: 38px;
	}

	.amin-live-search__submit {
		width: 38px;
		flex-basis: 38px;
	}

	.amin-live-search__panel-inner {
		max-height: min(62vh, 460px);
	}

	.amin-live-search__price {
		font-size: 12px;
	}

	.amin-live-search__thumb {
		width: 46px;
		height: 46px;
		flex-basis: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amin-live-search__field,
	.amin-live-search__panel,
	.amin-live-search__item,
	.amin-live-search__submit,
	.amin-live-search__icon--spin svg,
	.amin-live-search__skel-box,
	.amin-live-search__skel-line {
		animation: none !important;
		transition: none !important;
	}
}
