/*
Theme Name: Leguma
Description: A clean, lightweight starter theme for Leguma with WooCommerce support.
Version: 1.24.4
Text Domain: leguma
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Tokens
----------------------------------------------------------------
 * Breakpoint: the theme has ONE, `max-width: 64rem` (mobile/tablet
 * below, desktop above), used only in the "Mobile" block at the end.
 * CSS variables cannot be used in media queries, so to change it,
 * edit that single query. Prefer intrinsic layouts (flex-wrap, grid
 * auto-fit, min()/clamp()) over adding new breakpoints; when a single
 * component must adapt to its own width, use a container query (see the
 * header actions). JS never hardcodes it: it reads the menu toggle's
 * computed display instead.
 */

:root {
	--leguma-text: #222222;
	--leguma-muted: #676767;
	--leguma-border: #e4e4e4;
	--leguma-background: #fff;
	--leguma-surface: #fff;
	--leguma-surface-hover: #f6f6f6; /* Neutral grey: hover states, search field, tinted cards. */
	--leguma-accent: #0f4d6a;
	--leguma-accent-hover: #0a3c54;
	--leguma-accent-light: #125e81;
	--leguma-secondary: #9dbe00; /* Logo green: buttons. */
	--leguma-secondary-hover: #97b600;
	--leguma-secondary-dark: #778f00; /* Green text on white: prices. */
	--leguma-secondary-light: #b8d60c;
	--leguma-on-accent: #fff;
	--leguma-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--leguma-content-width: 72rem;
	--leguma-gutter: 1rem;
	--leguma-content-gap: 1.875rem; /* 30px: vertical rhythm between content sections. */
	--leguma-section-gap: clamp(2rem, 4vw, 3rem); /* Between sections of long landing pages. */
	--leguma-header-height: 4.25rem;
	--leguma-logo-height: 3rem;
	--leguma-transition: 160ms ease;
}

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

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

body {
	margin: 0;
	color: var(--leguma-text);
	background: var(--leguma-background);
	font-family: var(--leguma-font);
	font-size: 1rem;
	line-height: 1.6;
	overflow-x: clip; /* Contain .alignfull; unlike hidden, keeps position: sticky working. */
}

/* Text blocks: space below only, as content built for the previous theme expects. */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
blockquote {
	margin: 0 0 0.625rem;
}

/* Headings: tighter than body text so multi-line titles read as one. */
h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.25;
}

a {
	color: var(--leguma-accent);
}

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

/* In-page links (#anchor) stop below the sticky navigation bar. */
html {
	scroll-padding-top: calc(var(--leguma-header-height) + 1.5rem);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

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

.screen-reader-text:focus {
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip-path: none;
	background: var(--leguma-surface);
}

/* Layout
---------------------------------------------------------------- */

.site-header__top,
.site-navigation-bar__inner,
.site-footer__columns,
.site-footer__inner,
.site-main {
	width: min(100% - 2 * var(--leguma-gutter), var(--leguma-content-width));
	margin-inline: auto;
}

.site-header__top,
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

/* Spacing above and below the content is margins (not padding), so it merges
   with the content's own margins, e.g. WPBakery rows with lc-theme-*-margin. */
.site-main > :last-child {
	margin-bottom: var(--leguma-content-gap);
}

/* Pages without breadcrumbs (front page, search, 404, cart): same gap as below the breadcrumbs. */
.site-main > :first-child:not(.breadcrumbs) {
	margin-top: var(--leguma-content-gap);
}

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

.site-header {
	background: var(--leguma-surface);
}

.site-header__top {
	padding-block: 1rem;
	container-type: inline-size; /* For the compact header actions below. */
}

/* Theme logo, or one set in Customizer > Site Identity. */
.site-logo,
.custom-logo-link {
	display: block;
	flex-shrink: 0;
}

.site-logo img,
.custom-logo {
	display: block;
	width: auto;
	height: var(--leguma-logo-height);
}

/* Phone, email and account links. */
.header-actions {
	display: flex;
	gap: 1rem;
}

.header-action {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	color: var(--leguma-text);
	font-size: 0.875rem;
	font-weight: 650;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--leguma-transition);
}

.header-action__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--leguma-accent);
	background: var(--leguma-surface-hover);
	border-radius: 50%;
	transition: color var(--leguma-transition), background-color var(--leguma-transition);
}

.header-action__icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.header-action__label {
	display: block;
	color: var(--leguma-muted);
	font-size: 0.75rem;
	font-weight: 400;
}

