/**
 * London Hair Solution - store styling.
 *
 * Tokens are taken from the site's existing Astra global palette so the store
 * matches the rest of the site rather than introducing a second design language:
 *   --ast-global-color-0  #060097  deep indigo   (brand / links)
 *   --ast-global-color-1  #c10fff  magenta       (link hover)
 *   --ast-global-color-2  #1e293b  dark slate    (headings, button text)
 *   --ast-global-color-3  #67768e  slate grey    (body copy)
 *   --ast-global-color-6  #F2F5F7  light grey    (surfaces)
 *   --ast-global-color-7  #ffcd57  amber         (primary CTA background)
 * Buttons on this site are amber pills with dark slate text - the store CTAs
 * reuse exactly that treatment.
 */

.woocommerce,
.woocommerce-page {
	--lhs-max: 1366px;
	--lhs-ink: var(--ast-global-color-2, #1e293b);
	--lhs-body: var(--ast-global-color-3, #67768e);
	--lhs-brand: var(--ast-global-color-0, #060097);
	--lhs-brand-alt: var(--ast-global-color-1, #c10fff);
	--lhs-accent: var(--ast-global-color-7, #ffcd57);
	--lhs-accent-dark: #f0b92c;
	--lhs-surface: var(--ast-global-color-6, #f2f5f7);
	--lhs-line: #e4e9f0;
	--lhs-radius: 18px;
	--lhs-pill: 999px;
}

/* ---------------------------------------------------------------- *
 * 1. Page width
 * ---------------------------------------------------------------- */
.woocommerce-page .ast-container,
.woocommerce .ast-container,
.woocommerce-page .site-content .ast-container {
	max-width: var(--lhs-max);
}

/* ---------------------------------------------------------------- *
 * 2. Header area - tighten the vertical rhythm
 *
 * WooCommerce always prints <div class="woocommerce-notices-wrapper">,
 * even with no notice to show. Empty, it still occupies space and was
 * the large blank band under the "Shop" title.
 * ---------------------------------------------------------------- */
.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb {
	margin: 0 0 0.6rem;
	font-size: 0.8125rem;
	color: var(--lhs-body);
	letter-spacing: 0.01em;
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--lhs-body);
	text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
	color: var(--lhs-brand);
}

.woocommerce .woocommerce-products-header,
.woocommerce-page .woocommerce-products-header {
	margin: 0 0 1.25rem;
	padding: 0;
}

/* Astra sets H1 to 64px globally; that is too heavy for an archive header. */
.woocommerce .woocommerce-products-header__title,
.woocommerce-page .woocommerce-products-header__title,
.woocommerce .page-title {
	margin: 0;
	font-size: clamp(1.875rem, 3vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--lhs-ink);
}

/* Category archives print a description under the title. */
.woocommerce .term-description {
	max-width: 62ch;
	margin: 0.65rem 0 0;
	color: var(--lhs-body);
	font-size: 1rem;
	line-height: 1.6;
}

/* ---------------------------------------------------------------- *
 * 3. Catalog toolbar - result count + sort control
 * ---------------------------------------------------------------- */
.lhs-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 0 0 1.75rem;
	padding: 0;
	background: none;
	border: 0;
}

.lhs-shop-toolbar .woocommerce-result-count {
	margin: 0;
	color: var(--lhs-body);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.lhs-shop-toolbar .woocommerce-ordering {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
}

/* Mirrors the reference site's visible "Sort by" label. */
.lhs-shop-toolbar .woocommerce-ordering::before {
	content: "Sort by";
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--lhs-body);
	white-space: nowrap;
}

/* --- Custom sort dropdown (built by assets/store.js) ---------------
 *
 * The native <select> stays in the form so submission and the no-JS case
 * keep working; it is just taken out of the layout and a11y tree. Its
 * option list is drawn by the OS and cannot be styled, which is why the
 * listbox below replaces it visually.
 * ------------------------------------------------------------------ */
.lhs-select {
	position: relative;
	display: inline-block;
}

/* Before the script runs, style the raw select so there is no flash of an
   unstyled control; afterwards it is hidden by .lhs-select__native. */
.woocommerce .lhs-shop-toolbar select.orderby {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	padding: 0.6875rem 2.75rem;
	min-width: 16rem;
	max-width: 100%;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: var(--lhs-ink);
	background-color: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-pill);
	cursor: pointer;
}

.woocommerce .lhs-shop-toolbar select.orderby.lhs-select__native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	pointer-events: none;
}

.lhs-select__toggle {
	display: flex;
	align-items: start;
	justify-content: start;
	gap: 0.5rem;
	position: relative;
	min-width: 16rem;
	max-width: 100%;
	margin: 0;
	/* Symmetric side padding keeps the label optically centred despite the
	   absolutely positioned chevron. */
	padding: 0.6875rem 1rem;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-pill);
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lhs-select__toggle:hover {
	border-color: #c9d2de;
}

.lhs-select__toggle:focus-visible {
	outline: none;
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.14);
}

.lhs-select.is-open .lhs-select__toggle {
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.12);
}

