/*
 * E-KAG core styles.
 *
 * No colour or measurement is hard-coded. Everything reads a custom property
 * printed by ekag_css_vars(), which is generated from the option schema, which
 * is edited in the Customizer. Change a value there and it lands everywhere.
 *
 * Selectors are kept flat — one class, one job — so a child theme can override
 * any rule without a specificity fight.
 */

/* ------------------------------------------------------------ 1. Fallbacks */

:root {
	--ekag-ink: #14181c;
	--ekag-steel: #2b3138;
	--ekag-mist: #eef1f4;
	--ekag-paper: #fff;
	--ekag-signal: #e8b21a;
	--ekag-signal-ink: #14181c;
	--ekag-stock: #0f7b4f;
	--ekag-alert: #b4342a;
	--ekag-line: #d3d9df;
	--ekag-container: 1280px;
	--ekag-radius: 3px;
	--ekag-gap: 20px;
	--ekag-section-space: 56px;
	--ekag-base-size: 16px;
	--ekag-font-body: system-ui, sans-serif;
	--ekag-font-display: "Roboto Condensed", "Arial Narrow", sans-serif;
	--ekag-font-mono: ui-monospace, Menlo, monospace;
	--ekag-signal-soft: #fdf6e2;
	--ekag-ink-70: rgba(20, 24, 28, .7);
	--ekag-ink-45: rgba(20, 24, 28, .45);
	--ekag-shadow: 0 1px 2px rgba(20, 24, 28, .08), 0 8px 24px rgba(20, 24, 28, .06);
	--ekag-cols: 4;
}

/* ---------------------------------------------------------------- 2. Reset */

*,
*::before,
*::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--ekag-mist);
	color: var(--ekag-ink);
	font-family: var(--ekag-font-body);
	font-size: var(--ekag-base-size);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img,
svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--ekag-font-display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.01em;
	margin: 0 0 .5em;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

:focus-visible {
	outline: 3px solid var(--ekag-signal);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ekag-skip {
	position: absolute;
	left: -9999px;
	z-index: 100;
	padding: .75rem 1.25rem;
	background: var(--ekag-signal);
	color: var(--ekag-signal-ink);
	font-weight: 700;
}

.ekag-skip:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------- 3. Layout */

.ekag-container {
	width: 100%;
	max-width: var(--ekag-container);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

.ekag-section { padding-block: var(--ekag-section-space); }

.ekag-section + .ekag-section { padding-top: 0; }

.ekag-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: calc(var(--ekag-gap) * 1.2);
	padding-bottom: .6rem;
	border-bottom: 2px solid var(--ekag-ink);
}

.ekag-section__title { margin: 0; text-transform: uppercase; letter-spacing: .02em; }

.ekag-section__more {
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid var(--ekag-signal);
	padding-bottom: 2px;
	white-space: nowrap;
}

/*
 * Each grid owns its own column variable. Sharing one meant renaming the
 * variable in one place silently broke the others.
 */
.ekag-grid {
	display: grid;
	gap: var(--ekag-gap);
	--ekag-cols: var(--ekag-cols-desktop, 4);
	grid-template-columns: repeat(var(--ekag-cols), minmax(0, 1fr));
}

.ekag-main { padding-block: var(--ekag-section-space); }
.ekag-main--home { padding-block: 0; }

.ekag-prose { max-width: 68ch; }
.ekag-prose img { margin-block: 1.5rem; }

/* --------------------------------------------------------- 4. Part numbers */

/*
 * The signature of the theme. A part number is data, not prose: it is set in
 * a monospaced face with tabular figures and open letterspacing so a 0 never
 * reads as an O across a workshop counter.
 */

.ekag-pn {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0 0 .5rem;
	font-family: var(--ekag-font-mono);
	font-size: .8125rem;
}

.ekag-pn__label {
	font-family: var(--ekag-font-body);
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ekag-ink-45);
}

.ekag-pn__value {
	font-variant-numeric: tabular-nums;
	letter-spacing: .06em;
	font-weight: 600;
	background: var(--ekag-mist);
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	padding: .1rem .4rem;
	word-break: break-all;
}