.header-action:hover {
	color: var(--leguma-accent);
}

/* Cart item count badge on the cart icon (header and mobile bar). */
/* Hidden until something is in the cart; the search field then takes the space. */
.header-cart--empty {
	display: none;
}

.header-cart .header-action__icon,
.site-navigation-bar__cart {
	position: relative;
}

.cart-count {
	position: absolute;
	top: -0.2rem;
	right: -0.35rem;
	min-width: 1.2rem;
	height: 1.2rem;
	padding: 0 0.3rem;
	color: var(--leguma-on-accent);
	background: var(--leguma-secondary);
	border: 2px solid var(--leguma-surface);
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 0.95rem;
	text-align: center;
}

.cart-count[data-count="0"] {
	display: none;
}

/* Narrow desktops (header row under ~1100px): phone and email become icon-only buttons
   so the search keeps a usable width. The text stays available to screen readers. */
@container (max-width: 68.75rem) {
	:is(.header-action--phone, .header-action--mail) .header-action__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

.site-navigation-bar__cart {
	display: none;
}

.header-action:hover .header-action__icon {
	color: var(--leguma-on-accent);
	background: var(--leguma-accent);
}

/* Search form: header and any other get_search_form() call. */
/* Pill: search icon, field and a round submit button inside one rounded box. */
.search-form {
	position: relative;
	display: flex;
	flex: 1 1 12rem; /* Shrinks on narrow desktops so logo, search and actions stay on one row. */
	min-width: 0; /* Otherwise the input's default width (~20 characters) sets a larger minimum. */
	gap: 0.5rem;
	align-items: center;
	max-width: 32rem;
	height: 3rem;
	padding: 0 0.3rem 0 1.1rem;
	background: var(--leguma-surface-hover);
	border: 1px solid transparent;
	border-radius: 999px;
	transition: background-color var(--leguma-transition), border-color var(--leguma-transition), box-shadow var(--leguma-transition);
}

.search-form:hover {
	border-color: var(--leguma-border);
}

.search-form:focus-within {
	background: var(--leguma-surface);
	border-color: var(--leguma-accent);
	box-shadow: 0 0 0 4px rgb(15 77 106 / 12%);
}

.search-form__icon {
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	color: var(--leguma-muted);
	transition: color var(--leguma-transition);
}

.search-form:focus-within .search-form__icon {
	color: var(--leguma-accent);
}

.search-form__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	color: var(--leguma-text);
	background: none;
	border: 0;
	outline: 0; /* Focus is shown on the whole pill. */
	font: inherit;
	font-size: 0.9375rem;
}

.search-form__input::placeholder {
	color: var(--leguma-muted);
}

.search-form__input::-webkit-search-cancel-button {
	appearance: none;
}

.search-form__button {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 2.375rem;
	height: 2.375rem;
	color: var(--leguma-on-accent);
	background: var(--leguma-accent);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color var(--leguma-transition), transform var(--leguma-transition);
}

.search-form__button svg {
	width: 1.125rem;
	height: 1.125rem;
}

.search-form__button:hover {
	background: var(--leguma-accent-hover);
	transform: translateX(2px);
}

.search-form.is-loading .search-form__button {
	opacity: 0.7;
}

/* Live results dropdown. */
.search-form__results {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	left: 0;
	z-index: 1001; /* Above the sticky navigation bar. */
	min-width: min(24rem, 100vw - 2 * var(--leguma-gutter)); /* Readable even when the search field is narrow. */
	max-height: min(70vh, 32rem);
	padding: 0.4rem;
	overflow-y: auto;
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 1rem;
	box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 18%);
}

.search-results__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.search-result {
	display: grid;
	grid-template-columns: 3rem 1fr auto;
	gap: 0.75rem;
	align-items: center;
	padding: 0.4rem 0.5rem;
	border-radius: 0.3rem;
	color: var(--leguma-text);
	font-size: 0.875rem;
	line-height: 1.3;
	text-decoration: none;
}

.search-result:hover,
.is-active > .search-result {
	background: var(--leguma-surface-hover);
}

.search-result img {
	width: 3rem;
	height: 3rem;
	object-fit: contain;
}

.search-result__price {
	font-weight: 700;
	white-space: nowrap;
}

