/* ============================================================
   Хедър за целия сайт: в началото е на цяла ширина; при скрол става
   плаваща заоблена лента с отстъп от краищата (стил "island").
   JS (header-float.js) го прави fixed и вмъква разпорка със същата
   височина, за да не се мести съдържанието при смаляването.
   ============================================================ */

body.daga-fh {
	--fh-gap: 6px;      /* отстъп отгоре в "плаващо" състояние */
	--fh-side: 14px;    /* отстъп отстрани в "плаващо" състояние */
	--fh-radius: 28px;
	--fh-ease: cubic-bezier(.22, .8, .24, 1);
}

/* ---------- В началото: цяла ширина, плосък (като преди) ---------- */
body.daga-fh #header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 80;
	width: 100%;
	margin: 0 auto;
	background: #fff;
	border-radius: 0;
	box-shadow: none;
	transition: top .4s var(--fh-ease), width .4s var(--fh-ease), border-radius .4s var(--fh-ease),
		box-shadow .4s var(--fh-ease), background .4s;
}
body.daga-fh.dh-fixed #header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
}
.dh-hdr-spacer { display: block; width: 100%; pointer-events: none; }

/* редовете са прозрачни - фонът и заоблянето са на самата лента */
body.daga-fh #header [data-row] {
	background: transparent !important;
}

/* ---------- При скрол: плаваща заоблена лента, леко прозрачно "стъкло"
   (цветът се променя спрямо фона, над който минава) ---------- */
body.daga-fh.dh-stuck #header {
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--fh-gap));
	width: calc(100% - (var(--fh-side) * 2));
	border-radius: var(--fh-radius);
	box-shadow: 0 10px 34px rgba(10, 5, 0, .16);
	background: rgba(255, 255, 255, .72);
	-webkit-backdrop-filter: blur(16px) saturate(1.5);
	backdrop-filter: blur(16px) saturate(1.5);
}

/* съдържанието (лупа, икони) се разпъва към краищата на лентата, вместо
   да стои в тесния контейнер с празно отстрани (както при Salerm) */
body.daga-fh #header [data-row] > .ct-container {
	transition: width .4s var(--fh-ease), max-width .4s var(--fh-ease);
}
@media (min-width: 1000px) {
	body.daga-fh.dh-stuck #header [data-row] > .ct-container {
		width: calc(100% - 96px);
		max-width: 1760px;
	}
}

/* ---------- Профил + количка: една кремава капсула ----------
   (преди: аватар 22px и торбичка 15px с неравни отстъпи; сега два еднакви
   бутона по 40px, разделени с тънка линия, чиста иконка вместо сивия аватар) */
body.daga-fh #header [data-column="end"] > div:has(> .ct-header-account) {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px;
	background: #f4ede0;
	border-radius: 999px;
	flex: 0 0 auto;
	width: max-content;
	height: auto;
	align-self: center;
	justify-self: end;
}
/* колоната е по-тясна от капсулата (логото е 197px с прозрачни полета) -
   капсулата расте наляво, не излиза извън ръба */
body.daga-fh #header [data-device="mobile"] [data-column="end"] {
	display: flex;
	justify-content: flex-end;
}
body.daga-fh #header .ct-header-account,
body.daga-fh #header .ct-header-cart {
	position: relative;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	margin: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #0a0500;
	--theme-icon-color: #0a0500;
	--theme-icon-hover-color: #0a0500;
	transition: background .25s;
}
body.daga-fh #header .ct-header-account:hover,
body.daga-fh #header .ct-header-cart:hover {
	background: #fff;
}
body.daga-fh #header .ct-header-account::after {
	content: "";
	position: absolute;
	right: -2px;
	top: 11px;
	height: 18px;
	width: 1px;
	background: rgba(10, 5, 0, .16);
}
body.daga-fh #header .ct-header-account .ct-account-item,
body.daga-fh #header .ct-header-cart > a {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
body.daga-fh #header .ct-header-account svg,
body.daga-fh #header .ct-header-cart svg.ct-icon {
	width: 20px;
	height: 20px;
}
/* влязъл потребител: вместо сивия аватар - същата чиста иконка */
body.daga-fh #header .ct-header-account .ct-media-container img { display: none; }
body.daga-fh #header .ct-header-account .ct-media-container {
	width: 20px;
	height: 20px;
}
body.daga-fh #header .ct-header-account .ct-media-container::before {
	content: "";
	width: 20px;
	height: 20px;
	background: #0a0500;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* хамбургерът - в същата кремава капсула (същата ширина) за баланс с капсулата вдясно */