.ekag-pn--lg { font-size: 1rem; margin-bottom: .75rem; }
.ekag-pn--lg .ekag-pn__value { padding: .25rem .6rem; }

.ekag-pn__copy {
	background: none;
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	padding: .2rem .5rem;
	font-family: var(--ekag-font-body);
	font-size: .75rem;
	font-weight: 600;
	cursor: pointer;
}

.ekag-pn__copy:hover { border-color: var(--ekag-ink); }
.ekag-pn__copy[data-copied] { background: var(--ekag-stock); border-color: var(--ekag-stock); color: #fff; }

.ekag-xref { margin-top: .75rem; font-size: .875rem; }
.ekag-xref summary { cursor: pointer; font-weight: 600; }

.ekag-xref__list {
	list-style: none;
	margin: .6rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.ekag-xref__list .ekag-pn { margin: 0; }

/* -------------------------------------------------------------- 5. Buttons */

.ekag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .7rem 1.15rem;
	border: 2px solid transparent;
	border-radius: var(--ekag-radius);
	font-family: var(--ekag-font-display);
	font-size: .9375rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s ease, background-color .12s ease;
}

.ekag-btn:active { transform: translateY(1px); }

.ekag-btn--signal {
	background: var(--ekag-signal);
	border-color: var(--ekag-signal);
	color: var(--ekag-signal-ink);
}

.ekag-btn--signal:hover { filter: brightness(1.06); }

.ekag-btn--ghost {
	background: transparent;
	border-color: var(--ekag-line);
	color: var(--ekag-ink);
}

.ekag-btn--ghost:hover { border-color: var(--ekag-ink); }

/* --------------------------------------------------------- 6. Trade bar */

.ekag-tradebar {
	background: var(--ekag-ink);
	color: rgba(255, 255, 255, .82);
	font-size: .8125rem;
}

.ekag-tradebar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 38px;
	flex-wrap: wrap;
}

.ekag-tradebar__msg { margin: 0; }

.ekag-tradebar__links {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.ekag-tradebar__menu {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ekag-tradebar a { text-decoration: none; }
.ekag-tradebar a:hover { color: var(--ekag-signal); }

.ekag-phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.ekag-phone__label { font-weight: 400; opacity: .7; }
.ekag-wa { text-decoration: none; }

/* ---------------------------------------------------------------- 7. Header */

.ekag-header {
	background: var(--ekag-paper);
	border-bottom: 1px solid var(--ekag-line);
}

.ekag--sticky-header .ekag-header {
	position: sticky;
	top: 0;
	z-index: 40;
}

.ekag-header__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	padding-block: .85rem;
}

.ekag-logo { text-decoration: none; display: block; }

.ekag-header__brand img,
.ekag-header__brand .custom-logo {
	width: auto;
	max-width: min(100%, var(--ekag-logo-w, 240px));
	max-height: var(--ekag-logo-h, 64px);
	height: auto;
}

.ekag-logo__mark {
	display: block;
	font-family: var(--ekag-font-display);
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1;
}

.ekag-logo__tag {
	display: block;
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--ekag-ink-45);
	margin-top: .2rem;
}

