/*
Whiteplate — Header chrome (U1 + 0.35 Janebi STRUCTURE)
Version: 0.36.15
Brand Book: white search-first header, GREEN accents, ORANGE cart badge.
0.36.15 — more gap search↔menu; RTL inline-start align; mobile burger below promo at scroll 0.
0.36.14 — sticky-logo hide wins over .site-logo a flex (dual logo fix).
0.36.13 — hide sticky-logo until stick (0.36.12 flex rule had shown dual logos).
0.36.12 — 3-col RTL: logo | (search + main mega under it) | tools; remove hot links;
          logo fills stacked center; mobile hamburger icon-only; menu baseline align.
0.36.2 — compact sticky header on scroll (html/body.wp-header-compact / .is-scrolled).
0.36.8 — taller header logo (fills row minus ~4px top/bottom); compact still shrinks.
0.36.10 — WoodMart AJAX dropdown: force 1-col (.wd-suggestions-group was auto-fit 3-col).
0.36.11 — Missing product thumbs: always emit .wd-suggestion-thumb with placeholder img.
*/

/* ---- Site-wide canvas + typography ------------------------------------ */
html {
	direction: rtl;
}
body {
	background: var(--wp-bg, #F7F5F0);
	color: var(--wp-body, #4A4338);
	font-family: var(--wp-font) !important;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

/* ---- Kill Marketplace leftover rows ----------------------------------- */
/* Top bar + Digikala-red bottom row: mega bar is the real secondary nav.
   Account/wishlist nodes are relocated into general-header by app.js. */
.whb-top-bar,
.whb-header-bottom,
.whb-row.whb-header-bottom {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* Collapse reserved WHB row heights (hidden rows still inflate --wd-header-h).
   0.33.8 moved #wp-mega inside .whb-main-header. Sticky prep takes main out of
   flow — without mega in the offset, content slides under the chrome.
   Measured DEV (:19080): desk gen~65 + mega bar~63 = 128; mob gen+search~110
   (mega bar height 0 — hamburger is position:fixed corner). */
:root {
	--wd-top-bar-h: 0px !important;
	--wd-top-bar-sm-h: 0px !important;
	--wd-top-bar-sticky-h: 0px !important;
	--wd-top-bar-brd-w: 0px !important;
	--wd-header-bottom-h: 0px !important;
	--wd-header-bottom-sm-h: 0px !important;
	--wd-header-bottom-sticky-h: 0px !important;
	--wd-header-bottom-brd-w: 0px !important;
	--wd-header-general-h: 104px !important;
	--wd-header-general-sm-h: 58px !important;
	--wd-header-general-sticky-h: 86px !important;
	/* Desktop: mega lives under search inside general row (0.36.12). */
	--wp-mega-bar-h: 0px;
	--wp-header-center-stack-h: 94px; /* search 46 + gap 8 + menu ~40 */
	/* Mobile fixed hamburger: offset below live promo (JS syncs; CSS fallback). */
	--wp-promo-bar-offset: 0px;
	--wp-header-offset: calc(var(--wd-header-general-h) + var(--wd-header-brd-w));
	/* Critical: WHB sticky spacer uses --wd-header-h. */
	--wd-header-h: var(--wp-header-offset) !important;
	--wd-header-sticky-h: var(--wp-header-offset) !important;
	--wd-header-sm-h: var(--wd-header-general-sm-h) !important;
	--wd-header-brd-w: 1px !important;
}

/* Hide secondary nav spans that still say «منو بصورت اشتباه…» if WHB lags. */
.wd-header-secondary-nav > span:only-child {
	display: none !important;
}

/* ---- Main header: white marketplace chrome ---------------------------- */
.whb-header,
.whb-main-header {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}

/* Sticky prep: WoodMart pulls .whb-main-header out of flow (absolute/fixed).
   Keep a full-height placeholder on .whb-header so page content clears
   general + mega. Do NOT apply to .whb-main-header (must stay height:auto
   so mega is not clipped — see app.css 0.33.8). */
.whb-header.whb-sticky-prepared {
	height: var(--wd-header-h) !important;
	min-height: var(--wd-header-h) !important;
}

.whb-general-header.whb-with-bg,
.whb-general-header,
.whb-main-header .whb-general-header {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-bottom: 1px solid var(--wp-line, #E5E0D6) !important;
	box-shadow: none !important;
	color: var(--wp-ink, #333333) !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0;
}

.whb-general-header .whb-general-header-inner,
.whb-general-header .whb-flex-row {
	align-items: flex-start !important;
	gap: 12px;
	min-height: 0;
	padding-block: 6px 4px;
	margin: 0 !important;
	transition: min-height .28s ease, padding-block .28s ease, gap .28s ease;
}

/* Empty / hidden WHB rows must not leave a phantom band under general-header. */
.whb-header .whb-row.whb-top-bar,
.whb-header .whb-row.whb-header-bottom,
.whb-main-header > .whb-row.whb-top-bar,
.whb-main-header > .whb-row.whb-header-bottom {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	line-height: 0 !important;
	font-size: 0 !important;
}

.whb-general-header .wd-tools-element > a,
.whb-general-header .wd-tools-text,
.whb-general-header .wd-header-my-account a,
.whb-general-header .wd-header-wishlist a,
.whb-general-header .wd-header-cart a,
.whb-general-header .info-box-title,
.whb-general-header .info-box-content,
.whb-general-header .info-box-content a {
	color: var(--wp-ink, #333333) !important;
}

.whb-general-header .wd-tools-element > a:hover,
.whb-general-header .info-box-content a:hover {
	color: var(--wp-emerald, #687049) !important;
}

/* Support phone infobox — out of header (cleaner marketplace chrome). */
.whb-general-header .info-box-wrapper,
.whb-general-header .wd-info-box,
.whb-22ppxhwz1fmql3xltum9 {
	display: none !important;
}

/* WHB spacer wedges next to search — reclaim width for the form. */
.whb-general-header .whb-space-element {
	display: none !important;
	width: 0 !important;
	min-width: 0 !important;
}

/* Logo was inverted for dark header — undo on light chrome. */
.whb-general-header .site-logo img,
.whb-general-header .wd-logo img,
.whb-color-dark .site-logo img,
.whb-color-dark .wd-logo img {
	filter: none !important;
}
.whb-general-header.whb-color-light .site-logo img,
.whb-general-header.whb-color-light .wd-logo img {
	filter: none !important;
}

.whb-general-header .site-logo img,
.whb-general-header .wd-logo img {
	/* 0.36.12 — desktop height set in 3-col block to match search+menu stack */
	max-height: 64px;
	width: auto;
	object-fit: contain;
	transition: max-height .28s ease, height .28s ease;
}

/* ---- Columns: logo (R) | search+mega (C) | tools (L) — desktop ------------ */
/* Do NOT force display on .whb-visible-lg / .whb-hidden-lg — that leaks
   desktop search+tools onto mobile and breaks the compact bar. */
@media (min-width: 1025px) {
	.whb-general-header .whb-general-header-inner,
	.whb-general-header .whb-flex-row {
		align-items: stretch !important;
		width: 100%;
	}
	.whb-general-header .whb-col-left {
		flex: 0 0 auto !important;
		display: flex !important;
		align-items: center;
		align-self: stretch;
		min-height: var(--wp-header-center-stack-h);
	}
	.whb-general-header .whb-col-left .site-logo.wd-switch-logo,
	.whb-general-header .whb-col-left .wd-logo.wd-main-logo,
	.whb-general-header .whb-col-left a.wd-main-logo {
		display: flex !important;
		align-items: center;
		height: 100%;
		max-height: 100%;
	}
	/* Sticky twin must stay hidden until .whb-sticked (never force via .site-logo a). */
	.whb-general-header .wd-sticky-logo,
	.whb-general-header a.wd-sticky-logo,
	.whb-general-header .site-logo.wd-switch-logo > .wd-sticky-logo {
		display: none !important;
	}
	.whb-sticked .whb-general-header .wd-main-logo,
	.whb-sticked .whb-general-header a.wd-main-logo {
		display: none !important;
	}
	.whb-sticked .whb-general-header .wd-sticky-logo,
	.whb-sticked .whb-general-header a.wd-sticky-logo,
	.whb-sticked .whb-general-header .site-logo.wd-switch-logo > .wd-sticky-logo {
		display: flex !important;
		align-items: center;
		height: 100%;
		max-height: 100%;
	}
	/* Logo height ≈ (search + main menu) with ~4px top/bottom margins. */
	.whb-general-header .whb-col-left a.wd-main-logo img,
	.whb-general-header .whb-col-left .wd-main-logo img,
	.whb-sticked .whb-general-header a.wd-sticky-logo img,
	.whb-sticked .whb-general-header .wd-sticky-logo img {
		max-height: calc(100% - 8px);
		height: calc(100% - 8px);
		width: auto;
		object-fit: contain;
	}
	.whb-general-header .whb-col-center {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: flex-start;
		/* RTL: stack children share the same inline-start (right) edge. */
		align-items: stretch !important;
		gap: 8px;
		align-self: stretch;
	}
	/* Search + mega: full width of center, flush inline-start (no indent mismatch). */
	.whb-general-header .whb-col-center > .wd-header-search-form,
	.whb-general-header .whb-col-center > .wp-mega,
	.whb-general-header .whb-col-center .wp-mega.wp-mega--in-center {
		width: 100% !important;
		max-width: 100% !important;
		margin-inline: 0 !important;
		padding-inline: 0 !important;
		align-self: stretch;
		box-sizing: border-box;
	}
	.whb-general-header .whb-col-right {
		flex: 0 0 auto !important;
		display: flex !important;
		align-items: center;
		align-self: flex-start;
		justify-content: flex-end;
		gap: 2px;
		margin-inline-start: 8px;
		padding-block-start: 2px;
	}

	/* Mega nested under search in center column */
	.whb-general-header .whb-col-center > .wp-mega,
	.whb-general-header .whb-col-center .wp-mega.wp-mega--in-center {
		display: block !important;
		position: relative;
		z-index: 200;
		width: 100%;
		margin: 0 !important;
		padding: 0 !important;
		flex: 0 0 auto;
	}
	.whb-general-header .whb-col-center .wp-mega-bar {
		background: transparent;
		border-bottom: 0;
		box-shadow: none;
		margin: 0 !important;
		padding: 0 !important;
	}
	.whb-general-header .whb-col-center .wp-mega-bar-inner {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding-block: 0 !important;
		padding-inline: 0 !important;
		display: flex;
		align-items: center;
		justify-content: flex-start; /* RTL start = right edge with search */
	}
	.whb-general-header .whb-col-center .wp-mega-list {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		align-content: center;
		justify-content: flex-start; /* same inline-start as search box */
		gap: 2px;
		width: 100%;
		margin: 0;
		padding: 0;
		padding-inline: 0 !important;
		list-style: none;
		line-height: 1;
	}
	.whb-general-header .whb-col-center .wp-mega-item {
		display: flex;
		align-items: center;
		align-self: center;
		margin: 0;
		padding: 0;
		line-height: 1;
		vertical-align: middle;
	}
	.whb-general-header .whb-col-center .wp-mega-item:last-child {
		margin: 0;
		padding: 0;
		align-self: center;
	}
	/* Uniform baseline — fixes «ظروف بیرون‌بر» sitting lower than siblings. */
	.whb-general-header .whb-col-center .wp-mega-top {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center;
		height: 36px !important;
		min-height: 36px !important;
		max-height: 36px !important;
		padding: 0 12px !important;
		line-height: 1 !important;
		box-sizing: border-box;
		vertical-align: middle;
	}
	.whb-general-header .whb-col-center .wp-mega-top-name {
		display: inline-flex;
		align-items: center;
		line-height: 1.15 !important;
		font-size: 13px !important;
		font-weight: 700;
		white-space: nowrap;
	}
	.whb-general-header .whb-col-center .wp-mega-top--trigger {
		min-height: 36px !important;
		height: 36px !important;
		max-height: 36px !important;
		padding-inline: 14px !important;
	}
	.whb-general-header .whb-col-center .wp-mega-caret {
		margin-top: 0 !important;
		flex-shrink: 0;
	}
}

/* ---- Wide search (Janebi / Digikala skeleton, Brand Book colors) ------- */
.whb-general-header .wd-header-search-form {
	flex: 0 0 auto;
	min-width: 0;
	max-width: none;
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	transition: gap .28s ease;
}

/*
 * WoodMart defaults: absolute submit + absolute clear (offset by --wd-search-btn-w).
 * Our flex + text submit broke that offset → × sat under the green button.
 * Keep flex; make clear a real flex sibling before submit.
 */
.whb-general-header .wd-header-search-form .searchform,
.whb-general-header .searchform.wd-style-with-bg-2,
.whb-header .searchform.wd-style-with-bg-2 {
	display: flex !important;
	align-items: stretch;
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp-page, #F7F5F0);
	border: 1.5px solid var(--wp-line, #E5E0D6);
	box-shadow: none;
	--wd-form-height: 46px;
	--wd-search-btn-w: auto;
	transition: border-radius .28s ease;
}

.whb-general-header .searchform .s,
.whb-header .searchform .s {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0 14px !important;
	padding-inline-end: 8px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--wp-ink, #333333) !important;
	font-family: var(--wp-font) !important;
	font-size: 14px;
	font-weight: 600;
	position: relative;
	z-index: 1;
	transition: height .28s ease, font-size .28s ease, padding .28s ease;
}

.whb-general-header .searchform .s::placeholder {
	color: var(--wp-muted, #A1927D);
	opacity: 1;
}

/* Clear (×): flex item between input and submit — never under the button. */
.whb-general-header .searchform .wd-clear-search,
.whb-header .searchform .wd-clear-search {
	position: static !important;
	inset: auto !important;
	top: auto !important;
	flex: 0 0 36px;
	width: 36px !important;
	height: auto !important;
	min-height: 46px;
	align-self: stretch;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	color: var(--wp-muted, #A1927D) !important;
	z-index: 2;
	order: 0;
}
.whb-general-header .searchform .wd-clear-search.wd-hide,
.whb-header .searchform .wd-clear-search.wd-hide {
	display: none !important;
}
.whb-general-header .searchform .wd-clear-search:hover,
.whb-header .searchform .wd-clear-search:hover {
	color: var(--wp-ink, #333333) !important;
}
.whb-general-header .searchform .wd-clear-search:before,
.whb-header .searchform .wd-clear-search:before {
	font-size: 14px;
	line-height: 1;
}

.whb-general-header .searchform .searchsubmit,
.whb-header .searchform.wd-style-with-bg-2 .searchsubmit {
	position: static !important;
	inset: auto !important;
	flex: 0 0 auto;
	min-width: 52px;
	width: auto !important;
	height: auto !important;
	min-height: 46px;
	padding: 0 18px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--wp-emerald, #687049) !important;
	color: #fff !important;
	font-family: var(--wp-font) !important;
	font-weight: 800;
	font-size: 13px !important;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease;
	z-index: 2;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0;
}
.whb-general-header .searchform .searchsubmit span,
.whb-header .searchform .searchsubmit span {
	font-size: 13px !important;
	font-family: var(--wp-font) !important;
	font-weight: 800;
	line-height: 1;
}
/* Prefer icon-only submit on very small widths; keep text on desktop. */
.whb-general-header .searchform .searchsubmit:after,
.whb-header .searchform.wd-style-with-bg-2 .searchsubmit:after {
	content: none !important;
}
.whb-general-header .searchform .searchsubmit:hover {
	background: var(--wp-emerald-2, #55603c) !important;
}

/* ---- Ajax search dropdown: IRANYekan (not Albert Sans / broken glyphs) - */
.wd-search-results,
.wd-search-results-wrapper,
.wd-dropdown-results,
.wd-suggestion,
.wd-suggestion *,
.wd-search-results .wd-entities-title,
.wd-search-results .price,
.wd-search-results .amount,
.wd-search-results .wd-not-found,
.wd-search-results .wd-all-results,
.wd-suggestions-group {
	font-family: var(--wp-font) !important;
}
.wd-search-results {
	border: 1px solid var(--wp-line, #E5E0D6) !important;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(51, 51, 51, .1);
	overflow: hidden;
	background: #fff !important;
}
.wd-search-results .wd-entities-title {
	font-weight: 700;
	color: var(--wp-ink, #333333);
	font-size: 13px;
}
.wd-search-results .price,
.wd-search-results .amount {
	font-weight: 800;
	color: var(--wp-emerald, #687049);
	font-size: 12.5px;
}

/*
 * 0.36.10 — WoodMart header AJAX dropdown is the LIVE autocomplete
 * (not #wp-search modal). Parent theme sets:
 *   .wd-suggestions-group { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)) }
 * which becomes ~3 columns in a wide header. Force single column + one product/row.
 */
.wd-search-results .wd-suggestions-group,
.wd-dropdown-results .wd-suggestions-group,
.wd-search-results-wrapper .wd-suggestions-group,
.autocomplete-suggestions .wd-suggestions-group {
	display: flex !important;
	flex-direction: column !important;
	grid-template-columns: 1fr !important;
	gap: 0 !important;
}
.wd-search-results .wd-suggestion,
.wd-dropdown-results .wd-suggestion {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	width: 100% !important;
	max-width: 100% !important;
	gap: 8px !important;
	padding: 6px 10px !important;
	box-sizing: border-box;
}
.wd-search-results .wd-suggestion-thumb,
.wd-dropdown-results .wd-suggestion-thumb {
	flex: 0 0 28px !important;
	width: 28px !important;
	min-width: 28px !important;
	height: 28px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: hidden;
	border-radius: 6px;
	background: #F0EDE6;
	box-sizing: border-box;
}
.wd-search-results .wd-suggestion-thumb img,
.wd-dropdown-results .wd-suggestion-thumb img,
.wd-search-results .wd-suggestion-thumb img.wp-search-thumb-ph,
.wd-dropdown-results .wd-suggestion-thumb img.wp-search-thumb-ph {
	width: 28px !important;
	height: 28px !important;
	max-width: 28px !important;
	max-height: 28px !important;
	object-fit: contain !important;
	display: block !important;
}
/* Empty thumb column (if any legacy empty HTML) still reserves the box. */
.wd-search-results .wd-suggestion-thumb:empty,
.wd-dropdown-results .wd-suggestion-thumb:empty {
	background: #F0EDE6
		url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='8' fill='%23F0EDE6'/%3E%3Cpath fill='%23C8C2B6' d='M16 44l12-14 8 10 6-8 12 12H16z'/%3E%3Ccircle cx='24' cy='24' r='5' fill='%23C8C2B6'/%3E%3C/svg%3E")
		center / contain no-repeat;
}
.wd-search-results .wd-suggestion-content,
.wd-dropdown-results .wd-suggestion-content {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	gap: 8px !important;
	width: auto !important;
	--wd-mb: 0 !important;
	margin: 0 !important;
}
.wd-search-results .wd-suggestion-content .wd-entities-title,
.wd-dropdown-results .wd-suggestion-content .wd-entities-title {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
	font-size: 13px !important;
	line-height: 1.3 !important;
	margin: 0 !important;
}
.wd-search-results .wd-suggestion-content .wd-suggestion-sku,
.wd-dropdown-results .wd-suggestion-content .wd-suggestion-sku {
	display: none !important;
}
.wd-search-results .wd-suggestion-content .price,
.wd-dropdown-results .wd-suggestion-content .price {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex: 0 0 auto !important;
	margin: 0 !important;
	margin-inline-start: auto !important;
	gap: 8px !important;
	padding: 0 !important;
	white-space: nowrap !important;
}
.wd-search-results .wd-suggestion-content .price .amount,
.wd-dropdown-results .wd-suggestion-content .price .amount {
	font-size: 11px !important;
	font-weight: 500 !important;
	color: var(--wp-muted, #8A8276) !important;
	line-height: 1.2 !important;
}
.wd-search-results .wp-wm-search-cat,
.wd-dropdown-results .wp-wm-search-cat {
	position: relative;
	z-index: 2;
	display: inline-block !important;
	margin: 0 !important;
	max-width: 28%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 11px !important;
	font-weight: 600 !important;
	color: var(--wp-emerald, #687049) !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
}
.wd-search-results a.wp-wm-search-cat:hover,
.wd-dropdown-results a.wp-wm-search-cat:hover {
	text-decoration: underline !important;
}

/* ---- Tools: account / wishlist / cart (Digikala skeleton, Brand colors) */
.whb-general-header .wd-header-my-account,
.whb-general-header .wd-header-wishlist,
.whb-general-header .wd-header-cart {
	margin: 0 !important;
}

.whb-general-header .wd-tools-element > a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 6px !important;
	border-radius: 10px;
	gap: 0;
	position: relative;
	text-decoration: none !important;
}

/* Icon + text tools — show «ورود به حساب کاربری» and cart label. */
.whb-general-header .wd-header-my-account .wd-tools-text,
.whb-general-header .wd-header-my-account .wp-acc-text {
	display: inline-block !important;
	font-family: var(--wp-font) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	color: var(--wp-ink, #333333) !important;
	max-width: 130px;
	line-height: 1.25;
	white-space: normal;
	text-align: start;
}
.whb-general-header .wd-header-wishlist .wd-tools-text {
	display: none !important;
}
.whb-general-header .wd-header-my-account > a {
	min-width: 0 !important;
	gap: 8px !important;
	padding-inline: 8px !important;
	justify-content: flex-start !important;
}
.whb-general-header .wd-header-cart .wp-cart-label {
	display: inline-block;
	font-family: var(--wp-font);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--wp-ink, #333333);
	margin-inline-start: 4px;
}
@media (max-width: 1200px) {
	.whb-general-header .wd-header-cart .wp-cart-label {
		display: none;
	}
}

/* Hot links under search — removed 0.36.12 (keep rules as display:none for leftovers). */
.wp-header-hotlinks,
.wp-header-hotlinks--live,
#wp-header-hotlinks {
	display: none !important;
	height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Top promo bar. */
.wp-promo-bar {
	background: var(--wp-emerald, #687049);
	color: #fff;
	text-align: center;
	font-family: var(--wp-font);
	max-height: 40px;
	opacity: 1;
	overflow: hidden;
	transition: max-height .28s ease, opacity .22s ease;
}
/* Fallback when JS has not measured yet: ~promo content height (set on html only). */
html:has(#wp-promo-bar):not(.wp-header-compact):not(.is-scrolled) {
	--wp-promo-bar-offset: 36px;
}
html.wp-header-compact,
html.is-scrolled {
	--wp-promo-bar-offset: 0px;
}
.wp-promo-bar-inner {
	display: block;
	padding: 6px 14px;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
}
.wp-promo-bar-inner:hover {
	color: #fff !important;
	background: rgba(0,0,0,.06);
}

/* ---- Compact sticky header on scroll (0.36.2) ------------------------- */
/* Threshold + class toggle live in assets/js/app.js (initCompactHeader). */
html.wp-header-compact .whb-general-header .whb-general-header-inner,
html.wp-header-compact .whb-general-header .whb-flex-row,
html.is-scrolled .whb-general-header .whb-general-header-inner,
html.is-scrolled .whb-general-header .whb-flex-row {
	min-height: 0;
	padding-block: 4px 2px;
	gap: 8px;
}

html.wp-header-compact .whb-general-header .site-logo img,
html.wp-header-compact .whb-general-header .wd-logo img,
html.is-scrolled .whb-general-header .site-logo img,
html.is-scrolled .whb-general-header .wd-logo img {
	max-height: calc(100% - 6px);
	height: calc(100% - 6px);
}

@media (min-width: 1025px) {
	html.wp-header-compact .whb-general-header .whb-col-center .wp-mega-top,
	html.is-scrolled .whb-general-header .whb-col-center .wp-mega-top,
	html.wp-header-compact .whb-general-header .whb-col-center .wp-mega-top--trigger,
	html.is-scrolled .whb-general-header .whb-col-center .wp-mega-top--trigger {
		height: 30px !important;
		min-height: 30px !important;
		max-height: 30px !important;
		padding-inline: 10px !important;
		font-size: 12.5px !important;
	}
	html.wp-header-compact .whb-general-header .whb-col-center,
	html.is-scrolled .whb-general-header .whb-col-center {
		gap: 2px;
	}
}

html.wp-header-compact .whb-general-header .wd-header-search-form,
html.is-scrolled .whb-general-header .wd-header-search-form {
	gap: 0;
}

html.wp-header-compact .whb-general-header .wd-header-search-form .searchform,
html.wp-header-compact .whb-general-header .searchform.wd-style-with-bg-2,
html.wp-header-compact .whb-header .searchform.wd-style-with-bg-2,
html.is-scrolled .whb-general-header .wd-header-search-form .searchform,
html.is-scrolled .whb-general-header .searchform.wd-style-with-bg-2,
html.is-scrolled .whb-header .searchform.wd-style-with-bg-2 {
	--wd-form-height: 38px;
	border-radius: 10px;
}

html.wp-header-compact .whb-general-header .searchform .s,
html.wp-header-compact .whb-header .searchform .s,
html.is-scrolled .whb-general-header .searchform .s,
html.is-scrolled .whb-header .searchform .s {
	height: 38px;
	font-size: 13px;
	padding: 0 12px !important;
	padding-inline-end: 6px !important;
}

html.wp-header-compact .whb-general-header .searchform .searchsubmit,
html.wp-header-compact .whb-header .searchform.wd-style-with-bg-2 .searchsubmit,
html.is-scrolled .whb-general-header .searchform .searchsubmit,
html.is-scrolled .whb-header .searchform.wd-style-with-bg-2 .searchsubmit {
	padding: 0 14px !important;
	font-size: 12px !important;
}

html.wp-header-compact .whb-general-header .wd-header-cart.wd-design-3 > a,
html.wp-header-compact .whb-header .wd-header-cart.wd-design-3 > a,
html.is-scrolled .whb-general-header .wd-header-cart.wd-design-3 > a,
html.is-scrolled .whb-header .wd-header-cart.wd-design-3 > a {
	height: 38px !important;
}

html.wp-header-compact .wp-header-hotlinks,
html.wp-header-compact .wp-header-hotlinks--live,
html.is-scrolled .wp-header-hotlinks,
html.is-scrolled .wp-header-hotlinks--live {
	display: none !important;
}

html.wp-header-compact .wp-promo-bar,
html.is-scrolled .wp-promo-bar {
	max-height: 0;
	opacity: 0;
	pointer-events: none;
}

html.wp-header-compact .wp-mega-bar-inner,
html.is-scrolled .wp-mega-bar-inner {
	padding-block: 0 !important;
}

html.wp-header-compact .wp-mega-top--trigger,
html.is-scrolled .wp-mega-top--trigger {
	min-height: 32px;
}

@media (max-width: 1024px) {
	html.wp-header-compact .whb-general-header .whb-general-header-inner,
	html.is-scrolled .whb-general-header .whb-general-header-inner {
		min-height: 44px;
		padding-block: 4px;
	}
	html.wp-header-compact .whb-general-header .site-logo img,
	html.wp-header-compact .whb-general-header .wd-logo img,
	html.is-scrolled .whb-general-header .site-logo img,
	html.is-scrolled .whb-general-header .wd-logo img {
		max-height: 34px;
	}
	html.wp-header-compact .wp-header-mobile-search,
	html.is-scrolled .wp-header-mobile-search {
		padding: 0 12px 6px;
		transition: padding .28s ease;
	}
	html.wp-header-compact .wp-header-mobile-search .searchform .s,
	html.wp-header-compact .wd-header-search-form-mobile .searchform .s,
	html.is-scrolled .wp-header-mobile-search .searchform .s,
	html.is-scrolled .wd-header-search-form-mobile .searchform .s {
		height: 34px;
		font-size: 12.5px;
	}
	html.wp-header-compact .wp-header-mobile-search .searchform .searchsubmit,
	html.wp-header-compact .wp-header-mobile-search .searchform .wd-clear-search,
	html.is-scrolled .wp-header-mobile-search .searchform .searchsubmit,
	html.is-scrolled .wp-header-mobile-search .searchform .wd-clear-search {
		min-height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.whb-general-header .whb-general-header-inner,
	.whb-general-header .whb-flex-row,
	.whb-general-header .site-logo img,
	.whb-general-header .wd-logo img,
	.whb-general-header .wd-header-search-form,
	.whb-general-header .searchform .s,
	.wp-header-hotlinks,
	.wp-header-hotlinks--live,
	.wp-promo-bar,
	.wp-header-mobile-search {
		transition: none !important;
	}
}

/* Stronger cats CTA in mega row. */
@media (min-width: 1025px) {
	.wp-mega-item--cats .wp-mega-top--trigger {
		font-size: 13px;
		font-weight: 800;
		padding-inline: 14px;
		min-height: 36px;
		height: 36px;
	}
}

.whb-general-header .wd-tools-icon {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
}
.whb-general-header .wd-tools-icon:before {
	font-size: 22px !important;
	line-height: 1 !important;
	color: var(--wp-ink, #333333) !important;
}

/* Cart: Digikala-style icon + ORANGE count badge (no ugly count/amount column). */
.whb-general-header .wd-header-cart.wd-design-3 > a,
.whb-header .wd-header-cart.wd-design-3 > a {
	height: 44px !important;
	align-items: center;
}

.whb-general-header .wd-header-cart.wd-design-3 .wd-tools-icon:before,
.whb-header .wd-header-cart.wd-design-3 .wd-tools-icon:before {
	color: var(--wp-ink, #333333) !important;
	font-size: 24px !important;
	opacity: 1;
}

.whb-general-header .wd-header-cart.wd-design-3 .wd-tools-text,
.whb-header .wd-header-cart.wd-design-3 .wd-tools-text {
	display: block !important;
	position: absolute !important;
	inset-block-start: 2px;
	inset-inline-end: 0;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	flex-direction: row !important;
	width: auto !important;
	height: auto !important;
	background: transparent !important;
	line-height: 1 !important;
}

/* Hide divider + subtotal — badge only. */
.whb-general-header .wd-header-cart .subtotal-divider,
.whb-general-header .wd-header-cart .wd-cart-subtotal,
.whb-header .wd-header-cart .subtotal-divider,
.whb-header .wd-header-cart .wd-cart-subtotal {
	display: none !important;
}

/* Cart badge: Brand Book ORANGE (not WoodMart red / design-3 gray text). */
.whb-general-header .wd-header-cart .wd-cart-number,
.whb-general-header .wd-header-cart .wd-tools-count,
.whb-header .wd-header-cart .wd-cart-number,
.whb-header .wd-tools-element .wd-tools-count {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px !important;
	border-radius: 999px !important;
	background: #FF5F23 !important;
	background-color: #FF5F23 !important;
	color: #fff !important;
	border: 2px solid #fff !important;
	font-family: var(--wp-font) !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	box-shadow: 0 1px 2px rgba(51, 51, 51, .12);
	position: static !important;
	width: auto !important;
	text-align: center !important;
	text-transform: none !important;
}

/* Hide “موارد” label inside count. */
.whb-general-header .wd-header-cart .wd-cart-number > span,
.whb-header .wd-header-cart .wd-cart-number > span {
	display: none !important;
}

/* ---- Gap: header flush against mega bar -------------------------------- */
.whb-header,
.whb-main-header,
.whb-header .container,
.whb-main-header .container {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}
.whb-header + .wp-mega,
.whb-main-header + .wp-mega,
.wp-mega.wp-mega--ready,
.wp-mega {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
}
.wp-mega-bar {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	border-top: 0 !important;
	padding-top: 0 !important;
}

/* Keep existing mega polish tokens from header.css (desktop). */
.wp-mega-bar {
	background: #ffffff;
	border-bottom: 1px solid var(--wp-line, #E5E0D6);
	box-shadow: none;
}
/* When mega is nested under search, no full-bleed second strip. */
.whb-col-center .wp-mega-bar,
.wp-mega--in-center .wp-mega-bar {
	background: transparent;
	border-bottom: 0;
	box-shadow: none;
}
.wp-mega-bar-inner {
	width: min(1480px, calc(100% - 30px));
	padding-block: 2px !important;
}
.whb-col-center .wp-mega-bar-inner,
.wp-mega--in-center .wp-mega-bar-inner {
	width: 100%;
	padding-block: 0 !important;
}
.wp-mega-top {
	font-weight: 700;
	font-size: 13px;
}
/* Desktop only: green cats pill. header.css loads after app.css — an unscoped
   emerald background overrode mobile ivory + emerald label → invisible
   «دسته‌بندی محصولات» in the drawer (solid green blank bar). */
@media (min-width: 1025px) {
	.wp-mega-top--trigger {
		background: var(--wp-emerald, #687049);
		box-shadow: none;
		min-height: 36px;
		padding-inline: 14px;
	}
	.wp-mega-item--cats:hover .wp-mega-top--trigger,
	.wp-mega-top--trigger:hover {
		background: var(--wp-emerald-2, #55603c);
	}
}
@media (max-width: 1024px) {
	.wp-mega-top--trigger {
		background: var(--wp-ivory, #F7F5F0);
		color: var(--wp-emerald, #687049);
		box-shadow: none;
	}
	.wp-mega-top--trigger .wp-mega-top-name {
		color: var(--wp-emerald, #687049);
	}
	/* Icon-only mobile hamburger (label overlaps logo). */
	.wp-mega-trigger .wp-mega-trigger-label {
		display: none !important;
	}
	.wp-mega-trigger {
		width: 44px !important;
		min-width: 44px !important;
		padding: 0 !important;
		gap: 0 !important;
	}
}

/* Sticky: keep header readable */
.whb-sticked .whb-general-header,
.whb-clone .whb-general-header {
	background: #ffffff !important;
	box-shadow: 0 8px 24px rgba(51, 51, 51, .08);
}

/* Mobile search form in header-bottom is hidden with the row —
   mobile uses .wd-header-search-form-mobile when present; keep overrides ready. */
.wd-header-search-form-mobile .searchform {
	display: flex !important;
	align-items: stretch;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp-page, #F7F5F0);
	border: 1px solid var(--wp-line, #E5E0D6);
}
.wd-header-search-form-mobile .searchform .s {
	flex: 1 1 auto;
	min-width: 0;
	height: 40px;
	border: 0 !important;
	background: transparent !important;
	font-family: var(--wp-font) !important;
	padding-inline-end: 8px !important;
}
.wd-header-search-form-mobile .searchform .wd-clear-search {
	position: static !important;
	inset: auto !important;
	flex: 0 0 32px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}
.wd-header-search-form-mobile .searchform .wd-clear-search.wd-hide {
	display: none !important;
}
.wd-header-search-form-mobile .searchform .searchsubmit {
	position: static !important;
	inset: auto !important;
	flex: 0 0 auto;
	min-width: 48px;
	width: auto !important;
	background: var(--wp-emerald, #687049) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-family: var(--wp-font) !important;
	font-size: 12px !important;
}

@media (max-width: 1024px) {
	:root {
		--wd-header-general-h: 56px !important;
		/* Mega bar is height:0 on mobile (fixed corner trigger). Total chrome
		   ≈ general row + resurfaced mobile search — measured ~110. */
		--wp-mega-bar-h: 0px;
		--wp-header-offset: 110px;
		--wd-header-h: 110px !important;
		--wd-header-sticky-h: 110px !important;
		--wd-header-sm-h: 110px !important;
	}
	.whb-general-header .whb-general-header-inner {
		min-height: 52px;
		padding-block: 4px;
	}
	.whb-general-header .site-logo img,
	.whb-general-header .wd-logo img {
		max-height: 44px; /* mob row 52 − ~4px top/bottom */
	}
	/* Resurfaced mobile search under logo row */
	.wp-header-mobile-search {
		padding: 0 12px 10px;
		width: 100%;
	}
	.wp-header-mobile-search .wd-header-search-form-mobile,
	.wp-header-mobile-search .searchform {
		width: 100%;
		max-width: none;
	}
	.wp-header-mobile-search .searchform .s {
		height: 40px;
		font-size: 13px;
	}
	.wp-header-mobile-search .searchform .searchsubmit,
	.wp-header-mobile-search .searchform .wd-clear-search {
		min-height: 40px;
	}
}

/* 0.34 — denser marketplace type (header/search/actions) */
.whb-general-header .searchform .s,
.whb-general-header .wd-search-form input[type="text"] {
	font-size: 13.5px !important;
}
.whb-general-header .wd-tools-element .wd-tools-text,
.whb-general-header .wd-header-my-account a,
.whb-general-header .wd-header-cart .wd-tools-text {
	font-size: 12.5px !important;
	font-weight: 600;
}
.wp-mega-top {
	font-size: 13px !important;
	font-weight: 700;
	line-height: 1 !important;
}
.wp-mega-top--trigger {
	font-size: 13px !important;
}
.wp-mega-top-name {
	line-height: 1.15 !important;
}
