/* Page layout: contact bar, header, phone menu, footer. Shop layouts come in later phases. */

/* ---------- Contact bar above the header ---------- */

/* Darker brand red with white text (5.55:1), small and quiet. */
.contact-bar {
	background: var(--color-button-primary);
	color: var(--color-on-button-primary);
	font-size: var(--text-footnote);
	line-height: 1.2;
}

.contact-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-md);
	min-height: 32px;
}

.contact-bar__list {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-bar__list li,
.contact-bar a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.contact-bar a {
	min-height: 32px;
	color: inherit;
	text-decoration: none;
}

.contact-bar a:hover span {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.contact-bar svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.contact-bar__social {
	justify-content: center;
	min-width: 32px;
	border-radius: var(--radius-sm);
	transition: background-color var(--transition-fast);
}

.contact-bar__social:hover {
	background: rgba(255, 255, 255, 0.16);
}

/* Phones: phone and e-mail only, centred. */
.contact-bar__list--end {
	display: none;
}

.contact-bar :focus-visible {
	outline-color: var(--color-on-button-primary);
}

@media (min-width: 768px) {
	.contact-bar__inner {
		justify-content: space-between;
	}

	.contact-bar__list--end {
		display: flex;
		gap: var(--space-xs);
	}

	.contact-bar__address {
		margin-right: var(--space-xs);
	}
}

/* ---------- Header: top row ---------- */

/* Light brand tint, like the app's header panel (colors.primarySubtle). */
.site-header {
	background: var(--color-primary-subtle);
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	min-height: 64px;
	padding-block: var(--space-xs);
}

.site-header__logo {
	display: inline-flex;
	flex-shrink: 0;
	border-radius: var(--radius-sm);
}

.site-header__logo .logo {
	display: block;
	width: auto;
	height: 40px;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--space-xxs);
}

.header-action {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: var(--size-touch-target);
	min-height: var(--size-touch-target);
	padding: var(--space-xxs) var(--space-xs);
	border-radius: var(--radius-md);
	color: var(--color-text-primary);
	text-decoration: none;
	transition: background-color var(--transition-fast);
}

.header-action:hover {
	background: var(--color-button-tinted);
	color: var(--color-text-primary);
}

.header-action svg {
	display: block;
	width: 24px;
	height: 24px;
}

.header-action__icon {
	position: relative;
	display: inline-flex;
}

/* Label under the icon only on wider screens; on phones the icon alone (with aria-label). */
.header-action__label {
	display: none;
	font-size: var(--text-caption);
	font-weight: var(--font-weight-semibold);
	line-height: 1.2;
}

/* Cart count, like the app's tab bar badge: 18px, white on darker red. */
.header-action__badge {
	position: absolute;
	top: -6px;
	right: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 var(--space-xxs);
	border-radius: var(--radius-full);
	background: var(--color-button-primary);
	color: var(--color-on-button-primary);
	font-size: 11px;
	font-weight: var(--font-weight-bold);
	line-height: 18px;
	text-align: center;
}

.header-action__badge[hidden] {
	display: none;
}

/* ---------- Header: main navigation (desktop) ---------- */

.site-header {
	position: relative;
	z-index: 50;
}

/* Menu and search field sit in the header bar from 768px; phones get a drawer and a search row later. */
.primary-nav,
.header-search {
	display: none;
}

.primary-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Plain text links (the tinted pill around the current page looked
 * "previše AI"): hover and the current page only turn the text red; the current page
 * also gets a short red line under the word.
 */
.primary-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	min-height: var(--size-touch-target);
	padding: 0 var(--space-sm);
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-text-primary);
	font-family: var(--font-family);
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-semibold);
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--transition-fast), background-color var(--transition-fast);
}

.primary-nav__link:hover,
.primary-nav__link.is-current {
	color: var(--color-primary-pressed);
}

.primary-nav__link.is-current::after {
	content: "";
	position: absolute;
	right: var(--space-sm);
	bottom: 6px;
	left: var(--space-sm);
	height: 2px;
	border-radius: var(--radius-full);
	background: var(--color-primary-pressed);
}

