:root{
	--td-header-topbar-height: 30px;
	--td-header-main-height: 92px;
	--td-header-mobile-height: 76px;
	--td-header-wrap-desktop: 122px;
	--td-header-wrap-mobile: 106px;

	--td-header-max-width: 1280px;

	--td-header-side-padding: 20px;
	--td-header-side-padding-mobile: 14px;

	--td-header-icon-size: 22px;

	--td-header-logo-width: 220px;
	--td-header-logo-max-h: 72px;
	--td-header-logo-max-h-mobile: 52px;

	--td-header-action-gap: 14px;

	/* desktop */
	--td-header-actions-width: 170px;

	/* mobile */
	--td-header-actions-min-width-mobile: 92px;
	--td-header-mobile-left-width: 44px;

	--td-header-nav-gap: 28px;
}

/* ===== LOADING STABILITY ===== */
/* махаме скриването/появата, което прави прескачане */
.site-header-custom__deferred{
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: none;
}

/* ===== WRAP ===== */

.site-header-custom-wrap{
	position: sticky;
	top: 0;
	z-index: 100;
	overflow: visible;
	min-height: var(--td-header-wrap-desktop);
	background: transparent;
}

/* ===== TOPBAR ===== */

.site-header-custom__topbar{
	background: #f8e9ec;
	border: none;
	box-shadow: none;
}

.site-header-custom__topbar-inner{
	max-width: var(--td-header-max-width);
	margin: 0 auto;
	height: var(--td-header-topbar-height);
	padding: 0 var(--td-header-side-padding);
	display: flex;
	align-items: center;
	justify-content: center;
}

.site-header-custom__topbar-text{
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: #000;
	text-align: center;
}

/* ===== HEADER ===== */

.site-header-custom{
	background: #fff;
	box-shadow: 0 6px 14px rgba(0,0,0,0.06);
	border: none;
	overflow: visible;
}

.site-header-custom__inner{
	max-width: var(--td-header-max-width);
	margin: 0 auto;
	height: var(--td-header-main-height);
	padding: 0 var(--td-header-side-padding);
	display: grid;
	grid-template-columns: var(--td-header-logo-width) minmax(0,1fr) var(--td-header-actions-width);
	align-items: center;
	column-gap: 24px;
	overflow: visible;
}

/* ===== MOBILE LEFT ===== */
/* връщаме menu area към оригиналното поведение */
.site-header-custom__mobile-left{
	display: none;
	width: 0;
	min-width: 0;
	height: 0;
	overflow: hidden;
	position: relative;
	z-index: 2;
}

/* ===== LOGO ===== */

.site-header-custom__logo{
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-width: 0;
	width: var(--td-header-logo-width);
}

.site-header-custom__logo a{
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	text-decoration: none;
}

.site-header-custom__logo img{
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: var(--td-header-logo-max-h);
}

/* ===== NAV ===== */

.site-header-custom__nav{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--td-header-nav-gap);
	min-width: 0;
	height: 100%;
	overflow: visible;
	padding-left: 36px;
}

.site-header-custom__nav-link{
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: #111;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	height: auto;
	white-space: nowrap;
	transition: color .2s ease;
}

.site-header-custom__nav-link:hover{
	color: #8a646c;
}

.site-header-custom__mega{
	display: flex;
	align-items: center;
	position: relative;
	overflow: visible;
	flex: 0 0 auto;
	min-height: 40px;
}

.site-header-custom__mega,
.site-header-custom__mega *{
	overflow: visible;
}

/* ===== ACTIONS ===== */

.site-header-custom__actions{
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--td-header-action-gap);
	flex-wrap: nowrap;
	white-space: nowrap;
	overflow: visible;
	position: relative;
	z-index: 1;
	width: var(--td-header-actions-width);
	min-width: var(--td-header-actions-width);
	height: 100%;
}

.site-header-custom__action{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex: 0 0 auto;
	width: auto;
	height: 28px;
	min-width: 22px;
	min-height: 28px;
	position: relative;
	overflow: visible;
	z-index: 1;
	align-self: center;
}

.site-header-custom__action > *{
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	height: 100%;
}

.site-header-custom__action a,
.site-header-custom__action button,
.site-header-custom__action summary{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
	white-space: nowrap;
	position: relative;
	text-decoration: none;
}

.site-header-custom__action svg{
	width: var(--td-header-icon-size);
	height: var(--td-header-icon-size);
	display: block;
}

.site-header-custom__action-placeholder{
	opacity: 0;
	pointer-events: none;
}

/* profile text */
.site-header-custom__action:first-child,
.site-header-custom__action:first-child a{
	font-size: 14px;
	font-weight: 500;
	color: #111;
	text-decoration: none;
}

