/* =========================================================================
   Zen Aura — site frame: header, main menu (desktop + phone overlay),
   language switch, footer, contact list, floating WhatsApp button
   ZA-MARKER: site-frame-styles
   ========================================================================= */

/* Header ------------------------------------------------------------------ */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 60;
}

.za-header {
	position: relative;
	isolation: isolate;
}

/* The translucent bar lives on a pseudo-element: a blur on an ancestor of the menu would trap the phone overlay */
.za-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--wp--custom--header-bg);
	-webkit-backdrop-filter: blur(14px) saturate(1.1);
	backdrop-filter: blur(14px) saturate(1.1);
	box-shadow: 0 1px 0 var(--wp--custom--line--soft);
	opacity: 0;
	transition: opacity var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle);
}

.za-header.is-scrolled::before {
	opacity: 1;
}

.za-header .za-header__inner {
	min-height: var(--wp--custom--header-height);
	gap: var(--wp--preset--spacing--50);
}

/* Logo + wordmark */
.za-header .za-brand,
.za-footer .za-brand {
	gap: var(--wp--preset--spacing--30);
	flex: none;
}

.za-brand .wp-block-site-logo,
.za-brand .wp-block-site-logo a {
	display: block;
	line-height: 0;
}

.za-brand .wp-block-site-logo img {
	width: clamp(3.1rem, 2.6rem + 1.4vw, 3.9rem);
	height: auto;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--round);
	box-shadow: 0 0 0 1px rgb(201 163 90 / 0.4);
}

.za-brand .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--wordmark);
	font-weight: var(--wp--custom--weight--wordmark);
	line-height: 1;
	letter-spacing: var(--wp--custom--tracking--wordmark);
	white-space: nowrap;
}

.za-brand .wp-block-site-title a {
	color: var(--wp--preset--color--brand);
	text-decoration: none;
}

/* Desktop menu */
.za-header .za-nav .wp-block-navigation__container {
	flex-wrap: nowrap;
	gap: clamp(1.5rem, 2.5vw, 3rem);
}

.za-header .za-nav .wp-block-navigation-item {
	white-space: nowrap;
}

.za-header .za-nav .wp-block-navigation-item__content {
	position: relative;
	display: inline-block;
	padding-block: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--weight--regular);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.za-header .za-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.15rem;
	height: 0.6rem;
	background: var(--wp--custom--decor--swash-gold) center / 100% 100% no-repeat;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle);
}

.za-header .za-nav .wp-block-navigation-item__content:hover::after,
.za-header .za-nav .wp-block-navigation-item__content[aria-current="page"]::after {
	transform: scaleX(1);
}

/* The menu's own WhatsApp + phone buttons only show inside the phone overlay */
.za-header .za-nav .za-nav-extras,
.za-footer .za-nav-extras {
	display: none;
}

.za-header__actions {
	gap: var(--wp--preset--spacing--30);
	flex: none;
}

.za-header .za-header-cta {
	margin: 0;
}

.za-header .za-header-cta .wp-block-button__link {
	white-space: nowrap;
}

/* Menu toggle buttons: round, with the hand-drawn icons */
.za-header .za-nav .wp-block-navigation__responsive-container-open,
.za-header .za-nav .wp-block-navigation__responsive-container-close {
	width: 3rem;
	height: 3rem;
	align-items: center;
	justify-content: center;
	border-radius: var(--wp--custom--radius--round);
	border: 1px solid var(--wp--custom--line--soft);
	color: var(--wp--preset--color--brand);
	background: transparent;
}

.za-header .za-nav .wp-block-navigation__responsive-container-open svg,
.za-header .za-nav .wp-block-navigation__responsive-container-close svg {
	display: none;
}

.za-header .za-nav .wp-block-navigation__responsive-container-open::before,
.za-header .za-nav .wp-block-navigation__responsive-container-close::before {
	content: "";
	width: 1.5rem;
	height: 1.5rem;
	background: currentColor;
	-webkit-mask: var(--za-icon-menu) center / contain no-repeat;
	mask: var(--za-icon-menu) center / contain no-repeat;
}

.za-header .za-nav .wp-block-navigation__responsive-container-close::before {
	-webkit-mask-image: var(--za-icon-close);
	mask-image: var(--za-icon-close);
}

