/*
 * NESU – global styles.
 * Tokens live in theme.json: use var(--wp--preset--*) / var(--wp--custom--*) only, no raw colours.
 * Mobile-first: base rules = < 600px, then @media (min-width: 600px) and (min-width: 1024px).
 */

/* ---------- Base ---------- */

html {
	scroll-padding-top: var(--wp--custom--header--height);
}

/* Header, main and footer touch each other – no root block gap between them. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

:where(img) {
	height: auto;
	max-width: 100%;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Header (DESIGN §2, MOBILE §2) ---------- */

/* Scrolls away with the page at the top, then slides in and out with the scroll direction (assets/js/header.js).
   Selector also covers WooCommerce's own templates (order confirmation…), which omit .nesu-site-header.
   No transform while visible: the mobile menu overlay is position: fixed inside the header. */
.wp-site-blocks > :has(> .nesu-header) {
	position: relative;
	z-index: 100;
}

.wp-site-blocks > .is-header-sticky {
	position: sticky;
	top: 0;
}

.admin-bar .wp-site-blocks > .is-header-sticky {
	top: var(--wp-admin--admin-bar--height, 0px);
}

/* WordPress admin bar scrolls away below 601px. */
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > .is-header-sticky {
		top: 0;
	}
}

.wp-site-blocks > .is-header-animated {
	transition: transform 0.3s ease-out;
}

/* Keyboard focus always brings it back; :focus-visible, because a closed menu or cart drawer leaves plain focus
   on its button, which must not pin the header. */
.wp-site-blocks > .is-header-hidden:not(:has(:focus-visible)) {
	transform: translateY(-100%);
}

/* The html scroll-padding makes the browser see the header's own links as covered: focus landing on one (a closed menu
   or cart drawer, the Tab key) would scroll the page to centre it. They are always in view, so cancel the padding. */
.nesu-header * {
	scroll-margin-top: calc(-1 * var(--wp--custom--header--height-desktop));
}

.nesu-header {
	background-color: var(--wp--preset--color--base);
}

/* Mobile: logo left · cart centred · menu button right. */
.nesu-header__inner {
	box-sizing: border-box;
	display: grid;
	/* minmax(0, …): the hidden menu inside the toggle must not widen its column. */
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	height: var(--wp--custom--header--height);
	max-width: calc(var(--wp--style--global--content-size) + 2 * var(--wp--custom--gutter));
	margin-inline: auto;
	padding-inline: var(--wp--custom--gutter);
}

.nesu-header__inner > * {
	margin-block: 0;
}

.nesu-header__logo {
	justify-self: start;
}

.nesu-header__logo img {
	display: block;
	width: var(--wp--custom--header--logo-width);
	height: auto;
}

/*
 * `>`: core copies the navigation's class onto its inner <ul>, so target the <nav> only.
 * Two classes: core's layout CSS (.is-layout-flex) would otherwise win.
 */
.nesu-header__inner > .nesu-header__nav {
	display: none;
}

.nesu-header__cart {
	justify-self: center;
}

.nesu-header__inner > .nesu-header__toggle {
	justify-self: end;
}

@media (min-width: 1024px) {
	html {
		scroll-padding-top: var(--wp--custom--header--height-desktop);
	}

	/* Desktop: 980px container, logo · menu (85px after the logo) · cart at the right edge. */
	.nesu-header__inner {
		display: flex;
		height: var(--wp--custom--header--height-desktop);
	}

	.nesu-header__logo img {
		width: var(--wp--custom--header--logo-width-desktop);
	}

	.nesu-header__inner > .nesu-header__nav {
		display: flex;
		margin-inline-start: var(--wp--custom--header--nav-offset);
	}

	.nesu-header__cart {
		margin-inline-start: auto;
	}

	.nesu-header__inner > .nesu-header__toggle {
		display: none;
	}
}

/* ---------- Desktop menu (MOTION §4) ---------- */

.nesu-header__nav .wp-block-navigation__container {
	gap: 0;
}

.nesu-header__nav .wp-block-navigation-item__content {
	padding: 0 var(--wp--custom--header--nav-item-padding);
	white-space: nowrap;
	line-height: var(--wp--custom--header--nav-item-height);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: var(--wp--custom--transition--color);
}

.nesu-header__nav .wp-block-navigation-item__content:hover,
.nesu-header__nav .wp-block-navigation-item__content:focus-visible,
.nesu-header__nav .wp-block-navigation-item__content[aria-current="page"],
.nesu-header__nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent-dark);
}

/* KONTAKTAI exists only in the mobile menu. */
.nesu-header__nav .nesu-mobile-only {
	display: none;
}

/* The editor draws dropdown arrows even with showSubmenuIcon off – keep it looking like the site. */
.nesu-header__inner > .nesu-header__nav .wp-block-navigation__submenu-icon {
	display: none;
}

/* …and drops the side padding of dropdown parents (core editor rule wins on specificity). */
.nesu-header__inner > .nesu-header__nav .has-child > .wp-block-navigation-item__content:not(#nesu) {
	padding: 0 var(--wp--custom--header--nav-item-padding);
}

/* Dropdowns: plain list on the page background, 150ms fade. */
.nesu-header .nesu-header__nav .has-child .wp-block-navigation__submenu-container {
	min-width: 200px;
	padding-block: var(--wp--preset--spacing--s);
	border: 0;
	background-color: var(--wp--preset--color--base);
	transition: opacity var(--wp--custom--transition--fade), visibility var(--wp--custom--transition--fade);
}

.nesu-header .nesu-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding-block: var(--wp--preset--spacing--xs);
	line-height: var(--wp--custom--line-height--body);
}

/* ---------- Cart: outlined bag, the item count in a small dark square (owner design 2026-11-06) ---------- */

.nesu-header__cart .wc-block-mini-cart__button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--tap-target);
	min-height: var(--wp--custom--tap-target);
	padding: 0;
}

.nesu-header__cart .wc-block-mini-cart__quantity-badge {
	position: relative;
	display: block;
	width: var(--wp--custom--header--cart-icon);
	height: var(--wp--custom--header--cart-icon);
}

.nesu-header__cart .wc-block-mini-cart__quantity-badge::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--dark);
	mask: url("../icons/bag.svg") center / contain no-repeat;
}

.nesu-header__cart .wc-block-mini-cart__icon {
	display: none;
}

/* WooCommerce hides it while the cart is empty (header.html shows the count only above zero). Its script writes
   its own colours onto the badge as an inline style, hence !important on the two colours. */
.nesu-header__cart .wc-block-mini-cart__badge {
	position: absolute;
	inset: auto;
	top: -7px;
	right: -9px;
	min-width: 17px;
	height: 17px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-radius: 0;
	background-color: var(--wp--preset--color--dark) !important;
	color: var(--wp--preset--color--base) !important;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 10px;
	font-weight: 600;
	line-height: 17px;
	text-align: center;
	transform: none;
}

/* ---------- Mobile menu overlay (MOBILE §3) ---------- */

.nesu-header__toggle .wp-block-navigation__responsive-container-open {
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--tap-target);
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--contrast);
}

.nesu-header__toggle .wp-block-navigation__responsive-container-open svg {
	width: 32px;
	height: 32px;
}

.nesu-header__toggle .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
}

.nesu-menu-overlay {
	position: relative;
	min-height: 100%;
	padding: var(--wp--preset--spacing--l) var(--wp--preset--spacing--m) var(--wp--preset--spacing--m);
	background-color: var(--wp--preset--color--surface);
}

.nesu-menu-overlay .wp-block-navigation-overlay-close {
	position: absolute;
	top: var(--wp--preset--spacing--l);
	right: var(--wp--preset--spacing--m);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--tap-target);
	padding: 0;
	border: 0;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--custom--shadow--soft);
	cursor: pointer;
}

