/**
 * Larder custom styles.
 *
 * Only rules that cannot be expressed in theme.json live here.
 * Each section explains why it requires custom CSS.
 */

/* ================================================================
   CONTENT LINK UNDERLINES
   Reviewer requires consistent underlines on content links.
   Applied only to content areas, not navigation or UI elements.
   ================================================================ */
.wp-block-post-content a:not(.wp-element-button):not(.wc-block-components-product-button__button),
.wp-block-latest-posts a,
.wp-block-categories a,
.wp-block-tag-cloud a,
.larder-sidebar a:not(.wp-element-button),
.comment-content a,
.wp-block-comments a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.wp-block-post-content a:not(.wp-element-button):hover,
.wp-block-latest-posts a:hover,
.wp-block-categories a:hover,
.wp-block-tag-cloud a:hover,
.larder-sidebar a:not(.wp-element-button):hover,
.comment-content a:hover,
.wp-block-comments a:not(.wp-element-button):hover {
	text-decoration: none;
}

/* ================================================================
   BASE
   theme.json cannot remove root padding-top on .wp-site-blocks
   ================================================================ */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	body {
		scroll-behavior: auto;
	}
}

.wp-site-blocks {
	padding-top: 0 !important;
}

/* Content links need underlines — color alone is not sufficient for a11y */
.entry-content a:not(.wp-element-button):not(.wp-block-button__link),
.wp-block-post-content a:not(.wp-element-button):not(.wp-block-button__link),
.wc-tab a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	text-decoration-color: rgba(238, 105, 72, 0.4);
}

.entry-content a:not(.wp-element-button):hover,
.wp-block-post-content a:not(.wp-element-button):hover,
.wc-tab a:not(.wp-element-button):hover {
	text-decoration-color: currentColor;
}

/* Touch target minimum 44px for interactive elements */
.wp-element-button,
.wc-block-components-button,
.wp-block-button__link,
.wc-block-components-quantity-selector button {
	min-height: 44px;
}

/* Selection styling */
::selection {
	background-color: rgba(238, 105, 72, 0.2);
	color: var(--wp--preset--color--heading);
}

/* ================================================================
   HEADER
   Flexbox ordering (site-title left, nav center, icons right) and
   the animated nav underline require custom CSS pseudo-elements.
   ================================================================ */

.larder-header-border {
	background-color: var(--wp--preset--color--surface);
}

.larder-header-inner {
	max-width: 67.141em;
	margin: 0 auto;
}

/* Nav hover color — top-level items */
.larder-nav-primary .wp-block-navigation__container > .wp-block-navigation-item > a:hover,
.larder-nav-primary .wp-block-page-list > .wp-block-navigation-item > a:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* Animated underline — top-level nav items only, not submenu */
.larder-nav-primary .wp-block-navigation__container > .wp-block-navigation-item > a,
.larder-nav-primary .wp-block-page-list > .wp-block-navigation-item > a {
	position: relative;
	padding-bottom: 0.326em;
}

.larder-nav-primary .wp-block-navigation__container > .wp-block-navigation-item > a::before,
.larder-nav-primary .wp-block-page-list > .wp-block-navigation-item > a::before {
	content: "";
	position: absolute;
	display: block;
	bottom: 0;
	left: 0;
	width: 0;
	height: 3px;
	background-color: var(--wp--preset--color--primary);
	transition: width 0.3s cubic-bezier(0.795, -0.035, 0, 1);
}

.larder-nav-primary .wp-block-navigation__container > .wp-block-navigation-item > a:hover::before,
.larder-nav-primary .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > a::before,
.larder-nav-primary .wp-block-page-list > .wp-block-navigation-item > a:hover::before,
.larder-nav-primary .wp-block-page-list > .wp-block-navigation-item.current-menu-item > a::before {
	width: 100%;
}

/* Submenu dropdown — invisible bridge keeps hover chain intact */
.larder-nav-primary .wp-block-navigation__submenu-container {
	border: none;
	border-top: 3px solid var(--wp--preset--color--primary);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border-radius: 0 0 var(--wp--custom--border-radius) var(--wp--custom--border-radius);
	padding: 0.5em 0;
	min-width: 220px;
	top: 100%;
	margin-top: 0;
}

.larder-nav-primary .has-child > .wp-block-navigation__submenu-container::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	right: 0;
	height: 12px;
}

.larder-nav-primary .wp-block-navigation__submenu-container .wp-block-navigation-item a {
	font-size: 0.875rem;
	font-weight: 800;
	text-transform: none;
	letter-spacing: normal;
	padding: 0.625em 1.25em;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.larder-nav-primary .wp-block-navigation__submenu-container .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--primary);
	background-color: rgba(238, 105, 72, 0.05);
}

/* Header action icons — same visual line as nav text */
.larder-header-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	height: 100%;
}

.larder-header-actions > * {
	display: flex;
	align-items: center;
	justify-content: center;
}

.larder-header-actions svg {
	width: 24px;
	height: 24px;
	stroke-width: 2.4;
	color: var(--wp--preset--color--heading);
	display: block;
}

.larder-account-icon {
	display: flex;
	align-items: center;
}

.larder-account-icon svg {
	width: 24px;
	height: 24px;
	stroke-width: 2.4;
}

.larder-account-icon a:hover svg {
	color: var(--wp--preset--color--primary);
}

.larder-mini-cart {
	display: flex;
	align-items: center;
}

.larder-mini-cart .wc-block-mini-cart__button {
	background: transparent !important;
	border: none !important;
	display: flex;
	align-items: center;
	padding: 0;
}

.larder-mini-cart .wc-block-mini-cart__button svg {
	width: 24px;
	height: 24px;
	stroke-width: 2.4;
}

.larder-mini-cart .wc-block-mini-cart__button:hover svg {
	color: var(--wp--preset--color--primary);
}