body.daga-fh #header [data-device="mobile"] .ct-header-trigger {
	width: 90px; /* колкото капсулата вдясно (профил + количка), за да е логото по средата между двете */
	/* лявата колона е по-тясна (~58px) и свиваше капсулата -> логото изглеждаше изместено надясно;
	   не се свива, расте надясно над прозрачното поле на логото (z-index), както дясната расте наляво */
	flex: 0 0 90px;
	min-width: 90px;
	height: 48px;
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4ede0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	transition: background .25s;
}
body.daga-fh #header [data-device="mobile"] .ct-header-trigger:hover { background: #ece2cf !important; }

/* лупата в десктоп хедъра - в същия кремав кръг (баланс с капсулата вдясно) */
body.daga-fh #header [data-device="desktop"] [data-id="search"] a,
body.daga-fh #header [data-device="desktop"] .ct-header-search {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4ede0 !important;
	border-radius: 50% !important;
	transition: background .25s;
}
body.daga-fh #header [data-device="desktop"] [data-id="search"] a:hover,
body.daga-fh #header [data-device="desktop"] .ct-header-search:hover { background: #ece2cf !important; }

/* ---------- Смаляване при скрол ---------- */
body.daga-fh #header [data-row],
body.daga-fh #header .site-logo-container,
body.daga-fh #header .site-logo-container img {
	transition: height .35s var(--fh-ease), min-height .35s var(--fh-ease), padding .35s var(--fh-ease);
}
@media (min-width: 1000px) {
	body.daga-fh.dh-stuck #header [data-row*="middle"] {
		--height: 64px;
		min-height: 64px;
	}
	body.daga-fh.dh-stuck #header [data-row*="bottom"] {
		--height: 46px;
		min-height: 46px;
	}
	body.daga-fh.dh-stuck #header .site-logo-container {
		--logo-max-height: 50px;
		height: 50px;
	}
	body.daga-fh.dh-stuck #header .site-logo-container img {
		height: 50px;
		width: auto;
	}
}
@media (max-width: 999.98px) {
	body.daga-fh {
		--fh-gap: 4px;
		--fh-side: 12px;
		--fh-radius: 22px;
	}
	body.daga-fh.dh-stuck #header .site-logo-container {
		--logo-max-height: 44px;
		height: 44px;
	}
	body.daga-fh.dh-stuck #header .site-logo-container img {
		height: 44px;
		width: auto;
	}
}

/* ============================================================
   Мобилно меню (#offcanvas): ред в типографията, видимо "X",
   социални икони, лупа (иконка) до "X".
   ============================================================ */
#offcanvas .ct-toggle-close {
	--theme-icon-color: #0a0500;
	--theme-icon-hover-color: #0a0500;
	color: #0a0500 !important;
	width: 44px;
	height: 44px;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	align-items: center;
	justify-content: center;
}
#offcanvas .ct-toggle-close svg,
#offcanvas .ct-toggle-close svg path {
	fill: #0a0500 !important;
}
#offcanvas .ct-toggle-close svg {
	width: 18px;
	height: 18px;
}