/* Search field in the bar: white, rounded, like the app's search field. */
.header-search {
	position: relative;
	flex: 1 1 auto;
	min-width: 160px;
	max-width: 480px;
	margin: 0;
}

.header-search__icon {
	position: absolute;
	top: 50%;
	left: var(--space-sm);
	display: inline-flex;
	color: var(--color-text-secondary);
	transform: translateY(-50%);
	pointer-events: none;
}

.header-search__icon svg {
	width: 20px;
	height: 20px;
}

/*
 * Calm field that blends into the tinted bar (the white
 * bordered field "stood out"): no border, translucent white, a little lower than the
 * buttons; it turns solid white with a red ring only while it is used.
 */
.site-header .header-search__input {
	min-height: 40px;
	padding-left: 40px;
	border: 1px solid transparent;
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.65);
	font-size: var(--text-subheadline);
	transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-header .header-search__input:hover {
	background: rgba(255, 255, 255, 0.85);
}

.site-header .header-search__input:focus {
	border-color: var(--color-selected);
	background: var(--color-background);
	box-shadow: 0 0 0 1px var(--color-selected);
}

.site-header .header-search__input::placeholder {
	color: var(--color-text-secondary);
}

/* Hide the browser's own clear button; the field stays simple. */
.header-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* ---------- Header: suggestions while typing (phase 6, section 3) ---------- */

/* White panel under the field, at least 420px wide so names fit on a computer. */
.search-suggest {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 60;
	width: max(100%, 420px);
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: var(--space-xxs);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-background);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.12);
	overscroll-behavior: contain;
}

.search-suggest[hidden] {
	display: none;
}

/* Thin red line under the field while a request is running. */
.header-search.is-loading::after {
	content: "";
	position: absolute;
	right: 20px;
	bottom: 0;
	left: 20px;
	height: 2px;
	border-radius: var(--radius-full);
	background: var(--color-primary);
	animation: search-loading 0.9s ease-in-out infinite;
	transform-origin: left;
}

@keyframes search-loading {
	0% { transform: scaleX(0); opacity: 1; }
	70% { transform: scaleX(1); opacity: 1; }
	100% { transform: scaleX(1); opacity: 0; }
}

.search-suggest__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* One product: image · name and SKU · price. */
.search-suggest__item {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-xs);
	border-radius: var(--radius-md);
	color: var(--color-text-primary);
	text-decoration: none;
}

.search-suggest__item.is-active {
	background: var(--color-background-secondary);
}

/* Links turn red on hover elsewhere; here the grey row is enough. */
.search-suggest__item:hover {
	color: var(--color-text-primary);
}

.search-suggest__media {
	display: block;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: var(--color-background-secondary);
}

.search-suggest__item.is-active .search-suggest__media {
	background: var(--color-background);
}

.search-suggest__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.search-suggest__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

/* Long names: two lines at most. */
.search-suggest__name {
	display: -webkit-box;
	overflow: hidden;
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-semibold);
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.search-suggest__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--space-xs);
	color: var(--color-text-secondary);
	font-size: var(--text-footnote);
}

/* Typed words in the name and SKU: darker, not yellow. */
.search-suggest mark {
	background: none;
	color: var(--color-primary-pressed);
	font-weight: var(--font-weight-bold);
}

.search-suggest__meta mark {
	font-weight: var(--font-weight-semibold);
}

.search-suggest__out {
	color: var(--color-on-status-neutral);
}

.search-suggest__price {
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-bold);
	white-space: nowrap;
}

/* "Prikaži sve rezultate (32)" at the bottom. */
.search-suggest__all {
	display: block;
	margin-top: var(--space-xxs);
	padding: var(--space-sm);
	border-top: 1px solid var(--color-border);
	color: var(--color-primary-pressed);
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-semibold);
	text-align: center;
	text-decoration: none;
}

.search-suggest__all:hover {
	text-decoration: underline;
}

.search-suggest__empty {
	padding: var(--space-md);
	text-align: center;
}