.lhs-select__value {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.lhs-select__chevron {
	position: absolute;
	top: 50%;
	right: 1.125rem;
	width: 0.875rem;
	height: 0.5625rem;
	margin-top: -0.28125rem;
	color: var(--lhs-ink);
	transition: transform 0.2s ease;
}

.lhs-select.is-open .lhs-select__chevron {
	transform: rotate(180deg);
}

.lhs-select__menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 30;
	min-width: 100%;
	max-height: 17rem;
	overflow-y: auto;
	margin: 0;
	padding: 0.375rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-radius);
	box-shadow: 0 22px 44px -20px rgba(30, 41, 59, 0.34);
}

.lhs-select__menu[hidden] {
	display: none;
}

.lhs-select__option {
	margin: 0;
	padding: 0.625rem 0.875rem;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
	color: var(--lhs-body);
	border-radius: calc(var(--lhs-radius) - 8px);
	cursor: pointer;
	transition: background-color 0.14s ease, color 0.14s ease;
}

.lhs-select__option.is-active {
	background: var(--lhs-surface);
	color: var(--lhs-ink);
}

.lhs-select__option[aria-selected="true"] {
	font-weight: 700;
	color: var(--lhs-ink);
	background: var(--lhs-accent);
}

.lhs-select__option[aria-selected="true"].is-active {
	background: var(--lhs-accent-dark);
}

@media (max-width: 544px) {
	.lhs-shop-toolbar {
		align-items: stretch;
	}

	.lhs-shop-toolbar .woocommerce-ordering {
		width: 100%;
	}

	.lhs-select,
	.lhs-select__toggle,
	.woocommerce .lhs-shop-toolbar select.orderby {
		width: 100%;
		min-width: 0;
	}
}

/* ---------------------------------------------------------------- *
 * 3a. Front-end "Add product" form ([lhs_add_product])
 *
 * Admin-facing, so it is deliberately plainer than the storefront -
 * but it reuses the same tokens, field metrics and button treatment.
 * ---------------------------------------------------------------- */
.lhs-product-form {
	--lhs-ink: var(--ast-global-color-2, #1e293b);
	--lhs-body: var(--ast-global-color-3, #67768e);
	--lhs-brand: var(--ast-global-color-0, #060097);
	--lhs-accent: var(--ast-global-color-7, #ffcd57);
	--lhs-surface: var(--ast-global-color-6, #f2f5f7);
	--lhs-line: #e4e9f0;
	--lhs-radius: 18px;
	--lhs-pill: 999px;
	max-width: 60rem;
	margin: 0 auto;
}

.lhs-form-notice {
	margin: 0 0 1.25rem;
	padding: 0.875rem 1.125rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	border: 1px solid var(--lhs-line);
	border-radius: 12px;
	background: var(--lhs-surface);
	color: var(--lhs-ink);
}

.lhs-form-notice--success {
	border-color: #b7dfc4;
	background: #eefaf1;
}

.lhs-form-notice--error {
	border-color: #f0c2ae;
	background: #fdf1ec;
}

.lhs-form-notice ul {
	margin: 0.5rem 0 0;
	padding-left: 1.125rem;
}

.lhs-form-notice a {
	margin-left: 0.75rem;
	font-weight: 600;
	color: var(--lhs-brand);
}

.lhs-product-form__form {
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-radius);
	box-shadow: 0 18px 38px -26px rgba(30, 41, 59, 0.28);
}

.lhs-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1.25rem;
}

.lhs-form-row {
	margin: 0 0 1.125rem;
}

.lhs-form-row--full {
	grid-column: 1 / -1;
}

.lhs-product-form label,
.lhs-product-form legend {
	display: block;
	margin: 0 0 0.375rem;
	padding: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--lhs-ink);
}

.lhs-product-form .required {
	color: #c2410c;
}

.lhs-product-form input[type="text"],
.lhs-product-form input[type="file"],
.lhs-product-form select,
.lhs-product-form textarea {
	width: 100%;
	margin: 0;
	padding: 0.6875rem 0.875rem;
	font-size: 0.9375rem;
	line-height: 1.3;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
	box-shadow: none;
	box-sizing: border-box;
}

.lhs-product-form textarea {
	line-height: 1.55;
	resize: vertical;
}

.lhs-product-form input[type="text"]:focus,
.lhs-product-form select:focus,
.lhs-product-form textarea:focus {
	outline: none;
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.12);
}

.lhs-form-cats {
	margin: 0 0 1.125rem;
	padding: 0;
	border: 0;
}

.lhs-form-cats__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0.875rem;
	background: var(--lhs-surface);
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
}