.nesu-menu-overlay__nav {
	max-width: 270px;
	font-size: var(--wp--preset--font-size--nav-mobile);
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation__container {
	gap: 0;
	width: 100%;
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-item {
	flex-wrap: wrap;
	width: 100%;
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-item__content {
	flex: 1;
	line-height: var(--wp--custom--header--mobile-row-height);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--accent-dark);
}

/* RESTORANAI / IDĖJOS: accordions. Core toggles aria-expanded on the chevron button. */
.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-submenu__toggle {
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--header--mobile-row-height);
	margin: 0;
	padding: 0;
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-submenu__toggle svg {
	width: 14px;
	height: 14px;
	transition: transform var(--wp--custom--transition--fade);
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.nesu-menu-overlay .nesu-menu-overlay__nav .has-child .wp-block-navigation__submenu-container {
	position: static;
	display: none;
	flex-basis: 100%;
	min-width: 0;
	padding: 0 0 0 var(--wp--preset--spacing--s);
	border: 0;
	background: none;
}

/* aria-expanded is only present after core's script runs – closed until then. */
.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	display: flex;
}

.nesu-menu-overlay .nesu-menu-overlay__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	line-height: var(--wp--custom--line-height--body);
	padding-block: var(--wp--preset--spacing--s);
}

/* Contact icons under the menu (approved MOBILE §3 idea). */
.nesu-menu-overlay__contacts.wp-block-social-links {
	gap: var(--wp--preset--spacing--xs);
	margin-top: var(--wp--preset--spacing--m);
	/* Line the first icon (not its tap area) up with the menu text. */
	margin-inline-start: calc((24px - var(--wp--custom--tap-target)) / 2);
}

.nesu-menu-overlay__contacts .wp-social-link {
	color: var(--wp--preset--color--contrast);
}

.nesu-menu-overlay__contacts .wp-block-social-link-anchor {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--tap-target);
	padding: 0;
}

/* ---------- Buttons & links (owner design 2026-11-06, MOTION §6) ---------- */

/* Square, dark, spaced capitals; colours and type in theme.json (elements.button). WooCommerce also gives its drawer
   close icon and its text links this class, so they keep their own look. The right padding is shorter by the space
   after the last letter, so the text sits in the middle. */
:is(.wp-block-button__link, .wp-element-button):not(.is-link, .wc-block-components-drawer__close) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--custom--button--gap);
	min-height: var(--wp--custom--button--height);
	padding: 0 calc(var(--wp--custom--button--padding) - 0.2em) 0 var(--wp--custom--button--padding);
	border: 1px solid transparent;
	border-radius: 0;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wp-element-button.is-link {
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: normal;
	text-transform: none;
}

:is(.wp-block-button__link, .wp-element-button):not(.is-link, .is-style-outline, .is-style-outline *, .wc-block-components-drawer__close):hover {
	background-color: var(--wp--custom--button--hover);
}

/* Main buttons (core Button block, "Fill" style) end with an arrow. */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link::after {
	content: "";
	flex: none;
	width: var(--wp--custom--button--icon);
	height: var(--wp--custom--button--icon);
	background-color: currentColor;
	mask: url("../icons/arrow-right.svg") center / contain no-repeat;
}

/* Secondary: outline (core "Outline" style, WooCommerce "View cart"). */
:is(.wp-block-button.is-style-outline > .wp-block-button__link, .wp-element-button.is-style-outline) {
	padding: 0 calc(var(--wp--custom--button--padding) - 0.2em) 0 var(--wp--custom--button--padding);
	border: 1px solid currentColor;
	background-color: transparent;
	color: var(--wp--preset--color--dark);
}

/* WooCommerce draws its outline at 2px. */
.wc-block-mini-cart__footer-actions .wp-element-button.is-style-outline {
	border-width: 1px;
}

:is(.wp-block-button.is-style-outline > .wp-block-button__link, .wp-element-button.is-style-outline):hover {
	border-color: var(--wp--preset--color--dark);
	background-color: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--base);
}

/* Text link with an arrow and a line under both: the nesu-text-link class, or "Skaityti toliau" on the homepage
   (the about box's last paragraph is just the link). */
:is(.nesu-text-link, .nesu-about__text > p:last-child > a:only-child) {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--custom--button--gap);
	padding-bottom: 12px;
	border-bottom: 1px solid currentColor;
	color: var(--wp--preset--color--dark);
	font-family: var(--wp--preset--font-family--primary);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.2em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

:is(.nesu-text-link, .nesu-about__text > p:last-child > a:only-child)::after {
	content: "";
	flex: none;
	width: var(--wp--custom--button--icon);
	height: var(--wp--custom--button--icon);
	background-color: currentColor;
	mask: url("../icons/arrow-right.svg") center / contain no-repeat;
}

:is(.nesu-text-link, .nesu-about__text > p:last-child > a:only-child):hover {
	color: var(--wp--preset--color--accent-dark);
}

/* ---------- Page structure ---------- */

/* Sections in the page content set their own spacing. */
.wp-block-post-content > * {
	margin-block: 0;
}

.wp-block-post-content:has(> .nesu-panel, > .nesu-intro-overlap) {
	padding-bottom: var(--wp--preset--spacing--m);
}

.nesu-panel {
	background-color: var(--wp--preset--color--surface);
}

.wp-block-post-content > * + :is(.nesu-panel, .nesu-squares) {
	margin-top: var(--wp--custom--layout--panel-gap);
}

@media (min-width: 600px) {
	.wp-block-post-content:has(> .nesu-panel, > .nesu-intro-overlap) {
		padding-top: var(--wp--preset--spacing--m);
	}

	.nesu-panel,
	.nesu-intro-overlap {
		margin-inline: var(--wp--custom--gutter);
	}
}

/* Content text: left-aligned with hyphenation on phones, justified from desktop (MOBILE §5). */
.nesu-intro-split__text,
.nesu-intro-overlap__text,
.nesu-text-page {
	hyphens: auto;
}

.nesu-intro-split__text h1,
.nesu-intro-overlap__text h1,
.nesu-text-page h1 {
	margin-top: 0;
}

.nesu-intro-split__text h1 + *,
.nesu-intro-overlap__text h1 + *,
.nesu-text-page h1 + * {
	margin-top: var(--wp--preset--spacing--m);
}

@media (min-width: 1024px) {
	.nesu-intro-split__text p,
	.nesu-intro-overlap__text p,
	.nesu-text-page p {
		text-align: justify;
	}

	.nesu-intro-split__text h1 + *,
	.nesu-intro-overlap__text h1 + * {
		margin-top: var(--wp--preset--spacing--l);
	}
}

/* ---------- A. Homepage hero (owner design 2026-11-06; MOTION §1, MOBILE §4) ---------- */

/* Title and button centred near the bottom, on a soft dark gradient, on every screen size. */
.nesu-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 75svh;
	min-height: 420px;
	padding: 0 var(--wp--custom--gutter) 24px;
	overflow: hidden;
	text-align: center;
}

.nesu-hero > * {
	margin: 0;
}

.nesu-hero__media {
	position: absolute;
	inset: -20% 0 0;
	z-index: 0;
}

.nesu-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0;
}

/* Owner's choice between the first fade (70%) and the lightest one that still keeps the white title readable (35%). */
.nesu-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(to top, color-mix(in srgb, var(--wp--preset--color--dark) 50%, transparent), transparent 55%);
	pointer-events: none;
}

.nesu-hero > :not(.nesu-hero__media) {
	position: relative;
	z-index: 1;
}

/* The left padding balances the space after the last letter. */
.nesu-hero .nesu-hero__title {
	padding-left: 0.2em;
	color: var(--wp--preset--color--on-dark);
	font-size: var(--wp--preset--font-size--hero-title);
	font-weight: 300;
	letter-spacing: 0.2em;
	line-height: 1.15;
}

