/**
 * Makini Energy theme styles.
 *
 * Colours, fonts and spacing are set in theme.json; this file covers the
 * header, menus, footer, article cards and a few shared helpers.
 * Mobile-first. The desktop header starts at 1200px.
 */

:root {
	--mk-forest: var(--wp--preset--color--forest, #102d25);
	--mk-forest-2: var(--wp--preset--color--forest-2, #1b4237);
	--mk-leaf: var(--wp--preset--color--leaf, #1e7b45);
	--mk-green: var(--wp--preset--color--green, #b9e7c8);
	--mk-green-tint: var(--wp--preset--color--green-tint, #e8f5ec);
	--mk-offwhite: var(--wp--preset--color--offwhite, #f2f5f1);
	--mk-charcoal: var(--wp--preset--color--charcoal, #18221e);
	--mk-muted: var(--wp--preset--color--muted, #5b6b64);
	--mk-border: var(--wp--preset--color--border, #dce3dd);
	--mk-radius: 14px;
	--mk-shadow: 0 1px 2px rgba(16, 45, 37, 0.06), 0 8px 24px rgba(16, 45, 37, 0.08);
	--mk-inline: clamp(1rem, 4vw, 2rem);
	--mk-wide: 1280px;
	--mk-topbar-h: 36px;
}

@media (min-width: 768px) {
	:root {
		--mk-topbar-h: 40px;
	}
}

/* ------------------------------------------------------------------ */
/* Basics                                                              */
/* ------------------------------------------------------------------ */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	background: #fff;
	clip: auto !important;
	clip-path: none;
	color: var(--mk-forest);
	display: block;
	font-weight: 600;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	text-decoration: none;
	top: 8px;
	width: auto;
	z-index: 100000;
	border-radius: 8px;
	box-shadow: var(--mk-shadow);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--mk-leaf);
	outline-offset: 2px;
}

.wp-site-blocks > header.wp-block-template-part + *,
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

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

.mk-eyebrow {
	display: inline-block;
	margin: 0;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	background: var(--mk-green-tint);
	color: var(--mk-forest);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
}

.mk-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.mk-lead {
	color: var(--mk-muted);
	font-size: 1.125rem;
	max-width: 62ch;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid var(--mk-forest);
	color: var(--mk-forest);
	background: transparent;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
	background: var(--mk-green-tint);
	color: var(--mk-forest);
}

/* Inputs used by the theme and core blocks. */
.wp-block-search__input,
.mk-search__input {
	font: inherit;
	color: var(--mk-charcoal);
}

.wp-block-search__inside-wrapper {
	gap: 0.5rem;
}

.wp-block-search__input {
	border: 1px solid var(--mk-border);
	border-radius: 10px;
	padding: 0.7rem 0.9rem;
	font-size: 1rem;
	min-height: 44px;
}

.wp-block-search__button {
	margin-left: 0;
	border-radius: 10px;
	background: var(--mk-forest);
	color: #fff;
	border: 0;
	padding: 0.7rem 1.1rem;
	font-weight: 600;
	min-height: 44px;
	cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Sticky header: the top bar scrolls away, the main header stays.    */
/* ------------------------------------------------------------------ */

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

.wp-site-blocks > header.wp-block-template-part:has(.mk-topbar) {
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--mk-topbar-h));
}

@media (max-width: 600px) {
	/* WordPress's admin bar is not fixed on small screens. */
	.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}

	.admin-bar .wp-site-blocks > header.wp-block-template-part:has(.mk-topbar) {
		top: calc(0px - var(--mk-topbar-h));
	}
}

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.mk-topbar {
	background: var(--mk-forest);
	color: var(--mk-offwhite);
	font-size: 0.8125rem;
	font-weight: 500;
	height: var(--mk-topbar-h);
	overflow: hidden;
}

.mk-topbar__inner {
	box-sizing: border-box;
	max-width: var(--mk-wide);
	height: 100%;
	margin: 0 auto;
	padding: 0 var(--mk-inline);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.mk-topbar__points {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.mk-topbar__points li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
	padding: 0 1rem;
}

.mk-topbar__points li:first-child {
	padding-left: 0;
}

.mk-topbar__points li + li {
	border-left: 1px solid rgba(242, 245, 241, 0.3);
}

.mk-topbar__points .mk-icon {
	color: var(--mk-green);
	flex: none;
}

.mk-topbar__right {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-left: auto;
}

.mk-topbar__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	font-weight: 600;
	min-height: 32px;
}

.mk-topbar__phone:hover {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 767px) {
	.mk-topbar__points li:not(:first-child) {
		display: none;
	}

	.mk-topbar:has(.mk-topbar__phone) .mk-topbar__points {
		display: none;
	}

	.mk-topbar__right {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
	}

	.mk-topbar:has(.mk-topbar__points):not(:has(.mk-topbar__phone)) .mk-topbar__right {
		width: auto;
	}

	/* Phones: the social icons are in the footer; keep the top bar to the phone number. */
	.mk-topbar:has(.mk-topbar__phone) .mk-social--topbar {
		display: none;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.mk-topbar__points li:nth-child(3) {
		display: none;
	}
}

/* Social icons (top bar and footer). */
.mk-social {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mk-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	border-radius: 999px;
	text-decoration: none;
}

.mk-social svg {
	fill: currentColor;
}

.mk-social--topbar a {
	width: 32px;
	height: 32px;
}

.mk-social--topbar svg {
	width: 17px;
	height: 17px;
}

.mk-social--topbar a:hover {
	color: var(--mk-green);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.mk-header {
	background: #fff;
	border-bottom: 1px solid var(--mk-border);
	box-shadow: 0 2px 12px rgba(16, 45, 37, 0.05);
}

.mk-header__inner {
	box-sizing: border-box;
	max-width: var(--mk-wide);
	margin: 0 auto;
	padding: 0.625rem var(--mk-inline);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"brand icons"
		"search search";
	align-items: center;
	column-gap: 0.75rem;
	row-gap: 0.625rem;
}

.mk-brand {
	grid-area: brand;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: var(--mk-forest);
	min-width: 0;
	min-height: 44px;
	justify-self: start;
}

.mk-brand__logo {
	display: block;
	max-height: 40px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
}

.mk-brand__name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 1.3rem;
	line-height: 1.05;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mk-brand .mk-icon {
	color: var(--mk-leaf);
	flex: none;
}

.mk-search {
	grid-area: search;
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
}

.mk-search__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0.55rem 2.6rem 0.55rem 1rem;
	border: 1px solid var(--mk-border);
	border-radius: 999px;
	background: var(--mk-offwhite);
	font-size: 1rem;
	-webkit-appearance: none;
	appearance: none;
}

.mk-search__input::placeholder {
	color: var(--mk-muted);
}

/* Chrome and Safari keep room for their own clear button; the field is short enough without it. */
.mk-search__input::-webkit-search-cancel-button,
.mk-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.mk-search__input:focus {
	background: #fff;
	border-color: var(--mk-leaf);
}

.mk-search__button {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--mk-forest);
	cursor: pointer;
}

.mk-search__button:hover {
	background: var(--mk-green-tint);
}

.mk-icons {
	grid-area: icons;
	display: flex;
	align-items: center;
	gap: 0.125rem;
}

.mk-iconlink,
.mk-nav-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--mk-forest);
	text-decoration: none;
	cursor: pointer;
	padding: 0;
}

.mk-iconlink:hover,
.mk-nav-toggle:hover {
	background: var(--mk-green-tint);
	color: var(--mk-forest);
}

.mk-cart__count {
	position: absolute;
	top: 3px;
	right: 1px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--mk-leaf);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
}

.mk-cart__count.is-empty {
	display: none;
}

/* Menu: shared */
.mk-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mk-menu a {
	text-decoration: none;
}

.mk-submenu-toggle,
.mk-nav-toggle,
.mk-drawer__close,
.mk-iconlink {
	-webkit-tap-highlight-color: transparent;
}

.mk-submenu-toggle:active,
.mk-nav-toggle:active,
.mk-drawer__close:active {
	background: var(--mk-green-tint);
}

.mk-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	padding: 0;
	border-radius: 8px;
}

.mk-submenu-toggle .mk-icon {
	transition: transform 0.15s ease;
}

.mk-menu--header li.is-open > .mk-submenu-toggle .mk-icon {
	transform: rotate(180deg);
}

/* Phones and tablets: drawer */
@media (max-width: 1199px) {
	html:not(.mk-js) .mk-header .mk-nav-toggle {
		display: none;
	}

	/* Without JavaScript the menu is a list under the header. */
	html:not(.mk-js) .mk-header .mk-drawer {
		grid-column: 1 / -1;
	}

	html:not(.mk-js) .mk-header .mk-drawer__head {
		display: none;
	}

	.mk-js .mk-drawer {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 1001;
		width: min(360px, 88vw);
		overflow-y: auto;
		overscroll-behavior: contain;
		background: #fff;
		box-shadow: -12px 0 32px rgba(16, 45, 37, 0.18);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}

	.mk-js.is-open .mk-drawer {
		transform: none;
		visibility: visible;
		transition: transform 0.25s ease;
	}

	.mk-drawer-backdrop {
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(16, 45, 37, 0.5);
	}

	.mk-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0.75rem 0.75rem 0.75rem 1.25rem;
		border-bottom: 1px solid var(--mk-border);
	}

	.mk-drawer__title {
		font-family: var(--wp--preset--font-family--heading);
		font-weight: 700;
		font-size: 1.125rem;
		color: var(--mk-forest);
	}

	.mk-drawer__close {
		width: 44px;
		height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border: 0;
		border-radius: 10px;
		background: transparent;
		color: var(--mk-forest);
		cursor: pointer;
	}

	.mk-drawer__close:hover {
		background: var(--mk-green-tint);
	}

	.mk-menu--header {
		padding: 0.5rem 0;
	}

	.mk-menu--header > li {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		border-bottom: 1px solid var(--mk-border);
	}

	.mk-menu--header > li > a {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding: 0.5rem 1.25rem;
		color: var(--mk-charcoal);
		font-weight: 600;
	}

	.mk-menu--header > li.current-menu-item > a,
	.mk-menu--header > li.current-menu-ancestor > a {
		color: var(--mk-leaf);
	}

	.mk-menu--header .mk-submenu-toggle {
		width: 48px;
		height: 48px;
		margin-right: 0.5rem;
		color: var(--mk-forest);
	}

	.mk-menu--header .sub-menu {
		grid-column: 1 / -1;
		display: none;
		margin: 0;
		padding: 0 0 0.5rem;
		list-style: none;
		background: var(--mk-offwhite);
	}

	html:not(.mk-js) .mk-header .mk-menu--header .sub-menu,
	.mk-menu--header li.is-open > .sub-menu {
		display: block;
	}

	.mk-menu--header .sub-menu a {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 0.25rem 1.25rem 0.25rem 2rem;
		color: var(--mk-charcoal);
	}

	.mk-menu--header .mk-cta {
		border-bottom: 0;
		padding: 0.75rem 1.25rem;
	}

	.mk-menu--header .mk-cta > a {
		justify-content: center;
		border-radius: 10px;
		background: var(--mk-forest);
		color: #fff !important;
	}

	body.mk-drawer-open {
		overflow: hidden;
	}
}