.lhs-form-check {
	display: flex;
	align-items: center;
	gap: 0.4375rem;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--lhs-ink);
	cursor: pointer;
}

.lhs-form-check input {
	margin: 0;
}

.lhs-form-hint {
	margin: 0;
	font-size: 0.875rem;
	color: var(--lhs-body);
}

.lhs-form-actions {
	margin: 0.5rem 0 0;
}

.lhs-product-form .lhs-form-submit {
	display: inline-block;
	width: auto;
	padding: 0.8125rem 2rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--lhs-ink);
	background: var(--lhs-accent);
	border: 0;
	border-radius: var(--lhs-pill);
	cursor: pointer;
}

.lhs-product-form .lhs-form-submit:hover {
	background: #f0b92c;
}

@media (max-width: 640px) {
	.lhs-form-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------------- *
 * 3b. Real-time product search
 *
 * Printed above the toolbar on the shop page and every category
 * archive. The panel is absolutely positioned so results overlay the
 * grid rather than pushing it down as the visitor types.
 * ---------------------------------------------------------------- */
.lhs-search {
	position: relative;
	max-width: 28rem;
	margin: 0 0 1rem;
}

.lhs-search__field {
	position: relative;
	display: flex;
	align-items: center;
}

.lhs-search__icon {
	position: absolute;
	left: 1rem;
	width: 1.125rem;
	height: 1.125rem;
	color: var(--lhs-body);
	pointer-events: none;
}

.woocommerce .lhs-search .lhs-search__input,
.woocommerce-page .lhs-search .lhs-search__input {
	width: 100%;
	height: 2.875rem;
	min-height: 0;
	margin: 0;
	padding: 0 2.5rem 0 2.75rem;
	font-size: 0.9375rem;
	line-height: normal;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-pill);
	box-shadow: none;
	box-sizing: border-box;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.woocommerce .lhs-search .lhs-search__input:focus {
	outline: none;
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.12);
}

/* Chrome draws its own clear button on type=search; ours replaces it. */
.lhs-search__input::-webkit-search-decoration,
.lhs-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.lhs-search__clear {
	position: absolute;
	right: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--lhs-body);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.lhs-search__clear:hover {
	color: var(--lhs-ink);
	background: var(--lhs-surface);
}

/* Spinner while a request is in flight. */
.lhs-search.is-loading .lhs-search__icon {
	animation: lhs-search-pulse 0.9s ease-in-out infinite;
}

@keyframes lhs-search-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.35; }
}

.lhs-search__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	right: 0;
	z-index: 40;
	max-height: 24rem;
	overflow-y: auto;
	padding: 0.375rem;
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-radius);
	box-shadow: 0 22px 44px -20px rgba(30, 41, 59, 0.34);
}

.lhs-search__panel[hidden] {
	display: none;
}

.lhs-search__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lhs-search__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce .lhs-search__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem;
	text-decoration: none;
	border-radius: calc(var(--lhs-radius) - 8px);
	transition: background-color 0.14s ease;
}

.woocommerce .lhs-search__link:hover,
.lhs-search__link.is-active {
	background: var(--lhs-surface);
}

.lhs-search__thumb {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	object-fit: cover;
	border-radius: 8px;
	background: var(--lhs-surface);
}

.lhs-search__text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
}

.lhs-search__title {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--lhs-ink);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.lhs-search__meta {
	font-size: 0.875rem;
	color: var(--lhs-body);
}

.lhs-search__meta del {
	opacity: 0.65;
	margin-right: 0.25rem;
}

.lhs-search__meta ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--lhs-ink);
}

.lhs-search__oos {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.75rem;
	font-style: normal;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #c2410c;
}

.lhs-search__empty {
	margin: 0;
	padding: 0.875rem;
	font-size: 0.9375rem;
	color: var(--lhs-body);
	text-align: center;
}

.woocommerce .lhs-search__more {
	display: block;
	margin-top: 0.25rem;
	padding: 0.625rem;
	font-size: 0.875rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	color: var(--lhs-brand);
	border-top: 1px solid var(--lhs-line);
}

.woocommerce .lhs-search__more:hover {
	color: var(--lhs-brand-alt);
}

@media (max-width: 544px) {
	.lhs-search {
		max-width: none;
	}
}