.ekag-header__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.ekag-account,
.ekag-cart {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ekag-cart__count {
	display: inline-grid;
	place-items: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding-inline: .35rem;
	border-radius: 999px;
	background: var(--ekag-signal);
	color: var(--ekag-signal-ink);
	font-size: .75rem;
	font-weight: 700;
}

.ekag-burger {
	display: none;
	width: 44px;
	height: 44px;
	background: none;
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	cursor: pointer;
	position: relative;
}

.ekag-burger__bars,
.ekag-burger__bars::before,
.ekag-burger__bars::after {
	position: absolute;
	left: 12px;
	width: 18px;
	height: 2px;
	background: var(--ekag-ink);
}

.ekag-burger__bars { top: 21px; }
.ekag-burger__bars::before { content: ""; top: -6px; left: 0; }
.ekag-burger__bars::after { content: ""; top: 6px; left: 0; }

/* ------------------------------------------------------------ 8. Navigation */

.ekag-nav {
	background: var(--ekag-steel);
	color: #fff;
}

.ekag-nav__list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ekag-nav__list a {
	display: block;
	padding: .8rem 1rem;
	font-family: var(--ekag-font-display);
	font-size: .9375rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.ekag-nav__list a:hover,
.ekag-nav__list .current-menu-item > a {
	border-bottom-color: var(--ekag-signal);
	background: rgba(255, 255, 255, .06);
}

.ekag-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ------------------------------------------------------------ 9. The finder */

/*
 * Presented as a data plate: a solid panel with a signal-coloured top edge,
 * every field labelled above the control. Labels stay visible because a buyer
 * comparing two numbers should never have to remember which box was which.
 */

.ekag-finder {
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-top: 4px solid var(--ekag-signal);
	border-radius: var(--ekag-radius);
	padding: 1.15rem;
	box-shadow: var(--ekag-shadow);
}

.ekag-finder__row {
	display: grid;
	grid-template-columns: minmax(140px, .8fr) minmax(0, 2fr) auto;
	gap: .75rem;
	align-items: end;
}

.ekag-finder__field { min-width: 0; position: relative; }

.ekag-finder__label {
	display: block;
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--ekag-ink-70);
	margin-bottom: .35rem;
}

/*
 * Colour is set explicitly, never inherited. The finder sits on a dark hero,
 * and inherited colour there is white — which is invisible on the white field.
 */
.ekag-finder__select,
.ekag-finder__input {
	width: 100%;
	padding: .7rem .75rem;
	background: var(--ekag-paper);
	color: var(--ekag-ink);
	border: 2px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	appearance: none;
}

.ekag-finder__select option { color: var(--ekag-ink); background: var(--ekag-paper); }

.ekag-finder__input::placeholder { color: var(--ekag-ink-45); opacity: 1; }

/* The select needs its own arrow back once appearance is stripped. */
.ekag-finder__field--brand { position: relative; }

.ekag-finder__field--brand::after {
	content: "";
	position: absolute;
	right: .75rem;
	bottom: 1.25rem;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--ekag-ink-45);
	pointer-events: none;
}

.ekag-finder--compact .ekag-finder__field--brand::after { bottom: 1.1rem; }

.ekag-finder__input {
	font-family: var(--ekag-font-mono);
	font-variant-numeric: tabular-nums;
	letter-spacing: .05em;
}

.ekag-finder__select:focus,
.ekag-finder__input:focus {
	border-color: var(--ekag-signal);
	outline: none;
}

.ekag-finder__submit { height: 46px; }

.ekag-finder__note {
	margin: .8rem 0 0;
	font-size: .8125rem;
	color: var(--ekag-ink-70);
}

.ekag-finder--compact {
	border-top-width: 1px;
	padding: 0;
	box-shadow: none;
	border: 0;
	background: none;
}

.ekag-finder--compact .ekag-finder__label { position: absolute; left: -9999px; }
.ekag-finder--compact .ekag-finder__row { gap: .5rem; align-items: stretch; }
.ekag-finder--compact .ekag-finder__submit { height: auto; }

.ekag-header__search--deferred { visibility: hidden; }
.ekag-header--scrolled .ekag-header__search--deferred { visibility: visible; }

/* Suggestions */

.ekag-finder__results {
	position: absolute;
	z-index: 50;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: .3rem;
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	box-shadow: var(--ekag-shadow);
	max-height: 60vh;
	overflow-y: auto;
}

.ekag-suggest {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .2rem 1rem;
	padding: .6rem .75rem;
	text-decoration: none;
	border-bottom: 1px solid var(--ekag-line);
}

.ekag-suggest:last-child { border-bottom: 0; }
.ekag-suggest:hover,
.ekag-suggest:focus { background: var(--ekag-signal-soft); }

.ekag-suggest__title { font-weight: 600; font-size: .875rem; }

.ekag-suggest__pn {
	font-family: var(--ekag-font-mono);
	font-size: .75rem;
	letter-spacing: .05em;
	color: var(--ekag-ink-70);
}

.ekag-suggest__price { font-weight: 700; font-size: .875rem; text-align: right; }

.ekag-suggest__stock { font-size: .75rem; text-align: right; color: var(--ekag-stock); }
.ekag-suggest__stock--out { color: var(--ekag-alert); }