/* Desktop */
@media (min-width: 1200px) {
	.mk-header__inner {
		grid-template-columns: auto minmax(0, 1fr) auto auto;
		grid-template-areas: "brand nav search icons";
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
		column-gap: 1.25rem;
	}

	.mk-brand__logo {
		max-height: 48px;
		max-width: 220px;
	}

	.mk-brand__name {
		font-size: 1.45rem;
	}

	.mk-drawer {
		grid-area: nav;
		min-width: 0;
	}

	.mk-drawer__head,
	.mk-nav-toggle,
	.mk-drawer-backdrop {
		display: none !important;
	}

	.mk-search {
		width: clamp(170px, 14vw, 205px);
	}

	.mk-menu--header {
		display: flex;
		align-items: center;
		justify-content: safe center;
		flex-wrap: nowrap;
		gap: 0;
	}

	.mk-menu--header > li {
		position: relative;
		display: flex;
		align-items: center;
	}

	.mk-menu--header > li > a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 0.45rem;
		color: var(--mk-charcoal);
		font-size: 0.90625rem;
		font-weight: 600;
		white-space: nowrap;
		position: relative;
	}

	.mk-menu--header > li.menu-item-has-children > a {
		padding-right: 0.125rem;
	}

	.mk-menu--header > li > a:hover {
		color: var(--mk-leaf);
	}

	.mk-menu--header > li.current-menu-item > a::after,
	.mk-menu--header > li.current-menu-ancestor > a::after {
		content: "";
		position: absolute;
		left: 0.5rem;
		right: 0.5rem;
		bottom: 6px;
		height: 2px;
		border-radius: 2px;
		background: var(--mk-leaf);
	}

	.mk-menu--header > li.menu-item-has-children.current-menu-item > a::after,
	.mk-menu--header > li.menu-item-has-children.current-menu-ancestor > a::after {
		right: 0.125rem;
	}

	.mk-menu--header .mk-submenu-toggle {
		width: 24px;
		height: 32px;
		color: var(--mk-charcoal);
	}

	.mk-menu--header .mk-submenu-toggle .mk-icon {
		width: 16px;
		height: 16px;
	}

	.mk-menu--header .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 20;
		min-width: 240px;
		margin: 0;
		padding: 0.5rem;
		list-style: none;
		background: #fff;
		border: 1px solid var(--mk-border);
		border-radius: var(--mk-radius);
		box-shadow: var(--mk-shadow);
		display: none;
	}

	.mk-menu--header > li:focus-within > .sub-menu,
	.mk-menu--header > li.is-open > .sub-menu {
		display: block;
	}

	@media (hover: hover) {
		.mk-menu--header > li:hover > .sub-menu {
			display: block;
		}
	}

	.mk-menu--header .sub-menu a {
		display: block;
		padding: 0.6rem 0.75rem;
		border-radius: 8px;
		color: var(--mk-charcoal);
		font-size: 0.9375rem;
		font-weight: 500;
	}

	.mk-menu--header .sub-menu a:hover,
	.mk-menu--header .sub-menu .current-menu-item > a {
		background: var(--mk-green-tint);
		color: var(--mk-forest);
	}

	.mk-menu--header > li.mk-cta {
		margin: 0 0.375rem;
	}

	.mk-menu--header > li.mk-cta > a {
		min-height: 38px;
		padding: 0 0.875rem;
		border-radius: 8px;
		background: var(--mk-forest);
		color: #fff;
	}

	.mk-menu--header > li.mk-cta > a:hover {
		background: var(--mk-forest-2);
		color: #fff;
	}

	.mk-menu--header > li.mk-cta > a::after {
		display: none;
	}
}