/* ---------------------------------------------------------------- *
 * 4. Product cards
 *
 * .lhs-card is added by the plugin. li.product is Astra's grid column
 * and keeps its 20px side padding, which forms the gutter.
 * ---------------------------------------------------------------- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	margin-bottom: 2.25rem;
	background: none;
	border: 0;
}

.woocommerce ul.products li.product .lhs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-radius);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.woocommerce ul.products li.product .lhs-card:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 20px 42px -20px rgba(30, 41, 59, 0.32);
}

/* --- image --- */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	margin: 0;
	background: var(--lhs-surface);
	aspect-ratio: 1 / 1;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a:first-child {
	display: block;
	height: 100%;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.woocommerce ul.products li.product .lhs-card:hover .astra-shop-thumbnail-wrap img {
	transform: scale(1.055);
}

/* Astra's hover bag button duplicates the card's own CTA - drop the noise. */
.woocommerce ul.products li.product .ast-on-card-button {
	display: none;
}

/* --- badges --- */
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product span.onsale {
	position: absolute;
	top: 0.875rem;
	left: 0.875rem;
	right: auto;
	z-index: 2;
	min-height: 0;
	min-width: 0;
	margin: 0;
	padding: 0.375rem 0.75rem;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--lhs-ink);
	background: var(--lhs-accent);
	border: 0;
	border-radius: var(--lhs-pill);
}

.woocommerce ul.products li.product .ast-shop-product-out-of-stock {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	margin: 0;
	padding: 0.625rem 0;
	width: 100%;
	font-size: 0.6875rem;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #fff;
	background: rgba(30, 41, 59, 0.9);
	border-radius: 0;
}
.woocommerce-js ul.products li.product .woocommerce-loop-product__link:hover .ast-shop-product-out-of-stock, 
.woocommerce-page ul.products li.product .woocommerce-loop-product__link:hover .ast-shop-product-out-of-stock {
	color: #fff;
	background: rgba(30, 41, 59, 0.9);
}

/* --- body --- */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4375rem;
	padding: 1.125rem 1.125rem 1.25rem;
	text-align: left;
}

.woocommerce ul.products li.product .ast-woo-product-category {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--lhs-brand);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--lhs-ink);
	transition: color 0.18s ease;
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
	color: var(--lhs-brand);
}

.woocommerce ul.products li.product .price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.125rem 0 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--lhs-ink);
}

.woocommerce ul.products li.product .price del {
	opacity: 1;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #98a4b6;
	text-decoration: line-through;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--lhs-ink);
	background: none;
}

.woocommerce ul.products li.product .star-rating {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--lhs-accent-dark);
}

/*
 * Hide the rating row for products with no reviews. Astra always prints a
 * 0-star rating (an inner span at width:0%), which makes a card look
 * unfinished. Astra generates this markup itself, so it cannot be removed via
 * woocommerce_product_get_rating_html. Browsers without :has() simply keep the
 * previous behaviour.
 */
.woocommerce ul.products li.product .review-rating:has(.star-rating > span[style*="width:0%"]) {
	display: none;
}

/* --- CTA: matches the site's amber pill buttons --- */
.woocommerce ul.products li.product .lhs-card a.button,
.woocommerce ul.products li.product .lhs-card a.added_to_cart {
	display: block;
	width: 100%;
	margin: 1rem 0 0;
	padding: 0.8125rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	color: var(--lhs-ink);
	background: var(--lhs-accent);
	border: 0;
	border-radius: var(--lhs-pill);
	transition: background-color 0.18s ease, transform 0.18s ease;
}

/* Push the CTA to the bottom so buttons line up across a row. */
.woocommerce ul.products li.product .astra-shop-summary-wrap > a.button,
.woocommerce ul.products li.product .astra-shop-summary-wrap > a.added_to_cart {
	margin-top: auto;
}

.woocommerce ul.products li.product .lhs-card a.button:hover,
.woocommerce ul.products li.product .lhs-card a.added_to_cart:hover {
	background: var(--lhs-accent-dark);
	color: var(--lhs-ink);
	transform: translateY(-1px);
}

.woocommerce ul.products li.product .lhs-card a.button:focus-visible {
	outline: 3px solid rgba(6, 0, 151, 0.35);
	outline-offset: 2px;
}

/* Out-of-stock products still link through, but the CTA should read as muted. */
.woocommerce ul.products li.product.outofstock .lhs-card a.button {
	color: var(--lhs-ink);
	background: #e8ecf2;
}

.woocommerce ul.products li.product.outofstock .lhs-card a.button:hover {
	background: #dde3ec;
}

/* ---------------------------------------------------------------- *
 * 4b. Catalog pagination
 *
 * Astra's own rule sets white text on the active page, but it is scoped
 * to `.ast-pagination`:
 *     .ast-pagination .page-numbers.current { color:#fff; background:... }
 * WooCommerce prints `nav.woocommerce-pagination` instead, so the dark
 * background applied but the text stayed dark and unreadable. These rules
 * style the WooCommerce markup directly.
 * ---------------------------------------------------------------- */