/* Close under the title, so the two read as one group (owner 2026-11-06). */
.nesu-hero .wp-block-buttons {
	justify-content: center;
	margin-top: clamp(14px, 1.5vw, 24px);
}

/* Light button on the photo (owner's mockup). */
.nesu-hero .wp-block-button__link {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--dark);
}

.nesu-hero .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--on-dark);
}

/* Phones: a light outline instead, so the button doesn't outshine the photo (owner 2026-11-06; same as the footer button). */
@media (max-width: 599px) {
	.nesu-hero .wp-block-button__link {
		border-color: var(--wp--preset--color--base);
		background-color: transparent;
		color: var(--wp--preset--color--base);
	}

	.nesu-hero .wp-block-button__link:hover {
		background-color: var(--wp--preset--color--base);
		color: var(--wp--preset--color--dark);
	}
}

@media (min-width: 1024px) {
	.nesu-hero {
		height: calc(100svh - var(--wp--custom--header--height-desktop));
		min-height: 560px;
		padding-bottom: clamp(32px, 5svh, 56px);
	}
}

/* Parallax: the photo moves slower than the page (CSS scroll timeline; JS fallback in parallax.js). */
@keyframes nesu-parallax {
	to {
		transform: translateY(16.7%);
	}
}

@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.nesu-hero__media {
			animation: nesu-parallax linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100vh;
		}
	}
}

/* ---------- A. Photo strip (MOTION §2) ---------- */

.nesu-strip {
	padding-block: var(--wp--preset--spacing--s);
}

.wp-block-gallery.has-nested-images.nesu-strip__track {
	--wp--style--unstable-gallery-gap: var(--wp--preset--spacing--s);
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--s);
	margin: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.nesu-strip__track::-webkit-scrollbar {
	display: none;
}

.wp-block-gallery.has-nested-images.nesu-strip__track figure.wp-block-image:not(#nesu) {
	flex: none;
	width: var(--wp--custom--layout--strip-photo-width);
	aspect-ratio: 353 / 470;
	margin: 0;
}

/* ---------- A. About row ---------- */

/* Phones: edge to edge, like the hero and the strip above it. */
.nesu-about {
	display: grid;
	gap: var(--wp--preset--spacing--s);
}

.nesu-about > * {
	margin: 0;
}

.nesu-about__photo {
	position: relative;
	aspect-ratio: 320 / 250;
}

.nesu-about__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nesu-about__photo--extra {
	display: none;
}

.nesu-about__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter);
	background-color: var(--wp--preset--color--sand);
	text-align: center;
}

.nesu-about .nesu-about__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--section-title);
	line-height: 1.4;
}

/* "Skaityti toliau": text-link style (Buttons & links). */
.nesu-about__text > p:last-child > a:only-child {
	margin-top: var(--wp--preset--spacing--xs);
}

@media (min-width: 600px) {
	.nesu-about {
		grid-template-columns: repeat(2, 1fr);
		padding-inline: var(--wp--preset--spacing--s);
	}

	.nesu-about__photo {
		aspect-ratio: 3 / 4;
	}

	.nesu-about__photo--extra {
		display: block;
	}
}

@media (min-width: 1024px) {
	.nesu-about {
		grid-template-columns: repeat(4, 1fr);
		grid-auto-rows: minmax(var(--wp--custom--layout--about-row-height), auto);
	}

	.nesu-about__photo {
		aspect-ratio: auto;
	}

	.nesu-about__text {
		padding: var(--wp--preset--spacing--m) var(--wp--custom--layout--about-text-padding);
	}
}

/* ---------- A. Three tiles (owner design 2026-11-06) ---------- */

/* Whole photo, darker towards the bottom; title + arrow and the short text on it. Phones: one under another, 4:5. */
.nesu-tiles {
	display: grid;
	gap: var(--wp--preset--spacing--s);
	padding: var(--wp--preset--spacing--s);
}

.nesu-tile {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	isolation: isolate;
}

.nesu-tiles > .nesu-tile,
.nesu-tile > * {
	margin: 0;
}

.nesu-tile__media {
	position: absolute;
	inset: 0;
}

.nesu-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.nesu-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, color-mix(in srgb, var(--wp--preset--color--dark) 80%, transparent), transparent 55%);
	pointer-events: none;
}

.nesu-tile .nesu-tile__box {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: var(--wp--custom--layout--tile-padding);
	color: var(--wp--preset--color--on-dark);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.nesu-tile__box > * {
	margin-block: 0;
}

.nesu-tile__box > * + * {
	margin-top: 6px;
}

.nesu-tile .nesu-tile__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--s);
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--section-title);
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.nesu-tile .nesu-tile__title a {
	color: var(--wp--preset--color--on-dark);
	text-decoration: none;
}

/* The whole tile is tappable via the title link. */
.nesu-tile__title a::after {
	content: "";
	position: absolute;
	inset: -100vmax;
}

.nesu-tile__title::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	mask: url("../icons/arrow-ne.svg") center / contain no-repeat;
	transition: transform 0.3s ease;
}

.nesu-tile:has(a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--dark);
	outline-offset: 3px;
}

.nesu-tile__title a:focus-visible {
	outline: 0;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.nesu-tile:hover .nesu-tile__media img {
		transform: scale(1.04);
	}

	.nesu-tile:hover .nesu-tile__title::after {
		transform: translate(3px, -3px);
	}
}

@media (min-width: 600px) {
	.nesu-tiles {
		grid-template-columns: repeat(3, 1fr);
	}

	.nesu-tile {
		aspect-ratio: 2 / 3;
	}

	.nesu-tile .nesu-tile__title {
		font-size: var(--wp--preset--font-size--card-title);
	}
}

@media (min-width: 1024px) {
	.nesu-tile {
		aspect-ratio: 5 / 6;
	}

	.nesu-tile .nesu-tile__title {
		font-size: var(--wp--preset--font-size--section-title);
	}
}

/* ---------- Pre-footer: logo + quote (homepage) ---------- */

.nesu-prefooter {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--wp--preset--spacing--l) var(--wp--custom--gutter);
	text-align: center;
}

.nesu-prefooter > * {
	margin: 0;
}

.nesu-prefooter__logo img {
	display: block;
	width: var(--wp--custom--layout--prefooter-logo-mobile);
	height: auto;
}

.nesu-prefooter .nesu-quote {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xs);
	margin-top: var(--wp--preset--spacing--m);
	font-size: var(--wp--preset--font-size--small);
}

.nesu-quote > * {
	margin: 0;
}

@media (min-width: 600px) {
	.nesu-prefooter__logo img {
		width: var(--wp--custom--layout--prefooter-logo);
	}

	.nesu-prefooter .nesu-quote {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0 var(--wp--preset--spacing--s);
		font-size: var(--wp--preset--font-size--body);
	}

	.nesu-quote .nesu-quote__author {
		margin-inline-start: var(--wp--preset--spacing--s);
	}
}

/* ---------- Footer (owner design: dark, running strip, big NESU; colours in theme.json custom.footer) ---------- */

/* Phones first. --nesu-footer-pad keeps the content inside the 1440px design on wider screens. */
.nesu-footer {
	--nesu-footer-pad: 24px;
	overflow: hidden;
	background-color: var(--wp--custom--footer--background);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--secondary);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
}

.nesu-footer :is(h2, h3, p, ul, li, details, .wp-block-group, .wp-block-buttons) {
	margin: 0;
}

.nesu-footer ul {
	padding: 0;
	list-style: none;
}

.nesu-footer a:not(.wp-element-button) {
	color: inherit;
	text-decoration: none;
}

.nesu-footer a:not(.wp-element-button):hover {
	color: var(--wp--custom--footer--hover);
}

.nesu-footer :is(.nesu-footer__actions, .nesu-footer__social) a::before,
.nesu-footer__top a::before,
.nesu-footer__group summary::after {
	content: "";
	flex: none;
	background-color: currentColor;
	mask: var(--nesu-icon) center / contain no-repeat;
}