@media (min-width: 1200px) and (max-width: 1365px) {
	.mk-header__inner {
		column-gap: 0.75rem;
	}

	.mk-brand__logo {
		max-width: 170px;
	}

	.mk-menu--header > li > a {
		font-size: 0.84375rem;
		padding: 0 0.3rem;
	}

	.mk-menu--header > li.mk-cta {
		margin: 0 0.25rem;
	}

	.mk-menu--header > li.mk-cta > a {
		padding: 0 0.65rem;
	}

	.mk-menu--header .mk-submenu-toggle {
		width: 20px;
	}

	.mk-search {
		width: 170px;
	}

	.mk-search__input {
		font-size: 0.875rem;
		padding-right: 2.4rem;
		padding-left: 0.85rem;
	}

	.mk-search__input::placeholder {
		font-size: 0.8125rem;
	}
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.mk-footer {
	background: var(--mk-forest);
	color: #d5e3da;
	font-size: 0.9375rem;
}

.mk-footer a {
	color: #eef4f0;
	text-decoration: none;
}

.mk-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.mk-footer__inner {
	box-sizing: border-box;
	max-width: var(--mk-wide);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 3.5rem) var(--mk-inline) 2.5rem;
	display: grid;
	gap: 2rem;
}

.mk-footer__heading {
	margin: 0 0 0.875rem;
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
}

