/* ==========================================================================
   UTILITY PAGES — 404, SEARCH, EMPTY STATES
   --------------------------------------------------------------------------
   No Figma frame exists for any of these. They are built from the locked
   foundation instead: the page-hero heading treatment the catalogue, blog,
   Kontakt and account pages share, the button system, the form foundation, and
   the blog archive's own pagination — reused, not reimplemented.

   Nothing global is added. Every rule is scoped to .utility or to the shared
   .empty-state, so no other page can pick these sizes up.
   ========================================================================== */

.utility {
	padding-block-end: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   EMPTY STATE

   Shared by 404, a search that matched nothing, and an empty archive.

   No fixed viewport height. A phone in landscape has barely 400px of viewport,
   and a 100vh block would push the footer out of reach and clip the actions on
   exactly the devices least able to recover from a wrong URL. Generous padding
   gives the same composed feeling and cannot trap anyone.
   -------------------------------------------------------------------------- */

.empty-state {
	max-width: 46rem;
	margin-inline: auto;
	padding-block: var(--space-2xl);
	text-align: center;
}

.empty-state__eyebrow {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-secondary);
}

.empty-state__title {
	margin: 0 0 var(--space-md);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.2;
	color: var(--color-primary-dark);
}

.empty-state__text {
	max-width: 42ch;
	margin: 0 auto var(--space-lg);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
}

.empty-state__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
}

/* The shared .btn is full width below 768; inside a centred column it should
   size to its label instead. */
.empty-state__actions .btn.empty-state__action {
	width: auto;
	padding-inline: var(--space-lg);
}

.empty-state__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.02em;
	color: var(--color-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color var(--transition-base);
}

.empty-state__link:hover {
	color: var(--color-primary);
}

/*
 * The 404 is the whole page, so it gets the full standalone composition. The
 * other two sit underneath a heading that has already introduced them — the
 * search hero, or an archive's own title — so they take less room and a
 * quieter heading. Same primitive, three weights.
 */
.empty-state--search,
.empty-state--archive {
	padding-block: var(--space-lg);
}

.empty-state--search .empty-state__title,
.empty-state--archive .empty-state__title {
	font-size: 24px;
	color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   SEARCH — HEADER
   -------------------------------------------------------------------------- */

.search-hero {
	padding-block: var(--space-lg) var(--space-md);
}

.search-hero__eyebrow {
	margin: 0 0 var(--space-xs);
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-secondary);
}

.search-hero__title {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.2;
	color: var(--color-primary-dark);
}

.search-hero__meta {
	margin: 0 0 var(--space-md);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
}

.search-hero__count {
	font-family: var(--font-meta);
	font-weight: 600;
	color: var(--color-ink);
}

.search-hero__term {
	font-family: var(--font-heading);
	font-style: italic;
	color: var(--color-ink);
}

/*
 * The site's search form, which is styled for the header bar. On this page it
 * is the page's own control, so it gets room: the field takes the reading
 * width and the submit sits inside its end.
 */
.utility--search .header-search {
	position: relative;
	max-width: 34rem;
	margin-block-start: var(--space-md);
}

.utility--search .header-search__field {
	width: 100%;
	min-height: 62px;
	padding-inline: var(--space-md) 62px;
	border: 1px solid transparent;
	border-radius: var(--radius-button);
	background-color: var(--color-surface-light);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 24px;
	color: var(--color-ink);
}

.utility--search .header-search__submit {
	position: absolute;
	inset-inline-end: 0;
	inset-block-start: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-text);
	cursor: pointer;
	transition: color var(--transition-base);
}

.utility--search .header-search__submit:hover {
	color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   SEARCH — RESULTS

   One row shape for products, articles and pages. Each result keeps a type
   label, which is what makes a mixed list readable — without it a product and a
   page look like the same thing.
   -------------------------------------------------------------------------- */

/*
 * Scoped to the page's wrapper: WordPress also puts "search-results" on
 * <body> of every search with results, and the bare class turned the whole
 * body into this flex column with a 24px top margin and a rule above the
 * header (QA round 1, found while fixing 11.12).
 */
.utility--search .search-results {
	display: flex;
	flex-direction: column;
	margin-block-start: var(--space-md);
	border-block-start: 1px solid var(--color-border);
}

.search-result {
	display: flex;
	align-items: flex-start;
	gap: var(--space-md);
	padding-block: var(--space-md);
	border-block-end: 1px solid var(--color-border);
}

.search-result__media {
	flex-shrink: 0;
	display: block;
	width: 96px;
	border-radius: var(--radius-button);
	background-color: var(--color-surface-light);
}

.search-result__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	padding: var(--space-xs);
	object-fit: contain;
}