/* Running strip. */
.nesu-footer .nesu-footer__strip {
	overflow: hidden;
	padding: 16px 0;
	border-bottom: 1px solid var(--wp--custom--footer--line-soft);
	color: var(--wp--custom--footer--strip);
	font-family: var(--wp--preset--font-family--primary);
	font-size: 10px;
	letter-spacing: 0.4em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.nesu-footer__strip-track {
	display: flex;
	width: max-content;
}

.nesu-footer__strip-dash {
	margin-inline: 39px;
}

@keyframes nesu-footer-strip {
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.nesu-footer__strip-track {
		animation: nesu-footer-strip 288s linear infinite;
	}

	.nesu-footer__strip:hover .nesu-footer__strip-track {
		animation-play-state: paused;
	}
}

/* Main part. */
.nesu-footer__main {
	display: flex;
	flex-direction: column;
	gap: 36px;
	padding: 44px var(--nesu-footer-pad) 0;
}

.nesu-footer__cta {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.nesu-footer .nesu-footer__title {
	color: inherit;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 32px;
	font-weight: 300;
	line-height: 1.15;
}

/* Light outline on the dark footer, on every screen size (owner's button sheet; phones full width). */
.nesu-footer__cta-button a.wp-element-button {
	display: flex;
	border-color: var(--wp--preset--color--base);
	background-color: transparent;
	color: var(--wp--preset--color--base);
}

.nesu-footer__cta-button a.wp-element-button:hover {
	border-color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--custom--footer--background);
}

.nesu-footer__cta-button .wp-block-button {
	width: 100%;
}

/* Phones: three contact tiles, then the same details as one centred text. */
.nesu-footer__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.nesu-footer__actions a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 64px;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 13px;
}

.nesu-footer__actions a::before {
	width: 20px;
	height: 20px;
}

.nesu-footer__actions a[href^="tel:"] {
	--nesu-icon: url("../icons/phone.svg");
}

.nesu-footer__actions a[href^="mailto:"] {
	--nesu-icon: url("../icons/mail.svg");
}

.nesu-footer__actions a[href*="maps"] {
	--nesu-icon: url("../icons/pin.svg");
}

.nesu-footer .nesu-footer__heading {
	display: none;
}

.nesu-footer .nesu-footer__details {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 16px;
	color: var(--wp--custom--footer--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
}

.nesu-footer__details li:first-child::after {
	content: "\00a0·\00a0";
}

.nesu-footer__details li:last-child {
	flex-basis: 100%;
	text-align: center;
}

/* Phones: accordions. */
.nesu-footer__nav {
	border-top: 1px solid var(--wp--custom--footer--line);
}

.nesu-footer__group {
	border-bottom: 1px solid var(--wp--custom--footer--line);
}

.nesu-footer__group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.16em;
	cursor: pointer;
	list-style: none;
}

.nesu-footer__group summary::-webkit-details-marker {
	display: none;
}

.nesu-footer__group summary::after {
	--nesu-icon: url("../icons/plus.svg");
	width: 16px;
	height: 16px;
}

.nesu-footer__group[open] summary::after {
	--nesu-icon: url("../icons/minus.svg");
}

.nesu-footer__group ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding-bottom: 14px;
}

.nesu-footer__group a {
	display: block;
	padding: 11px 0;
	line-height: 1.2;
}

/* Phones: the two names side by side, centred, text only. */
.nesu-footer .nesu-footer__social {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nesu-footer__social a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 15px;
}

.nesu-footer__social a::before {
	display: none;
}

/* Bottom line + the big NESU. */
.nesu-footer .nesu-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 36px var(--nesu-footer-pad) 0;
	padding-top: 18px;
	border-top: 1px solid var(--wp--custom--footer--line);
	color: var(--wp--custom--footer--muted);
	font-size: var(--wp--preset--font-size--footer);
	line-height: 1.6;
}

.nesu-footer__copyright span {
	display: block;
}

.nesu-footer__copyright .nesu-footer__dot,
.nesu-footer__bottom .nesu-footer__tagline {
	display: none;
}

.nesu-footer__top a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border: 1px solid var(--wp--custom--footer--border);
	border-radius: 999px;
	color: var(--wp--preset--color--base);
	font-size: 0;
}

.nesu-footer__top a::before {
	--nesu-icon: url("../icons/arrow-up.svg");
	width: 16px;
	height: 16px;
}

/* Off-centre on purpose. Phones: NE / SU on two lines (the 2em width forces the break), N starting at 27.2% of the screen,
   the U touching the right edge and the letters standing on the page's end. Both lines have the same ink width, so aligning
   right lines them up on both sides. The right margin cancels the trailing letter space + the U's built-in side space (0.084em);
   the bottom margin cancels the space under the last line, leaving the U's curve. The footer's overflow: hidden crops the extra. */
.nesu-footer .nesu-footer__wordmark {
	width: 2em;
	margin-top: 200px;
	margin-right: -0.324em;
	margin-bottom: -0.05em;
	margin-left: auto;
	font-family: var(--wp--preset--font-family--primary);
	font-size: 50.9vw;
	font-weight: 300;
	letter-spacing: 0.24em;
	line-height: 0.84;
	opacity: 0.92;
	text-align: right;
	word-break: break-all;
}

/* Tablets and desktop: plain columns, no tiles, no accordions. */
@media (min-width: 600px) {
	.nesu-footer {
		--nesu-footer-pad: max(clamp(32px, 6.67vw, 96px), calc((100% - 1440px) / 2 + 96px));
	}

	.nesu-footer .nesu-footer__strip {
		padding: 20px 0;
		font-size: 11px;
		letter-spacing: 0.42em;
	}

	.nesu-footer__strip-dash {
		margin-inline: 64px;
	}

	@media (prefers-reduced-motion: no-preference) {
		.nesu-footer__strip-track {
			animation-duration: 240s;
		}
	}

	.nesu-footer__main {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-rows: auto auto 1fr;
		gap: 0 24px;
		padding-top: 72px;
	}

	.nesu-footer .nesu-footer__cta {
		grid-column: 1 / -1;
		margin-bottom: 48px;
	}

	.nesu-footer .nesu-footer__title {
		font-size: 40px;
		letter-spacing: -0.01em;
	}

	.nesu-footer__cta-button .wp-block-button {
		width: auto;
	}

	.nesu-footer__cta-button a.wp-element-button {
		display: inline-flex;
	}

	.nesu-footer__actions {
		display: none;
	}

	.nesu-footer .nesu-footer__heading,
	.nesu-footer__group summary {
		display: block;
		min-height: 0;
		margin-bottom: 20px;
		color: var(--wp--custom--footer--muted);
		font-family: var(--wp--preset--font-family--primary);
		font-size: var(--wp--preset--font-size--footer);
		font-weight: 500;
		letter-spacing: 0.16em;
		line-height: 1.2;
	}

	.nesu-footer__group summary {
		cursor: default;
	}

	.nesu-footer__group summary::after {
		display: none;
	}

	.nesu-footer__nav {
		display: contents;
	}

	.nesu-footer__group {
		grid-row: 2 / span 2;
		border: 0;
	}

	.nesu-footer__contact {
		grid-column: 3;
		grid-row: 2;
	}

	.nesu-footer .nesu-footer__details {
		display: flex;
		flex-direction: column;
		gap: 12px;
		margin-top: 0;
		color: inherit;
		font-size: inherit;
		line-height: 1.2;
	}

	.nesu-footer__details li:first-child::after {
		content: none;
	}

	.nesu-footer__details li:last-child {
		color: var(--wp--custom--footer--muted);
		line-height: 1.2;
		text-align: left;
	}

	.nesu-footer__group ul {
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding-bottom: 0;
	}

	.nesu-footer__group a {
		padding: 0;
	}

	.nesu-footer .nesu-footer__social {
		display: flex;
		flex-wrap: wrap;
		grid-column: 3;
		grid-row: 3;
		gap: 12px 16px;
		margin-top: 20px;
	}

	.nesu-footer__social a {
		gap: 6px;
		height: auto;
		font-family: inherit;
		font-size: inherit;
		white-space: nowrap;
	}

	.nesu-footer__social a::before {
		display: block;
		order: 1;
		--nesu-icon: url("../icons/arrow-ne.svg");
		width: 10px;
		height: 10px;
	}

	.nesu-footer .nesu-footer__bottom {
		margin-top: 64px;
		padding: 20px 0;
		font-size: 13px;
		line-height: 1.2;
	}

	.nesu-footer__copyright span {
		display: inline;
	}

	.nesu-footer__copyright .nesu-footer__dot {
		display: inline;
	}

	.nesu-footer__bottom .nesu-footer__tagline {
		display: block;
	}

	.nesu-footer__bottom .nesu-footer__top {
		display: none;
	}

	/* One line from here up. Line-height 0.7 is the letters' height, so nothing is left below them. */
	.nesu-footer .nesu-footer__wordmark {
		width: auto;
		margin-top: clamp(96px, 10vw, 144px);
		margin-right: -0.384em;
		margin-bottom: 0;
		font-size: min(20.14vw, 290px);
		letter-spacing: 0.3em;
		line-height: 0.7;
		white-space: nowrap;
		word-break: normal;
	}
}