.search-suggest__empty p {
	margin: 0;
}

.search-suggest__empty-title {
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-semibold);
}

.search-suggest__empty-call {
	margin-top: var(--space-xxs) !important;
	color: var(--color-text-secondary);
	font-size: var(--text-footnote);
}

.search-suggest__empty-call a {
	color: var(--color-primary-pressed);
	font-weight: var(--font-weight-semibold);
}

/* Phones: the field is full width, so the panel is too. */
@media (max-width: 767.98px) {
	.search-suggest {
		width: 100%;
		max-height: 60vh;
	}
}

/* ---------- Header: full-screen search on phones (phase 6, section 4) ---------- */

.header-search__row {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.header-search__field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

/* "×" and "Odustani" exist only in the open search; the hint only while it is empty. */
.header-search__clear,
.header-search__cancel,
.search-hint {
	display: none;
}

@media (max-width: 767.98px) {
	/* 16px text: iPhones zoom into smaller fields when they get focus. */
	.site-header .header-search__input {
		font-size: var(--text-body);
	}

	/* The page behind does not scroll while the search is open. */
	body.is-search-open {
		overflow: hidden;
	}

	.header-search.is-open {
		position: fixed;
		inset: 0;
		z-index: 1000;
		display: flex;
		flex-direction: column;
		margin: 0;
		padding: max(var(--space-sm), env(safe-area-inset-top)) var(--gutter) 0;
		background: var(--color-background);
		animation: search-open 160ms ease-out;
	}

	/* Field like the app's search field: white, thin border, red border while typing. */
	.site-header .header-search.is-open .header-search__input {
		min-height: 48px;
		padding-right: var(--space-sm);
		border-color: var(--color-border);
		border-radius: var(--radius-md);
		background: var(--color-background);
		box-shadow: none;
	}

	.site-header .header-search.is-open .header-search__input:focus {
		border-color: var(--color-selected);
	}

	/* Room for "×" only while there is text, so the placeholder fits. */
	.site-header .header-search.is-open .header-search__field:has(.header-search__clear:not([hidden])) .header-search__input {
		padding-right: var(--size-touch-target);
	}

	.header-search.is-open .header-search__clear:not([hidden]) {
		position: absolute;
		top: 50%;
		right: 2px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--size-touch-target);
		height: var(--size-touch-target);
		padding: 0;
		border: 0;
		background: none;
		color: var(--color-text-tertiary);
		transform: translateY(-50%);
		cursor: pointer;
	}

	.header-search__clear svg {
		width: 20px;
		height: 20px;
	}

	.header-search.is-open .header-search__cancel {
		display: inline-flex;
		align-items: center;
		flex-shrink: 0;
		min-height: var(--size-touch-target);
		padding: 0 var(--space-xxs);
		border: 0;
		background: none;
		color: var(--color-primary-pressed);
		font-family: var(--font-family);
		font-size: var(--text-body);
		font-weight: var(--font-weight-semibold);
		cursor: pointer;
	}

	/* Suggestions fill the screen under the field instead of a floating panel. */
	.header-search.is-open .search-suggest {
		position: static;
		flex: 1 1 auto;
		width: auto;
		max-height: none;
		margin: var(--space-xs) calc(var(--gutter) * -1) 0;
		padding: 0 var(--space-xs) max(var(--space-md), env(safe-area-inset-bottom));
		border: 0;
		border-top: 1px solid var(--color-border);
		border-radius: 0;
		box-shadow: none;
	}

	/* Empty field: icon in a light red circle and a short hint, like the app. */
	.header-search.is-open .search-suggest[hidden] ~ .search-hint {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: var(--space-md);
		padding-top: 72px;
		text-align: center;
	}

	.search-hint__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 72px;
		height: 72px;
		border-radius: var(--radius-full);
		background: var(--color-button-tinted);
		color: var(--color-primary-pressed);
	}

	.search-hint__icon svg {
		width: 32px;
		height: 32px;
	}

	.search-hint__text {
		margin: 0;
		color: var(--color-text-secondary);
		font-size: var(--text-body);
	}

	/* The loading line sits under the field, not at the bottom of the screen. */
	.header-search.is-open.is-loading::after {
		top: calc(max(var(--space-sm), env(safe-area-inset-top)) + 48px + 2px);
		bottom: auto;
	}
}