.mk-brand--footer {
	color: #fff;
}

.mk-brand--footer .mk-icon {
	color: var(--mk-green);
}

.mk-brand--footer .mk-brand__logo {
	max-height: 56px;
}

.mk-footer__tagline {
	margin: 0.75rem 0 1rem;
	color: #eef4f0;
	font-weight: 500;
}

.mk-social--footer a {
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.08);
}

.mk-social--footer a:hover {
	background: var(--mk-green);
	color: var(--mk-forest);
	text-decoration: none;
}

.mk-social--footer svg {
	width: 20px;
	height: 20px;
}

.mk-footer__menus {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.75rem 1.5rem;
}

.mk-menu--footer li {
	margin: 0;
}

.mk-menu--footer a {
	display: inline-block;
	padding: 0.3rem 0;
	color: #d5e3da;
}

.mk-contact {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.mk-contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	padding: 0.3rem 0;
}

.mk-contact .mk-icon,
.mk-contact svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 0.2rem;
	color: var(--mk-green);
	fill: none;
}

.mk-contact .wp-social-link-whatsapp,
.mk-contact li > svg:not(.mk-icon) {
	fill: var(--mk-green);
}

.mk-contact a {
	overflow-wrap: anywhere;
}

.mk-pay__cards {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.625rem;
	padding: 0;
	list-style: none;
}