@media (min-width: 1024px) {
	.nesu-footer__main {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		grid-template-rows: auto 1fr;
	}

	.nesu-footer .nesu-footer__cta {
		grid-column: 1 / span 5;
		grid-row: 1 / span 2;
		margin-bottom: 0;
	}

	.nesu-footer__group {
		grid-column: 7 / span 2;
		grid-row: 1 / span 2;
	}

	.nesu-footer__group + .nesu-footer__group {
		grid-column: 9 / span 2;
	}

	.nesu-footer__contact {
		grid-column: 11 / span 2;
		grid-row: 1;
	}

	.nesu-footer .nesu-footer__social {
		grid-column: 11 / span 2;
		grid-row: 2;
	}

	/* The N starts where "© 2026 Rugilė Baronienė" ends, on any desktop width: the space from there to the gap,
	   divided by the word's width (3.414em). The max() is the footer's left edge; 157px is that text's width.
	   The gap is measured to the U's ink: 0.016em is how far its curve dips below the N and E. */
	.nesu-footer .nesu-footer__wordmark {
		--nesu-wordmark-gap: 26px;
		margin-right: calc(var(--nesu-wordmark-gap) - 0.384em);
		padding-bottom: calc(var(--nesu-wordmark-gap) + 0.016em);
		font-size: calc((100vw - max(min(6.67vw, 96px), 50vw - 624px) - 157px - var(--nesu-wordmark-gap)) / 3.414);
	}
}

/* ---------- B. Intro-split (DESIGN §3B) ---------- */

.nesu-intro-split {
	display: grid;
}

.nesu-intro-split > * {
	margin: 0;
}

.nesu-intro-split__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.nesu-intro-split__text {
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter);
}

@media (min-width: 600px) {
	.nesu-intro-split__media img {
		aspect-ratio: 16 / 9;
	}
}

@media (min-width: 1024px) {
	/* Photo 25% · text from 40%, 38% wide. The photo never sets the panel height. */
	.nesu-intro-split {
		grid-template-columns: 25% 8% 55% 1fr;
	}

	.nesu-intro-split__media {
		position: relative;
		grid-column: 1;
	}

	.nesu-intro-split__media img {
		position: absolute;
		inset: 0;
		height: 100%;
		aspect-ratio: auto;
	}

	.nesu-intro-split__text {
		grid-column: 3;
		padding: var(--wp--custom--layout--text-top) 0 var(--wp--preset--spacing--xl);
	}
}

/* ---------- C. Intro-overlap (DESIGN §3C) ---------- */

.nesu-intro-overlap {
	display: grid;
}

.nesu-intro-overlap > * {
	margin: 0;
}

.nesu-intro-overlap__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.nesu-intro-overlap__text {
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter);
	background-color: var(--wp--preset--color--surface);
}

@media (min-width: 600px) {
	.nesu-intro-overlap__media img {
		aspect-ratio: 16 / 9;
	}
}

@media (min-width: 1024px) {
	/* Photo 62% wide top-left; text box 62% wide at the right, 80px lower. */
	.nesu-intro-overlap {
		grid-template-columns: 38% 24% 38%;
		grid-template-rows: var(--wp--preset--spacing--xl) auto;
	}

	.nesu-intro-overlap__media {
		grid-column: 1 / 3;
		grid-row: 1 / 3;
		align-self: start;
	}

	.nesu-intro-overlap__media img {
		height: var(--wp--custom--layout--overlap-photo-height);
		aspect-ratio: auto;
	}

	.nesu-intro-overlap__text {
		z-index: 1;
		grid-column: 2 / 4;
		grid-row: 2;
		min-height: var(--wp--custom--layout--overlap-box-min-height);
		padding: 85px 12% var(--wp--preset--spacing--xl) 12%;
	}
}

/* ---------- D. Cards: restaurants, projects (DESIGN §3D, MOBILE §7) ---------- */

.nesu-cards {
	display: grid;
	gap: var(--wp--preset--spacing--m);
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter) 0;
}

.nesu-card {
	position: relative;
	background-color: var(--wp--preset--color--surface);
}

.nesu-cards > .nesu-card,
.nesu-card > * {
	margin: 0;
}

.nesu-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.nesu-card .nesu-card__body {
	padding: var(--wp--custom--layout--card-padding);
}

.nesu-card__body > * {
	margin-block: 0;
}

.nesu-card .nesu-card__title {
	font-size: var(--wp--preset--font-size--card-title);
	line-height: 1.2;
}

.nesu-card__title a {
	color: var(--wp--preset--color--contrast);
}

.nesu-card .nesu-card__meta {
	margin-top: var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--city);
}

/* Linked cards: the whole card is clickable. */
.nesu-card--link .nesu-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* 2 columns from 480px (approved MOBILE §7 idea); a smaller card body until there is room. */
@media (min-width: 480px) {
	.nesu-cards {
		grid-template-columns: repeat(2, minmax(0, var(--wp--custom--layout--card-width)));
		justify-content: center;
		gap: var(--wp--preset--spacing--m) var(--wp--preset--spacing--s);
	}
}

@media (min-width: 480px) and (max-width: 599px) {
	.nesu-card .nesu-card__body {
		padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
	}

	.nesu-card .nesu-card__title {
		font-size: var(--wp--preset--font-size--city);
	}

	.nesu-card .nesu-card__meta {
		font-size: var(--wp--preset--font-size--small);
	}
}

@media (min-width: 600px) {
	.nesu-cards {
		gap: var(--wp--preset--spacing--m);
	}
}

@media (min-width: 1024px) {
	.nesu-cards {
		gap: var(--wp--preset--spacing--l);
		padding-top: var(--wp--preset--spacing--l);
	}

	.nesu-card__media img {
		aspect-ratio: 680 / 603;
	}

	.nesu-card .nesu-card__body {
		min-height: var(--wp--custom--layout--card-body-min-height);
	}
}

/* ---------- E1. Panel gallery (rows 2 / 3 / 3) ---------- */

/* Phones: no white frame, see the photo collage below. */
.nesu-panel--gallery {
	background-color: transparent;
}

.wp-block-gallery.has-nested-images.nesu-gallery-panel {
	margin: 0;
}