.woocommerce nav.woocommerce-pagination,
.woocommerce-page nav.woocommerce-pagination {
	margin: 2rem 0 0;
	text-align: left;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	border: 0;
	overflow: visible;
	list-style: none;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li a.page-numbers,
.woocommerce nav.woocommerce-pagination ul.page-numbers li span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
	text-decoration: none;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li a.page-numbers:hover,
.woocommerce nav.woocommerce-pagination ul.page-numbers li a.page-numbers:focus {
	color: var(--lhs-ink);
	background: var(--lhs-surface);
	border-color: #c9d2de;
}

/* The active page: white text on the brand indigo, which is the bit that
   was unreadable. */
.woocommerce nav.woocommerce-pagination ul.page-numbers li span.page-numbers.current,
.woocommerce nav.woocommerce-pagination ul.page-numbers li a.page-numbers.current,
.woocommerce-page nav.woocommerce-pagination ul.page-numbers li span.page-numbers.current {
	color: #fff;
	background: var(--lhs-brand);
	border-color: var(--lhs-brand);
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li a.page-numbers:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.16);
}

/* Prev / next arrows: Astra floats these, which breaks the flex row. */
.woocommerce nav.woocommerce-pagination ul.page-numbers li a.prev.page-numbers,
.woocommerce nav.woocommerce-pagination ul.page-numbers li a.next.page-numbers {
	float: none;
	margin: 0;
	padding: 0 0.875rem;
	height: 2.5rem;
	line-height: 1;
}

/* ---------------------------------------------------------------- *
 * 5. Cart page
 *
 * Markup is the classic (shortcode) cart:
 *   div.woocommerce
 *     > div.woocommerce-notices-wrapper
 *     > form.woocommerce-cart-form
 *     > div.cart-collaterals > div.cart_totals
 * Those two are siblings, so the shared parent becomes the grid and the
 * totals move into a right-hand sidebar.
 *
 * Several rules below need to out-specify Astra's dynamic CSS, notably
 * `.woocommerce table.cart td.actions .button` which sets its own
 * horizontal padding - hence the long selectors.
 * ---------------------------------------------------------------- */
.woocommerce-cart {
	--lhs-field-h: 2.75rem;
}

.woocommerce-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 21.875rem;
	align-items: start;
	gap: 2rem;
}

.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}

.woocommerce-cart .woocommerce form.woocommerce-cart-form {
	grid-column: 1;
	margin: 0;
}

/* WooCommerce floats these and gives them a 48% width by default. */
.woocommerce-cart .woocommerce .cart-collaterals {
	grid-column: 2;
	float: none;
	width: auto;
	margin: 0;
	position: sticky;
	top: 1.5rem;
}

.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
	float: none;
	width: auto;
	margin: 0;
	padding: 1.375rem 1.375rem 1.5rem;
	background: #fff;
	border: 1px solid #f2f5f7;
	border-radius: 0;
}

/* Astra renders this as a full-size H2; far too large for a sidebar card. */
.woocommerce-cart .woocommerce .cart_totals h2 {
	margin: 0 0 0.875rem;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--lhs-ink);
	background: none;
	border: 0;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table {
	margin: 0;
	border: 0;
	border-radius: 0;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table th,
.woocommerce-cart .woocommerce .cart_totals table.shop_table td {
	padding: 0.6875rem 0;
	border: 0;
	border-bottom: 1px solid #f2f5f7;
	font-size: 0.9375rem;
	vertical-align: middle;
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table th {
	width: 45%;
	font-weight: 500;
	color: var(--lhs-body);
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table td {
	text-align: right;
	color: var(--lhs-ink);
}

.woocommerce-cart .woocommerce .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .woocommerce .cart_totals table.shop_table tr.order-total td {
	border-bottom: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--lhs-ink);
}

/* --- Buttons: trim the oversized global padding ------------------- */
.woocommerce-cart .woocommerce .wc-proceed-to-checkout {
	padding: 1.125rem 0 0;
	margin: 0;
}

.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button.button {
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0.8125rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	border-radius: var(--lhs-pill);
	box-sizing: border-box;
}

/* --- Coupon row: input and button matched to one height ----------- */
.woocommerce-cart .woocommerce table.cart td.actions {
	padding: 1rem 1.125rem;
	background: none;
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon label {
	display: none;
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon input#coupon_code.input-text {
	flex: 0 1 13.75rem;
	width: auto;
	height: 50px;
	min-height: 50px;
	margin: 0;
	padding: 0 1.125rem;
	font-size: 0.9375rem;
	line-height: normal;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-pill);
	box-sizing: border-box;
}

.woocommerce-cart .woocommerce table.cart td.actions .coupon input#coupon_code.input-text:focus {
	outline: none;
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.12);
}