.ekag-suggest__empty {
	padding: .75rem;
	font-size: .875rem;
	color: var(--ekag-ink-70);
}

/* -------------------------------------------------------------- 10. Hero */

.ekag-hero {
	position: relative;
	background: var(--ekag-steel);
	color: #fff;
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
	background-image: linear-gradient(120deg, var(--ekag-ink) 0%, var(--ekag-steel) 100%);
}

.ekag-hero--image::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--ekag-hero-image);
	background-size: cover;
	background-position: center;
	opacity: .28;
}

.ekag-hero__inner { position: relative; max-width: 780px; }

.ekag-hero__eyebrow {
	font-family: var(--ekag-font-display);
	font-size: .8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: var(--ekag-signal);
	margin: 0 0 .6rem;
}

.ekag-hero__title { margin: 0 0 .6rem; text-wrap: balance; }

.ekag-hero__sub {
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, .82);
	max-width: 56ch;
	margin-bottom: 1.6rem;
}

.ekag-hero__finder { max-width: 720px; }

/* -------------------------------------------------------- 11. Assurance */

.ekag-usp {
	background: var(--ekag-ink);
	color: #fff;
}

.ekag-usp__list {
	display: grid;
	grid-template-columns: repeat(var(--ekag-cols-desktop, 4), minmax(0, 1fr));
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ekag-usp__item {
	padding: 1rem 1.25rem;
	border-left: 1px solid rgba(255, 255, 255, .14);
}

.ekag-usp__item:first-child { border-left: 0; padding-left: 0; }

.ekag-usp__title {
	display: block;
	font-family: var(--ekag-font-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: .9375rem;
}

.ekag-usp__detail {
	display: block;
	font-size: .8125rem;
	color: rgba(255, 255, 255, .68);
	margin-top: .15rem;
}

/* ----------------------------------------------------------- 12. Brands */

.ekag-brands {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--ekag-gap);
}

.ekag-brands--tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ekag-brands--chips { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.ekag-brands--list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; }

.ekag-brand__link {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .3rem;
	height: 100%;
	padding: 1rem;
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	text-decoration: none;
	transition: border-color .12s ease, transform .12s ease;
}

.ekag-brand__link:hover {
	border-color: var(--ekag-ink);
	transform: translateY(-2px);
}

.ekag-brand__logo {
	display: grid;
	place-items: center;
	min-height: 56px;
	margin-bottom: .4rem;
}

.ekag-brand__img { max-height: 56px; width: auto; object-fit: contain; }

.ekag-brand__name {
	font-family: var(--ekag-font-display);
	font-weight: 700;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.ekag-brand__count { font-size: .75rem; color: var(--ekag-ink-45); }

.ekag-brands--chips .ekag-brand__link { flex-direction: row; align-items: baseline; gap: .5rem; padding: .6rem .8rem; }
.ekag-brands--chips .ekag-brand__name { font-size: .875rem; }

.ekag-brands--list .ekag-brand__link {
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	border-radius: 0;
	border-width: 0 0 1px;
	padding: .7rem .25rem;
	background: none;
}

.ekag-brands--list .ekag-brand__link:hover { transform: none; background: var(--ekag-paper); }

/* ----------------------------------------------------------- 13. Promos */

.ekag-promos {
	display: grid;
	gap: var(--ekag-gap);
	grid-template-columns: repeat(var(--ekag-cols-desktop, 2), minmax(0, 1fr));
}

@media (max-width: 1024px) {
	.ekag-promos { grid-template-columns: repeat(min(var(--ekag-cols-desktop, 2), 2), minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	.ekag-promos { grid-template-columns: 1fr; }
}

.ekag-promo {
	display: block;
	padding: 1.6rem;
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-left: 5px solid var(--ekag-signal);
	border-radius: var(--ekag-radius);
	text-decoration: none;
}

.ekag-promo:hover { border-color: var(--ekag-ink); border-left-color: var(--ekag-signal); }
.ekag-promo__title { margin: 0 0 .3rem; }
.ekag-promo__detail { margin: 0 0 .8rem; font-size: .9375rem; color: var(--ekag-ink-70); }

.ekag-promo__cta {
	font-family: var(--ekag-font-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: .875rem;
	border-bottom: 2px solid var(--ekag-signal);
	padding-bottom: 2px;
}

/* ------------------------------------------------------------ 14. Trust */

.ekag-trust {
	display: grid;
	gap: var(--ekag-gap);
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ekag-trust__item { border-top: 3px solid var(--ekag-ink); padding-top: .9rem; }
.ekag-trust__title { margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .02em; }
.ekag-trust__detail { margin: 0; font-size: .9375rem; color: var(--ekag-ink-70); }

/* ------------------------------------------------------------ 15. Posts */

.ekag-page-head { margin-bottom: var(--ekag-gap); }
.ekag-page-head__title { margin: 0; }

.ekag-posts {
	display: grid;
	gap: var(--ekag-gap);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ekag-post {
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-radius: var(--ekag-radius);
	overflow: hidden;
}

.ekag-post__body { padding: 1.1rem; }
.ekag-post__title { font-size: 1.125rem; margin: 0 0 .4rem; }
.ekag-post__title a { text-decoration: none; }
.ekag-post__excerpt { font-size: .9375rem; color: var(--ekag-ink-70); }
.ekag-post__more { font-weight: 600; font-size: .875rem; }

.ekag-entry { background: var(--ekag-paper); border: 1px solid var(--ekag-line); border-radius: var(--ekag-radius); padding: clamp(1.25rem, 4vw, 2.5rem); }
.ekag-entry__title { margin-top: 0; }
.ekag-entry__media { margin: 0 0 1.5rem; }

.ekag-empty {
	background: var(--ekag-paper);
	border: 1px solid var(--ekag-line);
	border-left: 5px solid var(--ekag-signal);
	border-radius: var(--ekag-radius);
	padding: clamp(1.25rem, 4vw, 2rem);
	max-width: 640px;
}

.ekag-empty__title { margin-top: 0; }
.ekag-empty__call { font-weight: 600; }

/* ----------------------------------------------------------- 16. Widgets */

.ekag-widget { margin-bottom: var(--ekag-gap); }

.ekag-widget__title {
	font-size: .875rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 .6rem;
	padding-bottom: .4rem;
	border-bottom: 2px solid var(--ekag-line);
}

.ekag-widget ul { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.ekag-widget li { padding: .25rem 0; }

/* ------------------------------------------------------------ 17. Footer */

.ekag-footer {
	background: var(--ekag-ink);
	color: rgba(255, 255, 255, .75);
	margin-top: var(--ekag-section-space);
	padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem;
}

.ekag-footer a { text-decoration: none; }
.ekag-footer a:hover { color: var(--ekag-signal); }
.ekag-footer .ekag-logo__tag { color: rgba(255, 255, 255, .5); }

.ekag-footer__grid {
	display: grid;
	gap: var(--ekag-gap);
	grid-template-columns: 1.4fr repeat(var(--ekag-footer-cols, 0), minmax(0, 1fr));
}

.ekag-footer__text { font-size: .9375rem; margin-top: .9rem; }
.ekag-footer__address { font-style: normal; font-size: .9375rem; margin-bottom: .8rem; }

.ekag-footer .ekag-widget__title { color: #fff; border-bottom-color: rgba(255, 255, 255, .16); }

.ekag-footer__base {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(255, 255, 255, .14);
	font-size: .8125rem;
}

.ekag-footer__note { margin: 0; }

.ekag-footer__menu {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* -------------------------------------------------------- 18. Responsive */

@media (max-width: 900px) {
	/*
	 * Tablet: logo takes the free space so the actions and the burger are
	 * pushed hard right, where a thumb expects them.
	 */
	.ekag-header__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.ekag-header__brand { justify-self: start; }
	.ekag-header__actions { justify-self: end; }
	.ekag-header__search { grid-column: 1 / -1; order: 3; }
	.ekag-header__search--deferred { visibility: visible; }
	.ekag-burger { display: block; }

	.ekag-nav {
		display: none;
	}

	.ekag-nav[data-open] { display: block; }

	.ekag-nav__list { flex-direction: column; }
	.ekag-nav__list a { padding: .75rem 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
	.ekag-nav__list .sub-menu a { padding-left: 1rem; opacity: .8; }

	.ekag-finder__row { grid-template-columns: 1fr; }
	.ekag-finder__submit { width: 100%; }

	.ekag-tradebar__msg { display: none; }
	.ekag-tradebar__inner { justify-content: flex-end; }

	.ekag-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ekag-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	/*
	 * Phone: the logo gets its own centred row at the top, with account,
	 * order and the burger on the row beneath it.
	 */
	.ekag-header__inner {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: .6rem;
		padding-block: .75rem;
	}

	.ekag-header__brand {
		order: 1;
		justify-self: center;
		text-align: center;
		width: 100%;
	}

	.ekag-header__brand img,
	.ekag-header__brand .custom-logo {
		margin-inline: auto;
		max-width: min(100%, var(--ekag-logo-w-mobile, 260px));
		max-height: var(--ekag-logo-h-mobile, 72px);
	}

	.ekag-logo { text-align: center; }

	.ekag-header__actions {
		order: 2;
		justify-self: center;
		justify-content: center;
		width: 100%;
		gap: 1.25rem;
	}

	.ekag-header__search { order: 3; width: 100%; }

	.ekag-tradebar__inner { justify-content: center; }
}

@media (max-width: 560px) {
	.ekag-footer__grid { grid-template-columns: 1fr; }
	.ekag-section__head { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}
}

/* Search results header */

.ekag-page-head__title .ekag-pn__value {
	font-size: .7em;
	vertical-align: middle;
}

.ekag-page-head__finder { max-width: 720px; margin-top: 1rem; }
.ekag-page-head__desc { color: var(--ekag-ink-70); font-size: .9375rem; margin: 0; }

/* Footer: the about column is wider than the widget columns beside it. */

.ekag-footer__about { max-width: 42ch; }
.ekag-footer__address { margin-top: .6rem; }

@media (max-width: 900px) {
	.ekag-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ekag-footer__about { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 560px) {
	.ekag-footer__grid { grid-template-columns: 1fr; }
}

/* Suggestion empty state is a real control, not a dead-end message. */

.ekag-suggest__empty {
	display: block;
	width: 100%;
	padding: .8rem .75rem;
	background: none;
	border: 0;
	border-top: 3px solid var(--ekag-signal);
	font: inherit;
	font-size: .875rem;
	color: var(--ekag-ink);
	text-align: left;
	cursor: pointer;
}

.ekag-suggest__empty:hover { background: var(--ekag-signal-soft); }

/* Page width follows the Customizer choice. */

.ekag--full-width .ekag-prose { max-width: none; }
.ekag--read-width .ekag-prose { max-width: 68ch; }

/* Assurance strip: four across on desktop, two on tablet, one on phone. */

@media (max-width: 1024px) {
	.ekag-usp__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.ekag-usp__item {
		border-left: 1px solid rgba(255, 255, 255, .14);
		padding-left: 1.25rem;
	}

	/* First in each row of two loses the divider. */
	.ekag-usp__item:nth-child(2n+1) { border-left: 0; padding-left: 0; }

	/* Second row onwards gets a horizontal rule instead. */
	.ekag-usp__item:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); }
}

@media (max-width: 560px) {
	.ekag-usp__list { grid-template-columns: 1fr; }

	.ekag-usp__item {
		border-left: 0;
		padding-left: 0;
		padding-right: 0;
		border-top: 1px solid rgba(255, 255, 255, .14);
	}

	.ekag-usp__item:first-child { border-top: 0; }
}

/* Footer logo — its own asset, sized by the Customizer. */

.ekag-footer__logo {
	display: inline-block;
	max-width: 100%;
	margin-bottom: .9rem;
	line-height: 0;
}

.ekag-footer__logo-img {
	width: var(--ekag-footer-logo-w, 220px);
	max-width: 100%;
	height: auto;
}

/* For a dark logo with no transparent version. */
.ekag-footer__logo--plate {
	background: var(--ekag-paper);
	border-radius: var(--ekag-radius);
	padding: .6rem .8rem;
}
