/* ==========================================================================
   Frosted Bloom — reusable glass site header (two rows).

     Row 1  (.gfd-topbar)  : delivery-date picker + search + cart  (right)
     Row 2  (.gfd-mainbar) : logo (left)  +  menu (right)

   Same structure on mobile and desktop — only spacing/wrapping changes.
   Works on any page that opts in via gfd_use_frosted_header().
   ========================================================================== */

/* Hide the theme's own header/title chrome on frosted-header pages.
   Includes the theme top bar (.mkdf-top-bar) and its sticky clone, which
   otherwise render the delivery-date/cart/search widgets a second time. */
body.gfd-frosted-header .mkdf-top-bar,
body.gfd-frosted-header .mkdf-page-header,
body.gfd-frosted-header .mkdf-sticky-header,
body.gfd-frosted-header .mkdf-mobile-header,
body.gfd-frosted-header .mkdf-side-area,
body.gfd-frosted-header .mkdf-title-holder {
	display: none !important;
}
body.gfd-frosted-header .mkdf-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.gfd-site-header {
	position: relative;
	/* The theme's .mkdf-wrapper (which contains the whole page) is
	   position:relative; z-index:1000, and our header sits outside it — so the
	   header must clear 1000 (and shop-frosted's 1001) to keep the nav and its
	   dropdowns on top. Still below the jQuery-UI datepicker at 100000. */
	z-index: 1100;
	background: #fff0f5;
	border-bottom: 1px solid rgba(214,68,122,0.12);
	box-shadow: 0 2px 12px rgba(214,68,122,0.06);
	font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

/* ---- Row 1: top bar ---------------------------------------------------- */
.gfd-topbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	padding: 5px 40px;
	border-bottom: 1px solid rgba(214,68,122,0.1);
	flex-wrap: wrap;
}
.gfd-nav-actions {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}
.gfd-nav-actions .widget {
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: none !important;
	width: auto !important;
}
.gfd-nav-actions .gfd-topbar-datepicker {
	display: flex;
	align-items: center;
	gap: 8px;
}
.gfd-nav-actions .gfd-topbar-datepicker label { margin: 0; font-size: 12px; color: #4a4a5a; white-space: nowrap; }
.gfd-nav-actions input.gfd_delivery_date,
.gfd-nav-actions input.select_delivery_date {
	width: 120px;
	margin: 0;
	padding: 5px 11px;
	border-radius: 10px;
	border: 1px solid rgba(214,68,122,0.3);
	background: rgba(255,255,255,0.85);
	font-size: 13px;
	font-family: inherit;
	color: #3a3a4a;
}

/* ---- Row 2: main bar (logo + menu) ------------------------------------ */
.gfd-mainbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 7px 40px;
	flex-wrap: wrap;
}
.gfd-logo { display: block; flex-shrink: 0; }
.gfd-logo img { height: 50px; width: auto; display: block; }

.gfd-navlinks {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	font-weight: 500;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.gfd-navitem { position: relative; }
.gfd-navitem > a {
	display: block;
	color: #4a4a5a;
	text-decoration: none;
	padding: 7px 12px;
	border-radius: 18px;
	white-space: nowrap;
}
.gfd-navitem > a:hover { color: #d6447a; background: rgba(255,255,255,0.5); }
.gfd-caret { font-size: 10px; opacity: .6; }
.gfd-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 200px;
	padding: 10px;
	background: rgba(255,255,255,0.95);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255,255,255,0.9);
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0,0,0,0.12);
	flex-direction: column;
	z-index: 30;
}
.gfd-has-dropdown:hover .gfd-dropdown,
.gfd-has-dropdown:focus-within .gfd-dropdown {
	display: flex;
}
.gfd-dropdown a {
	display: block;
	padding: 8px 12px;
	border-radius: 10px;
	color: #4a4a5a;
	text-decoration: none;
	font-size: 13px;
	white-space: nowrap;
}
.gfd-dropdown a:hover { background: rgba(214,68,122,0.1); color: #d6447a; }

/* ---- Responsive: same two-row structure, tighter spacing -------------- */
@media (max-width: 900px) {
	.gfd-topbar { padding: 8px 16px; justify-content: center; gap: 16px; }
	.gfd-nav-actions { justify-content: center; gap: 16px; }
	.gfd-mainbar { padding: 12px 16px; gap: 10px; }
	/* No hover on touch — dropdowns become tap-to-open accordions. */
	.gfd-dropdown {
		position: static;
		display: none;
		box-shadow: none;
		background: rgba(255,255,255,0.5);
		min-width: 0;
	}
	.gfd-has-dropdown.gfd-dropdown-open .gfd-dropdown { display: flex; }
}

/* jQuery-UI delivery-date calendar must float above the page content. */
.ui-datepicker { z-index: 100000 !important; }