/* The design collapses the menu at 60rem, not WordPress's 600px */
@media (min-width: 600px) and (max-width: 59.99rem) {
	.za-header .za-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.za-header .za-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

@media (max-width: 599.98px) {
	.za-header .za-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (max-width: 59.99rem) {
	.za-header .za-header-cta {
		display: none;
	}

	/* the menu button sits last on phones (core also copies "za-nav" onto the inner list, so target the block itself) */
	.za-header .za-header__inner > .za-nav {
		order: 3;
	}
}

@media (max-width: 30rem) {
	.za-header__actions {
		gap: var(--wp--preset--spacing--20);
	}

	.za-header .za-header__inner {
		gap: var(--wp--preset--spacing--30);
	}
}

/* Phone overlay */
/* extra class beats core's white ".wp-block-navigation:not(.has-background) ... .is-menu-open" */
.za-header .za-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40) var(--wp--custom--gutter) var(--wp--preset--spacing--70);
	background-color: var(--wp--preset--color--mist);
	background-image: var(--wp--custom--texture--wash-lavender);
	background-repeat: no-repeat;
	background-position: 120% 110%;
	background-size: 80% auto;
	color: var(--wp--preset--color--brand);
}

.za-header .za-nav .wp-block-navigation__responsive-container.is-menu-open::after {
	content: "";
	position: absolute;
	right: var(--wp--custom--gutter);
	top: 28%;
	width: 6rem;
	aspect-ratio: 200 / 360;
	background: var(--wp--custom--decor--sprig-gold) center / contain no-repeat;
	opacity: 0.8;
	pointer-events: none;
}

.za-header .za-nav .is-menu-open .wp-block-navigation__responsive-close {
	max-width: none;
	height: 100%;
}

.za-header .za-nav .is-menu-open .wp-block-navigation__responsive-dialog {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.za-header .za-nav .is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: calc((var(--wp--custom--header-height) - 3rem) / 2);
	right: 0;
	display: flex;
}

.za-header .za-nav .is-menu-open .wp-block-navigation__responsive-container-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-top: calc(var(--wp--custom--header-height) + var(--wp--preset--spacing--70));
	gap: 0;
}

.za-header .za-nav .is-menu-open .wp-block-navigation__container {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	justify-items: start;
}

.za-header .za-nav .is-menu-open .wp-block-navigation-item__content {
	padding: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: var(--wp--custom--weight--display);
	line-height: 1.2;
	color: var(--wp--preset--color--brand);
}

.za-header .za-nav .is-menu-open .wp-block-navigation-item__content::after {
	display: none;
}

.za-header .za-nav .is-menu-open .wp-block-navigation-item__content[aria-current="page"] {
	font-style: italic;
}

.za-header .za-nav .is-menu-open .za-nav-extras {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	justify-items: start;
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--70);
}

.za-header .za-nav .is-menu-open .za-nav-extras .wp-block-button__link {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
}

/* The phone number in the overlay is a quiet text link, not a pill */
.za-header .za-nav .is-menu-open .za-nav-extras .za-icon-phone > .wp-block-button__link {
	min-height: 0;
	padding: 0;
	background: none;
	box-shadow: none;
	color: var(--wp--preset--color--brand);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.35em;
}

/* Language switch (EN / සිං) ---------------------------------------------- */
.za-lang-switch {
	display: inline-flex;
	align-items: center;
	padding: 3px;
	border-radius: var(--wp--custom--radius--pill);
	border: 1px solid var(--wp--custom--line--soft);
	background: var(--wp--preset--color--raised);
}

.za-lang-switch__opt {
	display: inline-grid;
	place-items: center;
	min-width: 2.6rem;
	min-height: 2.25rem;
	padding: 0 0.7rem;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--weight--medium);
	line-height: 1;
	text-decoration: none;
	color: var(--wp--preset--color--brand);
	transition: background-color var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle), color var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle);
}

.za-lang-switch__opt:hover {
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--brand);
}

.za-lang-switch__opt[aria-current="true"] {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--base);
}

@media (max-width: 30rem) {
	.za-lang-switch__opt {
		min-width: 2.3rem;
		padding: 0 0.55rem;
	}
}

/* Footer ------------------------------------------------------------------- */
/* tuck the footer 1px under the page so its wave never leaves a hairline seam */
.wp-site-blocks > footer.wp-block-template-part {
	position: relative;
	margin-block-start: -1px;
}

.za-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--wp--preset--color--deep);
	color: var(--wp--preset--color--plum-pale);
	padding-top: calc(var(--wp--preset--spacing--100) + var(--wp--custom--wave-height) * 0.3);
	padding-bottom: var(--wp--preset--spacing--60);
}

/* top wave, filled with the cream of the section above */
.za-footer::before {
	content: "";
	position: absolute;
	left: 0;
	top: -1px;
	width: 100%;
	height: var(--wp--custom--wave-height);
	background: var(--wp--preset--color--base);
	-webkit-mask: var(--za-wave-b) center / 100% 100% no-repeat;
	mask: var(--za-wave-b) center / 100% 100% no-repeat;
	transform: scaleY(-1);
	pointer-events: none;
}

.za-footer::after {
	content: "";
	position: absolute;
	right: -3.5rem;
	top: 18%;
	width: clamp(10rem, 18vw, 16rem);
	aspect-ratio: 200 / 360;
	background: var(--wp--custom--decor--sprig-gold) center / contain no-repeat;
	opacity: 0.35;
	z-index: -1;
	transform: rotate(-12deg);
	pointer-events: none;
}

