/* ==========================================================================
   Healthear Storefront — component styles
   Colors, type and spacing come from theme.json (var(--wp--preset--…)).
   ========================================================================== */

:root {
	--hs-radius-s: var(--wp--custom--radius--small, 10px);
	--hs-radius-m: var(--wp--custom--radius--medium, 18px);
	--hs-radius-l: var(--wp--custom--radius--large, 28px);
	--hs-shadow: var(--wp--preset--shadow--soft);
	--hs-shadow-lg: var(--wp--preset--shadow--lifted);
	--hs-green: var(--wp--preset--color--primary);
	--hs-green-dark: var(--wp--preset--color--primary-dark);
	--hs-lime: var(--wp--preset--color--lime);
	--hs-mint: var(--wp--preset--color--mint);
	--hs-surface: var(--wp--preset--color--surface);
	--hs-ink: var(--wp--preset--color--ink);
	--hs-muted: var(--wp--preset--color--muted);
	--hs-line: var(--wp--preset--color--line);
}

html { scroll-behavior: smooth; }
/* Header, main and footer sit flush; sections handle their own spacing. */
.wp-site-blocks > * + * { margin-block-start: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[id] { scroll-margin-top: 96px; }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--hs-lime);
	outline-offset: 2px;
}
img { height: auto; }

/* Admin-only reminders printed by shortcodes. */
.hs-admin-note {
	display: inline-block;
	padding: 0.35em 0.7em;
	border-radius: 8px;
	background: #fff4d6;
	color: #6b4e00;
	font-size: 0.875rem;
}

/* ---------- Header ---------- */
.hs-announce { text-align: center; }
.hs-announce p { margin: 0; }
/* The template-part wrapper is sticky (a sticky child can't outlive its short parent).
   No backdrop-filter here: it would trap the mobile menu overlay inside the header. */
.wp-site-blocks > .wp-block-template-part:has(> .hs-header),
.wp-site-blocks > .wp-block-template-part:has(> .hs-checkout-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .hs-header) { top: 0; }
}
.hs-header {
	background: #fff;
	border-bottom: 1px solid var(--hs-line);
}
.hs-header .wp-block-site-logo img { max-height: 44px; width: auto; }
.hs-header .wp-block-navigation a:hover { color: var(--hs-green); }
.hs-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
	font-size: 1.25rem;
}
.hs-header .wc-block-mini-cart__button,
.hs-header .wp-block-woocommerce-customer-account a { color: var(--hs-ink); }
.hs-header .wc-block-mini-cart__badge { background: var(--hs-green); color: #fff; border: 0; }

/* ---------- Shared pieces ---------- */
.hs-eyebrow {
	display: inline-flex !important;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	margin: 0 !important;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--hs-line);
	color: var(--hs-green);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.hs-eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hs-lime);
	box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.25);
}
.hs-kicker {
	color: var(--hs-green);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 0.25rem !important;
}
.hs-lead { font-size: var(--wp--preset--font-size--large); color: var(--hs-muted); line-height: 1.5; }
.hs-muted { color: var(--hs-muted); }

.hs-checks {
	list-style: none;
	padding: 0;
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.4rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--hs-ink);
}
.hs-checks li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}
.hs-checks li::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--hs-mint) url("../img/icons/check-green.svg") center / 14px no-repeat;
}
.hs-checks--stack { flex-direction: column; gap: 0.55rem; }

.hs-card {
	background: #fff;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-radius-m);
	box-shadow: var(--hs-shadow);
	height: 100%;
}
.hs-icon img { width: 56px; height: 56px; }
.hs-icon { margin-bottom: 0.25rem; }

/* Small print markers for claims. */
.hs-star { color: var(--hs-green); font-weight: 700; }

/* ---------- Hero ---------- */
.hs-hero { overflow: hidden; }
.hs-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 4rem); max-width: 14ch; }
.hs-hero h1 em { font-style: normal; color: var(--hs-green); }
.hs-hero__art img {
	aspect-ratio: 1100 / 1000;
	width: 100%;
	max-width: 620px;
	margin-inline: auto;
	filter: drop-shadow(0 30px 40px rgba(16, 40, 26, 0.12));
}
/* A real product photo on a white background: blend the white into the hero's soft green. */
.hs-hero__art .is-product-photo img {
	aspect-ratio: 1;
	max-width: 540px;
	mix-blend-mode: multiply;
	filter: none;
}
.hs-hero .wp-block-buttons { gap: 0.75rem; }

/* ---------- Trust bar ---------- */
.hs-trust__item { align-items: center; }
.hs-trust__item .wp-block-image { margin: 0; flex: none; }
.hs-trust img { width: 44px; height: 44px; flex: none; }
.hs-trust p { margin: 0; line-height: 1.3; }
.hs-trust strong { display: block; color: var(--hs-ink); }