/* Beats `.woocommerce table.cart td.actions .button` from Astra. */
.woocommerce-cart .woocommerce table.cart td.actions .coupon button.button,
.woocommerce-cart .woocommerce table.cart td.actions button.button[name="update_cart"] {
	height: var(--lhs-field-h);
	min-height: 0;
	width: auto;
	margin: 0;
	padding: 0 1.375rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	border-radius: var(--lhs-pill);
	box-sizing: border-box;
}

@media (max-width: 1024px) {
	.woocommerce-cart .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
	}

	.woocommerce-cart .woocommerce form.woocommerce-cart-form,
	.woocommerce-cart .woocommerce .cart-collaterals {
		grid-column: 1;
	}

	.woocommerce-cart .woocommerce .cart-collaterals {
		position: static;
	}
}

@media (max-width: 544px) {
	.woocommerce-cart .woocommerce table.cart td.actions .coupon {
		flex-wrap: wrap;
	}

	.woocommerce-cart .woocommerce table.cart td.actions .coupon input#coupon_code.input-text {
		flex: 1 1 100%;
	}

	.woocommerce-cart .woocommerce table.cart td.actions .coupon button.button {
		flex: 1 1 100%;
	}
}

/* ---------------------------------------------------------------- *
 * 6. Checkout page
 *
 * Classic (shortcode) checkout:
 *   form.woocommerce-checkout
 *     > div#customer_details.col2-set  (> .col-1 billing, .col-2 notes)
 *     > wc-order-attribution-inputs    (hidden inputs only)
 *     > h3#order_review_heading
 *     > div#order_review               (> table, > div#payment)
 *
 * Laid out as customer details on the left and the order summary +
 * payment in a sticky right column, matching the cart page.
 * ---------------------------------------------------------------- */
.woocommerce-checkout {
	--lhs-field-h: 2.875rem;
}

.woocommerce-checkout .woocommerce form.woocommerce-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 24rem;
	/* The heading and #order_review are wrapped into one .lhs-order-panel by the
	   plugin, so the right-hand side is a single grid item on a single row. */
	grid-template-areas: "details panel";
	align-items: start;
	column-gap: 2rem;
}

/*
 * Astra prints this in its inline dynamic CSS, at specificity (1,2,1):
 *   .woocommerce.woocommerce-checkout form #order_review,
 *   .woocommerce.woocommerce-checkout form #order_review_heading
 *     { width:40%; float:right; margin-right:0; clear:right; }
 * Inside the grid that made the summary 40% of its own 24rem track - about
 * 154px - which is what collapsed the column. Including
 * `form.woocommerce-checkout` here takes these to (1,3,1) so they win, and
 * the float/width/clear are reset explicitly rather than left to chance.
 */
.woocommerce-checkout .woocommerce form.woocommerce-checkout #customer_details,
.woocommerce-checkout .woocommerce form.woocommerce-checkout h3#order_review_heading,
.woocommerce-checkout .woocommerce form.woocommerce-checkout #order_review {
	width: auto;
	max-width: none;
	float: none;
	clear: none;
	margin-right: 0;
}

.woocommerce-checkout .woocommerce form.woocommerce-checkout #customer_details {
	grid-area: details;
}

/* The wrapper is the card now - one border, one radius, one sticky element. */
.woocommerce-checkout .woocommerce form.woocommerce-checkout .lhs-order-panel {
	grid-area: panel;
	position: sticky;
	top: 1.5rem;
	padding: 1.25rem 1.25rem 1.375rem;
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: var(--lhs-radius);
	box-shadow: 0 18px 38px -26px rgba(30, 41, 59, 0.28);
}

/*
 * Astra draws the summary as two halves of one box:
 *   form #order_review_heading:not(…) { border-width:2px 2px 0 2px; padding:1.5em 1.5em 1em }
 *   form #order_review:not(…)         { border-width:0 2px 2px; padding:0 2em }
 * Those selectors are specificity (2,1,1). Reusing Astra's own :not() clause
 * here lifts these to (2,2,1) so the inner borders and padding can be removed
 * and the wrapper above becomes the only visible frame.
 */
.woocommerce-checkout .woocommerce form.woocommerce-checkout .lhs-order-panel h3#order_review_heading:not(.elementor-widget-woocommerce-checkout-page #order_review_heading),
.woocommerce-checkout .woocommerce form.woocommerce-checkout .lhs-order-panel #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) {
	width: auto;
	max-width: none;
	float: none;
	clear: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.woocommerce-checkout .woocommerce form.woocommerce-checkout .lhs-order-panel h3#order_review_heading:not(.elementor-widget-woocommerce-checkout-page #order_review_heading) {
	margin-bottom: 0.875rem;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--lhs-ink);
}