.za-footer :is(p, h2, ul) {
	margin: 0;
}

.za-footer .za-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(3, 1fr);
	gap: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
}

.za-footer .za-footer__grid > *,
.za-footer .za-footer__brand > *,
.za-footer .za-footer__col > * {
	margin-block: 0;
}

.za-footer .za-footer__brand {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	align-content: start;
}

.za-footer .za-footer__logo img {
	width: clamp(5rem, 4rem + 3vw, 7rem);
	height: auto;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--round);
	box-shadow: 0 0 0 1px rgb(201 163 90 / 0.4);
}

.za-footer .za-footer__motto {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--xl);
	line-height: var(--wp--custom--leading--heading);
	color: var(--wp--preset--color--gold-pale);
	max-width: 16ch;
}

.za-footer .za-footer__heading {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--weight--display);
	color: var(--wp--preset--color--base);
	margin-bottom: var(--wp--preset--spacing--40);
}

.za-footer .za-footer-nav .wp-block-navigation__container {
	display: grid;
	gap: var(--wp--preset--spacing--20);
}

.za-footer .za-footer-nav .wp-block-navigation-item__content,
.za-footer .za-contact-list__item {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: 0;
	font-size: var(--wp--preset--font-size--sm);
	text-decoration: none;
	color: var(--wp--preset--color--plum-pale);
	transition: color var(--wp--custom--duration--quick) var(--wp--custom--ease--gentle);
}

.za-footer .za-footer-nav .wp-block-navigation-item__content:hover,
.za-footer a.za-contact-list__item:hover {
	color: var(--wp--preset--color--gold-pale);
}

.za-contact-list {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.za-footer .za-contact-list .za-icon {
	color: var(--wp--preset--color--accent);
}

.za-footer .za-footer__base {
	margin-top: var(--wp--preset--spacing--80);
	padding-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--custom--line--on-dark);
	gap: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--xs);
}

.za-footer :focus-visible {
	outline-color: var(--wp--preset--color--gold-light);
}

@media (max-width: 60rem) {
	.za-footer .za-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.za-footer .za-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 30rem) {
	.za-footer .za-footer__grid {
		grid-template-columns: 1fr;
	}
}

/* Floating WhatsApp button ----------------------------------------------- */
.za-fab {
	margin: 0;
}

.za-fab__link {
	position: fixed;
	right: clamp(1rem, 2vw, 2rem);
	bottom: clamp(1rem, 2vw, 2rem);
	z-index: 55;
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--lift);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--weight--medium);
	opacity: 0;
	transform: translateY(1rem);
	pointer-events: none;
	transition: opacity var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle), transform var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle), background-color var(--wp--custom--duration--quick);
}

.za-fab__link .za-icon {
	width: 1.6rem;
	height: 1.6rem;
}

.za-fab__link.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.za-fab__link:hover {
	background: var(--wp--preset--color--brand-hover);
	color: var(--wp--preset--color--base);
}

.za-fab__label {
	padding-right: var(--wp--preset--spacing--20);
}

@media (max-width: 40rem) {
	.za-fab__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

/* Editor: show the floating button in place so it can be selected and edited */
.editor-styles-wrapper .za-fab__link {
	position: static;
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* Header account + cart icons (WooCommerce, added after the menu) */
.za-header .za-header__inner > .wp-block-woocommerce-mini-cart,
.za-header .za-header__inner > .wp-block-woocommerce-customer-account {
	flex: none;
	margin: 0;
}

.za-header .wp-block-woocommerce-customer-account a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid var(--wp--custom--line--soft);
	border-radius: var(--wp--custom--radius--round);
	color: var(--wp--preset--color--brand);
	transition: box-shadow var(--wp--custom--duration--calm);
}

.za-header .wp-block-woocommerce-customer-account a:hover {
	box-shadow: 0 0 1.2rem rgb(201 163 90 / 0.4);
}

.za-header .wp-block-woocommerce-customer-account svg {
	width: 1.3rem;
	height: 1.3rem;
}

/* "My account" menu link: phone menu and footer only (the header has the icon) */
.za-header .za-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .za-nav-account {
	display: none;
}

@media (max-width: 30rem) {
	.za-header .za-header__inner > .wp-block-woocommerce-customer-account {
		display: none;
	}
}

@media (max-width: 59.99rem) {
	/* phone order: logo · language · account · cart · menu button */
	.za-header .za-header__inner > .za-header__actions {
		order: 1;
	}

	.za-header .za-header__inner > .wp-block-woocommerce-customer-account,
	.za-header .za-header__inner > .wp-block-woocommerce-mini-cart {
		order: 2;
	}
}