/* ---------- Moments / ingredients / steps ---------- */
.hs-moment h3, .hs-ingredient h3, .hs-step h3 { margin-top: 0.5rem; }
.hs-ingredient .hs-ingredient__role {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: var(--hs-mint);
	color: var(--hs-green-dark);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
}
.hs-dark { color: rgba(255, 255, 255, 0.86); }
.hs-dark h2, .hs-dark h3, .hs-dark strong { color: #fff; }
.hs-dark .hs-kicker { color: var(--hs-lime); }
.hs-dark a:not(.wp-element-button) { color: var(--hs-lime); }
.hs-dark .hs-card {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.14);
	box-shadow: none;
}
.hs-dark .hs-ingredient__role { background: rgba(141, 198, 63, 0.18); color: var(--hs-lime); }

.hs-step__num {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--hs-green);
	color: #fff;
	font-weight: 800;
	font-size: 1.125rem;
	margin: 0 !important;
}

/* ---------- Bundle cards ([healthear_bundles]) ---------- */
.hs-bundles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}
.hs-bundle {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.25rem 1.25rem 1.5rem;
	background: #fff;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-radius-l);
	box-shadow: var(--hs-shadow);
}
.hs-bundle.is-featured {
	border: 2px solid var(--hs-green);
	box-shadow: var(--hs-shadow-lg);
}
.hs-bundle__badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.3rem 0.9rem;
	border-radius: 999px;
	background: var(--hs-lime);
	color: var(--hs-ink);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.hs-bundle__media {
	width: 100%;
	aspect-ratio: 5 / 4;
	border-radius: var(--hs-radius-m);
	overflow: hidden;
	background: var(--hs-surface);
	margin-bottom: 1rem;
}
.hs-bundle__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.hs-bundle__title { margin: 0; font-size: 1.375rem; }
.hs-bundle__supply { margin: 0.15rem 0 0; color: var(--hs-muted); font-size: var(--wp--preset--font-size--small); }
.hs-bundle__price { margin: 0.75rem 0 0; font-size: 2rem; font-weight: 800; color: var(--hs-ink); letter-spacing: -0.02em; line-height: 1.1; }
.hs-bundle__unit { margin: 0.2rem 0 0; color: var(--hs-muted); font-size: var(--wp--preset--font-size--small); }
.hs-bundle__save {
	margin: 0.6rem 0 1rem;
	min-height: 1.6em;
	font-weight: 700;
	color: var(--hs-green);
	font-size: var(--wp--preset--font-size--small);
}
.hs-bundle__form { margin-top: auto; width: 100%; }
.hs-bundle__button { width: 100%; cursor: pointer; }
.hs-bundle:not(.is-featured) .hs-bundle__button {
	background: #fff;
	color: var(--hs-green);
	box-shadow: inset 0 0 0 2px var(--hs-green);
}
.hs-bundle:not(.is-featured) .hs-bundle__button:hover { background: var(--hs-green); color: #fff; }
.hs-bundle__oos { margin-top: auto; color: var(--hs-muted); font-weight: 700; }
.hs-bundles__note { text-align: center; color: var(--hs-muted); font-size: var(--wp--preset--font-size--small); margin-top: 1.5rem; }

/* ---------- FAQ (core/details) ---------- */
.hs-faq .wp-block-details summary,
.hs-product-info .wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	font-weight: 700;
	font-size: 1.0625rem;
	color: var(--hs-ink);
}
.hs-faq .wp-block-details summary::-webkit-details-marker,
.hs-product-info .wp-block-details summary::-webkit-details-marker { display: none; }
.hs-faq .wp-block-details summary::after,
.hs-product-info .wp-block-details summary::after {
	content: "";
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background:
		linear-gradient(var(--hs-green), var(--hs-green)) center / 12px 2px no-repeat,
		linear-gradient(var(--hs-green), var(--hs-green)) center / 2px 12px no-repeat,
		var(--hs-mint);
	transition: transform 0.2s ease;
}
.hs-faq .wp-block-details[open] summary::after,
.hs-product-info .wp-block-details[open] summary::after {
	background:
		linear-gradient(var(--hs-green), var(--hs-green)) center / 12px 2px no-repeat,
		var(--hs-mint);
}
.hs-faq .wp-block-details > :not(summary) { margin-top: 0.75rem; color: var(--wp--preset--color--foreground); }

/* ---------- Disclaimer ---------- */
.hs-disclaimer {
	border: 1.5px solid var(--hs-ink);
	border-radius: var(--hs-radius-s);
	padding: 0.9rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--hs-ink);
	background: #fff;
}
.hs-disclaimer p { margin: 0; }
.hs-footer .hs-disclaimer { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }

/* ---------- Footer ---------- */
.hs-footer { color: rgba(255, 255, 255, 0.78); }
.hs-footer h2, .hs-footer h3, .hs-footer .wp-block-site-title a { color: #fff; }
.hs-footer a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.hs-footer a:hover { color: var(--hs-lime); text-decoration: underline; }
.hs-footer .hs-footer__links { list-style: none; padding: 0; margin: 0.9rem 0 0; display: grid; gap: 0.5rem; }
.hs-footer .hs-legal { color: rgba(255, 255, 255, 0.62); margin: 0; }
.hs-footer .wp-block-separator { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); background: none; opacity: 1; }
.hs-footer .wp-block-site-title { font-size: 1.5rem; }

/* ---------- Product page ---------- */
.hs-product .wp-block-woocommerce-product-image-gallery { max-width: none; }
.hs-product .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0; }
.hs-product .wp-block-post-title { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); }
.hs-product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery__image,
.hs-product .wp-block-woocommerce-product-image-gallery .flex-viewport {
	border-radius: var(--hs-radius-l);
	overflow: hidden;
	background: var(--hs-surface);
}
.hs-product .flex-control-thumbs { display: flex; gap: 0.75rem; margin-top: 0.75rem !important; }
.hs-product .flex-control-thumbs li { width: calc((100% - 2.25rem) / 4) !important; }
.hs-product .flex-control-thumbs img {
	border-radius: var(--hs-radius-s);
	border: 2px solid transparent;
	opacity: 0.7;
}
.hs-product .flex-control-thumbs img.flex-active,
.hs-product .flex-control-thumbs img:hover { border-color: var(--hs-green); opacity: 1; }
.hs-product .woocommerce-product-gallery__trigger {
	background: #fff;
	border-radius: 50%;
	box-shadow: var(--hs-shadow);
}

.hs-price-from { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; }
.hs-price-from__unit { font-size: 0.55em; font-weight: 600; color: var(--hs-muted); }
.hs-price-from__note {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.5em;
	font-weight: 700;
	color: var(--hs-green);
}
.wc-block-product .hs-price-from__note,
.wc-block-grid__product .hs-price-from__note { font-size: 0.8125rem; }

.hs-product .wp-block-woocommerce-product-summary ul { padding-left: 0; list-style: none; display: grid; gap: 0.5rem; }
.hs-product .wp-block-woocommerce-product-summary li { position: relative; padding-left: 1.75rem; }
.hs-product .wp-block-woocommerce-product-summary li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--hs-mint) url("../img/icons/check-green.svg") center / 14px no-repeat;
}