.larder-header-search {
	display: flex;
	align-items: center;
}

.larder-header-search .wp-block-search__button {
	background: transparent;
	border: none;
	color: var(--wp--preset--color--heading);
	padding: 0;
	cursor: pointer;
	line-height: 1;
	display: flex;
	align-items: center;
}

.larder-header-search .wp-block-search__button:hover {
	color: var(--wp--preset--color--primary);
}

.larder-header-search .wp-block-search__button svg {
	width: 24px;
	height: 24px;
	stroke-width: 2.4;
}

.larder-mini-cart .wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	font-weight: 800;
	font-size: 0.6875rem;
	border-radius: 100%;
	border: 2px solid var(--wp--preset--color--surface);
	box-sizing: content-box;
}

/* ================================================================
   FOOTER
   Widget heading border + specific font override not possible in
   theme.json styles.blocks for template parts.
   ================================================================ */

.larder-footer .wp-block-heading {
	font-family: var(--wp--preset--font-family--body);
	text-transform: uppercase;
	font-size: 1.2em;
	letter-spacing: 1px;
	font-weight: 900;
	border-bottom: 3px solid var(--wp--preset--color--primary);
	padding-bottom: 0.5em;
	margin-bottom: 1em;
}

.larder-footer .wp-block-navigation a {
	font-family: var(--wp--preset--font-family--heading);
}

/* ================================================================
   SIDEBAR
   Same pattern as footer — heading borders and font overrides.
   ================================================================ */

.larder-sidebar .wp-block-heading {
	font-family: var(--wp--preset--font-family--body);
	text-transform: uppercase;
	font-size: 1.2em;
	letter-spacing: 1px;
	font-weight: 900;
	border-bottom: 3px solid var(--wp--preset--color--heading);
	padding-bottom: 0.5em;
	margin-bottom: 1em;
}

.larder-sidebar .wp-block-latest-posts,
.larder-sidebar .wp-block-categories,
.larder-sidebar .wp-block-tag-cloud {
	font-family: var(--wp--preset--font-family--heading);
}

.larder-sidebar .wp-block-latest-posts a,
.larder-sidebar .wp-block-categories a {
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
}

.larder-sidebar .wp-block-latest-posts a:hover,
.larder-sidebar .wp-block-categories a:hover {
	color: var(--wp--preset--color--primary);
}

.larder-content-sidebar {
	gap: var(--wp--preset--spacing--60);
}

/* ================================================================
   HERO (cover block)
   Cover block styling is handled by WordPress core. Only the
   decorative X section divider below the hero needs custom CSS
   (pseudo-element based drawing).
   ================================================================ */

.larder-section-divider {
	position: relative;
}

.larder-x-decoration {
	position: relative;
	height: 80px;
	width: 100%;
	margin: 0 auto;
}

.larder-x-decoration::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 33.333%;
	height: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	transform: translateX(-50%);
}

.larder-x-decoration::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 80px;
	height: 80px;
	transform: translate(-50%, -50%);
	background:
		linear-gradient(
			45deg,
			transparent calc(50% - 0.5px),
			rgba(0, 0, 0, 0.1) calc(50% - 0.5px),
			rgba(0, 0, 0, 0.1) calc(50% + 0.5px),
			transparent calc(50% + 0.5px)
		),
		linear-gradient(
			-45deg,
			transparent calc(50% - 0.5px),
			rgba(0, 0, 0, 0.1) calc(50% - 0.5px),
			rgba(0, 0, 0, 0.1) calc(50% + 0.5px),
			transparent calc(50% + 0.5px)
		);
}

/* ================================================================
   CATEGORY CARDS
   Gradient overlay, absolute-positioned text, and hover reveal
   animation all require pseudo-elements and transitions that
   theme.json cannot express.
   ================================================================ */

.larder-category-grid .wc-block-product-categories-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.larder-category-grid .wc-block-product-categories-list-item {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--border-radius);
}

.larder-category-grid .wc-block-product-categories-list-item > a {
	position: relative;
	display: block;
	text-decoration: none;
	color: var(--wp--preset--color--surface);
}

.larder-category-grid .wc-block-product-categories-list-item img {
	display: block;
	width: 100%;
	height: 320px;
	object-fit: cover;
	/* Bistro excludes category images from zoom: :not(.product-category) */
	transition: none;
}

/* Gradient overlay — bottom gradient for text readability */
.larder-category-grid .wc-block-product-categories-list-item > a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
	pointer-events: none;
	transition: height 0.3s ease;
}

.larder-category-grid .wc-block-product-categories-list-item:hover > a::after {
	height: 80%;
}

/* Category name — absolute positioned over image */
.larder-category-grid .wc-block-product-categories-list-item .wc-block-product-categories-list-item__name {
	position: absolute;
	bottom: 1rem;
	left: 1rem;
	right: 1rem;
	z-index: 2;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.387em;
	font-weight: 900;
	line-height: 1.3;
	color: var(--wp--preset--color--surface);
	text-align: left;
	transition: bottom 0.3s ease;
}

.larder-category-grid .wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item__name {
	bottom: 1.5rem;
}

/* Description slide-down reveal on hover (Bistro's signature effect) */
.larder-category-grid .wc-block-product-categories-list-item .wc-block-product-categories-list-item__description {
	position: absolute;
	bottom: 0;
	left: 1rem;
	right: 1rem;
	z-index: 2;
	color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
	line-height: 1.5;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.6s cubic-bezier(0.25, 0.25, 0.02, 1),
	            opacity 0.4s ease;
}

.larder-category-grid .wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item__description {
	max-height: 250px;
	opacity: 1;
}

/* Hide nested subcategory lists — only top-level categories in the grid */
.larder-category-grid .wc-block-product-categories-list-item .wc-block-product-categories-list {
	display: none;
}

