/* ===== EHFB – Header & Footer Builder ===== */

.ehfb-header, .ehfb-footer { width: 100%; box-sizing: border-box; }

/* ---------- Header behaviour ---------- */
.ehfb-header {
	position: relative;
	z-index: 999;
	transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.ehfb-header.ehfb-sticky,
.ehfb-header.ehfb-smart { position: sticky; top: 0; }

.ehfb-header.ehfb-transparent { position: absolute; top: 0; left: 0; right: 0; }
.ehfb-header.ehfb-transparent.ehfb-sticky,
.ehfb-header.ehfb-transparent.ehfb-smart { position: fixed; }

.admin-bar .ehfb-header.ehfb-sticky,
.admin-bar .ehfb-header.ehfb-smart,
.admin-bar .ehfb-header.ehfb-transparent { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .ehfb-header.ehfb-sticky,
	.admin-bar .ehfb-header.ehfb-smart,
	.admin-bar .ehfb-header.ehfb-transparent { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .ehfb-header.ehfb-transparent:not(.ehfb-sticky):not(.ehfb-smart) { top: 0; }
}

.ehfb-header.ehfb-hidden { transform: translateY(-110%); }

/* ---------- Site logo ---------- */
.ehfb-logo { display: inline-block; text-decoration: none; line-height: 1; }
.ehfb-logo img { display: block; max-width: 100%; height: auto; transition: opacity .2s; }
.ehfb-logo-text { font-weight: 700; font-size: 24px; color: inherit; }

/* ---------- Copyright ---------- */
.ehfb-copyright a { text-decoration: none; }

/* ---------- Nav menu ---------- */
.ehfb-nav { position: relative; display: flex; width: 100%; }
.ehfb-menu, .ehfb-menu ul { list-style: none; margin: 0; padding: 0; }
.ehfb-menu { display: flex; flex-wrap: wrap; align-items: center; }
.ehfb-menu li { position: relative; margin: 0; list-style: none; }
.ehfb-menu a { display: block; padding: 10px 14px; text-decoration: none; transition: color .2s, background-color .2s; }

.ehfb-layout-vertical .ehfb-menu { flex-direction: column; align-items: stretch; }

/* dropdown (desktop) */
.ehfb-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 210px; z-index: 99;
	background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ehfb-menu .sub-menu a { padding: 10px 16px; color: #222; }
.ehfb-menu .sub-menu a:hover { background: #f5f5f5; }
.ehfb-menu li:hover > .sub-menu,
.ehfb-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ehfb-menu .sub-menu .sub-menu { top: 0; left: 100%; }

.ehfb-layout-vertical .ehfb-menu .sub-menu {
	position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent;
}
.ehfb-layout-vertical .ehfb-menu li:hover > .sub-menu,
.ehfb-layout-vertical .ehfb-menu li:focus-within > .sub-menu { display: block; }

/* Toggle buttons are hidden by default (desktop).
   !important is needed: themes / the Elementor kit style every <button> and would show them. */
.ehfb-nav > .ehfb-nav-toggle,
.ehfb-menu .ehfb-sub-toggle { display: none !important; }

/* Reset theme / Elementor-kit button look (pink backgrounds, borders, big paddings, hover colours) */
.ehfb-nav .ehfb-nav-toggle,
.ehfb-nav .ehfb-nav-toggle:hover,
.ehfb-nav .ehfb-nav-toggle:focus,
.ehfb-nav .ehfb-nav-toggle:active,
.ehfb-menu .ehfb-sub-toggle,
.ehfb-menu .ehfb-sub-toggle:hover,
.ehfb-menu .ehfb-sub-toggle:focus,
.ehfb-menu .ehfb-sub-toggle:active,
.ehfb-search .ehfb-search-toggle,
.ehfb-search .ehfb-search-toggle:hover,
.ehfb-search .ehfb-search-toggle:focus,
.ehfb-search .ehfb-search-toggle:active {
	-webkit-appearance: none; appearance: none;
	background: var(--ehfb-toggle-bg, transparent); border: 0; border-radius: 0; box-shadow: none; text-shadow: none;
	text-transform: none; letter-spacing: normal; font: inherit; min-width: 0; min-height: 0; margin: 0;
	color: inherit; cursor: pointer; outline-offset: 2px;
}
.ehfb-nav .ehfb-nav-toggle { --ehfb-bar-w: 24px; align-items: center; justify-content: center; padding: 10px; line-height: 0; }
.ehfb-menu .ehfb-sub-toggle { padding: 0; }
.ehfb-search .ehfb-search-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px; line-height: 1; }

/* hamburger bars */
.ehfb-bars, .ehfb-bars::before, .ehfb-bars::after {
	display: block; width: var(--ehfb-bar-w, 24px); height: 2px; background: #222; border-radius: 2px;
	transition: transform .25s ease, background-color .25s ease, top .25s ease;
}
.ehfb-bars { position: relative; }
.ehfb-bars::before, .ehfb-bars::after { content: ""; position: absolute; left: 0; }
.ehfb-bars::before { top: -7px; }
.ehfb-bars::after { top: 7px; }
.ehfb-open .ehfb-bars { background: transparent !important; }
.ehfb-open .ehfb-bars::before { top: 0; transform: rotate(45deg); }
.ehfb-open .ehfb-bars::after { top: 0; transform: rotate(-45deg); }

.ehfb-sub-toggle::before {
	content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.ehfb-sub-open > .ehfb-sub-toggle::before { transform: rotate(-135deg) translate(-2px, -2px); }
.ehfb-menu .ehfb-sub-toggle { width: 44px; height: 44px; align-items: center; justify-content: center; }

/* ---- collapsed (hamburger) menu ---- */
@media (max-width: 1024px) {
	.ehfb-bp-tablet .ehfb-nav > .ehfb-nav-toggle { display: inline-flex !important; }
	.ehfb-bp-tablet .ehfb-nav-panel {
		display: none; position: absolute; z-index: 99; top: 100%;
		background: var(--ehfb-panel-bg, #fff); box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
		max-height: 80vh; overflow-y: auto; box-sizing: border-box;
	}
	/* full = spans the whole header row (JS sets the vars), left / right = fixed width panel */
	.ehfb-bp-tablet.ehfb-panel-full .ehfb-nav-panel { left: var(--ehfb-pl, 0); width: var(--ehfb-pw, 100vw); top: var(--ehfb-pt, 100%); max-width: 100vw; }
	.ehfb-bp-tablet.ehfb-panel-left .ehfb-nav-panel { left: 0; width: var(--ehfb-panel-w, 300px); max-width: 100vw; }
	.ehfb-bp-tablet.ehfb-panel-right .ehfb-nav-panel { right: 0; width: var(--ehfb-panel-w, 300px); max-width: 100vw; }
	.ehfb-bp-tablet .ehfb-nav.ehfb-open .ehfb-nav-panel { display: block; }
	.ehfb-bp-tablet .ehfb-menu { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
	.ehfb-bp-tablet .ehfb-menu li { width: 100%; }
	.ehfb-bp-tablet .ehfb-menu a { white-space: normal; }
	.ehfb-bp-tablet .ehfb-menu li.menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
	.ehfb-bp-tablet .ehfb-menu li.menu-item-has-children > a { flex: 1 1 0; min-width: 0; }
	.ehfb-bp-tablet .ehfb-menu .ehfb-sub-toggle { display: inline-flex !important; }
	.ehfb-bp-tablet .ehfb-menu .sub-menu {
		position: static; flex-basis: 100%; display: none; opacity: 1; visibility: visible;
		transform: none; box-shadow: none; background: transparent; padding-left: 14px; min-width: 0;
	}
	.ehfb-bp-tablet .ehfb-menu li.ehfb-sub-open > .sub-menu { display: block; }
}
@media (max-width: 767px) {
	.ehfb-bp-mobile .ehfb-nav > .ehfb-nav-toggle { display: inline-flex !important; }
	.ehfb-bp-mobile .ehfb-nav-panel {
		display: none; position: absolute; z-index: 99; top: 100%;
		background: var(--ehfb-panel-bg, #fff); box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
		max-height: 80vh; overflow-y: auto; box-sizing: border-box;
	}
	/* full = spans the whole header row (JS sets the vars), left / right = fixed width panel */
	.ehfb-bp-mobile.ehfb-panel-full .ehfb-nav-panel { left: var(--ehfb-pl, 0); width: var(--ehfb-pw, 100vw); top: var(--ehfb-pt, 100%); max-width: 100vw; }
	.ehfb-bp-mobile.ehfb-panel-left .ehfb-nav-panel { left: 0; width: var(--ehfb-panel-w, 300px); max-width: 100vw; }
	.ehfb-bp-mobile.ehfb-panel-right .ehfb-nav-panel { right: 0; width: var(--ehfb-panel-w, 300px); max-width: 100vw; }
	.ehfb-bp-mobile .ehfb-nav.ehfb-open .ehfb-nav-panel { display: block; }
	.ehfb-bp-mobile .ehfb-menu { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
	.ehfb-bp-mobile .ehfb-menu li { width: 100%; }
	.ehfb-bp-mobile .ehfb-menu a { white-space: normal; }
	.ehfb-bp-mobile .ehfb-menu li.menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
	.ehfb-bp-mobile .ehfb-menu li.menu-item-has-children > a { flex: 1 1 0; min-width: 0; }
	.ehfb-bp-mobile .ehfb-menu .ehfb-sub-toggle { display: inline-flex !important; }
	.ehfb-bp-mobile .ehfb-menu .sub-menu {
		position: static; flex-basis: 100%; display: none; opacity: 1; visibility: visible;
		transform: none; box-shadow: none; background: transparent; padding-left: 14px; min-width: 0;
	}
	.ehfb-bp-mobile .ehfb-menu li.ehfb-sub-open > .sub-menu { display: block; }
}

.ehfb-notice { padding: 10px 14px; background: #fff8e1; border: 1px dashed #e0b300; color: #6b5200; font-size: 13px; }

/* ---------- Search ---------- */
.ehfb-search { position: relative; }
.ehfb-search .ehfb-search-form { display: flex; align-items: stretch; width: 100%; margin: 0; }
.ehfb-search .ehfb-search-form input[type="search"],
.ehfb-search .ehfb-search-form input[type="search"]:focus {
	flex: 1 1 auto; min-width: 0; width: auto; height: 42px; box-sizing: border-box; padding: 0 14px; margin: 0;
	border: 1px solid #d0d0d0; background: #fff; color: #222; font: inherit; border-radius: 0; box-shadow: none; outline: 0;
	-webkit-appearance: none; appearance: none;
}
.ehfb-search .ehfb-search-form input[type="search"]:focus { border-color: #888; }
.ehfb-search .ehfb-search-form button,
.ehfb-search .ehfb-search-form button:hover,
.ehfb-search .ehfb-search-form button:focus {
	display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; margin: 0; box-sizing: border-box;
	background-color: var(--ehfb-btn-bg, #222); color: #fff; border: 0; border-radius: 0; box-shadow: none;
	text-transform: none; letter-spacing: normal; font: inherit; line-height: 1; cursor: pointer;
}
.ehfb-search--icon .ehfb-search-form {
	position: absolute; top: 100%; right: 0; width: 320px; max-width: 90vw; z-index: 99;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.ehfb-search--icon.ehfb-search-open .ehfb-search-form { opacity: 1; visibility: visible; transform: none; }

/* ---------- Cart ---------- */
.ehfb-cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.ehfb-cart-count {
	position: absolute; top: -8px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
	border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.ehfb-cart-label + .ehfb-cart-count, .ehfb-cart-label { position: static; }
.ehfb-hide-zero-yes .ehfb-cart-count[data-count="0"] { display: none; }
