body.abb-product-search-open {
	overflow: hidden;
}

.abb-product-search-shortcode {
	display: inline-flex;
	vertical-align: middle;
	color: var(--color-primary, #004c98);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.abb-product-search-shortcode:hover,
.abb-product-search-shortcode:focus-visible {
	color: var(--color-secondary-dark, #d9a300);
	background: rgba(0, 76, 152, 0.08);
}

.abb-product-search-shortcode svg {
	width: 24px;
	height: 24px;
}

.abb-product-search-shortcode svg * {
	stroke: currentColor;
}

.abb-menu-search-item > .abb-header-action--search {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-height: 48px;
	padding: 0;
	color: var(--color-primary, #004c98);
	background: transparent;
	border-radius: 50%;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.abb-menu-search-item > .abb-header-action--search:hover,
.abb-menu-search-item > .abb-header-action--search:focus-visible {
	color: var(--color-secondary-dark, #d9a300);
	background: rgba(0, 76, 152, 0.08);
}

.abb-menu-search-item > .abb-header-action--search::before,
.abb-menu-search-item > .abb-header-action--search::after {
	display: none !important;
}

.abb-menu-search-item > .abb-header-action--search svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.abb-menu-search-item > .abb-header-action--search svg * {
	stroke: currentColor;
}

.abb-product-search-modal[hidden] {
	display: none !important;
}

.abb-product-search-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow-x: hidden;
	overflow-y: auto;
	direction: rtl;
	color: #403f3e;
	background: rgba(10, 24, 40, 0.35);
	opacity: 0;
	transition: opacity 0.18s ease;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.abb-product-search-modal.is-open {
	opacity: 1;
}

.abb-product-search-modal__panel {
	width: 100%;
	min-height: 100%;
	background: #f7f8fa;
	transform: translateY(-12px);
	transition: transform 0.18s ease;
}

.abb-product-search-modal.is-open .abb-product-search-modal__panel {
	transform: translateY(0);
}

.abb-product-search-modal__toolbar {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: max(18px, env(safe-area-inset-top)) 24px 18px;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid #e4e7eb;
	box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.abb-product-search-modal__toolbar-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 52px;
	gap: 14px;
	width: min(100%, 1280px);
	margin-inline: auto;
}

.abb-product-search-form {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
}

.abb-product-search-form__input {
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 56px 0 52px;
	color: #253447;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	background: #fff;
	border: 1px solid #cad3df;
	border-radius: 14px;
	box-shadow: none;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
}

.abb-product-search-form__input:focus {
	border-color: var(--color-primary, #004c98);
	box-shadow: 0 0 0 4px rgba(0, 76, 152, 0.12);
}

.abb-product-search-form__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.abb-product-search-form__icon {
	position: absolute;
	right: 18px;
	z-index: 1;
	display: flex;
	width: 24px;
	height: 24px;
	color: var(--color-primary, #004c98);
	pointer-events: none;
}

.abb-product-search-form__icon svg {
	width: 100%;
	height: 100%;
}

.abb-product-search-form__spinner {
	position: absolute;
	left: 18px;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0, 76, 152, 0.18);
	border-top-color: var(--color-primary, #004c98);
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	animation: abb-product-search-spin 0.7s linear infinite;
}

.abb-product-search-modal.is-loading .abb-product-search-form__spinner {
	opacity: 1;
}

.abb-product-search-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	align-self: center;
	padding: 0;
	color: #253447;
	background: #eef2f6;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.abb-product-search-modal__close:hover,
.abb-product-search-modal__close:focus-visible {
	color: #fff;
	background: var(--color-primary, #004c98);
	transform: rotate(4deg);
}

.abb-product-search-modal__close svg {
	width: 23px;
	height: 23px;
}

.abb-product-search-modal__body {
	width: min(100% - 48px, 1280px);
	margin-inline: auto;
	padding: 28px 0 max(56px, env(safe-area-inset-bottom));
}

.abb-product-search-status {
	min-height: 28px;
	margin: 0 0 20px;
	color: #697789;
	font-size: 14px;
	line-height: 1.9;
}

.wcsf-live-search-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcsf-live-product {
	min-width: 0;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e1e6ec;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(20, 33, 61, 0.06);
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wcsf-live-product:hover,
.wcsf-live-product:focus-within {
	border-color: rgba(0, 76, 152, 0.35);
	box-shadow: 0 16px 38px rgba(20, 33, 61, 0.12);
	transform: translateY(-3px);
}

.wcsf-live-product > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.wcsf-live-product-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	width:100%;
	background: #f0f2f5;
	overflow: hidden;
}

.wcsf-live-product-media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	transition: transform 0.35s ease;
}

.wcsf-live-product:hover .wcsf-live-product-media img {
	transform: scale(1.035);
}

.wcsf-live-product-details {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 18px;
}

.wcsf-live-product-title {
	display: -webkit-box;
	min-height: 52px;
	color: #2f3d4e;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.75;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.wcsf-live-product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: var(--color-primary, #004c98);
	font-size: 14px;
	font-weight: 750;
	line-height: 1.8;
}

.wcsf-live-product-price del {
	color: #98a2ad;
	font-size: 12px;
	font-weight: 500;
	opacity: 1;
}

.wcsf-live-product-price ins {
	color: var(--color-primary, #004c98);
	background: transparent;
	text-decoration: none;
}

.wcsf-live-product-stock {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #667383;
	font-size: 12px;
	font-weight: 650;
}

.wcsf-live-product-stock::before {
	width: 7px;
	height: 7px;
	background: currentColor;
	border-radius: 50%;
	content: "";
}

.wcsf-live-product-stock.is-in-stock {
	color: #18864b;
}

.wcsf-live-product-stock.is-out-of-stock {
	color: #b73535;
}

@keyframes abb-product-search-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 1100px) {
	.wcsf-live-search-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.abb-product-search-modal__toolbar {
		padding-inline: 16px;
	}

	.abb-product-search-modal__body {
		width: min(100% - 32px, 1280px);
		padding-top: 22px;
	}

	.wcsf-live-search-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 520px) {
	.abb-product-search-shortcode {
		width: 48px;
		height: 48px;
		min-height: 48px;
		justify-content: center;
		padding: 0;
	}

	.abb-menu-search-item > .abb-header-action--search {
		width: 100%;
		min-height: 50px;
		justify-content: flex-start;
		padding-inline: 8px;
		border-radius: 8px;
	}

	.abb-menu-search-item > .abb-header-action--search::after {
		display: inline !important;
		margin-right: 10px;
		font-size: 14px;
		font-weight: 650;
		content: "جست‌وجوی محصولات";
	}

	.abb-product-search-modal__toolbar-inner {
		grid-template-columns: minmax(0, 1fr) 46px;
		gap: 9px;
	}

	.abb-product-search-form__input {
		height: 52px;
		padding-right: 48px;
		padding-left: 42px;
		font-size: 14px;
	}

	.abb-product-search-form__icon {
		right: 15px;
		width: 21px;
		height: 21px;
	}

	.abb-product-search-form__spinner {
		left: 13px;
	}

	.abb-product-search-modal__close {
		width: 46px;
		height: 46px;
	}

	.wcsf-live-search-list {
		grid-template-columns: 1fr;
	}

	.wcsf-live-product > a {
		flex-direction: row;
	}

	.wcsf-live-product-media {
		width: 112px;
		min-width: 112px;
		aspect-ratio: 1;
	}

	.wcsf-live-product-details {
		padding: 13px;
	}

	.wcsf-live-product-title {
		min-height: 0;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abb-product-search-modal,
	.abb-product-search-modal__panel,
	.wcsf-live-product,
	.wcsf-live-product-media img {
		transition: none;
	}
}