/* Editorial photography fills its frame; a bottle is contained on a plate. */
.search-result--post .search-result__image,
.search-result--page .search-result__image {
	aspect-ratio: 4 / 3;
	padding: 0;
	border-radius: var(--radius-button);
	object-fit: cover;
}

.search-result__body {
	min-width: 0;
}

.search-result__label {
	margin: 0 0 6px;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 11px;
	line-height: 16px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--color-text-secondary);
}

.search-result__title {
	margin: 0 0 var(--space-xs);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	color: var(--color-ink);
}

.search-result__link {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-base);
}

.search-result__link:hover {
	color: var(--color-primary);
}

.search-result__meta {
	margin: 0 0 4px;
	font-family: var(--font-ui);
	font-size: 13px;
	line-height: 20px;
	color: color-mix(in srgb, var(--color-text) 75%, transparent);
}

.search-result__excerpt {
	margin: 0;
	max-width: 68ch;
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-text);
}

/* WooCommerce's own price markup, given the site's price treatment. */
.search-result__price {
	margin: 0;
	font-family: var(--font-meta);
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: var(--color-ink);
}

.search-result__price del {
	margin-inline-end: var(--space-xs);
	font-weight: 400;
	color: var(--color-text-secondary);
}

.search-result__price ins {
	color: var(--color-primary-dark);
	text-decoration: none;
}

/* The reused blog pagination sits closer here — there is no card grid above it
   to space away from. */
.utility--search .blog-pagination {
	margin-block-start: var(--space-lg);
}

/* --------------------------------------------------------------------------
   SEARCH — PRODUCTS AS CATALOGUE CARDS (client 3.11.2026 p11, "teiste
   vaadete puhul samamoodi"; QA round 1, 11.12)

   The products in a result set use the catalogue's card and grid
   (catalog.css, loaded by search.php) and its columns: two from 600, three
   from 1024, four at 1180–1599, the approved large-screen three and four
   from 1600, and two on phones too (below). Articles and pages
   follow under their own small heading in the row shape above.
   -------------------------------------------------------------------------- */

.search-products {
	margin-block: var(--space-md) var(--space-lg);
}

.search-results__group {
	margin: var(--space-lg) 0 0;
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.25;
	color: var(--color-ink);
}

.utility--search .search-results__group + .search-results {
	margin-block-start: var(--space-sm);
}

/* First results page: the articles, recipes and pages after the products
   (QA 18.11 D3), with the view that lists them all. */
.search-other__all {
	margin: var(--space-md) 0 0;
}

/* A secondary link, not the page's main action: the compact button's size, so
   on a phone the label is one line and the target 44px+ (QA 18.11 D14). */
.search-other__all .btn {
	width: auto;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 24px;
	font-size: 14px;
	line-height: 20px;
}

/*
 * Phones: the products are the catalogue's two-up grid (client 04.11.2026),
 * the same card and columns as /shop/ — catalog.css, "< 600px — TWO PRODUCTS
 * PER ROW ON PHONES". Until then a one-column card was ~590px tall, so the
 * card lay on its side here (bottle 96 wide, name and price beside it); two
 * 163px cards per row at 390 give the density back without a second card
 * layout, and the name, price, unit price, deposit and LISA read as they do
 * in the catalogue.
 */

/*
 * The blog's pagination, which search.php reuses, lays its list out in a row
 * only under .blog-archive (blog.css). Here the numbers stood one under
 * another and the current page's underline ran the rail's full width. The
 * same row, for this page.
 */
.utility--search .blog-pagination__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.utility--search .blog-pagination {
	margin-block-start: var(--space-lg);
}

/* --------------------------------------------------------------------------
   TABLET AND UP
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {

	.empty-state {
		padding-block: 96px;
	}

	.empty-state__title,
	.search-hero__title {
		font-size: 40px;
	}

	.empty-state--search .empty-state__title,
	.empty-state--archive .empty-state__title {
		font-size: 26px;
	}

	.empty-state__actions {
		flex-direction: row;
		justify-content: center;
		gap: var(--space-lg);
	}

	.search-result {
		gap: var(--space-lg);
		padding-block: var(--space-lg);
	}

	.search-result__media {
		width: 128px;
	}

	.search-result__title {
		font-size: 24px;
	}
}

@media (min-width: 1024px) {

	.search-hero {
		padding-block: var(--space-lg) var(--space-lg);
	}

	.empty-state__title,
	.search-hero__title {
		font-size: 48px;
	}

	.empty-state {
		padding-block: 120px;
	}

	.empty-state--search,
	.empty-state--archive {
		padding-block: var(--space-2xl);
	}

	.empty-state--search .empty-state__title,
	.empty-state--archive .empty-state__title {
		font-size: 28px;
	}
}

/* --------------------------------------------------------------------------
   LEGAL PAGES — privacy policy and sales terms

   Ordinary Pages on the ordinary template. The only thing added is a reading
   measure: legal text set across the full 1312 container is technically fine
   and practically unreadable, and these are the two pages on the site someone
   actually has to read carefully.

   The body class comes from WordPress's own privacy setting and WooCommerce's
   terms setting, so this follows the assignment rather than a Page ID.

   Nothing global. Every rule below is scoped to .avallone-legal, and the
   typography is the site's own — this sets width and rhythm, not a new scale.
   -------------------------------------------------------------------------- */

