/**
 * Pahl's Market Store Customizations — front-end styles.
 *
 * Colours are set as custom properties so the theme or a child theme can override the
 * palette without touching this file.
 */

.pahls-ai {
	--pahls-ink: #2f6b3a;
	--pahls-muted: #5d6b60;
	--pahls-line: #dfe5e0;
	--pahls-pill-bg: #f6f9f6;
}

.pahls-ai-svg {
	flex: 0 0 auto;
	color: var(--pahls-ink);
}

.pahls-ai-label {
	display: block;
	font-size: 0.72em;
	color: var(--pahls-muted);
	line-height: 1.25;
}

.pahls-ai-value {
	display: block;
	line-height: 1.3;
}

.pahls-ai-lines {
	min-width: 0;
}

/* Exposure ramp: warm for sun, cool for shade, so the four states read as a scale. */
.pahls-ai .is-sun .pahls-ai-svg {
	color: #d39b16;
}

.pahls-ai .is-sun-light-shade .pahls-ai-svg {
	color: #b8842a;
}

.pahls-ai .is-light-shade .pahls-ai-svg {
	color: #5f8f57;
}

.pahls-ai .is-shade .pahls-ai-svg {
	color: #3d6b4a;
}

/* --- Colour swatches --- */

.pahls-ai-swatches {
	display: inline-flex;
	gap: 3px;
}

.pahls-ai-swatch {
	display: inline-block;
	flex: 0 0 auto;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.18);
}

/* --- Archive card badge --- */

.pahls-ai--badge {
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex-wrap: wrap;
	margin: 0.35em 0 0.1em;
}

.pahls-ai--badge .pahls-ai-exp {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-size: 0.82em;
	color: var(--pahls-muted);
}

/* --- Quick facts strip --- */

.pahls-ai--facts {
	margin: 1em 0 1.25em;
}

.pahls-ai-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.7em 1.1em;
	padding: 0.95em 0;
	border-top: 1px solid var(--pahls-line);
	border-bottom: 1px solid var(--pahls-line);
}

.pahls-ai-grid .pahls-ai-chip {
	display: flex;
	align-items: center;
	gap: 0.55em;
	font-size: 0.92em;
}

/* --- Feature pills --- */

.pahls-ai-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.85em;
}

.pahls-ai-feature {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.84em;
	color: var(--pahls-muted);
	background: var(--pahls-pill-bg);
	border: 1px solid var(--pahls-line);
	border-radius: 999px;
	padding: 0.35em 0.85em 0.35em 0.6em;
}

.pahls-ai-feature .pahls-ai-value {
	display: inline;
}

/* --- Category link row --- */

.pahls-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.pahls-nav__item a {
	display: inline-block;
	padding: 6px 13px;
	border: 1px solid #dfe5e0;
	border-radius: 999px;
	font-size: 0.88em;
	text-decoration: none;
	color: #4a5a4e;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pahls-nav__item a:hover,
.pahls-nav__item a:focus-visible {
	background: #f0f5f0;
	border-color: #b9ccbd;
	color: #2f6b3a;
}

.pahls-nav__item.is-current a {
	background: #2f6b3a;
	border-color: #2f6b3a;
	color: #fff;
}

.pahls-nav__count {
	opacity: 0.65;
	font-size: 0.9em;
}

/* --- Garden list --- */

.pahls-list-actions {
	margin: 1.5em 0;
}

.pahls-list-note {
	font-size: 0.86em;
	color: #5d6b60;
	margin: 0.6em 0 0;
	max-width: 46em;
}

/* The print header only appears on paper. */
.pahls-print-header {
	display: none;
}

@media (max-width: 600px) {
	.pahls-ai-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.6em 0.8em;
	}

	.pahls-ai-grid .pahls-ai-chip {
		font-size: 0.85em;
	}
}

/* --- Size label on archive card badges --- */

.pahls-ai-size {
	margin-left: auto;
	font-size: 0.76em;
	color: var(--pahls-muted);
	white-space: nowrap;
	opacity: 0.85;
}

/* Swatches get a pointer cursor so the tooltip is discoverable. */
.pahls-ai-swatch[title] {
	cursor: help;
}

/* --- Botanical name --- */

.pahls-ai--botanical {
	margin: -0.35em 0 0.6em;
}

.pahls-ai-botanical {
	font-size: 0.88em;
	color: var(--pahls-muted);
	letter-spacing: 0.01em;
}

/* --- Sparse facts: one fact, no pills. Drop the box. --- */

.pahls-ai--sparse {
	margin: 0.5em 0 1em;
}