@media (min-width: 600px) {
	.nesu-panel--gallery {
		padding: var(--wp--custom--gutter);
		background-color: var(--wp--preset--color--surface);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel {
		--nesu-gap: var(--wp--custom--layout--panel-gap);
		--wp--style--unstable-gallery-gap: var(--nesu-gap);
		gap: var(--nesu-gap);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:not(#nesu) {
		width: calc((100% - var(--nesu-gap)) / 2);
		aspect-ratio: 4 / 3;
		margin: 0;
	}
}

@media (min-width: 1024px) {
	.nesu-panel--gallery {
		padding: var(--wp--preset--spacing--m);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel {
		--nesu-gap: var(--wp--preset--spacing--m);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:not(#nesu) {
		height: var(--wp--custom--layout--gallery-row-height);
		aspect-ratio: auto;
	}

	/* -1px: rounding must never push the last photo of a row onto the next line. */
	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+3):not(#nesu),
	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+5):not(#nesu) {
		width: calc((100% - 2 * var(--nesu-gap)) * 0.2 - 1px);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+4):not(#nesu) {
		width: calc((100% - 2 * var(--nesu-gap)) * 0.6 - 1px);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+6):not(#nesu) {
		width: calc((100% - 2 * var(--nesu-gap)) * 0.25 - 1px);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+7):not(#nesu),
	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+8):not(#nesu) {
		width: calc((100% - 2 * var(--nesu-gap)) * 0.375 - 1px);
	}

	/* 7 photos: the last row is two photos 50/50. */
	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+6):nth-last-child(2):not(#nesu),
	.wp-block-gallery.has-nested-images.nesu-gallery-panel figure.wp-block-image:nth-child(8n+7):last-child:not(#nesu) {
		width: calc((100% - var(--nesu-gap)) / 2 - 1px);
	}
}

/* ---------- E2. Square grid (Galerija; phones: see the photo collage below) ---------- */

.wp-block-gallery.has-nested-images.nesu-gallery-squares {
	margin: 0;
}

@media (min-width: 600px) {
	.nesu-squares {
		padding: 0 var(--wp--preset--spacing--s);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-squares {
		--nesu-gap: var(--wp--preset--spacing--s);
		--wp--style--unstable-gallery-gap: var(--nesu-gap);
		gap: var(--nesu-gap);
	}

	.wp-block-gallery.has-nested-images.nesu-gallery-squares figure.wp-block-image:not(#nesu) {
		flex-grow: 0;
		width: calc((100% - 2 * var(--nesu-gap)) / 3);
		aspect-ratio: 1;
		margin: 0;
	}
}

/* ---------- Photo collage on phones (owner request; shapes marked in inc/galleries.php) ---------- */

/* Seamless, edge to edge: landscape photos full width, portrait photos two in a row. "dense" pulls the
   next portrait photo up beside a lone one, so a landscape photo between them never leaves a hole. */
@media (max-width: 599px) {
	.wp-block-post-content > * + :is(.nesu-panel--gallery, .nesu-squares) {
		margin-top: 0;
	}

	/* A gallery at the end of the page runs straight into the footer. */
	.wp-block-post-content:has(> :is(.nesu-panel--gallery, .nesu-squares):last-child) {
		padding-bottom: 0;
	}

	.wp-block-gallery.has-nested-images:is(.nesu-gallery-panel, .nesu-gallery-squares) {
		--wp--style--unstable-gallery-gap: 0px;
		display: grid;
		grid-auto-flow: dense;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0;
	}

	.wp-block-gallery.has-nested-images:is(.nesu-gallery-panel, .nesu-gallery-squares) figure.wp-block-image:not(#nesu) {
		grid-column: 1 / -1;
		width: 100%;
		margin: 0;
	}

	.wp-block-gallery.has-nested-images:is(.nesu-gallery-panel, .nesu-gallery-squares) figure.wp-block-image.is-landscape:not(#nesu) img {
		flex: none;
		height: auto;
	}

	/* Same shape for both photos in a row; the viewer still shows the whole photo. */
	.wp-block-gallery.has-nested-images:is(.nesu-gallery-panel, .nesu-gallery-squares) figure.wp-block-image.is-portrait:not(#nesu) {
		grid-column: auto;
		aspect-ratio: 3 / 4;
	}

	.wp-block-gallery.has-nested-images:is(.nesu-gallery-panel, .nesu-gallery-squares) figure.wp-block-image.is-single:not(#nesu) {
		grid-column: 1 / -1;
	}
}

/* ---------- Full-screen photo viewer (core lightbox: swipe, arrows, keyboard) ---------- */

/* !important: core sets these colours inline from the page colours. */
.wp-lightbox-overlay {
	height: 100dvh;
}

.wp-lightbox-overlay .scrim {
	background-color: var(--wp--preset--color--contrast) !important;
}

.wp-lightbox-overlay .wp-lightbox-close-button,
.wp-lightbox-overlay .wp-lightbox-navigation-button-prev,
.wp-lightbox-overlay .wp-lightbox-navigation-button-next {
	min-width: var(--wp--custom--tap-target);
	min-height: var(--wp--custom--tap-target);
	border-radius: 50%;
	background: var(--wp--preset--color--overlay) !important;
	fill: var(--wp--preset--color--on-dark) !important;
}

.wp-lightbox-overlay button:focus-visible {
	outline: 2px solid var(--wp--preset--color--on-dark);
	outline-offset: 2px;
}

.nesu-lightbox-count {
	position: fixed;
	bottom: calc(env(safe-area-inset-bottom) + 16px);
	left: 50%;
	z-index: 100001;
	padding-inline: var(--wp--preset--spacing--s);
	background: var(--wp--preset--color--overlay);
	color: var(--wp--preset--color--on-dark);
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--tap-target);
	pointer-events: none;
	transform: translateX(-50%);
}

.nesu-lightbox-count[hidden] {
	display: none;
}

/* ---------- Edukacijos prices + contact icons (DESIGN §3, MOBILE §8) ---------- */

.nesu-prices {
	margin-top: var(--wp--preset--spacing--l);
	text-align: center;
}

.nesu-prices > * {
	margin-block: 0;
}

.nesu-prices .nesu-prices__title {
	margin-bottom: var(--wp--preset--spacing--s);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--body);
}

.nesu-prices .nesu-prices__label {
	margin-top: var(--wp--preset--spacing--m);
}

.nesu-prices .nesu-prices__pill {
	width: min(100%, 260px);
	min-height: var(--wp--custom--tap-target);
	margin: var(--wp--preset--spacing--xs) auto 0;
	border-radius: 999px;
	background-color: var(--wp--preset--color--sand);
	line-height: var(--wp--custom--tap-target);
}

.nesu-prices .nesu-prices__note {
	margin-top: var(--wp--preset--spacing--m);
	text-align: center;
}

@media (min-width: 1024px) {
	.nesu-prices .nesu-prices__label {
		margin-top: var(--wp--preset--spacing--s);
	}

	.nesu-prices .nesu-prices__pill {
		width: var(--wp--custom--layout--pill-width);
		min-height: 0;
		line-height: 24px;
	}
}

.wp-block-social-links.nesu-contact-icons {
	justify-content: center;
	gap: var(--wp--preset--spacing--s);
	margin-top: var(--wp--preset--spacing--s);
	font-size: 20px;
}

.wp-block-social-links.nesu-contact-icons .wp-social-link {
	color: var(--wp--preset--color--icon);
}

.nesu-contact-icons .wp-block-social-link-anchor {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--tap-target);
	height: var(--wp--custom--tap-target);
	padding: 0;
}

/* ---------- Legal / plain text pages ---------- */

.nesu-text-page {
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter);
}

.nesu-text-page > * {
	max-width: 760px;
	margin-inline: auto;
}

.nesu-text-page h1 {
	font-size: var(--wp--preset--font-size--section-title);
}

.nesu-text-page h2 {
	margin-top: var(--wp--preset--spacing--m);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 600;
}