/* Product count — positioned inside the card overlay */
.larder-category-grid .wc-block-product-categories-list-item-count {
	position: absolute;
	bottom: 1rem;
	right: 1rem;
	z-index: 2;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--surface);
	background: rgba(0, 0, 0, 0.35);
	padding: 0.25em 0.6em;
	border-radius: 2px;
	line-height: 1;
}

/* ================================================================
   PRODUCT CARDS
   Card layout with absolute sale badge, hover zoom on image,
   and rating-cart bar pushed to bottom via flex column. These
   require overflow, position, aspect-ratio, and transforms.
   ================================================================ */

.larder-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	text-align: left;
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--border-radius);
	overflow: hidden;
	height: 100%;
}

/* Image wrapper — overflow hidden clips the zoom, forces consistent sizing */
.larder-product-image-wrap {
	overflow: hidden;
	position: relative;
	aspect-ratio: 1 / 1;
	background-color: var(--wp--preset--color--background);
	flex-shrink: 0;
	margin-top: 0 !important;
}

.larder-product-image-wrap .wc-block-components-product-image,
.larder-product-image-wrap .wc-block-components-product-image a {
	display: block;
	overflow: hidden;
	width: 100%;
	height: 100%;
	aspect-ratio: auto !important;
}

.larder-product-image-wrap img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.2s ease;
	aspect-ratio: auto !important;
}

.larder-product-image-wrap:hover img {
	transform: scale(1.1);
}

/* Reset block gap inside product card */
.larder-product-card > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* Product title and price — tight vertical rhythm */
.larder-product-card .wp-block-post-title {
	font-weight: 900;
	padding: 0.75rem 1rem 0.25rem;
}

.larder-product-card .wp-block-post-title a {
	text-decoration: none;
	font-size: 0.9375rem;
	line-height: 1.35;
}

.larder-product-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.larder-product-card .wc-block-components-product-price {
	padding: 0.25rem 1rem 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--wp--preset--color--heading);
}

/* Sale price — strikethrough original, highlight sale */
.larder-product-card .wc-block-components-product-price .wc-block-components-product-price__regular {
	text-decoration: line-through;
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	font-size: 0.875rem;
	margin-right: 0.375rem;
}

.larder-product-card .wc-block-components-product-price ins,
.larder-product-card .wc-block-components-product-price .wc-block-components-product-price__value.is-discounted {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* Sale price on single product + archive */
.woocommerce del,
del .woocommerce-Price-amount {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	font-size: 0.85em;
}

.woocommerce ins,
ins .woocommerce-Price-amount {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* Cart button area — full-width at bottom of card */
.larder-rating-cart {
	display: flex;
	align-items: center;
	padding: 0;
	margin-top: auto;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.larder-rating-cart .wc-block-components-product-button {
	margin: 0;
	width: 100%;
}

.larder-rating-cart .wc-block-components-product-button .wp-element-button,
.larder-rating-cart .wc-block-components-product-button a {
	display: block;
	width: 100%;
	font-size: 0.8125rem;
	padding: 0.875rem 1.25rem;
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	text-align: center;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
}

.larder-rating-cart .wc-block-components-product-button .wp-element-button:hover,
.larder-rating-cart .wc-block-components-product-button a:hover {
	background-color: var(--wp--preset--color--heading);
}

/* Star rating */
.wc-block-components-product-rating .wc-block-components-product-rating__stars {
	font-size: 1rem;
	margin: 0 1.25rem 0.5rem;
}

/* Sale badge (ribbon style) — positioned absolute with pseudo-element fold */
.larder-product-card .wc-block-components-product-sale-badge {
	position: absolute;
	top: 1em;
	left: -0.25em;
	z-index: 3;
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.375rem 0.75rem 0.375rem 1rem;
	border-radius: 0 2px 2px 0;
	line-height: 1;
}

.larder-product-card .wc-block-components-product-sale-badge::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: -0.5em;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.5em 0.5em 0 0;
	border-color: #c9a030 transparent transparent transparent;
}

/* ================================================================
   BREADCRUMBS
   WooCommerce breadcrumb has specific class selectors and color
   overrides that theme.json elements cannot target.
   ================================================================ */

.woocommerce-breadcrumb,
.wp-block-woocommerce-breadcrumbs {
	font-size: 0.8125rem;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--muted);
}

.woocommerce-breadcrumb a,
.wp-block-woocommerce-breadcrumbs a {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
	font-weight: 700;
	transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover,
.wp-block-woocommerce-breadcrumbs a:hover {
	color: var(--wp--preset--color--primary);
}

/* ================================================================
   BUTTONS
   Transform on hover/active — theme.json cannot set transitions.
   ================================================================ */

.wp-element-button,
.wc-block-components-button,
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.wp-element-button:hover,
.wc-block-components-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
}

.wp-element-button:active,
.wc-block-components-button:active,
.wp-block-button__link:active {
	transform: translateY(0);
}

/* ================================================================
   FORMS
   Focus ring with box-shadow and border-color transition.
   theme.json can set border-radius but not transitions/focus.
   ================================================================ */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select,
.wp-block-search__input {
	font-family: var(--wp--preset--font-family--body);
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	padding: 0.625rem 0.875rem;
	background-color: rgba(249, 244, 238, 0.5);
	color: var(--wp--preset--color--foreground);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus,
.wp-block-search__input:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 2px rgba(238, 105, 72, 0.15);
	outline: none;
}

/* ================================================================
   TABLES
   Zebra striping and header background — theme.json cannot
   target nth-child or th/td separately.
   ================================================================ */

table th {
	background-color: rgba(238, 235, 226, 0.5);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	color: var(--wp--preset--color--heading);
}

table td {
	background-color: var(--wp--preset--color--surface);
}

table tbody tr:nth-child(even) td {
	background-color: rgba(249, 244, 238, 0.5);
}

/* ================================================================
   NAVIGATION SUBMENUS (non-primary)
   Fallback styling for navigation blocks outside the primary nav.
   ================================================================ */

.wp-block-navigation:not(.larder-nav-primary) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid rgba(75, 57, 24, 0.08);
	border-radius: var(--wp--custom--border-radius);
	box-shadow: var(--wp--preset--shadow--medium);
	padding: 0.5rem 0;
}

