/*
 * Elementor Shop Header — the hggorras storefront top bar: brand monogram +
 * wordmark, a pill search field with an inline submit hint, a language
 * switcher, the orders / cart actions and a gold login button.
 *
 * Every colour, the gold gradient and the pill radius are declared here as
 * custom properties so the Elementor controls can override them without
 * fighting the cascade. Typeface is the system UI stack, matching the
 * category block.
 */

.esph-header {
	--esph-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--esph-gold-a: #b47b18;
	--esph-gold-b: #f0d486;
	--esph-hdr-bg: #ffffff;
	--esph-hdr-text: #1a1a1a;
	--esph-hdr-muted: #8a8a8a;
	--esph-hdr-border: #e5e5e5;
	--esph-hdr-radius: 999px;
	position: relative;
	z-index: 20;
	width: 100%;
	background-color: var(--esph-hdr-bg);
	border-top: 1px solid #111111;
	border-bottom: 1px solid var(--esph-hdr-border);
	font-family: var(--esph-font);
	color: var(--esph-hdr-text);
}

/* The host theme (Minimog and friends) styles bare elements aggressively, so
   sizing is pinned down to this subtree only. */
.esph-header,
.esph-header *,
.esph-header *::before,
.esph-header *::after {
	box-sizing: border-box;
}

/* Matches the products widget's content width so the brand lines up with the
   product grid below it; the white bar itself still spans the full viewport. */
.esph-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1270px;
	margin: 0 auto;
	padding: 12px 24px;
}

/* ---- Brand ---- */
.esph-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	text-decoration: none;
	border: 0;
}

.esph-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #111111;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
	color: #d9a83f;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 17px;
	font-weight: 700;
	font-style: italic;
	line-height: 1;
	letter-spacing: -0.02em;
	flex-shrink: 0;
}

/* With a logo image the badge's own black disc and gold lettering step aside —
   the artwork supplies both. Shape and size come from the element's own controls. */
.esph-brand__mark--image {
	width: auto;
	height: auto;
	overflow: hidden;
	background-color: transparent;
	box-shadow: none;
	color: inherit;
}

.esph-brand__logo {
	display: block;
	width: var(--esph-logo-size, 44px);
	height: var(--esph-logo-size, 44px);
	object-fit: cover;
	border-radius: 0;
}

.esph-brand__mark--circle .esph-brand__logo {
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.esph-brand__mark--rounded .esph-brand__logo {
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

/* Wide artwork: let the width follow the image, so a wordmark logo is shown
   whole instead of being cropped into a square. */
.esph-brand__mark--auto .esph-brand__logo {
	width: auto;
	max-width: 240px;
	object-fit: contain;
}

.esph-brand__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.esph-brand__title {
	color: #d9a83f;
	font-family: var(--esph-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	white-space: nowrap;
}

.esph-brand__tagline {
	color: var(--esph-hdr-muted);
	font-family: var(--esph-font);
	font-size: 8px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---- Search ---- */
.esph-hsearch {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	max-width: 480px;
	min-width: 200px;
	margin: 0;
}

.esph-hsearch__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: var(--esph-hdr-muted);
	pointer-events: none;
	z-index: 1;
}

.esph-hsearch__input {
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 132px 8px 40px;
	border: 1px solid var(--esph-hdr-border);
	border-radius: var(--esph-hdr-radius);
	background-color: #ffffff;
	font-family: var(--esph-font);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--esph-hdr-text);
	-webkit-appearance: none;
	appearance: none;
}

.esph-hsearch__input::placeholder {
	color: #b0b0b0;
	opacity: 1;
}

.esph-hsearch__input:focus {
	outline: none;
	border-color: #cfcfcf;
}

.esph-hsearch__hint {
	position: absolute;
	right: 5px;
	top: 5px;
	bottom: 5px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--esph-hdr-border);
	border-radius: var(--esph-hdr-radius);
	background-color: #ffffff;
	color: var(--esph-hdr-muted);
	font-family: var(--esph-font);
	font-size: 8px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.esph-hsearch__hint:hover {
	border-color: #cfcfcf;
	color: var(--esph-hdr-text);
}

/* ---- Language switcher ---- */
.esph-lang {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding: 4px 6px 4px 12px;
	border: 1px solid var(--esph-hdr-border);
	border-radius: var(--esph-hdr-radius);
	background-color: #ffffff;
}

.esph-lang__label {
	margin-right: 8px;
	color: var(--esph-hdr-muted);
	font-family: var(--esph-font);
	font-size: 11px;
	font-weight: 400;
	white-space: nowrap;
}

.esph-lang__items {
	display: flex;
	align-items: center;
	gap: 2px;
}

.esph-lang__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 32px;
	padding: 6px 10px;
	border-radius: var(--esph-hdr-radius);
	color: var(--esph-hdr-muted);
	font-family: var(--esph-font);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.esph-lang__btn:hover {
	color: var(--esph-hdr-text);
}

.esph-lang__btn.is-active {
	background-image: linear-gradient(135deg, var(--esph-gold-a), var(--esph-gold-b));
	color: #070708;
	font-weight: 700;
	box-shadow: 0 2px 6px rgba(170, 119, 28, 0.25);
}

/* ---- Actions ---- */
.esph-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	flex-shrink: 0;
}

.esph-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--esph-hdr-border);
	border-radius: var(--esph-hdr-radius);
	background-color: #ffffff;
	color: var(--esph-hdr-text);
	font-family: var(--esph-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.esph-action:hover {
	border-color: #cfcfcf;
	background-color: #fafafa;
	color: var(--esph-hdr-text);
}

.esph-action__icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--esph-hdr-muted);
}