.mk-pay__cards li {
	padding: 0.3rem 0.65rem;
	border-radius: 6px;
	background: #fff;
	color: var(--mk-forest);
	font-size: 0.8125rem;
	font-weight: 700;
}

.mk-pay__secure {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.8125rem;
	color: #d5e3da;
}

.mk-pay__secure .mk-icon {
	color: var(--mk-green);
}

.mk-footer__bottom {
	background: #0b211b;
	font-size: 0.8125rem;
}

.mk-footer__bottom-inner {
	box-sizing: border-box;
	max-width: var(--mk-wide);
	margin: 0 auto;
	padding: 1rem var(--mk-inline);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

.mk-footer__copy {
	margin: 0;
}

.mk-menu--bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
}

.mk-menu--bottom a {
	display: inline-block;
	padding: 0.5rem 0;
}

@media (min-width: 768px) {
	.mk-footer__menus {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.mk-footer__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mk-footer__menus {
		grid-column: 1 / -1;
		order: 2;
	}

	.mk-footer__contact {
		order: 1;
	}
}

@media (min-width: 1200px) {
	.mk-footer__inner {
		grid-template-columns: minmax(200px, 1.1fr) minmax(0, 4fr) minmax(250px, 1.5fr);
		gap: 2.5rem;
	}

	.mk-footer__menus {
		grid-column: auto;
		order: 0;
	}

	.mk-footer__contact {
		order: 0;
		padding-left: 2.5rem;
		border-left: 1px solid rgba(255, 255, 255, 0.14);
	}
}

/* ------------------------------------------------------------------ */
/* Articles                                                            */
/* ------------------------------------------------------------------ */

.mk-pagehead {
	margin-bottom: var(--wp--preset--spacing--50);
}

.mk-pagehead > * + * {
	margin-top: 0.75rem;
}

.mk-pagehead h1 {
	margin-top: 0.75rem;
}

.mk-cards {
	gap: 1.5rem !important;
}

.mk-card {
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--mk-border);
	border-radius: var(--mk-radius);
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.mk-card:hover {
	box-shadow: var(--mk-shadow);
}

.mk-card:not(:has(.mk-card__image img))::before {
	/* Articles without a featured image get a plain branded panel, so cards line up. */
	content: "";
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e7b45' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.5 19 2c1 2 2 4.2 2 8 0 5.5-4.8 10-10 10z'/%3E%3Cpath d='M2 21c0-3 1.9-5.4 5.1-6C9.5 14.5 12 13 13 12'/%3E%3C/svg%3E") center / 56px no-repeat,
		linear-gradient(135deg, var(--mk-green-tint), var(--mk-offwhite));
}

.mk-card__image {
	margin: 0 !important;
	width: 100%;
	background: var(--mk-offwhite);
}

.mk-card__image img {
	display: block;
}

.mk-card__body {
	padding: 0 1.25rem 1.25rem;
	flex: 1;
}

.mk-card:not(:has(.mk-card__image img)) .mk-card__body {
	padding-top: 1rem;
}

.mk-card .wp-block-post-title {
	margin: 0;
	line-height: 1.25;
}

.mk-card .wp-block-post-title a:hover {
	color: var(--mk-leaf);
}

.mk-card .wp-block-post-excerpt {
	margin: 0;
	color: var(--mk-muted);
}

.mk-card .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.mk-card__terms a {
	color: var(--mk-leaf);
	text-decoration: none;
}

.mk-card__date {
	margin-top: auto;
}

.mk-pagination {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0.375rem;
	font-weight: 600;
}

.mk-pagination a,
.mk-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.75rem;
	border-radius: 10px;
	text-decoration: none;
	box-sizing: border-box;
}

.mk-pagination a:hover {
	background: var(--mk-green-tint);
}

.mk-pagination .page-numbers.current {
	background: var(--mk-forest);
	color: #fff;
}

.mk-article .wp-block-post-title {
	margin-top: 0.75rem;
}

.mk-article__meta {
	color: var(--mk-muted);
}

.mk-article__image img {
	border-radius: var(--mk-radius);
}