.wp-block-navigation:not(.larder-nav-primary) .wp-block-navigation__submenu-container a {
	padding: 0.625rem 1.25rem;
	font-size: 0.9375rem;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 700;
}

.wp-block-navigation:not(.larder-nav-primary) .wp-block-navigation__submenu-container a:hover {
	background-color: var(--wp--preset--color--background);
}

/* ================================================================
   PAGINATION
   Styled numbered pagination with pill buttons and active state.
   ================================================================ */

.wp-block-query-pagination {
	gap: 0.5rem;
	font-size: 0.9375rem;
}

.wp-block-query-pagination-numbers {
	display: flex;
	gap: 0.25rem;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border-radius: var(--wp--custom--border-radius);
	font-weight: 700;
	font-family: var(--wp--preset--font-family--body);
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
	background-color: var(--wp--preset--color--surface);
	border: 1px solid rgba(75, 57, 24, 0.15);
	transition: all 0.2s ease;
}

.wp-block-query-pagination-numbers .page-numbers:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--wp--preset--color--heading);
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--heading);
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	font-weight: 700;
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: var(--wp--custom--border-radius);
	border: 1px solid rgba(75, 57, 24, 0.15);
	transition: all 0.2s ease;
}

.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
}

/* ================================================================
   SINGLE PRODUCT PAGE
   Gallery, summary, tabs, and related products layout.
   ================================================================ */

/* Gallery image rounding */
.larder-single-product .larder-product-gallery img {
	border-radius: var(--wp--custom--border-radius);
}

.larder-single-product .larder-product-gallery .woocommerce-product-gallery__image img {
	border-radius: var(--wp--custom--border-radius);
}

/* Hide WooCommerce lightbox/zoom icon */
.larder-single-product .woocommerce-product-gallery__trigger,
.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-large-image__trigger {
	display: none !important;
}

/* Breadcrumbs refinement */
.larder-breadcrumbs,
.woocommerce-breadcrumb {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.larder-breadcrumbs a,
.woocommerce-breadcrumb a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.larder-breadcrumbs a:hover,
.woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

/* Summary: tighter vertical rhythm between children */
.larder-single-product .larder-product-details > * {
	margin-top: 0;
	margin-bottom: 1rem;
}

.larder-single-product .larder-product-details > *:last-child {
	margin-bottom: 0;
}

/* Quantity + add-to-cart form (block-based) */
.larder-single-product .wc-block-add-to-cart-form {
	margin-bottom: 1rem !important;
}

.larder-single-product .wc-block-add-to-cart-form .wc-block-components-product-add-to-cart {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 0.75rem !important;
	flex-wrap: wrap;
}

.larder-single-product .wc-block-add-to-cart-form .wc-block-components-quantity-selector {
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	height: 3rem;
}

.larder-single-product .wc-block-add-to-cart-form .wc-block-components-quantity-selector input {
	width: 3rem;
	text-align: center;
	font-weight: 600;
	border: none;
	height: 100%;
	padding: 0;
	font-size: 1rem;
}

.larder-single-product .wc-block-add-to-cart-form .wc-block-components-quantity-selector button {
	background: transparent;
	border: none;
	padding: 0.5rem 0.625rem;
	color: var(--wp--preset--color--heading);
	height: 100%;
}

.larder-single-product .wc-block-add-to-cart-form .wc-block-components-quantity-selector button:hover {
	background: rgba(75, 57, 24, 0.06);
}

.larder-single-product .wc-block-add-to-cart-form .wp-element-button,
.larder-single-product .wc-block-add-to-cart-form .wc-block-components-product-add-to-cart-button {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.75rem 2rem;
	font-size: 0.9375rem;
	height: 3rem;
	display: inline-flex;
	align-items: center;
}

/* Classic form.cart fallback — qty + button on same line */
.larder-single-product form.cart,
.larder-single-product .larder-product-details form.cart {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 0.75rem !important;
	flex-wrap: wrap;
}

.larder-single-product form.cart > br {
	display: none;
}

.larder-single-product form.cart .wc-points-rewards-product-message {
	flex: 0 0 100%;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.25rem;
}

.larder-single-product form.cart .quantity {
	margin-right: 0;
	margin-bottom: 0;
}

.larder-single-product form.cart .quantity .qty {
	width: 4rem;
	height: 3rem;
	text-align: center;
	padding: 0.5rem;
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	font-size: 1rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--body);
	-moz-appearance: textfield;
}

.larder-single-product form.cart .quantity .qty::-webkit-inner-spin-button,
.larder-single-product form.cart .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.larder-single-product form.cart .single_add_to_cart_button {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.75rem 2rem;
	height: 3rem;
	display: inline-flex;
	align-items: center;
	font-size: 0.9375rem;
}

/* Product meta (SKU, category, tags) */
.larder-product-meta {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}

.larder-product-meta a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.larder-product-meta a:hover {
	text-decoration: underline;
}

/* Review form */
.larder-single-product .comment-respond {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid rgba(75, 57, 24, 0.1);
	border-radius: var(--wp--custom--border-radius);
	padding: 1.5rem;
	margin-top: 1.5rem;
}

.larder-single-product .comment-respond label {
	font-weight: 600;
	font-size: 0.875rem;
	display: block;
	margin-bottom: 0.375rem;
}