/* common wrappers from plugins/shortcodes */
.site-header-custom__actions *,
.site-header-custom__action *,
.site-header-custom .wcnc-wrap,
.site-header-custom .wcnc-wrap details,
.site-header-custom .wcnc-wrap summary,
.site-header-custom .wcnc-bell-icon{
	z-index: 1 !important;
}

.site-header-custom .wcnc-wrap{
	position: relative;
	overflow: visible !important;
}

.site-header-custom .wcnc-wrap details{
	position: relative;
	overflow: visible !important;
}

.site-header-custom .wcnc-panel{
	right: 0 !important;
	left: auto !important;
	top: 34px;
	max-width: min(340px, calc(100vw - 24px));
	white-space: normal !important;
	z-index: 20 !important;
}

.site-header-custom .wcnc-item-body,
.site-header-custom .wcnc-item-title,
.site-header-custom .wcnc-item-text,
.site-header-custom .wcnc-item-date,
.site-header-custom .wcnc-link{
	white-space: normal !important;
	word-break: break-word;
	overflow-wrap: anywhere;
}

/* cart count / badges desktop */
.site-header-custom__action .count,
.site-header-custom__action .cart-count,
.site-header-custom__action .qty,
.site-header-custom__action .badge,
.site-header-custom__action .woocommerce-mini-cart-count{
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	line-height: 1;
	background: #000;
	color: #fff;
}

/* ===== MOBILE ===== */

@media (max-width: 767px){

	.site-header-custom-wrap{
		min-height: var(--td-header-wrap-mobile);
	}

	.site-header-custom__topbar-inner{
		height: var(--td-header-topbar-height);
		padding: 0 var(--td-header-side-padding-mobile);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.site-header-custom__topbar-text{
		font-size: 13px;
		font-weight: 500;
		line-height: 1.2;
		white-space: normal;
	}

	.site-header-custom__inner{
		grid-template-columns: var(--td-header-mobile-left-width) 1fr auto;
		height: var(--td-header-mobile-height);
		padding: 0 var(--td-header-side-padding-mobile);
		column-gap: 10px;
		align-items: center;
	}

	.site-header-custom__nav{
		display: none;
		padding-left: 0;
	}

	/* menu shortcode остава непокътнат */
	.site-header-custom__mobile-left{
		display: flex;
		align-items: center;
		justify-content: flex-start;
		width: var(--td-header-mobile-left-width);
		min-width: var(--td-header-mobile-left-width);
		height: 40px;
		overflow: visible;
		position: relative;
		z-index: 2;
	}

	.site-header-custom__logo{
		width: auto;
		justify-content: center;
	}

	.site-header-custom__logo a{
		justify-content: center;
	}

	.site-header-custom__logo img{
		max-height: var(--td-header-logo-max-h-mobile);
	}

	.site-header-custom__actions{
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 12px;
		flex-wrap: nowrap;
		white-space: nowrap;
		overflow: visible;
		position: relative;
		z-index: 1;
		width: auto;
		min-width: var(--td-header-actions-min-width-mobile);
		height: 100%;
	}

	.site-header-custom__action{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 40px;
		min-width: 36px;
		min-height: 40px;
		position: relative;
		flex: 0 0 36px;
		overflow: visible;
		align-self: center;
	}

	/* account text hidden on mobile */
	.site-header-custom__action:first-child{
		font-size: 0;
	}

	.site-header-custom__action:first-child a{
		font-size: 0;
	}

	.site-header-custom__action:first-child svg,
	.site-header-custom__action:first-child img{
		display: block;
	}

	.site-header-custom__action a,
	.site-header-custom__action button,
	.site-header-custom__action summary{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		position: relative;
		padding: 0 !important;
		margin: 0 !important;
		line-height: 1 !important;
		overflow: visible;
	}

	/* количката получава повече височина, без да бута менюто */
	.site-header-custom__actions > .site-header-custom__action:last-child{
		width: 40px;
		height: 44px;
		min-width: 40px;
		min-height: 44px;
		flex: 0 0 40px;
	}

	.site-header-custom__actions > .site-header-custom__action:last-child a,
	.site-header-custom__actions > .site-header-custom__action:last-child button,
	.site-header-custom__actions > .site-header-custom__action:last-child summary{
		width: 100%;
		height: 100%;
		min-width: 40px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* badges */
	.site-header-custom__action .count,
	.site-header-custom__action .cart-count,
	.site-header-custom__action .qty,
	.site-header-custom__action .badge,
	.site-header-custom__action .woocommerce-mini-cart-count{
		position: absolute;
		top: 6px;
		right: -8px;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		font-size: 10px;
		line-height: 1;
		background: #000;
		color: #fff;
		z-index: 3;
	}

	.site-header-custom .wcnc-panel{
		right: 0 !important;
		left: auto !important;
		width: min(300px, calc(100vw - 20px)) !important;
		max-width: calc(100vw - 20px) !important;
		white-space: normal !important;
		z-index: 20 !important;
	}
}