.mk-article__nav a {
	display: inline-block;
	padding: 0.5rem 0;
	font-weight: 600;
	text-decoration: none;
}

.mk-comment {
	padding: 1rem 0;
	border-bottom: 1px solid var(--mk-border);
}

.mk-notfound {
	text-align: center;
}

.mk-notfound h1 {
	font-size: var(--wp--preset--font-size--xx-large);
	margin-top: 0.75rem;
}

.mk-notfound .wp-block-buttons {
	justify-content: center;
}

.mk-notfound .wp-block-search {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

/* ------------------------------------------------------------------ */
/* Plugin pages                                                        */
/* ------------------------------------------------------------------ */

/* The header already shows the cart, so the plugin's small cart bar is not needed. */
body.makini-theme .makini-cartbar:not(.makini-cartbar--inline) {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Motion and print                                                    */
/* ------------------------------------------------------------------ */

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

@media print {
	.mk-topbar,
	.mk-header,
	.mk-footer,
	.skip-link {
		display: none !important;
	}

	.wp-site-blocks > header.wp-block-template-part {
		position: static;
	}
}

/* ================================================================ Content pages (Theme Phase 5) */

.mk-intro {
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--mk-charcoal);
}

/* Plugin forms placed in a page with a shortcode line up with the page text. */
.wp-block-post-content > .makini-shop,
.wp-block-post-content > .wp-block-shortcode > .makini-shop {
	padding-inline: 0;
	padding-bottom: 1rem;
}

.mk-page h2.wp-block-heading,
.mk-legal h2.wp-block-heading {
	margin-top: 2.25rem;
	font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.mk-page h3.wp-block-heading {
	font-size: 1.125rem;
}

/* "Last updated" under policy page titles. */
.mk-legal__updated {
	margin-top: 0.25rem;
	color: var(--mk-muted);
	font-size: 0.9375rem;
}

.mk-legal .wp-block-post-content li + li {
	margin-top: 0.35rem;
}

/* About: three cards. */
.mk-info-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
	margin-block: 1rem 1.5rem;
}

.mk-info-cards > * {
	margin-block-start: 0;
}

.mk-info-card {
	padding: 1.25rem;
	border-radius: var(--mk-radius);
	background: var(--mk-offwhite);
}

.mk-info-card h3.wp-block-heading {
	margin-top: 0;
}

.mk-info-card p:last-child {
	margin-bottom: 0;
}

/* FAQs: questions that open on click or tap (core Details block). */
.mk-faq {
	margin-block: 0.5rem;
	border: 1px solid var(--mk-border);
	border-radius: 10px;
	background: #fff;
}

.mk-faq summary {
	position: relative;
	display: block;
	min-height: 48px;
	padding: 0.85rem 2.75rem 0.85rem 1rem;
	font-weight: 600;
	color: var(--mk-forest);
	cursor: pointer;
	list-style: none;
}

.mk-faq summary::-webkit-details-marker {
	display: none;
}

.mk-faq summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 1rem;
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

.mk-faq[open] summary::after {
	content: "\2212";
}

.mk-faq summary:focus-visible {
	outline: 2px solid var(--mk-leaf);
	outline-offset: 2px;
	border-radius: 10px;
}

.mk-faq > :not(summary) {
	margin: 0;
	padding: 0 1rem 1rem;
}

/* Contact cards. */
.mk-contact-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0;
	padding: 0;
	list-style: none;
}

.mk-contact-card {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.15rem 0.75rem;
	align-items: center;
	padding: 1rem;
	border-radius: var(--mk-radius);
	background: var(--mk-offwhite);
}

.mk-contact-card__icon {
	grid-row: span 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--mk-green-tint);
	color: var(--mk-forest);
}

.mk-contact-card__label {
	font-size: 0.8125rem;
	color: var(--mk-muted);
}

.mk-contact-card__value {
	font-weight: 600;
	color: var(--mk-forest);
	overflow-wrap: anywhere;
}

.mk-contact-card__value a {
	color: inherit;
}

/* Business details on policy pages. */
.mk-facts {
	margin: 1rem 0 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: var(--mk-radius);
	background: var(--mk-offwhite);
}

.mk-facts div {
	display: grid;
	grid-template-columns: 7rem 1fr;
	gap: 0.75rem;
	padding: 0.35rem 0;
}

.mk-facts dt {
	color: var(--mk-muted);
}

.mk-facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}