.avallone-legal .page-content {
	padding-block-end: var(--space-2xl);
}

/*
 * page.php renders the Page title through .page-content__title, which carries
 * no CSS of its own — so these arrived as a bare 44px Playfair heading sitting
 * flush against the sticky header, the same thing the account and cart pages
 * hit. It takes the page-hero treatment the rest of the site shares, scoped
 * here so no other ordinary Page is affected.
 */
.avallone-legal .page-content__header {
	padding-block-start: var(--space-lg);
}

.avallone-legal .page-content__title {
	margin: 0 0 var(--space-md);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.2;
	color: var(--color-primary-dark);
}

.avallone-legal .page-content__header > .container > *,
.avallone-legal .page-content > .container > * {
	max-width: 68ch;
}

.avallone-legal .page-content > .container > h2 {
	margin-block: var(--space-xl) var(--space-sm);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.3;
	color: var(--color-ink);
}

.avallone-legal .page-content > .container > h3 {
	margin-block: var(--space-lg) var(--space-xs);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	color: var(--color-ink);
}

.avallone-legal .page-content > .container > p {
	margin-block: 0 var(--space-md);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
}

.avallone-legal .page-content > .container > ul,
.avallone-legal .page-content > .container > ol {
	margin-block: 0 var(--space-md);
	padding-inline-start: var(--space-md);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
	list-style-position: outside;
}

.avallone-legal .page-content > .container > ul {
	list-style-type: disc;
}

.avallone-legal .page-content > .container > ol {
	list-style-type: decimal;
}

.avallone-legal .page-content > .container li {
	margin-block-end: var(--space-xs);
}

.avallone-legal .page-content > .container a {
	color: var(--color-primary-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
	/* Addresses and URLs are the one thing in a legal text that will not wrap
	   on its own, and an email running off a 360px screen is a real defect. */
	overflow-wrap: anywhere;
}

.avallone-legal .page-content > .container a:hover {
	color: var(--color-primary);
}

@media (min-width: 768px) {

	.avallone-legal .page-content__title {
		font-size: 40px;
	}
}

@media (min-width: 1024px) {

	.avallone-legal .page-content__title {
		margin-block-end: var(--space-lg);
		font-size: 48px;
	}

	.avallone-legal .page-content > .container > h2 {
		font-size: 28px;
	}
}

/* ==========================================================================
   SEARCH — ENTRY STATE
   --------------------------------------------------------------------------
   The page before anything has been searched for. The UX frame "Otsing" sets
   the shape: one field on a rule, given the middle of the page, over a short
   row of ways in. Everything visible is the theme's own language — the
   catalogue's curated-entry-point chip, the tracked label above it, the search
   icon the header already uses.
   ========================================================================== */

/*
 * Measured off the UX frame, which is 1280 x 1024: from the header's underside
 * to the footer it gives the field 254 of air above its rule, 100 between that
 * rule and the suggestions label, and 172 below the last row of chips. The
 * first pass had 181 / 48 / 120 — the right composition at two thirds of its
 * scale, which read as a form near the top of a page rather than a field given
 * the middle of one.
 *
 * Held as clamps rather than as the frame's absolute numbers, so a short
 * laptop viewport keeps the whole state on screen while a tall one opens up to
 * the frame's own proportions.
 */
.search-entry {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* The frame's 100 between the rule and the label. */
	gap: 96px;
	padding-block: clamp(var(--space-2xl), 20vh, 200px) clamp(var(--space-2xl), 17vh, 172px);
	padding-inline: var(--page-gutter);
}

/* --------------------------------------------------------------------------
   FIELD

   A rule, not a box. The site's own inputs are boxed, but this one is the only
   thing on the page and the frame draws it open — so it keeps the theme's
   border colour and focus ring and drops the rest.
   -------------------------------------------------------------------------- */

.search-entry__form {
	position: relative;
	display: flex;
	align-items: center;
	/* The frame sets 30.6 of clear space between the magnifier and the first
	   word, and insets the magnifier 11.8 from where its rule begins. */
	gap: 30px;
	padding-inline-start: 12px;
	width: 100%;
	/* The frame gives the field a little over half its 1280; 768 is that
	   measure, and it stops growing with the rail. */
	max-width: 768px;
	padding-block-end: var(--space-sm);
	border-block-end: 1px solid var(--color-border);
	transition: border-color var(--transition-base);
}

.search-entry__form:focus-within {
	border-block-end-color: var(--color-primary);
}

.search-entry__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--color-text);
}