@keyframes search-open {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.header-search.is-open {
		animation: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.header-search.is-loading::after {
		animation: none;
	}
}

/* ---------- Header on phones (below 768px) ---------- */

@media (max-width: 767.98px) {
	/* ☰ left, logo centred, account and cart right; search field in its own row below. */
	.site-header__bar {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		gap: var(--space-xs) var(--space-xs);
		min-height: 0;
		padding-block: var(--space-xs) var(--space-sm);
	}

	.header-menu-toggle {
		justify-self: start;
		margin-left: calc(var(--space-xs) * -1);
	}

	.site-header__actions {
		justify-self: end;
		margin-right: calc(var(--space-xs) * -1);
	}

	/* Second row; explicit, because the field comes before the icons in the markup. */
	.header-search {
		display: block;
		grid-row: 2;
		grid-column: 1 / -1;
		max-width: none;
	}

	.site-header .header-search__input {
		min-height: var(--size-touch-target);
		background: rgba(255, 255, 255, 0.8);
	}
}

.header-menu-toggle {
	border: 0;
	background: none;
	cursor: pointer;
}

/* ---------- Phone side menu ---------- */

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 100000; /* Above the WordPress admin bar. */
}

.mobile-menu[hidden] {
	display: none;
}

.mobile-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(28, 28, 30, 0.4);
	animation: mobile-menu-fade 160ms ease-out;
}

.mobile-menu__sheet {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: min(88vw, 360px);
	background: var(--color-background);
	box-shadow: 8px 0 32px rgba(0, 0, 0, 0.16);
	animation: mobile-menu-slide 200ms ease-out;
}

@keyframes mobile-menu-fade {
	from { opacity: 0; }
}

@keyframes mobile-menu-slide {
	from { transform: translateX(-100%); }
}

.mobile-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	padding: 0 var(--space-xs) 0 var(--space-md);
	border-bottom: 1px solid var(--color-border);
	background: var(--color-primary-subtle);
}

.mobile-menu__title {
	font-size: var(--text-headline);
	font-weight: var(--font-weight-bold);
}

.mobile-menu__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--size-touch-target);
	height: var(--size-touch-target);
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-text-primary);
	cursor: pointer;
}

.mobile-menu__close svg {
	width: 24px;
	height: 24px;
}

.mobile-menu__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--space-xs) var(--space-xs) var(--space-xl);
}

.mobile-menu__level[hidden] {
	display: none;
}

.mobile-menu__section,
.mobile-menu__sub-title {
	margin: var(--space-sm) var(--space-sm) var(--space-xs);
	color: var(--color-text-secondary);
	font-size: var(--text-footnote);
	font-weight: var(--font-weight-semibold);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.mobile-menu__sub-title {
	color: var(--color-text-primary);
	font-size: var(--text-title3);
	font-weight: var(--font-weight-bold);
	text-transform: none;
	letter-spacing: 0;
}

.mobile-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mobile-menu__list--plain {
	margin-top: var(--space-sm);
	padding-top: var(--space-sm);
	border-top: 1px solid var(--color-border);
}

.mobile-menu__row {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	width: 100%;
	min-height: 52px;
	padding: var(--space-xxs) var(--space-sm);
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-text-primary);
	font-family: var(--font-family);
	font-size: var(--text-body);
	font-weight: var(--font-weight-semibold);
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.mobile-menu__row:hover,
.mobile-menu__row:active {
	background: var(--color-background-secondary);
	color: var(--color-text-primary);
}

.mobile-menu__label {
	flex: 1;
}

.mobile-menu__row > svg {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: var(--color-text-tertiary);
}

.mobile-menu__row--all {
	color: var(--color-primary-pressed);
}

.mobile-menu__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-md);
	background: var(--color-primary-subtle);
	color: var(--color-primary-pressed);
}