.search-results__all {
	display: block;
	margin-top: 0.4rem;
	padding: 0.65rem 0.5rem 0.3rem;
	border-top: 1px solid var(--leguma-border);
	font-size: 0.875rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.search-results__empty {
	margin: 0;
	padding: 0.75rem 0.5rem;
	color: var(--leguma-muted);
	font-size: 0.875rem;
}

/* Navigation
---------------------------------------------------------------- */

/* Mobile-only search toggle and row (shown in the mobile bar, see the breakpoint below). */
.search-toggle,
.site-navigation-bar__search {
	display: none;
}


.site-navigation-bar {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--leguma-accent);
	box-shadow: 0 0 1.25rem rgb(0 0 0 / 8%);
}

/* Match the core admin bar heights so the sticky bar sits below it. */
.admin-bar .site-navigation-bar {
	top: 32px;
}

.site-navigation-bar__inner {
	display: flex;
	align-items: center;
	min-height: var(--leguma-header-height);
}

.site-navigation {
	--leguma-nav-link: var(--leguma-on-accent);
	--leguma-nav-link-active: var(--leguma-secondary-light);
	flex: 1;
}

.site-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation .menu {
	display: flex;
}

.site-navigation .menu-item {
	position: relative;
}

.site-navigation .menu > .menu-item > a {
	display: flex;
	gap: 0.45rem;
	align-items: center;
	min-height: var(--leguma-header-height);
	padding: 0 clamp(0.6rem, 2.5vw - 1rem, 1rem); /* Tighter on narrow desktops so items stay on one line. */
	color: var(--leguma-nav-link);
	font-size: 1.0625rem; /* 17px, as on the previous theme. */
	white-space: nowrap;
	font-weight: 700;
	text-decoration: underline 2px transparent;
	text-underline-offset: 0.5em;
	transition: color var(--leguma-transition), text-decoration-color var(--leguma-transition);
}

.site-navigation .menu > .current-menu-item > a,
.site-navigation .menu > .current-menu-ancestor > a {
	color: var(--leguma-nav-link-active);
	text-decoration-color: var(--leguma-secondary);
}

/* Hover only on devices that hover, so a tap doesn't leave items highlighted. */
@media (hover: hover) {
	.site-navigation .menu > .menu-item > a:hover {
		color: var(--leguma-nav-link-active);
		text-decoration-color: var(--leguma-secondary);
	}
}

.site-navigation .sub-menu {
	position: absolute;
	top: calc(100% - 0.35rem);
	left: 0;
	z-index: 10;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: min(52rem, 100vw - 2 * var(--leguma-gutter));
	max-height: min(65vh, 34rem);
	padding: 0.7rem;
	overflow-y: auto;
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 0.5rem;
	box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 18%);
	opacity: 0;
	pointer-events: none;
	transform: translateY(0.5rem);
	transition: opacity var(--leguma-transition), transform var(--leguma-transition);
}

.site-navigation .menu-item-has-children:hover > .sub-menu,
.site-navigation .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}

.site-navigation .sub-menu a {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	padding: 0.5rem 0.6rem;
	border-radius: 0.3rem;
	color: var(--leguma-text);
	font-size: 0.86rem;
	line-height: 1.25;
	text-decoration: none;
}

.site-navigation .sub-menu a:hover,
.site-navigation .sub-menu a:focus {
	color: var(--leguma-accent);
	background: var(--leguma-surface-hover);
}

/* Label of icon-only items (e.g. home): screen-reader only here, shown in the mobile menu.
   Own class rather than .screen-reader-text, which WooCommerce styles with !important. */
.menu-label-mobile {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Icon at the start of a button (e.g. the cart icon in WooCommerce "Add to cart"). */
.button-icon {
	width: 1.1em;
	height: 1.1em;
	margin-right: 0.4em;
	vertical-align: -0.15em;
}

/* Icons set in inc/menu-icons.php. */
.menu-icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
}

.menu-icon--image {
	width: 3.125rem;
	height: 3.125rem;
	object-fit: contain;
}

.menu-toggle,
.site-navigation-bar__logo {
	display: none;
}

/* Content
---------------------------------------------------------------- */

.entry {
	margin-bottom: 3rem;
}

