/* Flowix — Header Builder layout (inc/header-builder.php) */

/* Rows: left / centre / right zones. The centre stays truly centred. */
.fx-header .fx-hrow-inner {
	display: grid !important;
	/* Sides never squeeze below their content (logo, icons); a centred menu wraps instead. */
	grid-template-columns: minmax(min-content, 1fr) minmax(0, auto) minmax(min-content, 1fr) !important;
	align-items: center;
	gap: var(--space-lg, 24px);
	max-width: var(--site-width);
	margin: 0 auto;
	padding-left: var(--space-xl, 32px);
	padding-right: var(--space-xl, 32px);
}
.fx-header .fx-hrow--main .fx-hrow-inner { min-height: 72px; }
.fx-header .fx-hrow--top .fx-hrow-inner,
.fx-header .fx-hrow--bottom .fx-hrow-inner { min-height: 36px; }

.fx-hzone { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fx-hzone--left { justify-content: flex-start; }
.fx-hzone--center { justify-content: center; }
.fx-hzone--right { justify-content: flex-end; }
.fx-hzone:empty { display: none; }
.fx-hzone--left:empty, .fx-hzone--right:empty { display: flex; } /* keep the centre centred */

/* Bottom row */
.fx-header .header-bottombar { border-top: 1px solid rgba(155, 123, 58, 0.2); }

/* Items */
.fx-hitem--menu { display: flex; justify-content: center; }
/* A long menu wraps onto a second line instead of running under the logo or icons. */
.fx-hzone .fx-hitem--menu { min-width: 0; }
.fx-hzone .fx-hitem--menu > ul { flex-wrap: wrap; row-gap: 2px; }
.fx-hzone--center .fx-hitem--menu > ul { justify-content: center; }
.fx-header .fx-desktop .fx-hitem--logo { flex-shrink: 0; white-space: nowrap; }
.fx-hitem--secondary-menu a { white-space: nowrap; }
.fx-hspacer { flex: 1 1 auto; }
.fx-hdivider { width: 1px; height: 22px; background: currentColor; opacity: 0.25; margin: 0 6px; }
.fx-htext, .fx-hcontact, .fx-cart-total {
	font-family: var(--font-ui);
	font-size: 0.78rem;
	color: color-mix(in srgb, var(--hd-tx, #faf7f2) 80%, transparent);
}
.fx-header .header-topbar .fx-htext,
.fx-header .header-topbar .fx-hcontact { font-size: 0.68rem; }
.fx-hcontact { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.fx-hcontact:hover { color: var(--hd-acc, #d4b57a); }
.fx-cart-total { background: none; border: 0; cursor: pointer; padding: 6px 8px; }
.fx-hsocial { display: flex; gap: 2px; }
.fx-hsearch form { display: flex; gap: 6px; }
.fx-hsearch input[type="search"] {
	min-width: 180px;
	padding: 8px 12px;
	border-radius: var(--radius-sm, 4px);
	border: 1px solid color-mix(in srgb, var(--hd-tx, #faf7f2) 25%, transparent);
	background: color-mix(in srgb, var(--hd-tx, #faf7f2) 6%, transparent);
	color: inherit;
}
.fx-hsearch button, .fx-hsearch input[type="submit"] { padding: 8px 12px; }

/* Desktop vs mobile rows */
.fx-header .fx-mobile { display: none; }
.fx-header .nav-hamburger { display: flex; }
.fx-header .fx-desktop .fx-hitem--hamburger { display: none; }
@media (max-width: 1024px) {
	.fx-header .fx-desktop { display: none !important; }
	.fx-header .fx-mobile { display: block; }
	.fx-header .fx-mobile .fx-hrow-inner { padding-left: 16px; padding-right: 16px; gap: 10px; }
	.fx-header .fx-mobile .fx-hrow--main .fx-hrow-inner,
	.fx-header .fx-hrow--main.fx-mobile .fx-hrow-inner { min-height: 62px; }
	.fx-header .fx-mobile #primary-navigation,
	.fx-header .fx-mobile .fx-hitem--menu { display: flex; }
	.fx-header .fx-mobile .header-topbar-inner { padding-top: 0; padding-bottom: 0; }
}

/* Scroll behaviour */
#masthead.fx-header { transition: transform 0.35s ease, background-color 0.3s ease, box-shadow 0.3s ease; }
#masthead.fx-sticky-off { position: relative; }
#masthead.fx-sticky-up.is-hidden { transform: translateY(-100%); }
#masthead.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
#masthead.fx-shrink .fx-hrow--main .fx-hrow-inner { transition: min-height 0.3s ease; }
#masthead.fx-shrink.is-scrolled .fx-hrow--main .fx-hrow-inner { min-height: 54px; }
#masthead.fx-shrink .custom-logo-link img { transition: max-height 0.3s ease; }
#masthead.fx-shrink.is-scrolled .custom-logo-link img { max-height: 36px; }
#masthead.fx-shrink.is-scrolled .fx-hrow--top { display: none; }

/* See-through header floating over the homepage hero */
.home.fx-has-overlay-header #masthead.fx-overlay {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	background: transparent;
	border-bottom-color: transparent;
}
.home.fx-has-overlay-header #masthead.fx-overlay .header-topbar { background: transparent; }
.admin-bar.home.fx-has-overlay-header #masthead.fx-overlay { top: 32px; }
.home.fx-has-overlay-header #masthead.fx-overlay.is-scrolled { background: var(--hd-bg, var(--espresso)); }
.home.fx-has-overlay-header .hero { padding-top: calc(var(--fx-header-h, 110px) + 40px); }
@media (max-width: 782px) {
	.admin-bar.home.fx-has-overlay-header #masthead.fx-overlay { top: 46px; }
}

/* ================================================================
   Footer Builder layout (inc/footer-builder.php)
   ================================================================ */
.fx-footer .fx-fmain { grid-template-columns: var(--fx-fgrid, 2fr 1fr 1fr 1fr); }
/* Column layout presets (Footer Builder → Column layout). */
.fx-footer .fx-fmain.fx-fgrid--1fr { --fx-fgrid: 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr { --fx-fgrid: 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--2fr-1fr { --fx-fgrid: 2fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-2fr { --fx-fgrid: 1fr 2fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-1fr { --fx-fgrid: 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--2fr-1fr-1fr { --fx-fgrid: 2fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-2fr { --fx-fgrid: 1fr 1fr 2fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-2fr-1fr { --fx-fgrid: 1fr 2fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-1fr-1fr { --fx-fgrid: 1fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1p4fr-1fr-1fr-1fr { --fx-fgrid: 1.4fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--2fr-1fr-1fr-1fr { --fx-fgrid: 2fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-1fr-2fr { --fx-fgrid: 1fr 1fr 1fr 2fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-1fr-1fr-1fr { --fx-fgrid: 1fr 1fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--2fr-1fr-1fr-1fr-1fr { --fx-fgrid: 2fr 1fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain.fx-fgrid--1fr-1fr-1fr-1fr-1fr-1fr { --fx-fgrid: 1fr 1fr 1fr 1fr 1fr 1fr; }
.fx-footer .fx-fmain > div:last-child { display: block; } /* old theme rule hid the last column on tablets */
.fx-fcol { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.fx-fcol:empty { display: none; }
.fx-fitem .footer-col-title { margin-bottom: 14px; }
.fx-ftext { font-size: 0.85rem; line-height: 1.7; opacity: 0.85; }
.fx-ftext p { margin: 0 0 0.6em; }
.fx-fcontact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.85rem; }
.fx-fcontact li { display: flex; gap: 10px; align-items: flex-start; }
.fx-fcontact svg { flex: none; margin-top: 3px; opacity: 0.7; }
.fx-fcontact a { color: inherit; }
.fx-fbacktotop { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: inherit; text-decoration: none; opacity: 0.8; }
.fx-fbacktotop:hover { opacity: 1; }

.fx-footer .fx-fbottom { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.fx-fzone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.fx-fzone--center { justify-content: center; }
.fx-fzone--right { justify-content: flex-end; }

@media (max-width: 1024px) {
	.fx-footer .fx-fmain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.fx-footer .fx-fmain.fx-fmain--m1 { grid-template-columns: minmax(0, 1fr); }
	.fx-footer .fx-fmain.fx-fmain--m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fx-footer .fx-fmain.fx-fmain--m2 .fx-fcol--1 { grid-column: 1 / -1; }
	.fx-footer .fx-fbottom { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.fx-fzone, .fx-fzone--right { justify-content: center; }
}

/* Dark mode switch (header item / floating button) */
.fx-dark-toggle .lucide, .fx-dark-toggle svg { display: block; }
.fx-dark-toggle svg + svg { display: none; }
html.fx-dark .fx-dark-toggle svg { display: none; }
html.fx-dark .fx-dark-toggle svg + svg { display: block; }
.fx-dark-float {
	position: fixed; left: 20px; bottom: 20px; z-index: 400;
	width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	background: var(--espresso); color: var(--cream); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
html.fx-dark .fx-dark-float { background: var(--cream); color: var(--ink); }
html:not(.fx-float-on) .fx-dark-float { display: none; }

/* Phones: a long shop name shrinks and trims instead of running into the icons. */
.fx-mobile .site-branding, .fx-mobile .site-branding a { min-width: 0; max-width: 100%; }
.fx-mobile .site-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: clamp(1rem, 5.2vw, 1.4rem) !important; letter-spacing: 0.02em !important; }
.fx-mobile .custom-logo-link img { max-height: 40px; }
/* When nothing sits in the middle, the left zone (logo) gets the spare room. */
.fx-header .fx-hrow-inner:has(> .fx-hzone--center:empty) { grid-template-columns: minmax(0, 1fr) 0 auto !important; }