.larder-single-product .comment-respond input[type="text"],
.larder-single-product .comment-respond input[type="email"],
.larder-single-product .comment-respond textarea {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	transition: border-color 0.2s ease;
}

.larder-single-product .comment-respond input:focus,
.larder-single-product .comment-respond textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 2px rgba(192, 87, 52, 0.15);
}

.larder-single-product .comment-respond .form-submit input[type="submit"] {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.875rem 2rem;
	cursor: pointer;
}

/* Tabs — constrain to content width, override alignwide */
.larder-product-tabs.alignwide {
	max-width: var(--wp--style--global--content-size) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.larder-product-tabs,
.wc-tabs-wrapper,
.woocommerce-tabs {
	border: 1px solid rgba(75, 57, 24, 0.12);
	border-radius: var(--wp--custom--border-radius);
	overflow: hidden;
	background-color: #fff;
}

.larder-product-tabs .wc-tab,
.wc-tabs-wrapper .wc-tab,
.woocommerce-tabs .woocommerce-Tabs-panel,
.woocommerce-tabs .panel {
	padding: 1.75rem 2rem !important;
	background: #fff;
}

/* Hide the first heading inside ALL tab panels — the tab label already says it */
.larder-product-tabs .wc-tab > h2:first-child,
.wc-tabs-wrapper .wc-tab > h2:first-child,
.woocommerce-tabs .woocommerce-Tabs-panel > h2:first-child,
.woocommerce-tabs .panel > h2:first-child,
.woocommerce-tabs #tab-description > h2:first-child,
.woocommerce-tabs #tab-reviews > h2:first-child,
.woocommerce-tabs #tab-additional_information > h2:first-child,
.woocommerce-tabs [id^="tab-"] > h2:first-child,
.woocommerce-Tabs-panel > h2:first-child,
#reviews > #comments > h2:first-child,
.woocommerce-Reviews-title {
	display: none !important;
}

/* Kill all WooCommerce tab pseudo-elements */
.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after,
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after,
.wc-tabs::before,
.wc-tabs::after,
.wc-tabs li::before,
.wc-tabs li::after {
	display: none !important;
	content: none !important;
}

.wc-tabs,
.woocommerce-tabs ul.tabs {
	list-style: none !important;
	display: flex !important;
	padding: 0 !important;
	margin: 0 !important;
	border-bottom: 1px solid rgba(75, 57, 24, 0.12) !important;
	background: var(--wp--preset--color--surface) !important;
	gap: 0 !important;
	position: relative !important;
}

.wc-tabs li,
.woocommerce-tabs ul.tabs li {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	position: static !important;
}

.wc-tabs li a,
.woocommerce-tabs ul.tabs li a {
	display: block !important;
	padding: 0.9375rem 1.75rem !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	color: var(--wp--preset--color--muted) !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	border: none !important;
	border-bottom: 3px solid transparent !important;
	margin-bottom: -1px !important;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
	background: transparent !important;
	position: relative !important;
}

.wc-tabs li a:hover,
.woocommerce-tabs ul.tabs li a:hover {
	color: var(--wp--preset--color--heading) !important;
	background: rgba(249, 244, 238, 0.8) !important;
}

.wc-tabs li.active a,
.woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--heading) !important;
	border-bottom-color: var(--wp--preset--color--primary) !important;
	background: #fff !important;
}

/* Gallery thumbnail wrapper — needs position for nav arrows */
.larder-single-product .larder-product-gallery {
	position: relative;
}

/* Gallery thumbnails */
.larder-single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: flex !important;
	gap: 0.625rem !important;
	list-style: none !important;
	padding: 0 0 4px !important;
	margin: 1rem 0 0 !important;
	overflow-x: auto !important;
	overflow-y: visible !important;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.larder-single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

.larder-single-product .woocommerce-product-gallery .flex-control-thumbs li {
	flex: 0 0 80px !important;
	width: 80px !important;
	height: 80px !important;
	overflow: visible !important;
}

.larder-single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	width: 80px !important;
	height: 80px !important;
	object-fit: cover !important;
	box-sizing: border-box !important;
	border-radius: 3px;
	border: 2px solid transparent;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.larder-single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
.larder-single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	opacity: 1;
	border-color: var(--wp--preset--color--primary);
}