/* The base form layer sets every text input by attribute, which outranks a
   single class — so this one is qualified rather than made important. */
input[type='search'].search-entry__field {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: transparent;
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 32px;
	line-height: 44px;
	letter-spacing: -0.01em;
	color: var(--color-ink);
}

input[type='search'].search-entry__field::placeholder {
	color: color-mix(in srgb, var(--color-text) 70%, transparent);
	opacity: 1;
}

/*
 * The ring belongs to the rule. The base form layer gives every input a box, a
 * radius and a focus ring, and here the rule under the field is what a reader
 * reads as the field — so the box is cleared and the rule turns primary on
 * focus-within, which is a visible indicator on the thing that looks like the
 * control.
 */
/* The form layer's focused-field box would outrank a plain :focus here and draw
   a rounded bubble around the field; the form ancestor matches its weight. See
   the same rule in components/header-search.css. */
.search-entry__form input[type='search'].search-entry__field:focus,
.search-entry__form input[type='search'].search-entry__field:focus-visible {
	border: 0;
	box-shadow: none;
	outline: 2px solid transparent;
	outline-offset: 0;
	background-color: transparent;
}

/* Search inputs draw their own clear affordance in some browsers; the rule and
   the icon are the design here. */
input[type='search'].search-entry__field::-webkit-search-decoration,
input[type='search'].search-entry__field::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

/*
 * The frame has no visible submit — Enter is the interaction. The button stays
 * for the keyboard and for anyone whose browser needs a control to submit, and
 * appears when it is focused.
 */
.search-entry__submit {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.search-entry__submit:focus-visible {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	padding: 8px 20px;
	overflow: visible;
	clip-path: none;
	border: 1px solid var(--color-primary);
	border-radius: var(--radius-pill);
	background-color: transparent;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-primary);
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   SUGGESTIONS

   The catalogue's own curated-entry-point chip, rounded as the frame draws it
   — the theme already carries a pill radius, so this is its own vocabulary
   rather than a new shape.
   -------------------------------------------------------------------------- */

.search-entry__suggestions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
	width: 100%;
	max-width: 768px;
}

.search-entry__suggestions-title {
	margin: 0;
	font-family: var(--font-ui);
	font-style: normal;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-secondary);
}

.search-entry__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	/* The frame's two rows sit 11.3 apart. */
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The catalogue's chip, at the size the frame draws it: 46.8 tall against the
   archive row's 39, which is the frame's own padding around the same label. */
.search-entry__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 47px;
	padding: 12px 24px;
	border: 1px solid color-mix(in srgb, var(--color-text) 70%, transparent);
	border-radius: var(--radius-pill);
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	line-height: 21px;
	color: var(--color-ink);
	text-decoration: none;
	transition:
		border-color var(--transition-base),
		color var(--transition-base);
}

.search-entry__chip:hover,
.search-entry__chip:focus-visible {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

/* ==========================================================================
   <= 767px
   ========================================================================== */

@media (max-width: 767px) {

	input[type='search'].search-entry__field {
		font-size: 22px;
		line-height: 32px;
	}
}

/*
 * Short desktop screens (the client's ~1414x645 window and 1280x600): the
 * hero's 48px air above and below, the 48px heading and the 62px field put
 * the first product at 477. The same parts, closer together and a step
 * smaller, as the catalogue header does at these heights. Last in the file
 * so it follows the 1024 step above.
 */
@media (min-width: 1024px) and (max-height: 880px) {

	.search-hero {
		padding-block: var(--space-sm) 0;
	}

	.search-hero__eyebrow {
		margin-bottom: 4px;
	}

	.search-hero__title {
		margin-bottom: var(--space-xs);
		font-size: 40px;
		line-height: 1.1;
	}

	.search-hero__meta {
		margin-bottom: 0;
	}

	.utility--search .header-search {
		margin-block-start: 12px;
	}

	.utility--search .header-search__field {
		min-height: 52px;
	}

	.utility--search .header-search__submit {
		width: 52px;
		height: 52px;
	}

	.search-products {
		margin-block-start: var(--space-md);
	}
}