.pahls-ai--sparse .pahls-ai-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.4em;
	padding: 0;
	border: 0;
}

/* =========================================================================
 * Garden list button (TI WooCommerce Wishlist)
 * =========================================================================
 * Two states, because the primary action differs:
 *
 *   Purchasable    Add To Cart is primary, the list is an outlined secondary button.
 *   Not purchasable  Most plants, most of the year — "Coming soon" means there is no
 *                    Add To Cart at all, so the list IS the primary action and gets the
 *                    solid treatment. This is the foot-traffic path.
 *
 * Driven entirely by WooCommerce's own outofstock class on the product wrapper.
 */

.woocommerce div.product .tinvwl_add_to_wishlist_button,
.woocommerce div.product .tinv-wraper .tinvwl_add_to_wishlist_button {
	display: inline-flex !important;
	align-items: center;
	gap: 0.45em;
	padding: 0.7em 1.3em;
	border: 1.5px solid #2f6b3a;
	border-radius: 4px;
	background: transparent;
	color: #2f6b3a;
	font-size: 0.95em;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce div.product .tinvwl_add_to_wishlist_button:hover,
.woocommerce div.product .tinvwl_add_to_wishlist_button:focus-visible {
	background: #2f6b3a;
	color: #fff;
}

/* Sits alongside Add To Cart rather than under it. */
.woocommerce div.product form.cart .tinv-wraper,
.woocommerce div.product .tinv-wraper {
	display: inline-block;
	vertical-align: middle;
	margin-left: 0.6em;
}

/* 3.13.2: the wishlist plugin puts 15px above its button, which dropped it below the
 * quantity box and Add To Cart. In the row it shares with them it gets none. */
.woocommerce div.product form.cart .tinv-wraper .tinvwl_add_to_wishlist_button {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* No Add To Cart on the page — the list is the primary action. */
.woocommerce div.product.outofstock .tinvwl_add_to_wishlist_button,
.woocommerce div.product.outofstock .tinv-wraper .tinvwl_add_to_wishlist_button {
	background: #2f6b3a;
	color: #fff;
	padding: 0.85em 1.6em;
	font-size: 1em;
}

.woocommerce div.product.outofstock .tinvwl_add_to_wishlist_button:hover,
.woocommerce div.product.outofstock .tinvwl_add_to_wishlist_button:focus-visible {
	background: #24522c;
	color: #fff;
}

.woocommerce div.product.outofstock .tinv-wraper {
	display: block;
	margin: 1em 0 0.5em;
}

/* Keep archive cards as a text link: a grid of twelve solid buttons is noise. */
.woocommerce ul.products .tinvwl_add_to_wishlist_button,
.wc-block-product-template .tinvwl_add_to_wishlist_button {
	border: 0 !important;
	background: transparent !important;
	padding: 0.2em 0 !important;
	color: #2f6b3a !important;
	font-weight: 400;
}

/* =========================================================================
 * Product meta line: SKU / category / brand
 * =========================================================================
 * Selectors are deliberately NOT scoped under .woocommerce div.product — block templates
 * frequently do not output that wrapper, which is why an earlier scoped version silently
 * did nothing.
 *
 * Order by usefulness:
 *   1  Categories  lateral navigation, and the most useful of the three
 *   2  Brand       matters for Proven Winners / Knock Out, not for supplier names
 *   3  SKU         the web-to-store bridge, wanted but quiet
 */

.product_meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.55em;
	margin-top: 1.5em;
	padding-top: 1.1em;
	border-top: 1px solid #e6ebe7;
	font-size: 0.9em;
	color: #5d6b60;
}

.product_meta > span,
.product_meta > .sku_wrapper,
.product_meta > .posted_in {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35em;
	width: 100%;
	margin: 0;
	float: none;
	clear: both;
}

/* The theme prefixes each item with a folder glyph. They add nothing and they were
   orphaning onto their own line on mobile. */
.product_meta > span > svg,
.product_meta > span > i,
.product_meta > span > .dashicons,
.product_meta > span::before {
	display: none !important;
}

.product_meta .posted_in { order: 1; }
.product_meta .tagged_as,
.product_meta .posted_in_brand,
.product_meta .brand_wrapper,
.product_meta .posted_in_product_brand { order: 2; }
.product_meta .sku_wrapper { order: 3; }

/* Labels: quiet, consistent, no shouting caps. */
.product_meta .posted_in,
.product_meta .sku_wrapper,
.product_meta .tagged_as {
	text-transform: none;
	letter-spacing: 0;
}

/* Categories as browsable chips. */
.product_meta .posted_in a {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid #dfe5e0;
	border-radius: 999px;
	color: #2f6b3a;
	text-decoration: none;
	font-size: 0.95em;
	line-height: 1.5;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.product_meta .posted_in a:hover,
.product_meta .posted_in a:focus-visible {
	background: #f0f5f0;
	border-color: #b9ccbd;
}

/* SKU: quiet, monospaced so it can be read aloud or typed without transcription errors. */
.product_meta .sku_wrapper {
	font-size: 0.86em;
	color: #93a096;
}

.product_meta .sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.02em;
}

/* Brand hidden by setting. */
.pahls-hide-brand .product_meta .posted_in_brand,
.pahls-hide-brand .product_meta .brand_wrapper,
.pahls-hide-brand .product_meta .posted_in_product_brand,
.pahls-hide-brand .product_meta .wc-brands-brand {
	display: none !important;
}

/* =========================================================================
 * Buttons and quantity
 * =========================================================================
 * Both buttons get identical metrics rather than styling ours to guess at the theme's.
 * 48px minimum height is the touch-target floor; 16px font on the quantity input is what
 * stops iOS zooming the page when it is focused.
 */

.woocommerce div.product form.cart,
div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 0.6em;
}