.entry-title {
	line-height: 1.2;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-meta {
	color: var(--leguma-muted);
	font-size: 0.9rem;
}

.entry-content > .alignwide {
	max-width: none;
	margin-inline: max(-8rem, 50% - 50vw + var(--leguma-gutter));
}

.entry-content > .alignfull {
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

/* WooCommerce notices anywhere on the site use the theme grey instead of WooCommerce's
   purple-tinted one (cart, checkout and account restyle them further). */
:is(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
	background-color: var(--leguma-surface-hover);
}

/* Notice icons drawn as SVG masks instead of WooCommerce's icon font glyphs. */
:is(.woocommerce-info, .woocommerce-message, .woocommerce-error)::before {
	width: 1.25rem;
	height: 1.25rem;
	color: var(--leguma-secondary-dark);
	background: currentcolor;
	content: "";
	-webkit-mask: var(--leguma-notice-icon) center / contain no-repeat;
	mask: var(--leguma-notice-icon) center / contain no-repeat;
}

.woocommerce-info {
	--leguma-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1 8h2v7h-2Zm0-4h2v2h-2Z'/%3E%3C/svg%3E");
}

.woocommerce-message {
	--leguma-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 13.6-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4Z'/%3E%3C/svg%3E");
}

.woocommerce-error {
	--leguma-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1 5h2v7h-2Zm0 9h2v2h-2Z'/%3E%3C/svg%3E");
}

.woocommerce-error::before {
	color: #b42318;
}

/* Content helpers
----------------------------------------------------------------
 * Classes used in WPBakery page content (Extra class name field),
 * carried over from the dt-the7-child theme with the same names.
 */

.lc-theme-y-margin {
	margin-block: var(--leguma-content-gap);
}

.lc-theme-top-margin {
	margin-top: var(--leguma-content-gap);
}

.lc-theme-bottom-margin {
	margin-bottom: var(--leguma-content-gap);
}

.lc-theme-y-padding {
	padding-block: var(--leguma-content-gap);
}

.lc-theme-left-auto-margin {
	margin-left: auto;
}

.lc-theme-right-auto-margin {
	margin-right: auto;
}

.lc-theme-video-player-wrap iframe {
	border-radius: 10px;
}

/* Spacing between the sections of a long landing page (rows with this class). Only a top
   margin, so two sections never add up their margins (WPBakery rows don't collapse them). */
.lc-theme-section {
	margin-top: var(--leguma-section-gap);
	margin-bottom: 0;
}

/* The section gap alone separates sections: no trailing margin from the last block in a
   column (e.g. WPForms' 24px), and on desktop none from columns that only need it when stacked. */
.lc-theme-section .wpb_wrapper > :last-child {
	margin-bottom: 0;
}

@media (width > 64rem) {
	.lc-theme-section > .wpb_column.lc-theme-bottom-margin {
		margin-bottom: 0;
	}
}

/* Full-width row with the theme grey ("Stretch row" + this class), padded by the same gap. */
.lc-theme-band {
	padding-block: var(--leguma-section-gap);
	background: var(--leguma-surface-hover) !important;
}

/* WPBakery pads a stretched row by the container offset minus its 25px gutter, which bottoms out
   at 0 on narrower screens; the column padding then follows the offset so content stays aligned. */
.lc-theme-band > .wpb_column > .vc_column-inner {
	padding-inline: min(25px, max(var(--leguma-gutter), (100vw - var(--leguma-content-width)) / 2)) !important;
}

/* Text block whose first paragraph is a larger lead and the rest muted body text. */
.lc-theme-lead p {
	color: var(--leguma-muted);
	font-size: 1rem;
	line-height: 1.75;
}

.lc-theme-lead p:first-child {
	color: var(--leguma-text);
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.6;
}

/* Text block as a grey note box; its links become outlined pills (e.g. "see also" links). */
.lc-theme-note {
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--leguma-surface-hover);
	border-radius: 1.25rem;
}

.lc-theme-note p {
	margin: 0 0 1rem;
}

.lc-theme-note p:last-child {
	margin-bottom: 0;
}

.lc-theme-note a {
	display: inline-flex;
	align-items: center;
	margin: 0.25rem 0.5rem 0.25rem 0;
	padding: 0.6rem 1.15rem;
	color: var(--leguma-text);
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: border-color var(--leguma-transition), color var(--leguma-transition);
}

.lc-theme-note a:hover {
	color: var(--leguma-secondary-dark);
	border-color: var(--leguma-secondary);
}

.lc-theme-note a::after {
	margin-left: 0.4rem;
	content: "→";
}

/* Text block whose bullet list becomes a two-column checklist of bordered rows. */
.lc-theme-checklist ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.lc-theme-checklist li {
	position: relative;
	margin: 0;
	padding: 1rem 1.25rem 1rem 3.5rem;
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 1rem;
	line-height: 1.55;
}

.lc-theme-checklist li::before {
	position: absolute;
	top: 0.85rem;
	left: 1rem;
	width: 1.6rem;
	height: 1.6rem;
	background: var(--leguma-surface-hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23778f00' d='m9.55 17.65-5.3-5.3 1.4-1.4 3.9 3.9 8.8-8.8 1.4 1.4Z'/%3E%3C/svg%3E") center / 1rem no-repeat;
	border-radius: 50%;
	content: "";
}

/* Text block whose ordered list becomes a vertical timeline: numbered dots joined by a line. */
.lc-theme-timeline ol {
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: lc-step;
}

.lc-theme-timeline li {
	position: relative;
	margin: 0;
	padding: 0.35rem 0 1.75rem 3.75rem;
	font-size: 1.0625rem;
	line-height: 1.55;
	counter-increment: lc-step;
}

.lc-theme-timeline li::before {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--leguma-on-accent);
	background: var(--leguma-secondary);
	border: 4px solid var(--leguma-surface);
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--leguma-secondary);
	font-weight: 800;
	content: counter(lc-step);
}