/* Tables: delivery fees, who receives data, how long it is kept. */
.mk-table-wrap {
	margin: 1rem 0 1.25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.mk-delivery__table,
.mk-policy-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.mk-delivery__table caption {
	padding-bottom: 0.5rem;
	text-align: left;
	font-weight: 600;
	color: var(--mk-forest);
}

.mk-delivery__table :is(th, td),
.mk-policy-table :is(th, td) {
	padding: 0.7rem 0.75rem;
	border-bottom: 1px solid var(--mk-border);
	text-align: left;
	vertical-align: top;
}

.mk-delivery__table thead th,
.mk-policy-table thead th {
	background: var(--mk-offwhite);
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--mk-muted);
}

.mk-delivery__table tbody th,
.mk-policy-table tbody th {
	font-weight: 600;
	color: var(--mk-forest);
	white-space: nowrap;
}

.mk-policy-table tbody th {
	white-space: normal;
	width: 34%;
}

.mk-delivery__fee {
	font-weight: 700;
	white-space: nowrap;
}

.mk-delivery__fee.is-off {
	font-weight: 400;
	color: var(--mk-muted);
	white-space: normal;
}

.mk-delivery__notes {
	padding-left: 1.2rem;
}

/* Phones: delivery table as stacked cards (seven states per row do not fit). */
@media (max-width: 640px) {
	.mk-delivery__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.mk-delivery__table tr {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 0.25rem 1rem;
		padding: 0.75rem 0;
		border-bottom: 1px solid var(--mk-border);
	}

	.mk-delivery__table :is(th, td) {
		padding: 0;
		border: 0;
	}

	.mk-delivery__table td:not(.mk-delivery__fee) {
		grid-column: 1 / -1;
		grid-row: 2;
		color: var(--mk-muted);
		font-size: 0.875rem;
	}

	.mk-delivery__fee {
		text-align: right;
	}

	.mk-policy-table tbody th {
		width: 40%;
	}
}

/* ================================================================ Articles (Energy Guide) */

.wp-block-post-content .mk-callout {
	margin-block: 1.5rem;
	padding: 1rem 1.25rem;
	border-left: 5px solid var(--mk-leaf);
	border-radius: 0 var(--mk-radius) var(--mk-radius) 0;
	background: var(--mk-green-tint);
}

.wp-block-post-content .mk-callout--warning {
	border-left-color: #b7791f;
	background: #fff6e0;
}

.wp-block-post-content .mk-callout p {
	margin: 0;
}

.wp-block-post-content .mk-callout p + p {
	margin-top: 0.75rem;
}

/* Formulas: a calm box, not a pull quote. */
.wp-block-post-content .mk-formula {
	margin-block: 1.25rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--mk-border);
	border-left: 5px solid var(--mk-forest);
	border-radius: 0 10px 10px 0;
	background: var(--mk-offwhite);
	font-weight: 600;
	font-style: normal;
	color: var(--mk-forest);
}

.wp-block-post-content .mk-formula p {
	margin: 0;
	font-size: 1rem;
}

.wp-block-post-content .mk-formula p + p {
	margin-top: 0.5rem;
}

/* Checklists: empty boxes to tick on paper. */
.wp-block-post-content .mk-checklist {
	padding-left: 0;
	list-style: none;
}

.wp-block-post-content .mk-checklist li {
	position: relative;
	padding-left: 2rem;
}

.wp-block-post-content .mk-checklist li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid var(--mk-leaf);
	border-radius: 4px;
}

/* Tables fit the screen; on phones the text is a little smaller and words wrap. */
.wp-block-post-content .mk-article-table {
	margin-block: 1.25rem;
}

.wp-block-post-content .mk-article-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	overflow-wrap: break-word;
	hyphens: auto;
}

@media (max-width: 600px) {
	.wp-block-post-content .mk-article-table table {
		font-size: 0.875rem;
	}

	.wp-block-post-content .mk-article-table :is(th, td) {
		padding: 0.5rem 0.4rem;
	}
}

.wp-block-post-content .mk-article-table :is(th, td) {
	padding: 0.6rem 0.7rem;
	border: 0;
	border-bottom: 1px solid var(--mk-border);
	text-align: left;
	vertical-align: top;
}

.wp-block-post-content .mk-article-table thead th {
	background: var(--mk-offwhite);
	color: var(--mk-forest);
	font-weight: 700;
}