form.cart .single_add_to_cart_button,
.tinvwl_add_to_wishlist_button,
div.product .tinv-wraper .tinvwl_add_to_wishlist_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0.85em 1.7em;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	box-sizing: border-box;
}

/* Primary */
form.cart .single_add_to_cart_button {
	border: 1.5px solid transparent;
}

/* Secondary: outlined, same box */
.tinvwl_add_to_wishlist_button,
div.product .tinv-wraper .tinvwl_add_to_wishlist_button {
	border: 1.5px solid #2f6b3a;
	background: transparent;
	color: #2f6b3a;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tinvwl_add_to_wishlist_button:hover,
.tinvwl_add_to_wishlist_button:focus-visible {
	background: #2f6b3a;
	color: #fff;
}

/* No Add To Cart on the page — the list becomes the primary action. */
.product.outofstock .tinvwl_add_to_wishlist_button {
	background: #2f6b3a;
	color: #fff;
}

.product.outofstock .tinvwl_add_to_wishlist_button:hover,
.product.outofstock .tinvwl_add_to_wishlist_button:focus-visible {
	background: #24522c;
}

div.product .tinv-wraper {
	display: inline-flex;
	margin: 0;
}

/* Quantity: a real stepper, sized for thumbs. */
div.product form.cart .quantity {
	display: inline-flex;
	align-items: stretch;
	min-height: 48px;
	border: 1px solid #ccd6cf;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	margin: 0;
}

div.product form.cart .quantity input.qty {
	width: 3.4rem;
	min-height: 46px;
	padding: 0 0.25em;
	border: 0;
	border-radius: 0;
	text-align: center;
	/* 16px stops iOS zooming the viewport when this is focused. */
	font-size: 16px;
	line-height: 1.2;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

div.product form.cart .quantity .minus,
div.product form.cart .quantity .plus,
div.product form.cart .quantity .qty-minus,
div.product form.cart .quantity .qty-plus,
div.product form.cart .quantity button {
	width: 44px;
	min-height: 46px;
	border: 0;
	background: #f4f7f4;
	color: #2f6b3a;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

div.product form.cart .quantity .minus:hover,
div.product form.cart .quantity .plus:hover,
div.product form.cart .quantity button:hover {
	background: #e6efe7;
}

/* 3.20.0: the theme (PetGrub) adds its own + and - boxes to every quantity box and
 * lays them over the number, absolutely, 24px each. In a 74px box they sit on top of
 * the digit, so the box showed "-  +" and no number. Put them in a row instead:
 * [ - ] 1 [ + ]. The theme's script still does the clicking. */
div.product form.cart .quantity .op-qty-incdec-wrap {
	position: static;
	display: contents;
}

div.product form.cart .quantity .op-btn-qty {
	width: 44px;
	height: auto;
	min-height: 48px;
	margin: 0;
	border: 0;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f7f4;
	color: #2f6b3a;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

div.product form.cart .quantity .op-btn-qty:hover {
	background: #e6efe7;
}

div.product form.cart .quantity .op-btn-qty.q_dec {
	order: 1;
}

div.product form.cart .quantity input.qty {
	order: 2;
	position: static;
	height: auto;
}

div.product form.cart .quantity .op-btn-qty.q_inc {
	order: 3;
}

div.product form.cart .quantity:has(.op-qty-incdec-wrap) {
	width: auto;
	max-width: none;
	height: 50px;
}

@media (max-width: 600px) {
	div.product form.cart {
		gap: 0.5em;
	}

	form.cart .single_add_to_cart_button {
		flex: 1 1 auto;
	}

	div.product .tinv-wraper,
	.tinvwl_add_to_wishlist_button {
		width: 100%;
	}
}

/* =========================================================================
 * Grouped department navigation
 * =========================================================================
 * One structure, two patterns. Tabs above 820px; accordion below, because five groups
 * with icons is roughly 700px of tab bar and a phone is 360px. A sideways-scrolling tab
 * strip was the alternative and it hides groups with nothing to signal they exist.
 *
 * Without JS every panel stays open, so this degrades to a plain grouped list of links.
 */

.pahls-nav__tabs { display: none; }
.pahls-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pahls-nav--flat .pahls-nav__list { margin-bottom: 1.5em; }

.pahls-nav__item a {
	display: inline-block;
	padding: 6px 13px;
	border: 1px solid #dfe5e0;
	border-radius: 999px;
	font-size: 0.88em;
	text-decoration: none;
	color: #4a5a4e;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pahls-nav__item a:hover,
.pahls-nav__item a:focus-visible {
	background: #f0f5f0;
	border-color: #b9ccbd;
	color: #2f6b3a;
}

.pahls-nav__item.is-current a {
	background: #2f6b3a;
	border-color: #2f6b3a;
	color: #fff;
}

.pahls-nav__n { opacity: 0.6; font-size: 0.9em; }

/* --- accordion (default, mobile-first) --- */

.pahls-nav--grouped {
	border: 1px solid #dfe5e0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 1.5em;
}

.pahls-nav__group + .pahls-nav__group { border-top: 1px solid #eef2ef; }

.pahls-nav__acc {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 14px 15px;
	border: 0;
	background: #fff;
	font: inherit;
	font-size: 0.98em;
	color: #24302a;
	text-align: left;
	cursor: pointer;
	min-height: 48px;
}

.pahls-nav__acc:hover { background: #f6f9f6; }
.pahls-nav__acc .pahls-dept-icon { color: #2f6b3a; flex: 0 0 auto; }
.pahls-nav__acc > span { flex: 1; }
.pahls-nav__car { color: #93a096; transition: transform 0.18s ease; flex: 0 0 auto; }
.pahls-nav__group.is-open .pahls-nav__car { transform: rotate(180deg); }

.pahls-nav__panel { padding: 0 15px 15px; }

/* Enhanced: closed groups hide. Unenhanced: everything stays open and readable. */
.pahls-nav--grouped.is-enhanced .pahls-nav__group:not(.is-open) .pahls-nav__panel {
	display: none;
}

/* --- tabs (desktop) --- */

@media (min-width: 821px) {
	.pahls-nav--grouped {
		border: 0;
		border-radius: 0;
		overflow: visible;
	}

	.pahls-nav__tabs {
		display: flex;
		flex-wrap: wrap;
		gap: 4px;
		border-bottom: 2px solid #eef2ef;
	}

	.pahls-nav__tab {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		padding: 12px 18px;
		margin-bottom: -2px;
		border: 0;
		border-bottom: 3px solid transparent;
		border-radius: 8px 8px 0 0;
		background: none;
		font: inherit;
		font-size: 0.95em;
		color: #5d6b60;
		cursor: pointer;
	}

	.pahls-nav__tab:hover { color: #24522c; background: #f0f5f0; }
	.pahls-nav__tab .pahls-dept-icon { color: #2f6b3a; }

	.pahls-nav__tab.is-active {
		color: #24522c;
		font-weight: 600;
		border-bottom-color: #2f6b3a;
	}

	.pahls-nav__acc { display: none; }
	.pahls-nav__group { display: none; }
	.pahls-nav--grouped.is-enhanced .pahls-nav__group.is-active { display: block; }
	.pahls-nav--grouped:not(.is-enhanced) .pahls-nav__group { display: block; }
	.pahls-nav__panel { padding: 16px 0 4px; }
}

/* =========================================================================
 * Shop departments
 * ========================================================================= */

.pahls-ready {
	background: linear-gradient(135deg, #2f6b3a, #3f8149);
	color: #fff;
	border-radius: 14px;
	padding: 20px 22px;
	margin: 0 0 2em;
}

.pahls-ready__title { margin: 0 0 4px; font-size: 1.15em; color: #fff; }
.pahls-ready__sub { margin: 0 0 14px; font-size: 0.9em; opacity: 0.9; }

.pahls-ready__list {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pahls-ready__list a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	text-decoration: none;
	font-size: 0.88em;
}

.pahls-ready__list a:hover { background: rgba(255, 255, 255, 0.26); }
.pahls-ready__list .n { opacity: 0.7; }

.pahls-dept { margin: 0 0 2.2em; }

.pahls-dept__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 12px;
	margin-bottom: 16px;
	border-bottom: 2px solid #f0f5f0;
}

.pahls-dept__head .pahls-dept-icon { color: #2f6b3a; flex: 0 0 auto; }
.pahls-dept__title { margin: 0; font-size: 1.2em; }
.pahls-dept__count { margin-left: auto; font-size: 0.85em; color: #93a096; white-space: nowrap; }

.pahls-dept__grid {
	display: grid;
	grid-template-columns: repeat(var(--pahls-cols, 4), minmax(0, 1fr));
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pahls-cat a {
	display: block;
	border: 1px solid #dfe5e0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	height: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pahls-cat a:hover,
.pahls-cat a:focus-visible {
	border-color: #b9ccbd;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.pahls-cat__img {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eef2ef;
}

.pahls-cat__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pahls-cat__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8efe9, #d8e6db);
}

.pahls-cat__body { display: block; padding: 10px 12px 12px; }
.pahls-cat__name { display: block; font-size: 0.94em; font-weight: 600; line-height: 1.3; }
.pahls-cat__count { display: block; font-size: 0.8em; color: #93a096; margin-top: 2px; }
.pahls-cat__ready { display: block; font-size: 0.76em; color: #2f6b3a; font-weight: 600; margin-top: 5px; }

@media (max-width: 900px) {
	.pahls-dept__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Two per row, not one full-width photo each: seventeen categories goes from roughly
   nine screens of scrolling to about three. */
@media (max-width: 640px) {
	.pahls-dept__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.pahls-dept__title { font-size: 1.05em; }
	.pahls-ready { padding: 16px 18px; }
}

/* =========================================================================
 * Category toolbar
 * ========================================================================= */

.pahls-toolbar { margin: 0 0 1.5em; }

.pahls-toolbar__search {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1.5px solid #dfe5e0;
	border-radius: 10px;
	padding: 4px 4px 4px 14px;
	background: #fff;
	margin: 0 0 1.2em;
}

.pahls-toolbar__search:focus-within {
	border-color: #2f6b3a;
	box-shadow: 0 0 0 3px rgba(47, 107, 58, 0.12);
}

.pahls-toolbar__icon { color: #93a096; flex: 0 0 auto; }

.pahls-toolbar__search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	/* 16px stops iOS zooming the viewport on focus. */
	font-size: 16px;
	padding: 10px 0;
}

.pahls-toolbar__search button {
	flex: 0 0 auto;
	border: 0;
	border-radius: 7px;
	background: #2f6b3a;
	color: #fff;
	padding: 10px 18px;
	font-size: 0.9em;
	font-weight: 500;
	cursor: pointer;
	min-height: 42px;
}

.pahls-toolbar__search button:hover { background: #24522c; }

.pahls-toolbar__typehead {
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #93a096;
	margin: 0 0 8px;
}

.pahls-toolbar__filter {
	width: 100%;
	border: 1px solid #dfe5e0;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 16px;
	margin: 0 0 10px;
	background: #fff;
}

.pahls-toolbar__filter:focus {
	outline: 0;
	border-color: #2f6b3a;
	box-shadow: 0 0 0 3px rgba(47, 107, 58, 0.1);
}

.pahls-toolbar__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pahls-toolbar__item a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #dfe5e0;
	border-radius: 999px;
	font-size: 0.86em;
	text-decoration: none;
	color: #4a5a4e;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pahls-toolbar__item a:hover,
.pahls-toolbar__item a:focus-visible {
	background: #f0f5f0;
	border-color: #b9ccbd;
	color: #2f6b3a;
}

.pahls-toolbar__n { opacity: 0.55; font-size: 0.9em; }

/* Long lists get a capped height rather than pushing the products off the page.
   Typing lifts the cap so a match is never hidden below the fold. */
.pahls-toolbar__types.is-filterable .pahls-toolbar__list {
	max-height: 132px;
	overflow: hidden;
	position: relative;
	mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

.pahls-toolbar__types.is-searching .pahls-toolbar__list {
	max-height: none;
	overflow: visible;
	mask-image: none;
	-webkit-mask-image: none;
}

.pahls-toolbar__empty {
	font-size: 0.88em;
	color: #93a096;
	margin: 10px 0 0;
}

@media (max-width: 600px) {
	.pahls-toolbar__search { padding-left: 12px; }
	.pahls-toolbar__search button { padding: 10px 14px; }
	.pahls-toolbar__types.is-filterable .pahls-toolbar__list { max-height: 110px; }
}

/* =========================================================================
 * Filter rail enhancement
 * =========================================================================
 * Applied to WooCommerce's own filter markup by assets/js/filters.js. Everything here
 * is additive: with JavaScript off the rail is plain chips and still works.
 */

.pahls-chip {
	display: inline-flex !important;
	align-items: center;
	gap: 0.4em;
}

/* The markers themselves are styled inline by filters.js — the theme has rules for spans
   in this position and inline is the only thing that reliably beats them. Nothing here
   should try to size or position them. */

/* --- collapsible sections --- */

.pahls-filter-toggle {
	position: relative;
	cursor: pointer;
	padding-right: 1.4em;
	user-select: none;
}

.pahls-filter-toggle::after {
	content: "";
	position: absolute;
	right: 0.2em;
	top: 50%;
	width: 0.45em;
	height: 0.45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	opacity: 0.5;
	transition: transform 0.18s ease;
}

.pahls-filter-section.is-open > .pahls-filter-toggle::after {
	transform: translateY(-20%) rotate(-135deg);
}

.pahls-filter-toggle:hover::after { opacity: 0.9; }

.pahls-filter-toggle:focus-visible {
	outline: 2px solid #2f6b3a;
	outline-offset: 2px;
}

/* Hide everything in a closed section except its heading. */
.pahls-filter-section:not(.is-open) > *:not(.pahls-filter-toggle) {
	display: none !important;
}

/* Chips must not wrap once an icon or swatch is added — a constrained chip will otherwise
   break the label one letter per line. */
.pahls-chip {
	white-space: nowrap !important;
	width: auto !important;
	max-width: none !important;
	flex: 0 0 auto;
}

.pahls-chip > * { white-space: nowrap; }

/* The element holding a chip's label text, once a marker has been placed inside it.
   Keeps icon and text on one line regardless of what the chip container is doing. */
.pahls-chip-host {
	display: inline-flex !important;
	align-items: center;
	white-space: nowrap !important;
}

/* "All <Department>" leads each panel — filled, so it reads as the destination rather than
   another sibling category. */
.pahls-nav__item--all a {
	background: #2f6b3a;
	border-color: #2f6b3a;
	color: #fff;
	font-weight: 500;
}

.pahls-nav__item--all a:hover,
.pahls-nav__item--all a:focus-visible {
	background: #24522c;
	border-color: #24522c;
	color: #fff;
}

/* =========================================================================
 * Department nav: collapsed behind one line on mobile
 * ========================================================================= */

.pahls-nav__summary { display: none; }

@media (max-width: 820px) {
	.pahls-nav--collapsible.is-enhanced .pahls-nav__summary {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-height: 48px;
		padding: 13px 15px;
		border: 0;
		background: #fff;
		font: inherit;
		font-size: 0.98em;
		color: #24302a;
		text-align: left;
		cursor: pointer;
	}

	.pahls-nav--collapsible.is-enhanced .pahls-nav__summary:hover { background: #f6f9f6; }
	.pahls-nav__summary .pahls-dept-icon { color: #2f6b3a; flex: 0 0 auto; }
	.pahls-nav__summary-label { flex: 1; }

	/* Names the department you are in, so the collapsed state still orients you. */
	.pahls-nav__summary-here {
		color: #93a096;
		font-size: 0.88em;
	}

	.pahls-nav__summary-here::before {
		content: " · ";
		color: #c3ccc6;
	}

	.pahls-nav--collapsible.is-enhanced .pahls-nav__summary .pahls-nav__car {
		transition: transform 0.18s ease;
		color: #93a096;
	}

	.pahls-nav--collapsible.is-enhanced.is-expanded .pahls-nav__summary .pahls-nav__car {
		transform: rotate(180deg);
	}

	/* Groups hidden until expanded. Only when enhanced — without JS they stay visible. */
	.pahls-nav--collapsible.is-enhanced:not(.is-expanded) .pahls-nav__groups {
		display: none;
	}

	.pahls-nav--collapsible.is-enhanced.is-expanded .pahls-nav__groups {
		border-top: 1px solid #eef2ef;
	}
}

/* =========================================================================
 * Product meta — block-based markup
 * =========================================================================
 * The theme uses WooCommerce's meta BLOCKS (Product SKU, Product Categories, Product
 * Tags, Brands) rather than the classic .product_meta wrapper, so the rules further up
 * this file never matched. These target the blocks.
 */

.wp-block-woocommerce-product-sku,
.wp-block-woocommerce-product-categories,
.wp-block-woocommerce-product-tags {
	font-size: 0.88em;
	color: #5d6b60;
}

/* SKU is the web-to-store bridge — someone reads it aloud to staff or types it into a
   search. Quiet, monospaced, and never wrapped mid-code. */
.wp-block-woocommerce-product-sku {
	font-size: 0.82em;
	color: #93a096;
	white-space: nowrap;
}

.wp-block-woocommerce-product-sku,
.wp-block-woocommerce-product-sku * {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.02em;
}

/* The theme prefixes each meta block with a folder glyph. It adds nothing, and when the
   block wraps it strands the icon on its own line. */
.wp-block-woocommerce-product-sku > svg,
.wp-block-woocommerce-product-sku > i,
.wp-block-woocommerce-product-categories > svg,
.wp-block-woocommerce-product-categories > i,
.wp-block-woocommerce-product-tags > svg,
.wp-block-woocommerce-product-tags > i {
	display: none !important;
}

/* Categories stay browsable — with 111 children under Annuals, "more Osteospermum" is a
   genuinely useful lateral path. */
.wp-block-woocommerce-product-categories a {
	display: inline-block;
	padding: 3px 11px;
	margin: 2px 4px 2px 0;
	border: 1px solid #dfe5e0;
	border-radius: 999px;
	color: #2f6b3a;
	text-decoration: none;
	font-size: 0.95em;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wp-block-woocommerce-product-categories a:hover,
.wp-block-woocommerce-product-categories a:focus-visible {
	background: #f0f5f0;
	border-color: #b9ccbd;
}

/* =========================================================================
 * Stock states
 * =========================================================================
 * "Coming soon" is not an error. For most of the year most of this catalogue is out of
 * season, and a red warning on 678 of 680 annuals reads as a broken store. Green, with a
 * seedling, says "not yet" rather than "no".
 */

p.stock.coming-soon,
.stock.coming-soon {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0 0 1.2em;
	padding: 0.55em 1.15em 0.55em 0.95em;
	border: 1px solid #bcd9c2;
	border-radius: 999px;
	background: #eaf3ec;
	color: #1f5c2a;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.3;
}

.stock.coming-soon::before {
	content: "";
	display: inline-block;
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f8149' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21v-7'/%3E%3Cpath d='M12 14c0-3.3 2.7-6 6-6 0 3.3-2.7 6-6 6z'/%3E%3Cpath d='M12 14c0-3.3-2.7-6-6-6 0 3.3 2.7 6 6 6z'/%3E%3C/svg%3E");
}

/* Genuinely unavailable stays a warning, just a softer one. */
p.stock.out-of-stock {
	display: inline-flex;
	align-items: center;
	margin: 0 0 1.2em;
	padding: 0.55em 1.15em;
	border: 1px solid #e8c4c4;
	border-radius: 999px;
	background: #fdf0f0;
	color: #97302c;
	font-size: 0.95em;
	font-weight: 600;
}

p.stock.in-stock {
	color: #1f5c2a;
	font-weight: 600;
}

/* =========================================================================
 * Product meta row — layout
 * =========================================================================
 * The blocks sit in a flex Row, which put Category and SKU side by side in narrow
 * columns: the SKU wrapped mid-code and the theme's folder glyph stranded itself on the
 * line above. Stacking them full width fixes both, and puts them in order of usefulness —
 * categories are navigation, the SKU is reference.
 */

[class*="wp-block-woocommerce-product-categories"],
[class*="wp-block-woocommerce-product-tags"],
[class*="wp-block-woocommerce-product-sku"] {
	display: flex !important;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.15em 0.45em;
	flex-basis: 100% !important;
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 0 0.35em;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

[class*="wp-block-woocommerce-product-categories"] { order: 1; }
[class*="wp-block-woocommerce-product-tags"] { order: 2; }
[class*="wp-block-woocommerce-product-sku"] { order: 3; }

/* The glyphs render in several shapes depending on the theme, and none of them survive a
   wrap gracefully. Take them all out. */
[class*="wp-block-woocommerce-product-categories"] svg,
[class*="wp-block-woocommerce-product-categories"] i,
[class*="wp-block-woocommerce-product-tags"] svg,
[class*="wp-block-woocommerce-product-tags"] i,
[class*="wp-block-woocommerce-product-sku"] svg,
[class*="wp-block-woocommerce-product-sku"] i {
	display: none !important;
}

[class*="wp-block-woocommerce-product-categories"]::before,
[class*="wp-block-woocommerce-product-tags"]::before,
[class*="wp-block-woocommerce-product-sku"]::before {
	content: none !important;
	display: none !important;
}

/* Item # stays on one line: it gets read aloud to staff and typed into WooPOS, so a code
   broken across two lines is a transcription error waiting to happen. */
[class*="wp-block-woocommerce-product-sku"] {
	font-size: 0.8em;
	color: #9aa69d;
	white-space: nowrap;
	margin-top: 0.5em;
}

[class*="wp-block-woocommerce-product-sku"] * {
	white-space: nowrap;
}


/* 3.11.0: a department tab is loading its first category. */
.pahls-nav.is-navigating,
.pahls-nav.is-navigating .pahls-nav__tab {
	cursor: progress;
}

/* =========================================================================
 * Sold-out product cards stay clickable (3.13.2)
 * =========================================================================
 * The theme greys a sold-out card with a layer over the whole card and a red
 * "Out of stock" pill on top of that. Both sat above the photo, the name and the
 * button, so nothing on a sold-out card could be clicked — and from November to April
 * that is most of the catalogue. The look is unchanged; clicks now pass through.
 */
ul.products .product.outofstock::before,
ul.products .product.outofstock::after,
.wc-block-grid__products .product.outofstock::before,
.wc-block-grid__products .product.outofstock::after,
.wp-block-post-template .product.outofstock::before,
.wp-block-post-template .product.outofstock::after,
.wc-block-product-template .product.outofstock::before,
.wc-block-product-template .product.outofstock::after {
	pointer-events: none !important;
}

/* =========================================================================
 * Product cards and the filter drawer on phones (3.14.0)
 * =========================================================================
 * From the phone-width pass after launch.
 */

/*
 * "Out of stock" sat dead centre on the card, on top of the size and exposure
 * line it was competing with. It now sits in the corner of the photo, at every
 * width. (Coming Soon mode replaces it with its own green badge.)
 */
ul.products .product.outofstock::after,
.wc-block-grid__products .product.outofstock::after,
.wp-block-post-template .product.outofstock::after,
.wc-block-product-template .product.outofstock::after {
	top: 24px !important;
	left: 24px !important;
	right: auto !important;
	bottom: auto !important;
	transform: none !important;
	width: auto !important;
	height: auto !important;
	padding: 4px 9px !important;
	font-size: 11px !important;
	line-height: 1.3 !important;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

/* The sort menu's text ran under its own arrow. */
.woocommerce-ordering select.orderby {
	padding-right: 30px !important;
	width: auto !important;
	min-width: 150px;
	max-width: 100%;
	text-overflow: ellipsis;
}

/* "Filter products" and the drawer's close button were 24px tall — hard to hit. */
.wc-block-product-filters__open-overlay {
	min-height: 44px;
	padding: 10px 14px 10px 0 !important;
}
.wc-block-product-filters__close-overlay {
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* The drawer's Apply button in the market's green rather than the default grey. */
.wc-block-product-filters__overlay-footer .wc-block-product-filters__apply {
	background-color: #004b2a !important;
	color: #fff !important;
	border-radius: 999px !important;
	min-height: 48px;
}

/*
 * The theme's back-to-top button floats above everything (z-index 99999),
 * including the filter drawer and the photo lightbox. It belongs under them.
 */
a.op-scroll-to-top {
	z-index: 90 !important;
}

@media (max-width: 600px) {
	/* Two cards across on a phone leaves 126px of text width: tighten to fit. */
	.wc-block-product-template li.wc-block-product {
		padding: 12px !important;
	}
	.wc-block-product-template li.wc-block-product .wp-block-post-title {
		font-size: 1rem !important;
		line-height: 1.25 !important;
	}
	.wc-block-product-template li.wc-block-product .wc-block-components-product-button__button {
		font-size: 13px !important;
		padding: 8px 10px !important;
		gap: 6px !important;
		white-space: nowrap;
		width: 100%;
		justify-content: center;
	}
	.wc-block-product-template li.wc-block-product .tinvwl_add_to_wishlist_button {
		font-size: 13px !important;
		margin-top: 8px !important;
		line-height: 1.25 !important;
	}
	.wc-block-product-template .product.outofstock::after {
		top: 18px !important;
		left: 18px !important;
		font-size: 10px !important;
		padding: 3px 7px !important;
	}
}