/* Thumbnail scroll arrows — positioned on the thumbnail row */
.larder-thumb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(75, 57, 24, 0.15);
	color: var(--wp--preset--color--heading);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	line-height: 1;
	z-index: 2;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.larder-thumb-nav:hover {
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.larder-thumb-nav--prev {
	left: 4px;
}

.larder-thumb-nav--next {
	right: 4px;
}

.is-hovered .larder-thumb-nav.is-visible {
	display: flex;
}

/* WooCommerce block gallery thumbnails */
.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-thumbnails {
	display: flex;
	gap: 0.625rem;
	margin-top: 1rem !important;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-thumbnails::-webkit-scrollbar {
	display: none;
}

.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-thumbnails img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 3px;
	border: 2px solid transparent;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-thumbnails img:hover,
.larder-single-product .wp-block-woocommerce-product-image-gallery .wc-block-woocommerce-product-gallery-thumbnails img.is-active {
	opacity: 1;
	border-color: var(--wp--preset--color--primary);
}

/* Stock status */
.larder-single-product .stock {
	font-size: 0.875rem;
	font-weight: 600;
}

.larder-single-product .in-stock {
	color: #3a7d44;
}

.larder-single-product .out-of-stock {
	color: var(--wp--preset--color--primary);
}

/* ================================================================
   WOOCOMMERCE PRODUCT DETAILS (block-based)
   Tab heading font override — theme.json cannot target
   WooCommerce's proprietary component class.
   ================================================================ */

.wc-block-components-product-details .wc-block-components-product-details__tab {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

/* ================================================================
   CART & CHECKOUT
   Quantity selector radius and place-order button typography.
   ================================================================ */

.wc-block-cart .wc-block-components-quantity-selector,
.wc-block-checkout .wc-block-components-quantity-selector {
	border-radius: var(--wp--custom--border-radius);
}

.wc-block-cart .wp-element-button.wc-block-components-checkout-place-order-button,
.wc-block-checkout .wp-element-button.wc-block-components-checkout-place-order-button {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ================================================================
   BLOG ARCHIVE & SINGLE POST
   Post entry cards, sidebar widget styling, author box,
   comment section, and content typography.
   ================================================================ */

/* Post entry cards in archive */
.larder-post-entry {
	margin-bottom: var(--wp--preset--spacing--40);
}

.larder-post-entry .wp-block-post-featured-image img {
	border-radius: var(--wp--custom--border-radius);
	transition: opacity 0.2s ease;
}

.larder-post-entry .wp-block-post-featured-image a:hover img {
	opacity: 0.9;
}

.larder-post-entry .wp-block-post-date {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

.larder-post-entry .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--heading);
}

.larder-post-entry .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.larder-post-entry .wp-block-post-excerpt__more-text a,
.larder-post-entry .wp-block-post-excerpt__more-link {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.larder-post-entry .wp-block-post-excerpt__more-text a:hover,
.larder-post-entry .wp-block-post-excerpt__more-link:hover {
	color: var(--wp--preset--color--heading);
}

/* Single post meta (categories, tags) */
.larder-main-content .wp-block-post-terms a {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

.larder-main-content .wp-block-post-terms a:hover {
	text-decoration: underline;
}

/* Post navigation (prev/next) */
.larder-post-nav {
	gap: 1.5rem;
}

.larder-post-nav .wp-block-post-navigation-link {
	flex: 1;
	min-width: 0;
}

.larder-post-nav .wp-block-post-navigation-link a {
	text-decoration: none;
	color: var(--wp--preset--color--heading);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	line-height: 1.4;
}

.larder-post-nav .wp-block-post-navigation-link a:hover {
	color: var(--wp--preset--color--primary);
}

.larder-post-nav .wp-block-post-navigation-link .wp-block-post-navigation-link__label {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.6875rem;
	color: var(--wp--preset--color--muted);
}

.larder-post-nav .wp-block-post-navigation-link .wp-block-post-navigation-link__title {
	font-weight: 600;
	font-size: 0.9375rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.larder-post-nav .wp-block-post-navigation-link--next {
	text-align: right;
}

.larder-post-nav .wp-block-post-navigation-link--next a {
	align-items: flex-end;
}

/* Comments section */
.larder-main-content .wp-block-comments {
	border-top: 1px solid rgba(75, 57, 24, 0.1);
	padding-top: var(--wp--preset--spacing--40);
}

.larder-main-content .wp-block-comment-author-name {
	font-weight: 700;
}

.larder-main-content .wp-block-comment-date {
	color: var(--wp--preset--color--muted);
}

.larder-main-content .wp-block-post-comments-form textarea,
.larder-main-content .wp-block-post-comments-form input[type="text"],
.larder-main-content .wp-block-post-comments-form input[type="email"],
.larder-main-content .wp-block-post-comments-form input[type="url"] {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
}

.larder-main-content .wp-block-post-comments-form input:focus,
.larder-main-content .wp-block-post-comments-form textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 2px rgba(192, 87, 52, 0.15);
}

/* Sidebar refinements */
.larder-sidebar-area {
	position: relative;
}

.larder-sidebar {
	position: sticky;
	top: 2rem;
}

.larder-sidebar .wp-block-group {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--border-radius);
	padding: 1.25rem;
}

.larder-sidebar .wp-block-latest-posts__list {
	padding-left: 0;
}

.larder-sidebar .wp-block-latest-posts__list li {
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(75, 57, 24, 0.06);
}

.larder-sidebar .wp-block-latest-posts__list li:last-child {
	border-bottom: none;
}

.larder-sidebar .wp-block-latest-posts__post-date {
	display: block;
	margin-top: 0.25rem;
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
}

.larder-sidebar .wp-block-categories-list {
	padding-left: 0;
	list-style: none;
}

.larder-sidebar .wp-block-categories-list li {
	padding: 0.375rem 0;
}

.larder-sidebar .wp-block-tag-cloud a {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	margin: 0.125rem;
	border: 1px solid rgba(75, 57, 24, 0.15);
	border-radius: var(--wp--custom--border-radius);
	text-decoration: none;
	font-size: 0.8125rem !important;
	color: var(--wp--preset--color--foreground);
	transition: all 0.2s ease;
}

.larder-sidebar .wp-block-tag-cloud a:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
}

.larder-sidebar .wp-block-search__inside-wrapper {
	border: 1px solid rgba(75, 57, 24, 0.2);
	border-radius: var(--wp--custom--border-radius);
	overflow: hidden;
}

.larder-sidebar .wp-block-search__input {
	border: none;
	padding: 0.625rem;
}

/* Single post content — proper list and blockquote styling */
.larder-content-area .wp-block-post-content ul,
.larder-content-area .wp-block-post-content ol {
	padding-left: 1.5em;
}

.larder-content-area .wp-block-post-content blockquote,
.larder-content-area .wp-block-quote {
	border-left: 4px solid var(--wp--preset--color--primary);
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	background-color: rgba(249, 244, 238, 0.5);
	border-radius: 0 var(--wp--custom--border-radius) var(--wp--custom--border-radius) 0;
}

.larder-content-area .wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	font-style: normal;
}

.larder-content-area .wp-block-post-content pre,
.larder-content-area .wp-block-code {
	background-color: var(--wp--preset--color--heading);
	color: var(--wp--preset--color--background);
	padding: 1.25rem;
	border-radius: var(--wp--custom--border-radius);
	font-size: 0.875rem;
	overflow-x: auto;
}

/* ================================================================
   ACCESSIBILITY
   Skip link, focus ring, screen-reader text, and reduced motion.
   ================================================================ */

/* Skip-to-content link — visible on focus for keyboard users */
.skip-link,
a.skip-link {
	position: fixed;
	top: -100%;
	left: 1rem;
	z-index: 999999;
	background-color: var(--wp--preset--color--heading);
	color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
	font-weight: 700;
	padding: 0.75rem 1.5rem;
	border-radius: 0 0 var(--wp--custom--border-radius) var(--wp--custom--border-radius);
	text-decoration: none;
	transition: top 0.15s ease;
}

.skip-link:focus,
a.skip-link:focus {
	top: 0;
	outline: none;
}

*:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

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

/* Reduced motion — disable animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.larder-product-image-wrap:hover img {
		transform: none;
	}

	.larder-category-grid .wc-block-product-categories-list-item:hover > a::after,
	.larder-category-grid .wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item__name {
		transition: none;
	}
}

/* High contrast mode support */
@media (forced-colors: active) {
	.wp-element-button,
	.wc-block-components-button,
	.wp-block-button__link {
		border: 1px solid ButtonText;
	}

	*:focus-visible {
		outline: 2px solid Highlight;
	}
}

/* ================================================================
   SEARCH OVERLAY
   The WordPress search block expands inline by default which breaks
   the header layout. We hide the inline expansion and instead show
   a full-screen search modal triggered by JS.
   ================================================================ */

.larder-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(75, 57, 24, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.larder-search-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.larder-search-overlay__inner {
	width: 90%;
	max-width: 600px;
	text-align: center;
}

.larder-search-overlay__field {
	width: 100%;
	padding: 1rem 0;
	font-size: 1.5rem;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--wp--preset--color--surface);
	background: transparent;
	border: none;
	border-bottom: 2px solid rgba(255, 255, 255, 0.3);
	outline: none;
	text-align: center;
}

.larder-search-overlay__field::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.larder-search-overlay__field:focus {
	border-bottom-color: var(--wp--preset--color--primary);
}

.larder-search-overlay__close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	color: var(--wp--preset--color--surface);
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.larder-search-overlay__close:hover {
	color: var(--wp--preset--color--primary);
}

/* Keep the search icon visible but prevent the input from expanding inline */
.larder-header-search .wp-block-search__input {
	display: none !important;
}

.larder-header-search .wp-block-search__inside-wrapper {
	border: none !important;
	background: none !important;
	padding: 0 !important;
	min-width: 0 !important;
	width: auto !important;
}

.larder-header-search.wp-block-search__searchfield-visible .wp-block-search__inside-wrapper {
	width: auto !important;
}

.larder-header-search.wp-block-search__searchfield-visible .wp-block-search__input {
	display: none !important;
}

/* ================================================================
   MOBILE NAVIGATION OVERLAY
   Full-screen slide-in from right with accordion sub-menus.
   WordPress block nav uses .wp-block-navigation__responsive-container
   with .is-menu-open (added dynamically by Interactivity API).
   ================================================================ */

.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--surface) !important;
	padding: 0 !important;
}