@media (min-width: 1024px) {
	.nesu-text-page {
		padding-block: var(--wp--custom--layout--text-top) var(--wp--preset--spacing--xl);
	}
}

/* ---------- Welcome screen (MOTION §3, approved short version, phones only) ---------- */

.nesu-welcome {
	display: none;
}

html.nesu-welcome-active {
	overflow: hidden;
}

html.nesu-welcome-active .nesu-welcome {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--wp--preset--color--surface);
}

.nesu-welcome__bg {
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--base);
	animation: nesu-welcome-bg-in 0.7s cubic-bezier(0.77, 0, 0.175, 1) both;
}

.nesu-welcome__logo {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	overflow: hidden;
	animation: nesu-welcome-logo-in 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) 0.7s both;
}

.nesu-welcome__logo img {
	max-width: 100%;
	height: auto;
}

.nesu-welcome__cover {
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--base);
	opacity: 0.85;
	transform: translateX(-120px);
}

.nesu-welcome.is-loop .nesu-welcome__cover {
	animation: nesu-welcome-sweep 2.2s ease-in-out infinite;
}

.nesu-welcome.is-outro {
	background-color: transparent;
}

.nesu-welcome.is-outro .nesu-welcome__logo {
	animation: nesu-welcome-fade 0.3s ease both;
}

.nesu-welcome.is-outro .nesu-welcome__bg {
	animation: nesu-welcome-bg-out 0.6s cubic-bezier(0.77, 0, 0.175, 1) 0.3s both;
}

@keyframes nesu-welcome-bg-in {
	from {
		transform: translateX(-100vw);
	}
}

@keyframes nesu-welcome-bg-out {
	to {
		transform: translateX(-100vw);
	}
}

@keyframes nesu-welcome-logo-in {
	from {
		opacity: 0;
		transform: translateX(-60px);
	}
}

@keyframes nesu-welcome-fade {
	to {
		opacity: 0;
	}
}

@keyframes nesu-welcome-sweep {
	from {
		transform: translateX(-120px);
	}

	to {
		transform: translateX(120px);
	}
}

/* Price block stays centred inside justified content columns. */
.nesu-intro-split__text .nesu-prices-wrap p {
	text-align: center;
}

/* ---------- Shop grid (DESIGN §4, MOBILE §9: 2 columns on phones – approved) ---------- */

.nesu-shop {
	padding: var(--wp--preset--spacing--m) var(--wp--preset--spacing--s) var(--wp--preset--spacing--xl);
}

.nesu-shop > * {
	margin-block: 0;
}

.nesu-shop .wc-block-product-template.wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--m) var(--wp--custom--layout--shop-gap);
	max-width: var(--wp--custom--layout--shop-width);
	margin: 0 auto;
	padding: 0;
}

.nesu-shop .wc-block-product-template > li {
	width: auto;
	margin: 0;
	text-align: start;
}

.nesu-shop .wc-block-components-product-image {
	margin: 0;
}

.nesu-shop .wc-block-components-product-image img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.nesu-shop .nesu-shop__title {
	margin: var(--wp--preset--spacing--s) 0 0;
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--body);
}

.nesu-shop__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.nesu-shop .nesu-shop__price,
.nesu-shop .nesu-shop__stock {
	margin: var(--wp--preset--spacing--xs) 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	text-align: start;
}

/* In-stock products show no stock text (as on Wix). */
.nesu-shop .wc-block-components-product-stock-indicator--in-stock,
.nesu-shop .wc-block-components-product-stock-indicator:empty {
	display: none;
}

@media (min-width: 1024px) {
	.nesu-shop .wc-block-product-template.wc-block-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------- Single product (DESIGN §4, MOBILE §9) ---------- */

/* Phones: photo full width · title · price · button · description. */
.nesu-product {
	display: grid;
	grid-template-areas: "notices" "gallery" "info";
	grid-template-columns: minmax(0, 1fr);
	padding-bottom: var(--wp--preset--spacing--xl);
}

.nesu-product > * {
	margin: 0;
}

.nesu-product > .wc-block-store-notices,
.nesu-product > .woocommerce-notices-wrapper {
	grid-area: notices;
}

/* Margins, not a grid gap: the notices row is usually empty and must not push the photo down. */
.nesu-product .woocommerce-notices-wrapper:not(:empty) {
	margin-bottom: var(--wp--custom--layout--product-gap);
}

.nesu-product > .nesu-product__info {
	margin-top: var(--wp--custom--layout--product-gap);
}

.nesu-product__gallery {
	grid-area: gallery;
}

.nesu-product__info {
	display: grid;
	grid-area: info;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--custom--layout--product-gap);
}

.nesu-product__info > * {
	margin: 0;
}

.nesu-product__summary,
.nesu-product__description {
	padding-inline: var(--wp--custom--gutter);
}

.nesu-product__summary > *,
.nesu-product__description > * {
	margin-block: 0;
}

.nesu-product .nesu-product__title {
	font-size: var(--wp--preset--font-size--title);
	line-height: 1.3;
}

.nesu-product .nesu-product__price {
	margin-top: var(--wp--preset--spacing--s);
	font-size: var(--wp--preset--font-size--body);
}

.nesu-product .wc-block-add-to-cart-form,
.nesu-product form.cart {
	margin: var(--wp--custom--layout--product-gap) 0 0;
}

/* Apple Pay / Google Pay (WooPayments) right under the button. */
.nesu-product .wc-block-add-to-cart-form .wcpay-express-checkout-wrapper {
	margin-block: var(--wp--preset--spacing--xs) 0;
}

.nesu-product .single_add_to_cart_button.wp-element-button,
.nesu-buybar__button.wp-element-button {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 var(--wp--preset--spacing--s);
	border: 0;
	cursor: pointer;
}

.nesu-product .stock.out-of-stock {
	margin: var(--wp--preset--spacing--s) 0 0;
	color: var(--wp--preset--color--muted);
}

/* Gallery: main photo + thumbnails row under it (Woo flexslider gallery). */
.nesu-product .woocommerce-product-gallery:not(#nesu) {
	position: relative;
	width: 100% !important;
	margin: 0;
}

.nesu-product .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
}

.nesu-product .woocommerce-product-gallery__image a {
	cursor: zoom-in;
}

/* Woo's hover zoom layer must let clicks through: a click on the photo opens the viewer. */
.nesu-product .woocommerce-product-gallery__image .zoomImg {
	pointer-events: none;
}

.nesu-product .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(9, minmax(0, 1fr));
	gap: var(--wp--custom--layout--shop-gap);
	margin: var(--wp--preset--spacing--xs) var(--wp--custom--gutter) 0;
	padding: 0;
	list-style: none;
}

.nesu-product .flex-control-thumbs li {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

.nesu-product .flex-control-thumbs img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	cursor: pointer;
	opacity: 1;
}

.nesu-product .flex-control-thumbs img.flex-active {
	outline: 1px solid var(--wp--preset--color--contrast);
	outline-offset: 1px;
}

/* No magnifier icon (owner request): the photo itself opens the viewer. */
.nesu-product .woocommerce-product-gallery__trigger {
	display: none;
}

/* Description accordions (approved MOBILE §9 idea). */
.nesu-product__description details.nesu-accordion {
	border-top: 1px solid var(--wp--preset--color--sand);
}

.nesu-product__description details.nesu-accordion:last-of-type {
	border-bottom: 1px solid var(--wp--preset--color--sand);
}

.nesu-product__description details.nesu-accordion + details.nesu-accordion {
	margin-top: 0;
}

.nesu-accordion summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--wp--custom--tap-target);
	cursor: pointer;
	list-style: none;
}

.nesu-accordion summary::-webkit-details-marker {
	display: none;
}

.nesu-accordion summary::after {
	content: "+";
	font-size: var(--wp--preset--font-size--city);
}