.mobile-menu__icon svg {
	width: 24px;
	height: 24px;
}

.mobile-menu__back {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	min-height: var(--size-touch-target);
	padding: 0 var(--space-sm) 0 var(--space-xxs);
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-primary-pressed);
	font-family: var(--font-family);
	font-size: var(--text-body);
	font-weight: var(--font-weight-semibold);
	cursor: pointer;
}

.mobile-menu__back svg {
	width: 24px;
	height: 24px;
	transform: scaleX(-1);
}

/* Page behind the open menu does not scroll. */
body.has-mobile-menu {
	overflow: hidden;
}

@media (min-width: 768px) {
	.header-menu-toggle,
	.mobile-menu {
		display: none !important;
	}
}

@media (min-width: 768px) {
	/* One thin row: logo · menu · search · account · cart. */
	.site-header {
		border-bottom: 1px solid var(--color-button-tinted-pressed);
	}

	.site-header__bar {
		justify-content: flex-start;
		gap: var(--space-sm);
		min-height: 60px;
		padding-block: 6px;
	}

	.site-header__logo .logo {
		height: 40px;
	}

	.primary-nav {
		display: block;
		flex-shrink: 0;
	}

	.header-search {
		display: block;
		margin-left: auto;
	}

	.site-header__actions {
		flex-shrink: 0;
		gap: var(--space-xxs);
	}

	.header-action {
		min-width: 56px;
	}

	.header-action__label {
		display: block;
	}
}

@media (min-width: 1024px) {
	.site-header__bar {
		gap: var(--space-lg);
	}
}

/*
 * The footer stays at the bottom of the window on short pages:
 * the page is a column at least as tall as the window and the main part takes the
 * free space. Fixed and hidden parts (mobile menu, cookie banner) are not affected.
 */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

/* WordPress's admin bar pushes the page down by its own height. */
body.admin-bar {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.site-main {
	flex: 1 0 auto;
	padding-block: var(--space-xl) var(--space-xxxl);
}

/* Home page: the full-width banner starts right under the header. */
/* The home page ends with full-width bands, so no white gap before the footer;
the footer's top line separates them. */
.home .site-main {
	padding-top: 0;
	padding-bottom: 0;
}

/* ---------- Footer ---------- */

/*
 * Layout: logo, social icons and information links ·
 * categories in two columns · contact; bottom row: © and legal pages, developer credit.
 * Calm light grey (the app's secondary background).
 */
.site-footer {
	border-top: 1px solid var(--color-border);
	background: var(--color-background-secondary);
	color: var(--color-text-secondary);
	font-size: var(--text-subheadline);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl);
	padding-block: var(--space-xxl);
}

/* Brand block: logo and social icons in one row on phones, info links below. */
.site-footer__brand {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: var(--space-md);
}

.site-footer__logo {
	display: inline-flex;
	border-radius: var(--radius-sm);
}

.site-footer__logo .logo {
	display: block;
	width: auto;
	height: 56px;
}

.site-footer__social {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--size-touch-target);
	height: var(--size-touch-target);
	border-radius: var(--radius-full);
	background: var(--color-background);
	color: var(--color-text-primary);
	transition: background-color var(--transition-fast), color var(--transition-fast);
}

.site-footer__social a:hover {
	background: var(--color-button-tinted);
	color: var(--color-primary-pressed);
}

.site-footer__social svg {
	width: 20px;
	height: 20px;
}

/* Information links in one row under the contact details. */
.site-footer__info {
	margin-top: var(--space-md);
	padding-top: var(--space-sm);
	border-top: 1px solid var(--color-border);
}

.site-footer__info .site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-lg);
}

.site-footer__title {
	margin: 0 0 var(--space-xs);
	color: var(--color-text-primary);
	font-size: var(--text-subheadline);
	font-weight: var(--font-weight-bold);
}

.site-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__links a,
.site-footer__text {
	display: inline-flex;
	align-items: flex-start;
	gap: var(--space-xs);
	padding-block: 6px;
	color: var(--color-text-secondary);
	line-height: 1.4;
	text-decoration: none;
}