/* Scrollable content area */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding: 5rem 1.5rem 2rem;
	display: flex;
	flex-direction: column;
	gap: 0;
	align-items: stretch;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	max-height: 100vh;
	max-height: 100dvh;
}

/* Override WP's centered alignment in overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch !important;
}

/* Top-level menu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	border-bottom: 1px solid rgba(75, 57, 24, 0.08);
	align-items: stretch !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
	border-bottom: none;
}

/* Items with sub-menus: row layout so link + chevron share a line */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu.has-child {
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
}

/* Menu item links */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 0.875rem 0 !important;
	font-size: 1.0625rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	color: var(--wp--preset--color--heading) !important;
	text-decoration: none !important;
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	background: none !important;
	border: none !important;
	transition: color 0.2s ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--primary) !important;
}

/* Submenu toggle — large touch target on right side */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 48px;
	flex-shrink: 0;
	background: none !important;
	border: none !important;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	color: var(--wp--preset--color--heading) !important;
	transition: color 0.2s ease, background-color 0.2s ease;
	border-radius: 50%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle:focus {
	color: var(--wp--preset--color--primary) !important;
	background-color: rgba(238, 105, 72, 0.06) !important;
}

/* Chevron SVG icon */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
	width: 12px !important;
	height: 12px !important;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-navigation__responsive-container.is-menu-open [aria-expanded="true"] > .wp-block-navigation__submenu-icon {
	transform: rotate(180deg);
}

/* Sub-menu container — hidden by default, WP Interactivity API toggles via aria-expanded */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 0 0.5rem 1rem !important;
	position: static !important;
	width: 100% !important;
	flex-basis: 100% !important;
	min-width: 0 !important;
	background: transparent !important;
	display: none !important;
	flex-direction: column !important;
	align-items: stretch !important;
	overflow: hidden;
}