/* Holds hidden attribution inputs only; they still submit when not rendered. */
.woocommerce-checkout .woocommerce wc-order-attribution-inputs {
	display: none;
}

/* The left column is narrower than WooCommerce's 47%/47% float assumes,
   so billing and order notes stack instead. */
.woocommerce-checkout .woocommerce #customer_details.col2-set {
	display: block;
}

.woocommerce-checkout .woocommerce #customer_details .col-1,
.woocommerce-checkout .woocommerce #customer_details .col-2 {
	float: none;
	width: auto;
}

.woocommerce-checkout .woocommerce #customer_details .col-2 {
	margin-top: 1.5rem;
}

.woocommerce-checkout .woocommerce #customer_details h3 {
	margin: 0 0 1rem;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--lhs-ink);
}

/* --- Form fields ------------------------------------------------- */
.woocommerce-checkout .woocommerce .form-row {
	margin: 0 0 0.875rem;
	padding: 0;
}

.woocommerce-checkout .woocommerce .form-row label {
	display: block;
	margin: 0 0 0.375rem;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--lhs-ink);
}

.woocommerce-checkout .woocommerce .form-row label .required {
	color: #c2410c;
	text-decoration: none;
}

.woocommerce-checkout .woocommerce .form-row input.input-text,
.woocommerce-checkout .woocommerce .form-row textarea,
.woocommerce-checkout .woocommerce .form-row select,
.woocommerce-checkout .woocommerce .form-row .select2-container .select2-selection--single {
	width: 100%;
	height: var(--lhs-field-h);
	min-height: 0;
	margin: 0;
	padding: 0 0.875rem;
	font-size: 0.9375rem;
	line-height: normal;
	color: var(--lhs-ink);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
	box-shadow: none;
	box-sizing: border-box;
}

.woocommerce-checkout .woocommerce .form-row textarea {
	height: auto;
	min-height: 5.5rem;
	padding: 0.6875rem 0.875rem;
	line-height: 1.5;
	resize: vertical;
}

.woocommerce-checkout .woocommerce .form-row input.input-text:focus,
.woocommerce-checkout .woocommerce .form-row textarea:focus,
.woocommerce-checkout .woocommerce .form-row select:focus {
	outline: none;
	border-color: var(--lhs-brand);
	box-shadow: 0 0 0 3px rgba(6, 0, 151, 0.12);
}

/* Select2 renders the country/state pickers. */
.woocommerce-checkout .woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: calc(var(--lhs-field-h) - 2px);
	color: var(--lhs-ink);
}

.woocommerce-checkout .woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
	height: calc(var(--lhs-field-h) - 2px);
	right: 0.625rem;
}

/* --- Order summary + payment ------------------------------------- *
 * The frame lives on .lhs-order-panel above; #order_review itself is
 * transparent so there is only ever one border.
 * ----------------------------------------------------------------- */
.woocommerce-checkout .woocommerce #order_review table.shop_table {
	margin: 0;
	border: 0;
	border-radius: 0;
	font-size: 0.9375rem;
}

.woocommerce-checkout .woocommerce #order_review table.shop_table th,
.woocommerce-checkout .woocommerce #order_review table.shop_table td {
	padding: 0.625rem 0;
	border: 0;
	border-bottom: 1px solid var(--lhs-line);
	vertical-align: top;
}

.woocommerce-checkout .woocommerce #order_review table.shop_table thead th {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lhs-body);
}

.woocommerce-checkout .woocommerce #order_review table.shop_table td {
	text-align: right;
	color: var(--lhs-ink);
}

.woocommerce-checkout .woocommerce #order_review table.shop_table td.product-name {
	text-align: left;
	color: var(--lhs-ink);
}

.woocommerce-checkout .woocommerce #order_review table.shop_table .product-quantity {
	color: var(--lhs-body);
	font-weight: 600;
}

.woocommerce-checkout .woocommerce #order_review table.shop_table tr.order-total th,
.woocommerce-checkout .woocommerce #order_review table.shop_table tr.order-total td {
	border-bottom: 0;
	padding-top: 0.875rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--lhs-ink);
}

/* --- Payment methods (Stripe's Payment Element mounts in here) ---- */
.woocommerce-checkout .woocommerce #payment {
	margin: 1rem 0 0;
	padding: 0;
	background: none;
	border-radius: 0;
}

.woocommerce-checkout .woocommerce #payment ul.payment_methods {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	border: 0;
}