.lc-theme-timeline li:not(:last-child)::after {
	position: absolute;
	top: 2.5rem;
	bottom: 0;
	left: calc(1.25rem - 1px);
	width: 2px;
	background: var(--leguma-border);
	content: "";
}

.lc-theme-timeline li:last-child {
	padding-bottom: 0;
}

.lc-theme-timeline ol + p {
	margin-top: 1.5rem;
}

/* Text block whose ordered list becomes numbered steps. */
.lc-theme-steps ol {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
	padding: 0;
	list-style: none;
	counter-reset: lc-step;
}

.lc-theme-steps li {
	position: relative;
	margin: 0;
	padding: 1.25rem 1.25rem 1.25rem 4.25rem;
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 1rem;
	line-height: 1.55;
	counter-increment: lc-step;
}

.lc-theme-steps li::before {
	position: absolute;
	top: 1.1rem;
	left: 1.1rem;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--leguma-on-accent);
	background: var(--leguma-secondary);
	border-radius: 50%;
	font-weight: 800;
	content: counter(lc-step);
}

/* Text block whose table becomes label / value rows (e.g. price examples). */
.lc-theme-table table {
	width: 100% !important;
	height: auto !important;
	margin: 1.25rem 0;
	overflow: hidden;
	border: 1px solid var(--leguma-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 1rem;
}

.lc-theme-table :is(td, th) {
	padding: 0.85rem 1.25rem;
	border: 0;
	border-top: 1px solid var(--leguma-border);
}

.lc-theme-table tr:first-child :is(td, th) {
	border-top: 0;
}

.lc-theme-table tr:nth-child(odd) {
	background: var(--leguma-surface-hover);
}

.lc-theme-table :is(td, th):last-child {
	font-weight: 700;
	text-align: right;
}

/* WPBakery FAQ toggles: bordered rows with a green +/- that open into one card. */
.vc_toggle {
	margin: 0 0 0.5rem !important;
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 0.75rem;
	transition: border-color var(--leguma-transition);
}

.vc_toggle:hover,
.vc_toggle.vc_toggle_active {
	border-color: var(--leguma-secondary);
}

.vc_toggle .vc_toggle_title {
	padding: 1rem 3.25rem 1rem 1.25rem !important;
}

.vc_toggle .vc_toggle_title > h4 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
}

/* WPBakery's icon is replaced by a plain +/- drawn on the title: two 2px bars,
   the vertical one collapsing when the toggle is open. */
.vc_toggle .vc_toggle_icon {
	display: none !important;
}

.vc_toggle .vc_toggle_title {
	position: relative;
}

.vc_toggle .vc_toggle_title::after {
	position: absolute;
	top: 50%;
	right: 1.25rem;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	color: var(--leguma-secondary-dark);
	background:
		linear-gradient(currentcolor, currentcolor) center / 100% 2px no-repeat,
		linear-gradient(currentcolor, currentcolor) center / 2px 100% no-repeat;
	content: "";
	transition: background-size var(--leguma-transition);
}

.vc_toggle.vc_toggle_active .vc_toggle_title::after {
	background-size: 100% 2px, 2px 0;
}

.vc_toggle .vc_toggle_content {
	margin: 0 !important;
	padding: 0 1.25rem 1.25rem !important;
	color: var(--leguma-muted);
	line-height: 1.65;
}