.site-footer__links a:hover {
	color: var(--color-primary-pressed);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Categories in two columns, so the footer stays short. */
.site-footer__links--columns {
	columns: 2;
	column-gap: var(--space-xl);
}

.site-footer__links--columns li {
	break-inside: avoid;
}

.site-footer__contact svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

/* Bottom row */
.site-footer__bottom {
	border-top: 1px solid var(--color-border);
	font-size: var(--text-footnote);
}

/* Phones: every row centred; from 768px left and right, as before. */
.site-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-sm);
	padding-block: var(--space-md);
	text-align: center;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-xxs) var(--space-lg);
}

.site-footer__copyright {
	margin: 0;
}

.site-footer__legal-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-xxs) var(--space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__legal-links a,
.site-footer__credit {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	color: var(--color-text-secondary);
	text-decoration: none;
}

.site-footer__legal-links a:hover,
.site-footer__credit:hover {
	color: var(--color-primary-pressed);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Developer credit, like the app: "Developed by" · muted logo · name. */
.site-footer__credit {
	gap: 6px;
	color: var(--color-text-tertiary);
}

.site-footer__credit img {
	display: block;
	width: 18px;
	height: 18px;
}

.site-footer__credit-name {
	font-weight: var(--font-weight-semibold);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 1fr 2fr 1.3fr;
		gap: var(--space-xxl);
		padding-block: var(--space-xxxl);
	}

	.site-footer__brand {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-md);
	}

	.site-footer__social {
		justify-content: flex-start;
	}

	.site-footer__bottom-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		text-align: left;
	}

	.site-footer__legal,
	.site-footer__legal-links {
		justify-content: flex-start;
	}
}

/* ---------- Header: category strip ---------- */

/* Phones: the categories are in the side menu. */
.category-strip {
	display: none;
}

@media (min-width: 768px) {
	/* White row under the tinted bar, all top-level categories across the full width. */
	.category-strip {
		display: block;
		border-top: 1px solid var(--color-button-tinted-pressed);
		background: var(--color-background);
	}

	/* Each column as wide as its name, so short names stay on one line. */
	.category-strip__list {
		display: flex;
		justify-content: space-between;
		gap: var(--space-xxs);
		margin: 0;
		padding: var(--space-xs) 0;
		list-style: none;
	}

	.category-strip__item {
		flex: 1 1 auto;
	}

	.category-strip__link {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: var(--space-xs);
		height: 100%;
		padding: var(--space-sm) var(--space-xs) var(--space-xs);
		border-radius: var(--radius-md);
		color: var(--color-text-primary);
		font-size: var(--text-footnote);
		font-weight: var(--font-weight-semibold);
		line-height: 1.25;
		text-align: center;
		text-decoration: none;
		transition: color var(--transition-fast), background-color var(--transition-fast);
	}

	/*
	 * Icon in a solid red circle (the client likes strong colours),
	 * light red on hover and keyboard focus. The current category keeps the red circle
	 * and is marked by red text with a line under it.
	 */
	.category-strip__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		border-radius: var(--radius-full);
		background: var(--color-button-primary);
		color: var(--color-on-button-primary);
		transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
	}

	.category-strip__icon svg {
		display: block;
		width: 26px;
		height: 26px;
	}

	.category-strip__link:hover,
	.category-strip__link:focus-visible {
		background: var(--color-background-secondary);
		color: var(--color-primary-pressed);
	}

	.category-strip__link.is-current {
		color: var(--color-primary-pressed);
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 5px;
	}

	/* Hover: the brand yellow from the logo (the light red circle was the alternative). */
	.category-strip__link:hover .category-strip__icon,
	.category-strip__link:focus-visible .category-strip__icon {
		background: var(--color-accent);
		color: var(--color-primary-pressed);
	}

	.category-strip__link:hover .category-strip__icon {
		transform: translateY(-2px);
	}
}

/* From 1024px every short name stays on one line (wrapped names
   looked messy); 13px text up to 1200px, 15px above (measured, no overflow). */
