/* پلاس ابر باران - ویجت سرچ ایجکسی محصولات */

.abrbaran-search-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
}

.abrbaran-search-box {
	display: flex;
	align-items: center;
	height: 46px;
	background-color: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
}

.abrbaran-search-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	color: #999;
	flex-shrink: 0;
	line-height: 1;
}

.abrbaran-search-input {
	flex-grow: 1;
	width: 100%;
	height: 100%;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	padding: 0 15px;
	color: #333;
}

.abrbaran-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 100%;
	width: 50px;
	border: none;
	background-color: #e63946;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color .2s ease;
	line-height: 1;
	padding: 0 10px;
}

.abrbaran-search-submit:hover {
	background-color: #c1121f;
}

/* اسکین: کلاسیک - آیکون سمت راست داخل کادر، بدون دکمه مجزا در ظاهر پیش‌فرض */
.abrbaran-skin-classic .abrbaran-search-box {
	flex-direction: row-reverse;
}

/* اسکین: دکمه چسبیده */
.abrbaran-skin-button-attached .abrbaran-search-box {
	border-radius: 8px;
}
.abrbaran-skin-button-attached .abrbaran-search-icon {
	display: none;
}

/* اسکین: مینیمال با خط زیر */
.abrbaran-skin-minimal-underline .abrbaran-search-box {
	border: none;
	border-bottom: 2px solid #ddd;
	border-radius: 0;
	background: transparent;
}
.abrbaran-skin-minimal-underline .abrbaran-search-submit {
	background: transparent;
	color: #333;
	width: 40px;
}
.abrbaran-skin-minimal-underline .abrbaran-search-submit:hover {
	background: transparent;
	opacity: .7;
}

/* اسکین: کپسولی */
.abrbaran-skin-rounded-pill .abrbaran-search-box {
	border-radius: 999px;
}
.abrbaran-skin-rounded-pill .abrbaran-search-submit {
	border-radius: 999px;
	margin: 4px;
	width: auto;
	padding: 0 16px;
	height: calc(100% - 8px);
}

/* باکس نتایج */
.abrbaran-search-results {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-start: 0;
	width: 100%;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
	z-index: 9999;
	overflow: hidden;
}

.abrbaran-search-results-list {
	max-height: 420px;
	overflow-y: auto;
}

.abrbaran-search-spinner {
	width: 26px;
	height: 26px;
	margin: 20px auto;
	border: 3px solid rgba(0, 0, 0, .1);
	border-top-color: #e63946;
	border-radius: 50%;
	animation: abrbaran-spin .7s linear infinite;
}

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

.abrbaran-search-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 15px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color .2s ease;
}

.abrbaran-search-item:hover {
	background-color: #f7f7f7;
}

.abrbaran-search-item-image {
	width: 55px;
	height: 55px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	background-color: #f2f2f2;
}

.abrbaran-search-item-info {
	flex-grow: 1;
	min-width: 0;
}

.abrbaran-search-item-title {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	color: #222;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.abrbaran-search-item-price {
	display: block;
	font-size: 13px;
	color: #e63946;
}

.abrbaran-search-item-price bdi,
.abrbaran-search-item-price ins,
.abrbaran-search-item-price del {
	all: unset;
}

.abrbaran-search-badge {
	display: inline-block;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 20px;
	background-color: #999;
	color: #fff;
	flex-shrink: 0;
	margin-inline-start: auto;
}

.abrbaran-search-empty {
	text-align: center;
	padding: 24px 15px;
	color: #888;
	font-size: 13.5px;
}

.abrbaran-search-view-all {
	display: block;
	text-align: center;
	padding: 12px;
	background-color: #222;
	color: #fff;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
}

@media (max-width: 480px) {
	.abrbaran-search-results {
		position: fixed;
		top: auto;
		left: 10px;
		right: 10px;
		width: auto;
	}
}
