/**
 * Luxe Search – رنگ‌ها از primary سایت (WoodMart: --wd-primary-color یا --ks-primary)
 */

/* ========== متغیرها – رنگ accent از primary تم ========== */
body .wd-search-form.wd-header-search-form.wd-display-form,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form {
	--luxe-bg: #ffffff;
	--luxe-text: #1a1a1a;
	--luxe-accent: var(--wd-primary-color, var(--ks-primary, #8b7355));
	--luxe-accent-2: color-mix(in srgb, var(--luxe-accent) 65%, white);
	--luxe-accent-soft: color-mix(in srgb, var(--luxe-accent) 8%, transparent);
	--luxe-accent-soft-hover: color-mix(in srgb, var(--luxe-accent) 15%, transparent);
	--luxe-accent-soft-hover-2: color-mix(in srgb, var(--luxe-accent) 12%, transparent);
	--luxe-border: rgba(0, 0, 0, 0.06);
	--luxe-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
	--luxe-shadow-focus: 0 0 0 3px var(--luxe-accent-soft), 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* ========== wrapper و فرم ========== */
/* قالب WoodMart: پیش‌فرض ارتفاع فرم 46px، min-width اینپوت 290px */
body .wd-search-form.wd-header-search-form.wd-display-form,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form {
	position: relative;
	width: 100%;
	max-width: 860px;
	flex: 1 1 auto;
	min-width: 0;
	align-self: center;
	margin: 0;
	padding: 0;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform.wd-style-default,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform.wd-style-default {
	position: relative;
	display: flex !important;
	flex-direction: row;
	align-items: center;
	background: #ffffff !important;
	border: 1px solid rgba(0, 0, 0, 0.06) !important;
	border-radius: 12px !important;
	padding: 0 6px 0 16px !important;
	height: 44px !important;
	min-height: 44px !important;
	transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03) !important;
	--wd-form-bg: #ffffff !important;
	--wd-form-color: #1a1a1a !important;
	--wd-form-placeholder-color: var(--luxe-accent-2) !important;
	--wd-form-brd-color: rgba(0, 0, 0, 0.06) !important;
	--wd-form-brd-color-focus: var(--luxe-accent) !important;
	--wd-form-height: 44px !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform:focus-within,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform:focus-within {
	border-color: var(--luxe-accent) !important;
	box-shadow: var(--luxe-shadow-focus) !important;
	transform: translateY(-1px);
}

/* فقط یک آیکون جستجو (روی دکمه) – آیکون تکراری داخل باکس حذف شد برای RTL */
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform::before,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform::before {
	content: none !important;
	display: none !important;
}

/* فیلد متنی – بدون فضای آیکون اضافه (RTL: دکمه سمت چپ، یک آیکون) */
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s,
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].wd-search-inited,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].wd-search-inited {
	flex: 1;
	min-width: 380px;
	background: transparent !important;
	border: none !important;
	outline: none !important;
	font-size: 14px !important;
	font-weight: 400;
	letter-spacing: 0.01em;
	color: #1a1a1a !important;
	height: 100%;
	padding: 0 8px !important;
	padding-inline-start: 12px !important;
	/* فضای دکمه پاک + دکمه ارسال (RTL: سمت چپ) */
	padding-inline-end: 72px !important;
	box-shadow: none !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s::placeholder,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s::placeholder {
	color: var(--luxe-accent-2) !important;
	font-weight: 300;
	letter-spacing: 0.04em;
	opacity: 1;
}

/* دکمه پاک */
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search {
	position: static !important;
	top: auto !important;
	inset-inline-end: auto !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px !important;
	height: 26px !important;
	min-height: 26px !important;
	border-radius: 50% !important;
	background: var(--luxe-accent-soft) !important;
	margin-inline-end: 6px;
	transition: opacity 0.25s ease, background 0.25s ease;
	opacity: 0.6;
	color: #1a1a1a !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search::before,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search::before {
	color: inherit !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search:hover {
	opacity: 1;
	background: var(--luxe-accent-soft-hover) !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search.wd-hide,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .wd-clear-search.wd-hide {
	display: none !important;
}

/* دکمه ارسال – فقط آیکون، بدون مربع؛ رنگ کمرنگ */
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit {
	position: static !important;
	inset-block: auto !important;
	inset-inline-end: auto !important;
	width: 36px !important;
	height: 36px !important;
	min-height: 36px !important;
	border-radius: 0 !important;
	border: none !important;
	background: transparent !important;
	color: inherit !important;
	box-shadow: none !important;
	padding: 0 !important;
	font-size: 0 !important;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:hover {
	transform: scale(1.06);
	opacity: 0.85;
	background: transparent !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:active,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:active {
	transform: scale(0.98);
}

/* آیکون جستجو کمرنگ، بدون پس‌زمینه */
body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit::after,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit::after {
	color: var(--luxe-accent-2) !important;
	font-size: 17px !important;
	opacity: 0.9;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:hover::after,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit:hover::after {
	color: var(--luxe-accent) !important;
	opacity: 1;
}

body .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit span,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform .searchsubmit span {
	display: none !important;
}

/* ========== دراپ‌داون نتایج – سفید و سایه دمو ========== */
body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results-wrapper,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results-wrapper {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1100;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.wd-dropdown-results,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.wd-dropdown-results {
	background: #ffffff !important;
	border-radius: 0 0 18px 18px !important;
	overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
	border: 1px solid rgba(0, 0, 0, 0.06) !important;
	border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
	max-height: 420px;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px) scale(0.98);
	transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0.35s,
	            transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.wd-dropdown-results.wd-opened,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.wd-dropdown-results.wd-opened {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .luxe-smart-wrapper,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .luxe-smart-wrapper {
	display: none;
	flex: 1;
	overflow-y: auto;
	min-height: 0;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.luxe-suggestions-visible .wd-scroll-content,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.luxe-suggestions-visible .wd-scroll-content {
	display: none !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.luxe-suggestions-visible .luxe-smart-wrapper,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results.luxe-suggestions-visible .luxe-smart-wrapper {
	display: block;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .wd-scroll-content,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .wd-scroll-content {
	overflow-y: auto;
	flex: 1;
	padding: 4px 8px 8px;
	scroll-behavior: smooth;
	background: #ffffff !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .wd-scroll-content::-webkit-scrollbar {
	width: 4px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-results .wd-scroll-content::-webkit-scrollbar-thumb {
	background: var(--luxe-accent-2);
	border-radius: 4px;
	opacity: 0.5;
}

/* آیتم پیشنهاد – مثل دمو */
body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-suggestions .wd-suggestions-group,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-suggestions .wd-suggestions-group {
	display: block;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion {
	display: flex !important;
	align-items: center;
	gap: 16px;
	padding: 12px;
	border-radius: 14px;
	transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	line-height: 1.3;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion:hover {
	background: var(--luxe-accent-soft) !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-thumb,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-thumb {
	width: 52px !important;
	min-width: 52px !important;
	height: 52px !important;
	border-radius: 12px !important;
	flex-shrink: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-thumb img,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion:hover .wd-suggestion-thumb,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion:hover .wd-suggestion-thumb {
	transform: scale(1.06);
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-content,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion-content {
	flex: 1;
	min-width: 0;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .wd-entities-title,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .wd-entities-title {
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0.01em;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #1a1a1a !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .wd-entities-title strong,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .wd-entities-title strong {
	color: #1a1a1a !important;
}

/* قیمت – رنگ اکسن قهوه‌ای دمو */
body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price,
body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price .woocommerce-Price-amount,
body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price .amount bdi,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price .woocommerce-Price-amount,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price .amount bdi {
	font-size: 15px !important;
	font-weight: 500 !important;
	color: var(--luxe-accent) !important;
	letter-spacing: 0.02em;
	margin-top: 2px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price del .amount,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price del .amount {
	color: var(--luxe-accent-2) !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price ins .amount,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-suggestion .price ins .amount {
	color: var(--luxe-accent) !important;
}

/* لینک مشاهده همه نتایج – مثل دمو */
body .wd-search-form.wd-header-search-form.wd-display-form .wd-all-results,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-all-results {
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 12px 20px !important;
	border-top: 1px solid var(--luxe-accent-soft) !important;
	font-size: 12px !important;
	color: var(--luxe-accent) !important;
	letter-spacing: 0.06em;
	font-weight: 500 !important;
	transition: color 0.25s ease;
	text-decoration: none !important;
	text-transform: none;
	line-height: 1.4;
	background: transparent !important;
}

body .wd-search-form.wd-header-search-form.wd-display-form .wd-all-results:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-all-results:hover {
	color: #1a1a1a !important;
	background: transparent !important;
}

/* لودر */
body .wd-search-form.wd-header-search-form.wd-display-form .wd-search-loader,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .wd-search-loader {
	background-color: rgba(255, 255, 255, 0.9) !important;
/* ========== جستجوی هوشمند – پیشنهاد خالی (جستجوهای اخیر، دسته‌ها، محصول) ========== */
body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-suggestions,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-suggestions {
	padding: 4px 8px 12px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-section,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-section {
	margin-bottom: 12px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-section:last-child,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-section:last-child {
	margin-bottom: 0;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-header,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-header {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--luxe-accent-2);
	padding: 8px 4px 6px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent-item,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent-item {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 20px;
	background: var(--luxe-accent-soft);
	color: #1a1a1a;
	font-size: 13px;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent-item:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-recent-item:hover {
	background: var(--luxe-accent-soft-hover-2);
	color: var(--luxe-accent);
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-categories,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-cat,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-cat {
	display: inline-block;
	padding: 10px 16px;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #1a1a1a;
	font-size: 13px;
	text-decoration: none;
	transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-cat:hover,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-cat:hover {
	border-color: var(--luxe-accent);
	background: var(--luxe-accent-soft);
	color: var(--luxe-accent);
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-products,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-products {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

body .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-product.wd-suggestion,
.whb-header .wd-search-form.wd-header-search-form.wd-display-form .luxe-smart-product.wd-suggestion {
	text-decoration: none !important;
	color: inherit;
}

	border-radius: 0 0 18px 18px;
}

@media (max-width: 1024px) {
	body .wd-search-form.wd-header-search-form.wd-display-form,
	.whb-header .wd-search-form.wd-header-search-form.wd-display-form {
		max-width: 100%;
	}

	body .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s,
	body .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].wd-search-inited,
	.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].s,
	.whb-header .wd-search-form.wd-header-search-form.wd-display-form form.searchform input[type="text"].wd-search-inited {
		min-width: 0;
	}
}