@media (min-width: 1024px) {
	.category-strip__link {
		white-space: nowrap;
	}

	.category-strip__icon {
		width: 52px;
		height: 52px;
	}
}

@media (min-width: 1200px) {
	.category-strip__link {
		font-size: var(--text-subheadline);
	}
}

/* ---------- Category strip: subcategories panel ---------- */

@media (min-width: 768px) {
	/* The panel is placed against the whole strip, not against its item. */
	.category-strip {
		position: relative;
	}

	.category-strip__item {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.category-strip__link {
		width: 100%;
		height: auto;
	}

	/*
	 * Arrow button for keyboard users only (visible arrows under the
	 * names "bodu oči"). It takes no height and stays invisible; it shows up only while
	 * it has keyboard focus, over the bottom of its category. Mouse opens on hover,
	 * touch on the first tap.
	 */
	.category-strip__toggle {
		position: relative;
		width: 32px;
		height: 0;
		padding: 0;
		border: 0;
		background: none;
		color: var(--color-primary-pressed);
		opacity: 0;
		cursor: pointer;
	}

	.category-strip__toggle[hidden] {
		display: none;
	}

	.category-strip__toggle svg {
		position: absolute;
		top: -12px;
		left: 50%;
		width: 20px;
		height: 20px;
		margin-left: -10px;
		border-radius: var(--radius-full);
		background: var(--color-background);
	}

	.category-strip__toggle:focus-visible {
		outline: none;
		opacity: 1;
	}

	.category-strip__toggle:focus-visible svg {
		outline: 2px solid var(--color-selected);
		outline-offset: 1px;
	}

	.category-strip__item.is-open .category-strip__toggle svg {
		transform: rotate(180deg);
	}

	/* The open category looks like a hovered one. */
	.category-strip__item.is-open .category-strip__link {
		background: var(--color-background-secondary);
		color: var(--color-primary-pressed);
	}

	.category-strip__item.is-open .category-strip__icon {
		background: var(--color-accent);
		color: var(--color-primary-pressed);
	}

	.strip-panel {
		position: absolute;
		top: calc(100% - var(--space-xxs));
		left: 0;
		right: 0;
		z-index: 60;
	}

	.strip-panel[hidden] {
		display: none;
	}

	.strip-panel__box {
		max-height: min(480px, calc(100vh - 220px));
		overflow-y: auto;
		padding: var(--space-xl) var(--space-xxl);
		border: 1px solid var(--color-border);
		border-radius: var(--radius-lg);
		background: var(--color-background);
		box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
		white-space: normal;
	}

	.strip-panel__head {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: var(--space-md);
		margin-bottom: var(--space-md);
		padding-bottom: var(--space-sm);
		border-bottom: 1px solid var(--color-border);
	}

	.strip-panel__title {
		margin: 0;
		font-size: var(--text-title3);
		font-weight: var(--font-weight-bold);
		line-height: 1.25;
	}

	.strip-panel__all {
		display: inline-flex;
		flex-shrink: 0;
		align-items: center;
		gap: 2px;
		font-size: var(--text-subheadline);
		font-weight: var(--font-weight-semibold);
		text-decoration: none;
	}

	.strip-panel__all svg {
		width: 20px;
		height: 20px;
	}

	.strip-panel__subs {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: var(--space-xxs) var(--space-lg);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.strip-panel__subs a {
		display: flex;
		align-items: center;
		min-height: var(--size-touch-target);
		padding: var(--space-xxs) var(--space-sm);
		border-radius: var(--radius-sm);
		color: var(--color-text-primary);
		font-size: var(--text-subheadline);
		line-height: 1.3;
		text-decoration: none;
		transition: background-color var(--transition-fast), color var(--transition-fast);
	}

	.strip-panel__subs a:hover {
		background: var(--color-button-tinted);
		color: var(--color-primary-pressed);
	}
}

@media (prefers-reduced-motion: reduce) {
	.category-strip__link:hover .category-strip__icon {
		transform: none;
	}
}