/* WPForms (modern markup): fields and button in the theme style, through its CSS variables. */
.entry-content div.wpforms-container-full {
	--wpforms-field-border-radius: 10px;
	--wpforms-field-border-color: var(--leguma-border);
	--wpforms-field-background-color: var(--leguma-surface);
	--wpforms-field-text-color: var(--leguma-text);
	--wpforms-label-color: var(--leguma-text);
	--wpforms-label-sublabel-color: var(--leguma-muted);
	--wpforms-button-border-radius: 999px;
	--wpforms-button-background-color: var(--leguma-secondary);
	--wpforms-button-text-color: var(--leguma-on-accent);
	--wpforms-page-break-color: var(--leguma-secondary);

	padding: clamp(1.25rem, 3vw, 2.25rem);
	background: var(--leguma-surface-hover);
	border-radius: 1.25rem;
}

/* Small and medium fields fill the box too, so a form in a narrow column doesn't hug its left edge. */
.entry-content div.wpforms-container-full .wpforms-form :is(input, select, textarea, .choices, .wpforms-field-row):is(.wpforms-field-small, .wpforms-field-medium) {
	max-width: 100%;
}

.entry-content div.wpforms-container-full .wpforms-title {
	font-size: 1.375rem;
	font-weight: 800;
}

.entry-content div.wpforms-container-full button.wpforms-submit {
	padding-inline: 2rem;
	border-radius: 999px;
	font-weight: 700;
}

.entry-content div.wpforms-container-full button.wpforms-submit:hover {
	background: var(--leguma-secondary-hover);
}

/* Row border radius does not apply to columns with a background image ("Gamyba" page). */
.lc-theme-col-with-background-image-border-radius {
	overflow: hidden !important;
	border-top-left-radius: 10px !important;
	border-bottom-left-radius: 10px !important;
}

/* WPBakery accordion with the "leg-custom-accordion" class: separated rows with a
   green +/- control. !important beats WPBakery's colour rules and inline variables. */
.leg-custom-accordion .vc_tta-panel {
	margin: 0 0 0.5rem !important;
}

.leg-custom-accordion .vc_tta-panel-heading {
	background: var(--leguma-surface) !important;
	border: 1px solid var(--leguma-border) !important;
	border-radius: 0.75rem !important;
	transition: border-color var(--leguma-transition);
}

.leg-custom-accordion .vc_tta-panel-heading:hover,
.leg-custom-accordion .vc_tta-panel.vc_active .vc_tta-panel-heading {
	border-color: var(--leguma-secondary) !important;
}

.leg-custom-accordion .vc_tta-panel.vc_active .vc_tta-panel-heading {
	border-bottom-color: transparent !important;
	border-radius: 0.75rem 0.75rem 0 0 !important;
}

.leg-custom-accordion .vc_tta-panel-title {
	margin: 0;
	font-size: 1rem !important;
	font-weight: 700;
}

.leg-custom-accordion .vc_tta-panel-title > a {
	padding: 1rem 3.25rem 1rem 1.25rem !important;
}

.leg-custom-accordion .vc_tta-title-text {
	color: var(--leguma-text) !important;
	font-weight: 700;
}

.leg-custom-accordion .vc_tta-controls-icon-plus {
	right: 1.25rem !important;
	color: var(--leguma-secondary-dark);
}

.leg-custom-accordion .vc_tta-controls-icon-plus::before,
.leg-custom-accordion .vc_tta-controls-icon-plus::after {
	border-color: currentcolor !important;
	border-width: 2px 0 0 !important;
}

.leg-custom-accordion .vc_tta-controls-icon-plus::after {
	border-width: 0 0 0 2px !important;
}

.leg-custom-accordion .vc_tta-panel-body {
	padding: 0 1.25rem 1.25rem !important;
	background: var(--leguma-surface) !important;
	border: 1px solid var(--leguma-secondary) !important;
	border-top: 0 !important;
	border-radius: 0 0 0.75rem 0.75rem !important;
	color: var(--leguma-muted);
	line-height: 1.65;
}

.leg-custom-accordion .vc_tta-panel:not(.vc_active) .vc_tta-panel-body {
	border-color: transparent !important;
}

.leg-custom-accordion ::marker {
	color: var(--leguma-secondary);
}

/* Not found (404)
---------------------------------------------------------------- */

.error-404 {
	max-width: 44rem;
	margin-inline: auto;
	text-align: center;
}

