/* Header (PHP) and footer (Elementor template) chrome. */

/* ---------- Header ---------- */
.eamd-header {
	position: sticky;
	top: 0;
	z-index: var(--eamd-z-header);
	background: var(--eamd-surface);
	border-bottom: 1px solid var(--eamd-line);
}

.admin-bar .eamd-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .eamd-header {
		top: 46px;
	}
}

.eamd-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(20px, 3vw, 48px);
	max-width: calc(var(--eamd-container) + 2 * var(--eamd-gutter));
	height: var(--eamd-header-h);
	margin: 0 auto;
	padding: 0 var(--eamd-gutter);
}

.eamd-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.eamd-header .eamd-logo__img {
	display: block;
	width: auto;
	max-width: none;
	height: 40px;
}

.eamd-logo__text {
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* Navigation: one line, sentence case */
.eamd-nav__list,
.eamd-panel__list {
	display: flex;
	gap: clamp(18px, 2.4vw, 36px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.eamd-nav__list a {
	position: relative;
	display: inline-block;
	padding: 8px 0;
	color: var(--eamd-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.eamd-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--eamd-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s var(--eamd-ease);
}

.eamd-nav__list a:hover {
	color: var(--eamd-ink);
}

.eamd-nav__list a:hover::after,
.eamd-nav__list .current-menu-item > a::after,
.eamd-nav__list .current_page_item > a::after {
	transform: scaleX(1);
}

/* Actions */
.eamd-header__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.eamd-phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--eamd-ink);
	font-family: var(--eamd-mono);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.eamd-phone:hover {
	color: var(--eamd-accent);
}

.eamd-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 4px;
	color: var(--eamd-ink);
	text-decoration: none;
}

.eamd-cart .eamd-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.eamd-cart__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: var(--eamd-radius);
	background: var(--eamd-surface-2);
	color: var(--eamd-ink);
	font-family: var(--eamd-mono);
	font-size: 0.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.eamd-cart__count:not(:empty):not([data-zero]) {
	background: var(--eamd-ink);
	color: var(--eamd-surface);
}

.eamd-header__cta {
	min-height: 42px;
	padding: 0 18px;
}

.eamd-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--eamd-line);
	border-radius: var(--eamd-radius);
	background: transparent;
	color: var(--eamd-ink);
	cursor: pointer;
}

.eamd-burger .eamd-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.eamd-burger__close {
	display: none;
}

.eamd-header.is-open .eamd-burger__open {
	display: none;
}

.eamd-header.is-open .eamd-burger__close {
	display: inline-flex;
}

/* Mobile panel */
.eamd-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	max-height: calc(100dvh - var(--eamd-header-h));
	padding: 8px var(--eamd-gutter) 28px;
	overflow-y: auto;
	background: var(--eamd-surface);
	border-bottom: 1px solid var(--eamd-line);
	box-shadow: var(--eamd-shadow);
}

.eamd-panel__list {
	flex-direction: column;
	gap: 0;
}

.eamd-panel__list li + li {
	border-top: 1px solid var(--eamd-line);
}

.eamd-panel__list a {
	display: block;
	padding: 16px 0;
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	text-decoration: none;
}

.eamd-panel__foot {
	display: grid;
	gap: 18px;
	margin-top: 20px;
}

.eamd-panel__foot .eamd-btn {
	width: 100%;
}

.eamd-phone--panel {
	justify-content: center;
	font-size: 1rem;
}

@media (max-width: 1200px) {
	.eamd-phone {
		display: none;
	}
}

@media (max-width: 1024px) {
	.eamd-header__inner {
		grid-template-columns: 1fr auto;
	}

	.eamd-nav {
		display: none;
	}

	.eamd-burger {
		display: inline-flex;
	}

	.eamd-header .eamd-logo__img {
		height: 34px;
	}
}

@media (max-width: 640px) {
	.eamd-header__cta {
		display: none;
	}

	.eamd-header__actions {
		gap: 10px;
	}
}

@media (min-width: 1025px) {
	.eamd-panel {
		display: none !important;
	}
}

/* ---------- Footer (Elementor template, tokens only) ---------- */
.eamd-footer {
	background: var(--eamd-surface-2);
	border-top: 1px solid var(--eamd-line);
}

.eamd-footer .elementor-heading-title {
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.4;
}

.eamd-footer p,
.eamd-footer li,
.eamd-footer .elementor-icon-list-text {
	font-size: 0.9375rem;
	line-height: 1.65;
}

.eamd-footer a {
	text-decoration: none;
}

.eamd-footer a:hover {
	color: var(--eamd-accent);
	text-decoration: underline;
}

.eamd-footer .eamd-footer__logo img {
	width: auto;
	max-width: none;
	height: 40px;
}

.eamd-footer__legal {
	border-top: 1px solid var(--eamd-line);
}

.eamd-footer__legal p,
.eamd-footer__legal a {
	color: var(--eamd-muted);
	font-size: 0.875rem;
}

.eamd-footer .elementor-social-icon {
	width: 40px;
	height: 40px;
	border: 1px solid var(--eamd-line);
	border-radius: var(--eamd-radius);
	background: transparent;
	color: var(--eamd-ink);
}

.eamd-footer .elementor-social-icon:hover {
	border-color: var(--eamd-ink);
	background: var(--eamd-ink);
	color: var(--eamd-surface);
	text-decoration: none;
}

/* Social icons: Elementor paints the SVG white by default */
.eamd-footer .elementor-social-icon svg,
.eamd-footer .elementor-social-icon i {
	fill: currentColor;
	color: currentColor;
}

/* The header phone is hidden below 1200px, but the mobile panel keeps its own. */
.eamd-panel .eamd-phone {
	display: inline-flex;
}

/* Below 601px the WP admin bar scrolls with the page instead of being fixed. */
@media (max-width: 600px) {
	.admin-bar .eamd-header {
		top: 0;
	}
}

/* ---------- Developer credit ---------- */
.eamd-footer .eamd-credit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--eamd-muted);
	font-size: 0.875rem;
}

.eamd-footer .eamd-credit a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.eamd-footer .eamd-credit img {
	display: block;
	width: auto;
	height: 20px;
	max-width: none;
	transition: opacity 0.2s var(--eamd-ease);
}

.eamd-footer .eamd-credit a:hover img {
	opacity: 0.75;
}

.eamd-footer .eamd-credit__dark {
	display: none !important;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .eamd-footer .eamd-credit__light {
		display: none;
	}

	:root:not([data-theme="light"]) .eamd-footer .eamd-credit__dark {
		display: block !important;
	}
}

:root[data-theme="dark"] .eamd-footer .eamd-credit__light {
	display: none;
}

:root[data-theme="dark"] .eamd-footer .eamd-credit__dark {
	display: block !important;
}

/* Footer list arrows: Elementor paints the SVG black */
.eamd-footer .elementor-icon-list-icon svg {
	fill: currentColor;
	color: var(--eamd-muted);
}

.eamd-footer .eamd-footer__credit,
.eamd-footer .eamd-credit {
	flex: none;
	width: auto;
	white-space: nowrap;
}