/* Show sub-menu when WP sets aria-expanded="true" on the toggle */
.wp-block-navigation__responsive-container.is-menu-open [aria-expanded="true"] + .wp-block-navigation__submenu-container,
.wp-block-navigation__responsive-container.is-menu-open [aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	display: flex !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container::before {
	display: none !important;
}

/* Sub-menu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border-bottom: none;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
	font-size: 0.9375rem !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	padding: 0.5rem 0.75rem !important;
	color: var(--wp--preset--color--foreground) !important;
	display: flex;
	align-items: center;
	border-radius: 6px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--primary) !important;
	background-color: rgba(238, 105, 72, 0.06);
}

/* Nested sub-menus (3rd level+) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
	padding-left: 0.75rem !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: var(--wp--preset--color--muted) !important;
	padding: 0.375rem 0.75rem !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* Close button — clean X in top-right */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none !important;
	border: none !important;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
	z-index: 10;
	color: var(--wp--preset--color--heading);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:focus {
	color: var(--wp--preset--color--primary) !important;
	background-color: rgba(238, 105, 72, 0.06) !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

/* Hamburger button */
.wp-block-navigation__responsive-container-open {
	border: none !important;
	background: none !important;
	padding: 0.5rem;
}

.wp-block-navigation__responsive-container-open svg {
	width: 26px;
	height: 26px;
	color: var(--wp--preset--color--heading);
}

/* ================================================================
   RESPONSIVE
   Layout adjustments for smaller screens.
   ================================================================ */

@media (max-width: 781px) {
	.larder-content-sidebar {
		flex-direction: column;
	}

	.larder-content-sidebar .larder-content-area,
	.larder-content-sidebar .larder-sidebar-area {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.larder-header-row {
		flex-wrap: nowrap;
		gap: 0.5em;
	}

	.larder-category-grid .wc-block-product-categories-list {
		grid-template-columns: repeat(2, 1fr);
	}

	.larder-category-grid .wc-block-product-categories-list-item img {
		height: 240px;
	}
}

@media (max-width: 599px) {
	.wp-block-columns {
		flex-wrap: wrap;
	}

	.wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.larder-category-grid .wc-block-product-categories-list {
		grid-template-columns: 1fr;
	}

	.larder-category-grid .wc-block-product-categories-list-item img {
		height: 200px;
	}

	.larder-x-decoration {
		height: 60px;
	}

	.larder-x-decoration::after {
		width: 60px;
		height: 60px;
	}
}

/* Block styles */
.is-style-larder-card {
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--border, #e0d5c7);
	border-radius: var(--wp--custom--border-radius, 6px);
	padding: var(--wp--preset--spacing--40, 1.5rem);
}

.is-style-larder-ornament {
	border: none !important;
	position: relative;
	height: 2px;
	background: var(--wp--preset--color--border, #e0d5c7);
}

.is-style-larder-rounded img {
	border-radius: var(--wp--custom--border-radius, 6px);
}

/* =============================================
   WooCommerce My Account
   ============================================= */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid rgba(75, 57, 24, 0.08);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
	border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 0.5em 0 !important;
	margin: 0 !important;
	color: var(--wp--preset--color--primary) !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 0.9375rem;
	transition: color 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	color: var(--wp--preset--color--heading) !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	font-weight: 800;
}

/* Account tables (orders, downloads, subscriptions) */
.woocommerce-account table.woocommerce-orders-table,
.woocommerce-account table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.woocommerce-account table.shop_table thead th {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--heading);
	font-weight: 800;
	text-transform: uppercase;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	padding: 0.875em 1em;
	text-align: left;
	border-bottom: 2px solid rgba(75, 57, 24, 0.12);
}

.woocommerce-account table.shop_table td {
	padding: 1em;
	border-bottom: 1px solid rgba(75, 57, 24, 0.08);
	vertical-align: middle;
}

.woocommerce-account table.shop_table tbody tr:hover {
	background-color: rgba(249, 244, 238, 0.5);
}

/* View / action buttons in tables */
.woocommerce-account table.shop_table .woocommerce-button,
.woocommerce-account table.shop_table .button,
.woocommerce-account .woocommerce-pagination .woocommerce-button,
.woocommerce-account .woocommerce-pagination .button {
	display: inline-block !important;
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--surface) !important;
	border: none !important;
	border-radius: var(--wp--custom--border-radius, 6px) !important;
	padding: 0.4em 1em !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	line-height: 1.4 !important;
	min-height: auto !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.woocommerce-account table.shop_table .woocommerce-button:hover,
.woocommerce-account table.shop_table .button:hover,
.woocommerce-account .woocommerce-pagination .woocommerce-button:hover,
.woocommerce-account .woocommerce-pagination .button:hover {
	background-color: var(--wp--preset--color--heading) !important;
}

/* Links inside account tables */
.woocommerce-account table.shop_table a:not(.woocommerce-button):not(.button) {
	text-decoration: none !important;
}

/* Order details page */
.woocommerce-account .woocommerce-order-details .shop_table tfoot th {
	font-weight: 700;
	text-align: left;
	padding: 0.75em 1em;
	border-bottom: 1px solid rgba(75, 57, 24, 0.08);
}

.woocommerce-account .woocommerce-order-details .shop_table tfoot td {
	padding: 0.75em 1em;
}

/* Customer addresses */
.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--border-radius, 6px);
	padding: 1.5em;
	margin-bottom: 1.5em;
}

.woocommerce-account .woocommerce-column--billing-address address,
.woocommerce-account .woocommerce-column--shipping-address address {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--border-radius, 6px);
	padding: 1.5em;
	font-style: normal;
	line-height: 1.8;
}

/* Account forms (edit address, edit account, login) */
.woocommerce-account .woocommerce-EditAccountForm .woocommerce-Button,
.woocommerce-account .woocommerce-address-fields .button,
.woocommerce-account .woocommerce-form-login .woocommerce-button {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--surface) !important;
	border: none !important;
	border-radius: var(--wp--custom--border-radius, 6px) !important;
	padding: 0.75em 2em !important;
	font-size: 0.875rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.woocommerce-account .woocommerce-EditAccountForm .woocommerce-Button:hover,
.woocommerce-account .woocommerce-address-fields .button:hover,
.woocommerce-account .woocommerce-form-login .woocommerce-button:hover {
	background-color: var(--wp--preset--color--heading) !important;
}