.esph-action__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	margin-left: 2px;
	border-radius: 50%;
	background-image: linear-gradient(135deg, var(--esph-gold-a), var(--esph-gold-b));
	color: #070708;
	font-family: var(--esph-font);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

/* The badge element is always in the DOM so WooCommerce cart fragments can
   replace it; an empty cart just hides it. */
.esph-action__badge[data-count='0'] {
	display: none;
}

.esph-actions__divider {
	width: 1px;
	height: 26px;
	flex-shrink: 0;
	background-color: var(--esph-hdr-border);
}

.esph-login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 24px;
	border: 0;
	border-radius: var(--esph-hdr-radius);
	background-image: linear-gradient(135deg, var(--esph-gold-a), var(--esph-gold-b));
	color: #070708;
	font-family: var(--esph-font);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(170, 119, 28, 0.3);
	transition: filter 0.2s ease;
}

.esph-login:hover {
	filter: brightness(1.06);
	color: #070708;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
	.esph-header__inner {
		flex-wrap: wrap;
		gap: 12px 16px;
	}

	/* The search field drops to its own full-width row under the brand. */
	.esph-hsearch {
		order: 3;
		flex-basis: 100%;
		max-width: none;
	}

	.esph-actions {
		margin-left: auto;
	}
}

@media (max-width: 767px) {
	.esph-header__inner {
		padding: 10px 12px;
		gap: 10px 12px;
	}

	/* Row 1: brand on the left, language pills on the right. */
	.esph-brand {
		flex: 1 1 auto;
		min-width: 0;
	}

	.esph-brand__mark {
		width: 38px;
		height: 38px;
		font-size: 15px;
	}

	/* Re-asserted because it sits earlier in the file and would otherwise lose
	   this tie: the image variant sizes itself from the variable, not the box. */
	.esph-brand__mark--image {
		width: auto;
		height: auto;
	}

	/* Three classes, so it outranks the two-class rule Elementor writes from the
	   Logo Size control no matter which stylesheet the page loads last. */
	.esph-header .esph-header__inner .esph-brand {
		--esph-logo-size: 38px;
	}

	.esph-brand__title {
		font-size: 13px;
		letter-spacing: 0.12em;
	}

	.esph-brand__tagline {
		display: none;
	}

	.esph-lang {
		margin-left: auto;
		padding: 4px;
	}

	.esph-lang__label {
		display: none;
	}

	.esph-lang__btn {
		min-width: 32px;
		min-height: 32px;
		padding: 6px 8px;
		font-size: 10px;
	}

	/* Row 2: the search field spans the full width. A 16px input font stops
	   iOS from zooming the page when the field takes focus. */
	.esph-hsearch {
		order: 3;
		flex-basis: 100%;
		max-width: none;
	}

	.esph-hsearch__input {
		padding-right: 108px;
		font-size: 16px;
	}

	/* Row 3: icon-only action buttons, centred. */
	.esph-actions {
		order: 4;
		flex-basis: 100%;
		margin-left: 0;
		justify-content: center;
		gap: 8px;
	}

	.esph-action__text {
		display: none;
	}

	.esph-action {
		gap: 6px;
		padding: 8px 12px;
	}

	.esph-login {
		padding: 8px 18px;
	}
}