.error-404__code {
	margin: 0;
	color: var(--leguma-surface-hover);
	font-size: clamp(5rem, 14vw, 8rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	-webkit-text-stroke: 2px var(--leguma-border);
}

.error-404__title {
	margin: 0.5rem 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
}

.error-404__text {
	margin: 0 auto 1.75rem;
	color: var(--leguma-muted);
	font-size: 1.0625rem;
	line-height: 1.65;
}

.error-404__search .search-form {
	max-width: 32rem;
	margin-inline: auto;
	text-align: left;
}

/* Top categories as chips. */
.error-404__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
}

.error-404__categories a {
	display: inline-block;
	padding: 0.5rem 1rem;
	color: var(--leguma-text);
	background: var(--leguma-surface);
	border: 1px solid var(--leguma-border);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--leguma-transition), color var(--leguma-transition);
}

.error-404__categories a:hover {
	color: var(--leguma-secondary-dark);
	border-color: var(--leguma-secondary);
}

.error-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

.error-404__button {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.85rem 1.75rem;
	color: var(--leguma-on-accent);
	background: var(--leguma-secondary);
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color var(--leguma-transition), color var(--leguma-transition), border-color var(--leguma-transition);
}

.error-404__button:hover {
	color: var(--leguma-on-accent);
	background: var(--leguma-secondary-hover);
}

.error-404__button svg {
	width: 1.1rem;
	height: 1.1rem;
}

.error-404__button--outline {
	color: var(--leguma-text);
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--leguma-border);
}

.error-404__button--outline:hover {
	color: var(--leguma-secondary-dark);
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--leguma-secondary);
}

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

.site-footer {
	color: rgb(255 255 255 / 78%);
	background: var(--leguma-accent);
	font-size: 0.875rem;
	line-height: 1.6;
}

.site-footer a {
	color: inherit;
	text-decoration: none;
	transition: color var(--leguma-transition);
}

.site-footer a:hover {
	color: var(--leguma-secondary-light);
}

/* Links, company and bank details, then the wider contacts column on the right. */
.site-footer__columns {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
	gap: 2.5rem 3rem;
	padding-block: clamp(2.75rem, 5vw, 4rem);
}

.site-footer__title {
	margin: 0 0 1.25rem;
	color: var(--leguma-on-accent);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Contacts column: phone, email and address, then the certificates. */
.site-footer__contacts {
	display: grid;
	gap: 0.6rem;
	margin: 0 0 1.75rem;
	padding: 0;
	list-style: none;
}

.site-footer__contacts a {
	display: inline-flex;
	gap: 0.75rem;
	align-items: center;
	color: var(--leguma-on-accent);
	font-weight: 600;
}

.site-footer__contact-icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--leguma-secondary-light);
	background: rgb(255 255 255 / 8%);
	border-radius: 50%;
}

.site-footer__contact-icon svg {
	width: 1rem;
	height: 1rem;
}

.site-footer__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.site-footer__badges a {
	transition: transform var(--leguma-transition);
}

.site-footer__badges a:hover {
	transform: translateY(-2px);
}

.site-footer__badges img {
	display: block;
	width: auto;
	height: 4.75rem;
	border-radius: 0.375rem;
}

/* A round seal on a white square image (ISO): cropped to its circle. */
.site-footer__badges img.site-footer__badge--round {
	border-radius: 50%;
}