/* лупа (само иконка, отваря търсенето) */
#offcanvas .ct-panel-actions {
	justify-content: space-between;
	align-items: center;
}
#offcanvas .daga-m-searchbtn {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #0a0500;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
	cursor: pointer;
}
#offcanvas .daga-m-searchbtn svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ниво 1: сериф, едър; разделители */
#offcanvas [data-id="mobile-menu"] > ul > li {
	border-bottom: 1px solid #e6dcc8;
}
#offcanvas [data-id="mobile-menu"] > ul > li > a,
#offcanvas [data-id="mobile-menu"] > ul > li > .ct-sub-menu-parent > a {
	font-family: Lora, Georgia, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -.01em;
	padding: 15px 0;
}
/* ниво 2 и 3: по-малко, по-леко, с тънка вертикална линия */
#offcanvas [data-id="mobile-menu"] .sub-menu {
	margin: 0 0 10px 2px;
	padding-left: 16px;
	border-left: 2px solid #e6dcc8;
}
#offcanvas [data-id="mobile-menu"] .sub-menu .ct-menu-link {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	font-weight: 500;
	padding: 9px 0;
	--theme-link-initial-color: #504e4a !important;
}
#offcanvas [data-id="mobile-menu"] .sub-menu .sub-menu .ct-menu-link {
	font-size: 15px;
	font-weight: 400;
}

/* двата бутона (Торта по твой дизайн / Нашите обекти): еднакви, на цяла ширина */
#offcanvas [data-id="mobile-menu"] > ul > li.daga-nav-btn {
	border-bottom: 0;
	margin: 14px 0 0 !important;
}
#offcanvas [data-id="mobile-menu"] > ul > li.daga-nav-btn > a {
	display: flex !important;
	justify-content: center;
	width: 100%;
	padding: 15px 20px !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: 0;
	border-radius: 999px !important;
}
#offcanvas [data-id="mobile-menu"] > ul > li.daga-nav-btn + li.daga-nav-btn > a {
	border: 1.5px solid #0a0500 !important;
	color: #0a0500 !important;
}

/* "Обади се": само в мобилното меню, плътен тъмен бутон под другите два */
#offcanvas [data-id="mobile-menu"] > ul > li.daga-nav-btn.daga-nav-call.daga-nav-call > a {
	background: #0a0500 !important;
	border: 1.5px solid #0a0500 !important;
	color: #fff !important;
	gap: 9px;
	align-items: center;
}
#offcanvas [data-id="mobile-menu"] > ul > li.daga-nav-btn.daga-nav-call.daga-nav-call > a::before {
	content: "";
	display: inline-block !important;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.09 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13 1.05.36 2.07.69 3.06a2 2 0 0 1-.45 2.11L8.09 10.9a16 16 0 0 0 6 6l1.99-1.27a2 2 0 0 1 2.11-.45c.99.33 2.01.56 3.06.69A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.09 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13 1.05.36 2.07.69 3.06a2 2 0 0 1-.45 2.11L8.09 10.9a16 16 0 0 0 6 6l1.99-1.27a2 2 0 0 1 2.11-.45c.99.33 2.01.56 3.06.69A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* на десктоп бутонът "Обади се" не се показва (махната слушалка по искане на Калоян 2026-10-05) */
@media (min-width: 1001px) {
	li.daga-nav-btn.daga-nav-call { display: none !important; }
}

/* социални мрежи: тъмни кръгове със светла икона (бяха в цвета на фона) */
#offcanvas [data-id="socials"] {
	margin-top: 26px;
	display: flex;
	gap: 12px;
	justify-content: center;
}
#offcanvas [data-id="socials"] a {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #0a0500 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
#offcanvas [data-id="socials"] a svg,
#offcanvas [data-id="socials"] a svg path {
	fill: #f4ede0 !important;
}

/* Мобилна админ лента (до 782px) не е залепена - изчезва със скрола, затова
   в плаващо състояние не пазим място за нея (иначе остава ~46px празно горе,
   видимо само за влезли администратори). */
@media (max-width: 782px) {
	body.daga-fh.dh-stuck #header {
		top: var(--fh-gap);
	}
}