/* Pack cards replacing the dropdown. */
.hs-packs { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.7rem; min-width: 0; }
.hs-packs__legend { font-weight: 800; color: var(--hs-ink); margin-bottom: 0.7rem; padding: 0; font-size: 1.0625rem; }
.hs-pack {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.9rem;
	padding: 0.95rem 1.1rem;
	border: 2px solid var(--hs-line);
	border-radius: var(--hs-radius-m);
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.hs-pack:hover { border-color: #b9cfaa; }
.hs-pack.is-selected { border-color: var(--hs-green); background: var(--hs-surface); box-shadow: var(--hs-shadow); }
.hs-pack.is-disabled { opacity: 0.5; cursor: not-allowed; }
.hs-pack__input { position: absolute; opacity: 0; pointer-events: none; }
.hs-pack__input:focus-visible + .hs-pack__check { outline: 3px solid var(--hs-lime); outline-offset: 2px; }
.hs-pack__check {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #aebfa5;
	background: #fff;
}
.hs-pack.is-selected .hs-pack__check {
	border-color: var(--hs-green);
	background: radial-gradient(circle, var(--hs-green) 0 5px, #fff 6px);
}
.hs-pack__main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; min-width: 0; }
.hs-pack__title { font-weight: 800; color: var(--hs-ink); font-size: 1.0625rem; }
.hs-pack__badge {
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--hs-lime);
	color: var(--hs-ink);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.hs-pack__supply { flex-basis: 100%; color: var(--hs-muted); font-size: 0.875rem; }
.hs-pack__side { display: grid; justify-items: end; text-align: right; line-height: 1.25; }
.hs-pack__price { font-weight: 800; font-size: 1.125rem; color: var(--hs-ink); }
.hs-pack__unit { color: var(--hs-muted); font-size: 0.8125rem; }
.hs-pack__save { color: var(--hs-green); font-weight: 800; font-size: 0.8125rem; }

/* Hide the original dropdown row once the cards are ready (it stays in the form for WooCommerce). */
form.hs-packs-ready table.variations { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.variations_form .reset_variations { display: none !important; }

/* Classic add-to-cart form */
.hs-product form.cart { margin-bottom: 1.25rem; }
.hs-product .single_variation_wrap .woocommerce-variation-price { display: none; }
.hs-product .single_variation_wrap .woocommerce-variation-availability { font-size: var(--wp--preset--font-size--small); color: var(--hs-muted); }
.hs-product .woocommerce-variation-add-to-cart,
.hs-product form.cart:not(.variations_form) {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
	flex-wrap: wrap;
}
.hs-product .quantity .qty {
	width: 4.5rem;
	height: 100%;
	min-height: 3.1rem;
	border: 2px solid var(--hs-line);
	border-radius: 999px;
	text-align: center;
	font: inherit;
	font-weight: 700;
	color: var(--hs-ink);
	background: #fff;
}
.hs-product .single_add_to_cart_button {
	flex: 1 1 220px;
	min-height: 3.1rem;
	font-size: 1.0625rem !important;
	cursor: pointer;
}
.hs-product .single_add_to_cart_button.disabled { opacity: 0.55; cursor: not-allowed; }

.hs-assurances {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem 1rem;
	padding: 1rem 1.1rem;
	border-radius: var(--hs-radius-m);
	background: var(--hs-surface);
	font-size: var(--wp--preset--font-size--small);
}
.hs-assurances > * { margin: 0 !important; }
.hs-assurances .wp-block-group { display: flex; align-items: center; gap: 0.55rem; }
.hs-assurances .wp-block-image { margin: 0; flex: none; }
.hs-assurances img { width: 30px; height: 30px; flex: none; }
.hs-assurances p { margin: 0; font-weight: 600; color: var(--hs-ink); line-height: 1.3; }

.hs-product-info .wp-block-details summary { font-size: 1rem; }
.hs-product-info .wp-block-details summary::after { width: 24px; height: 24px; }
.hs-product-info .wp-block-details > :not(summary) { margin-top: 0.6rem; font-size: var(--wp--preset--font-size--small); }

/* Product tabs (description / reviews) */
.hs-product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 0.5rem;
	padding: 0;
	margin: 0 0 1.5rem;
	list-style: none;
	border-bottom: 1px solid var(--hs-line);
}
.hs-product .woocommerce-tabs ul.tabs::before, .hs-product .woocommerce-tabs ul.tabs li::before, .hs-product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.hs-product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0 !important; background: none !important; }
.hs-product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.8rem 1rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--hs-muted);
	border-bottom: 3px solid transparent;
}
.hs-product .woocommerce-tabs ul.tabs li.active a { color: var(--hs-ink); border-bottom-color: var(--hs-green); }
.hs-product .woocommerce-Tabs-panel { max-width: 760px; }
.hs-product .woocommerce-Tabs-panel > h2:first-child { display: none; }
.hs-product #reviews .comment-form input[type="text"],
.hs-product #reviews .comment-form input[type="email"],
.hs-product #reviews .comment-form textarea {
	width: 100%;
	border: 2px solid var(--hs-line);
	border-radius: var(--hs-radius-s);
	padding: 0.7rem 0.9rem;
	font: inherit;
}
.hs-product #reviews .stars a { color: var(--hs-green); }

.hs-product .woocommerce-breadcrumb { font-size: var(--wp--preset--font-size--small); color: var(--hs-muted); }
.hs-product .woocommerce-breadcrumb a { color: var(--hs-muted); }

/* Sticky summary on large screens. */
@media (min-width: 960px) {
	.hs-product .wp-block-columns > .wp-block-column:first-child {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 120px);
		align-self: flex-start;
	}
}

/* ---------- Store notices, cart & checkout ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.wc-block-components-notice-banner {
	border-radius: var(--hs-radius-s) !important;
}
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	border-radius: 999px !important;
	font-weight: 700 !important;
}
.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control input,
.wc-block-components-select-input select,
.wc-blocks-components-select__select {
	border-radius: var(--hs-radius-s) !important;
}
.hs-checkout-header .hs-secure {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--hs-green);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
}
.hs-checkout-header .hs-secure { margin: 0; }
.hs-checkout-header .hs-secure::before {
	content: "";
	width: 18px;
	height: 18px;
	background: url("../img/icons/lock-green.svg") center / contain no-repeat;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.hs-bundles { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; gap: 1.75rem; }
}
@media (max-width: 781px) {
	.hs-hero h1 { max-width: none; }
	.hs-hero__art img { max-width: 440px; }
	.hs-assurances { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.hs-pack { grid-template-columns: auto 1fr; }
	.hs-pack__side { grid-column: 2; justify-items: start; text-align: left; display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; align-items: baseline; }
}