/* Links: an arrow slides in on hover. */
.site-footer__links {
	display: grid;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__links a {
	display: inline-flex;
	align-items: center;
}

.site-footer__links a::before {
	width: 0;
	overflow: hidden;
	color: var(--leguma-secondary-light);
	content: "→";
	transition: width var(--leguma-transition), margin var(--leguma-transition);
}

.site-footer__links a:hover::before {
	width: 1em;
	margin-right: 0.25rem;
}

/* Company and bank details: small muted label above the white value. */
.site-footer__details {
	display: grid;
	gap: 0.85rem;
	margin: 0;
}

.site-footer__details dt {
	color: rgb(255 255 255 / 55%);
	font-size: 0.75rem;
}

.site-footer__details dd {
	margin: 0;
	color: var(--leguma-on-accent);
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* Copyright bar with social buttons. */
.site-footer__bottom {
	border-top: 1px solid rgb(255 255 255 / 12%);
}

.site-footer__inner {
	min-height: 4rem;
	padding-block: 1rem;
	font-size: 0.8125rem;
}

.site-footer__inner p {
	margin: 0;
}

.site-footer__social {
	display: flex;
	gap: 0.5rem;
}

.site-footer__social a {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--leguma-on-accent);
	border: 1px solid rgb(255 255 255 / 25%);
	border-radius: 50%;
	transition: border-color var(--leguma-transition), color var(--leguma-transition);
}

.site-footer__social a:hover {
	border-color: var(--leguma-secondary-light);
}

.site-footer__social svg {
	width: 1rem;
	height: 1rem;
}

/* Admin bar
----------------------------------------------------------------
 * Sticky offsets matching WordPress core's admin bar breakpoints.
 * These follow core, not the theme, so leave them as they are.
 */
@media (max-width: 782px) {
	.admin-bar .site-navigation-bar {
		top: 46px;
	}
}

/* Below 600px the core admin bar scrolls away with the page. */
@media (max-width: 600px) {
	.admin-bar .site-navigation-bar {
		top: 0;
	}
}

/* Mobile: the theme's only breakpoint (see Tokens).
---------------------------------------------------------------- */

@media (max-width: 64rem) {
	:root {
		--leguma-header-height: 3.75rem;
	}

	/* Footer: links and details in two columns, contacts on their own row below. */
	.site-footer__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.25rem 1.5rem;
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}

	/* The white sticky bar (logo, search, cart, menu button) replaces the header. */
	.site-header {
		display: none;
	}

	.site-navigation-bar {
		background: var(--leguma-surface);
	}

	.site-navigation-bar__inner {
		flex-wrap: wrap;
	}

	/* Full bar height, so the logo row stays put when the menu opens below it. */
	.site-navigation-bar__logo {
		--leguma-logo-height: 2.5rem;
		display: flex;
		align-items: center;
		min-height: var(--leguma-header-height);
	}

	/* Search and cart icons next to the menu button. */
	.search-toggle {
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-left: auto;
		padding: 0;
		color: var(--leguma-text);
		background: none;
		border: 0;
		cursor: pointer;
	}

	.search-toggle svg {
		width: 1.35rem;
		height: 1.35rem;
	}

	.search-toggle[aria-expanded="true"] {
		color: var(--leguma-secondary-dark);
	}

	.site-navigation-bar__cart {
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		color: var(--leguma-text);
	}

	/* Search row below the bar. */
	.site-navigation-bar__search:not([hidden]) {
		display: block;
		flex-basis: 100%;
		padding-bottom: 0.75rem;
	}

	.site-navigation-bar__cart svg {
		width: 1.5rem;
		height: 1.5rem;
	}

	.site-navigation-bar__cart .cart-count {
		top: 0.15rem;
		right: 0;
	}

	.site-navigation-bar__cart + .menu-toggle {
		margin-left: 0.25rem;
	}

	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-left: auto;
		margin-right: -0.5rem;
		color: var(--leguma-text);
		background: none;
		border: 0;
		cursor: pointer;
	}

	.menu-toggle__icon,
	.menu-toggle__icon::before,
	.menu-toggle__icon::after {
		width: 1.75rem;
		height: 3px;
		border-radius: 2px;
		background: currentcolor;
	}

	.menu-toggle__icon {
		position: relative;
	}

	.menu-toggle__icon::before,
	.menu-toggle__icon::after {
		position: absolute;
		left: 0;
		content: "";
	}

	.menu-toggle__icon::before {
		top: -0.5rem;
	}

	.menu-toggle__icon::after {
		top: 0.5rem;
	}

	.site-navigation {
		--leguma-nav-link: var(--leguma-text);
		--leguma-nav-link-active: var(--leguma-accent);
		display: none;
		flex-basis: 100%;
		max-height: calc(100dvh - var(--leguma-header-height));
		padding-bottom: 1rem;
		overflow-y: auto;
	}

	.menu-is-open .site-navigation {
		display: block;
	}

	.site-navigation .menu {
		flex-direction: column;
	}

	.site-navigation .menu > .menu-item {
		border-top: 1px solid var(--leguma-border);
	}

	.site-navigation .menu > .menu-item > a {
		min-height: auto;
		padding: 0.85rem 0;
		font-size: 1rem;
	}

	.menu-label-mobile {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip-path: none;
		white-space: normal;
	}

	.site-navigation .sub-menu {
		position: static;
		display: none;
		grid-template-columns: 1fr;
		width: 100%;
		max-height: none;
		padding: 0.45rem;
		border: 0;
		box-shadow: none;
		opacity: 1;
		pointer-events: auto;
		transform: none;
	}

	.site-navigation .is-submenu-open > .sub-menu {
		display: grid;
	}

	/* Chevron points up while the submenu is open. */
	.site-navigation .is-submenu-open > a > .menu-icon--svg-chevron {
		transform: rotate(180deg);
	}
}

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