.woocommerce-checkout .woocommerce #payment ul.payment_methods > li {
	margin: 0 0 0.5rem;
	padding: 0.625rem 0.6875rem;
	background: var(--lhs-surface);
	border: 1px solid var(--lhs-line);
	border-radius: 12px;
	list-style: none;
}

.woocommerce-checkout .woocommerce #payment ul.payment_methods > li label {
	display: inline-block;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--lhs-ink);
	cursor: pointer;
}

.woocommerce-checkout .woocommerce #payment div.payment_box {
	margin: 0.5rem 0 0;
	padding: 0.625rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--lhs-body);
	background: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
}

/* Stripe mounts its iframe here; it needs no inset of its own on top of the
   payment box padding above. */
.woocommerce-checkout .woocommerce #payment div.payment_box .wc-stripe-upe-element,
.woocommerce-checkout .woocommerce #payment div.payment_box #wc-stripe-upe-element {
	margin: 0;
	padding: 0;
}

/*
 * Stripe card fields.
 *
 * The inputs live in a cross-origin iframe, so they cannot be styled from here
 * directly. The plugin reads the computed styles of this hidden probe input
 * (`upeThemeInputSelector: "#wc-stripe-hidden-style-input"`) and copies them
 * into Stripe's Appearance API, so styling the probe is how the card fields
 * get their border, radius, colours, font and horizontal padding.
 *
 * What this canNOT control is the field HEIGHT. Measured in a real browser:
 * changing this probe's padding (13px -> 34px) and line-height (1.2 -> 2.6)
 * both left the rendered card input at offsetHeight 24 with 0px vertical
 * padding. The plugin rewrites vertical padding for its floating-label layout:
 *     rules['.Input'].paddingTop = `calc(<padding> - <label float height>)`
 * There is no filter to intercept that, and forcing it by wrapping
 * window.Stripe stops the Payment Element mounting altogether.
 */
.woocommerce-checkout #wc-stripe-hidden-style-input.input-text {
	box-sizing: border-box;
	padding: 13px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.2;
	color: var(--lhs-ink);
	background-color: #fff;
	border: 1px solid var(--lhs-line);
	border-radius: 10px;
	box-shadow: none;
	outline: none;
}

/* The test-mode hint Stripe prints above the fields. */
.woocommerce-checkout .woocommerce #payment div.payment_box .stripe-gateway-testmode-notice,
.woocommerce-checkout .woocommerce #payment div.payment_box p:first-child {
	margin-top: 0;
}

/* WooCommerce draws a CSS triangle on the payment box; it clashes with
   the card treatment above. */
.woocommerce-checkout .woocommerce #payment div.payment_box::before {
	display: none;
}
.woocommerce-checkout .woocommerce #payment div.payment_box fieldset {
	padding: 12px;
}

.woocommerce-checkout .woocommerce #payment .place-order {
	margin: 0;
	padding: 0;
}

.woocommerce-checkout .woocommerce #payment button#place_order {
	display: block;
	float: none;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0.25rem 0 0;
	padding: 0.875rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25;
	border-radius: var(--lhs-pill);
	box-sizing: border-box;
}

.woocommerce-checkout .woocommerce .woocommerce-terms-and-conditions-wrapper {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--lhs-body);
}

.woocommerce-checkout .woocommerce .woocommerce-privacy-policy-text p {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--lhs-body);
}

/* --- Coupon toggle above the form -------------------------------- */
.woocommerce-checkout .woocommerce .woocommerce-form-coupon-toggle .woocommerce-info {
	margin: 0 0 1.25rem;
	padding: 0.8125rem 1rem;
	font-size: 0.9375rem;
	color: var(--lhs-ink);
	background: var(--lhs-surface);
	border: 1px solid var(--lhs-line);
	border-top: 1px solid var(--lhs-line);
	border-radius: 12px;
}

.woocommerce-checkout .woocommerce .woocommerce-form-coupon-toggle .woocommerce-info::before {
	display: none;
}

.woocommerce-checkout .woocommerce form.checkout_coupon {
	width: auto;
	margin: 0 0 1.25rem;
	padding: 1rem;
	border: 1px solid var(--lhs-line);
	border-radius: 12px;
}

.woocommerce-checkout .woocommerce form.checkout_coupon .form-row {
	margin-bottom: 0;
}

.woocommerce-checkout .woocommerce form.checkout_coupon button.button {
	height: var(--lhs-field-h);
	min-height: 0;
	padding: 0 1.375rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
	border-radius: var(--lhs-pill);
	box-sizing: border-box;
}

@media (max-width: 1024px) {
	.woocommerce-checkout .woocommerce form.woocommerce-checkout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"details"
			"panel";
		gap: 1.25rem;
	}

	.woocommerce-checkout .woocommerce form.woocommerce-checkout .lhs-order-panel {
		position: static;
	}
}