.nesu-accordion[open] summary::after {
	content: "–";
}

.nesu-accordion > :not(summary) {
	margin-block: 0 var(--wp--preset--spacing--s);
}

.nesu-product__description ul {
	padding-inline-start: 1.2em;
}

@media (min-width: 600px) {
	.nesu-product {
		padding-top: var(--wp--custom--layout--product-gap);
	}

	.nesu-product__summary,
	.nesu-product__description {
		padding-inline: 0;
	}

	.nesu-product .flex-control-thumbs {
		margin-inline: 0;
	}

	.nesu-product {
		max-width: var(--wp--custom--layout--product-gallery-width);
		margin-inline: auto;
	}
}

@media (min-width: 1024px) {
	/* The shorter column waits at its end so that both finish together (offsets: assets/js/product.js). */
	.nesu-product__gallery,
	.nesu-product__info {
		position: sticky;
		top: var(--nesu-sticky-top);
	}

	/* Photo collage on the left · title, price, button and the description on the right. */
	.nesu-product {
		grid-template-areas:
			"notices notices"
			"gallery info";
		grid-template-columns: minmax(0, var(--wp--custom--layout--product-collage-width)) var(--wp--custom--layout--product-summary-width);
		align-items: start;
		column-gap: var(--wp--preset--spacing--m);
		justify-content: center;
		max-width: none;
		padding-top: 0;
		padding-inline: var(--wp--custom--gutter);
	}

	.nesu-product > .nesu-product__info {
		margin-top: 0;
	}

	/* Same height as the Google Pay button (WooPayments "small"). */
	.nesu-product .single_add_to_cart_button.wp-element-button {
		min-height: 40px;
	}
}

/* Product photo collage (desktop): main photo full width, then landscape photos full width and portrait
   photos two in a row, same idea as the phone galleries. Class set in inc/galleries.php. */
.nesu-product-collage .wp-block-woocommerce-product-image-gallery {
	max-width: none;
}

.nesu-product-collage .woocommerce-product-gallery__wrapper {
	display: grid;
	grid-auto-flow: dense;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--layout--shop-gap);
}

.nesu-product-collage .nesu-product .woocommerce-product-gallery__image:not(#nesu) {
	display: block;
	grid-column: 1 / -1;
	width: 100%;
	margin: 0;
}

/* Same shape for both photos in a row; the viewer still shows the whole photo. */
.nesu-product-collage .nesu-product .woocommerce-product-gallery__image.is-portrait:not(.is-single, #nesu) {
	grid-column: auto;
	aspect-ratio: 3 / 4;
}

.nesu-product-collage .woocommerce-product-gallery__image.is-portrait:not(.is-single) a {
	display: block;
	height: 100%;
}

.nesu-product-collage .nesu-product .woocommerce-product-gallery__image.is-portrait:not(.is-single) img {
	height: 100%;
	object-fit: cover;
}

/* Shown while the real button is off screen. Phones/tablets: bottom bar "price · Pridėti į krepšelį".
   Desktop: small card at the bottom right with photo, name, price and button. */
.nesu-buybar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 95;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--s);
	padding: var(--wp--preset--spacing--s) var(--wp--custom--gutter);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--custom--shadow--soft);
	visibility: hidden;
	transform: translateY(110%);
	transition: transform 0.2s ease, visibility 0.2s;
}

.nesu-buybar.is-visible {
	visibility: visible;
	transform: none;
}

.nesu-buybar__photo,
.nesu-buybar__name {
	display: none;
}

.nesu-buybar__price {
	display: block;
	white-space: nowrap;
}

.nesu-buybar__button.wp-element-button {
	flex: 1;
}

@media (min-width: 1024px) {
	.nesu-buybar {
		--nesu-buybar-offset: var(--wp--custom--layout--panel-gap);
		right: var(--nesu-buybar-offset);
		bottom: var(--nesu-buybar-offset);
		left: auto;
		box-sizing: border-box;
		width: var(--wp--custom--layout--buybar-width);
		padding: var(--wp--preset--spacing--s);
		transform: translateY(calc(100% + var(--nesu-buybar-offset)));
	}

	.nesu-buybar__photo {
		display: block;
		flex: none;
		width: var(--wp--custom--layout--buybar-photo);
		height: var(--wp--custom--layout--buybar-photo);
		object-fit: cover;
	}

	.nesu-buybar__text {
		flex: 1;
		min-width: 0;
		font-size: var(--wp--preset--font-size--small);
		line-height: 1.3;
	}

	.nesu-buybar__name {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.nesu-buybar__price {
		color: var(--wp--preset--color--muted);
	}

	.nesu-buybar__button.wp-element-button {
		flex: none;
		width: auto;
		min-height: 40px;
		white-space: nowrap;
	}
}

/* Stays clear of the big NESU at the very bottom of the page (assets/js/product.js). */
.nesu-buybar.is-visible.is-over-wordmark {
	visibility: hidden;
	transform: translateY(calc(100% + 40px));
}

/* ---------- Cart & checkout ---------- */

.nesu-commerce {
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--wp--custom--gutter));
	margin-inline: auto;
	padding: var(--wp--preset--spacing--m) var(--wp--custom--gutter) var(--wp--preset--spacing--xl);
}

.nesu-commerce > * {
	margin-block: 0;
}

.nesu-commerce .nesu-commerce__title {
	margin-bottom: var(--wp--preset--spacing--m);
	font-size: var(--wp--preset--font-size--section-title);
}

.nesu-commerce .wc-block-components-button:not(.is-link),
.nesu-commerce .wc-block-cart__submit-button,
.nesu-commerce .wc-block-components-checkout-place-order-button {
	min-height: 52px;
}

/* Cart, checkout and mini-cart items: name, price and photo only – no description excerpt. */
.nesu-commerce .wc-block-components-product-metadata__description,
.wc-block-mini-cart__drawer .wc-block-components-product-metadata__description {
	display: none;
}

/* Order confirmation page. */
.nesu-order > * + * {
	margin-top: var(--wp--preset--spacing--m);
}

.nesu-order h1,
.nesu-order .wc-block-order-confirmation-status {
	font-size: var(--wp--preset--font-size--section-title);
}

.nesu-order h2,
.nesu-order h3 {
	font-size: var(--wp--preset--font-size--city);
}

/* From 1400px: the exact Wix proportions (measured at 1715px). Below that the text gets more room. */
@media (min-width: 1400px) {
	.nesu-intro-split {
		grid-template-columns: 25% 15% 38% 1fr;
	}

	.nesu-intro-overlap__text {
		padding-inline: 20% 28%;
	}
}

/* Woo lays the add-to-cart form out as a row; as a plain block the button can be full width on phones. */
.nesu-product form.cart:not(.variations_form) {
	display: block;
}

.nesu-product form.cart .single_add_to_cart_button {
	flex: 1 1 auto;
}

/* 404 page. */
.nesu-not-found .wp-block-buttons {
	gap: var(--wp--preset--spacing--s);
	margin-top: var(--wp--preset--spacing--m);
}

.wp-block-post-content:has(> .nesu-panel),
main:has(> .nesu-not-found) {
	padding-bottom: var(--wp--preset--spacing--m);
}

@media (min-width: 600px) {
	main:has(> .nesu-not-found) {
		padding-top: var(--wp--preset--spacing--m);
	}
}

/* Unique pieces are sold one at a time: Woo then prints an empty quantity box – don't let it take space. */
.nesu-product form.cart .quantity:not(:has(input:not([type="hidden"]))) {
	display: none;
}

/* Woo's own form.cart margin (2em below) would push the description away; the block wrapper sets the spacing. */
.nesu-product .wc-block-add-to-cart-form form.cart:not(#nesu) {
	margin: 0;
	padding: 0;
}

.nesu-product form.cart .single_add_to_cart_button.wp-element-button {
	margin: 0;
}
