/* ==========================================================================
   Heathylee theme
   Colours and fonts follow Elementor's Site Settings (global colours and
   fonts), so changing them in Elementor updates the shop screens too.
   ========================================================================== */

:root {
	--hl-heather: var(--e-global-color-primary, #5E4766);
	--hl-moss: var(--e-global-color-secondary, #4D5A3A);
	--hl-ink: var(--e-global-color-text, #2A2622);
	--hl-cinnamon: var(--e-global-color-accent, #A35F2E);
	--hl-mist: var(--e-global-color-hl_mist, #EEF0EA);
	--hl-grit: var(--e-global-color-hl_grit, #22201C);
	--hl-fawn: var(--e-global-color-hl_fawn, #CDB08A);
	--hl-line: rgba(42, 38, 34, 0.14);
	--hl-serif: "Young Serif", Georgia, "Times New Roman", serif;
	--hl-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	--hl-radius: 6px;
	--hl-wrap: 1240px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
	margin: 0;
	background: #fff;
	color: var(--hl-ink);
	font-family: var(--hl-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--hl-heather); text-underline-offset: .18em; }
a:hover { color: var(--hl-cinnamon); }

:focus-visible { outline: 3px solid var(--hl-cinnamon); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--hl-serif); font-weight: 400; line-height: 1.15; color: var(--hl-ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000; left: 12px; top: 12px; background: #fff; padding: 12px 18px; }

.hl-wrap { max-width: var(--hl-wrap); margin: 0 auto; padding: 0 24px; }
.hl-wrap--narrow { max-width: 820px; }
.site-main { min-height: 40vh; }
.hl-page-head { padding: 64px 0 12px; }
.hl-entry { padding-bottom: 48px; }

/* ---------- Header (sticky, shrinks on scroll) ---------- */
.hl-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff; /* solid: a backdrop-filter here would trap the fixed mobile menu panel */
	transition: box-shadow .25s ease;
}
.admin-bar .hl-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hl-site-header { top: 0; } }
.hl-site-header.is-scrolled { box-shadow: 0 1px 0 var(--hl-line); }
.hl-site-header .hl-logo img { width: auto !important; transition: max-height .25s ease; }
.hl-site-header.is-scrolled .hl-logo img { max-height: 52px; width: auto; }
.hl-site-header > .elementor > .e-con,
.hl-site-header > .elementor > .elementor-element { transition: padding .25s ease; }
.hl-site-header.is-scrolled > .elementor > .e-con { --padding-top: 6px; --padding-bottom: 6px; }

/* ---------- Back to top ---------- */
.hl-to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	width: 46px; height: 46px; border-radius: 50%;
	border: 0; cursor: pointer;
	background: var(--hl-grit); color: #fff;
	display: grid; place-items: center;
	opacity: 0; transform: translateY(12px); pointer-events: none;
	transition: opacity .25s ease, transform .25s ease, background .2s;
}
.hl-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.hl-to-top:hover { background: var(--hl-heather); }

/* ---------- Contour-line motif (add the class "hl-contours" to any container) ---------- */
.hl-contours { position: relative; isolation: isolate; }
.hl-contours::after {
	content: "";
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: url("../img/contours.svg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: .22;
}
.hl-contours--light::after { background-image: url("../img/contours-light.svg"); opacity: .12; }


/* Fact cards with a bottom "contour" rule */
.hl-fact { border-top: 3px solid var(--hl-heather); }
.hl-fact .elementor-image-box-img img, .hl-fact img { border-radius: var(--hl-radius); }

/* Shade chips used in copy */
.hl-shade { display: inline-flex; align-items: center; gap: .45em; }
.hl-shade::before { content: ""; width: .9em; height: .9em; border-radius: 50%; background: var(--hl-fawn); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.hl-shade--cinnamon::before { background: var(--hl-cinnamon); }

/* Elementor Image Gallery tweaks (foals) */
.hl-foals .gallery-item img { border-radius: var(--hl-radius); aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.hl-foals .gallery-item:hover img { transform: scale(1.03); }
.hl-foals .gallery-caption { font-family: var(--hl-serif); font-size: 1.05rem; padding-top: 8px; color: var(--hl-ink); }

/* Quote */
.hl-quote blockquote { margin: 0; }

/* Buttons used outside Elementor */
.hl-btn,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.wc-block-components-button:not(.is-link) {
	display: inline-block;
	background: var(--hl-heather) !important;
	color: #fff !important;
	border: 0;
	border-radius: var(--hl-radius) !important;
	padding: .85em 1.5em !important;
	font-family: var(--hl-sans);
	font-weight: 600;
	font-size: .98rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background .2s ease;
}
.hl-btn:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.wc-block-components-button:not(.is-link):hover { background: var(--hl-grit) !important; color: #fff !important; }
.woocommerce button.button:disabled, .woocommerce button.button.disabled { opacity: .5; }

/* ---------- WooCommerce ---------- */
.hl-shop-main { padding: 48px 0 80px; }
.heathylee-shop-screen .woocommerce-breadcrumb { font-size: .9rem; color: rgba(42,38,34,.7); margin-bottom: 24px; }
.heathylee-shop-screen .woocommerce-breadcrumb a { color: inherit; }
.woocommerce-products-header__title { margin-top: 0; }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; text-align: left; }
.woocommerce ul.products li.product a img { border-radius: var(--hl-radius); margin-bottom: 14px; aspect-ratio: 1; object-fit: cover; background: var(--hl-mist); transition: transform .35s ease; }
.woocommerce ul.products li.product a:hover img { transform: translateY(-3px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--hl-serif); font-weight: 400; font-size: 1.25rem !important; color: var(--hl-ink); padding: 0 !important; }
.woocommerce ul.products li.product .price { color: var(--hl-cinnamon) !important; font-size: 1.05rem !important; font-weight: 600; }
@media (max-width: 900px) { .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 520px) { .woocommerce ul.products { grid-template-columns: 1fr; } }

.woocommerce span.onsale, .hl-badge {
	background: var(--hl-grit); color: #fff; border-radius: 999px; min-height: 0; min-width: 0; line-height: 1;
	padding: .5em .9em; font-size: .78rem; font-weight: 600; letter-spacing: .01em;
}
.hl-badge { display: inline-block; margin: 0 0 10px; }
.woocommerce ul.products li.product .hl-badge { position: absolute; top: 12px; left: 12px; z-index: 2; margin: 0; }
.woocommerce ul.products li.product { position: relative; }

.woocommerce div.product .product_title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--hl-cinnamon); font-size: 1.5rem; font-weight: 600; }
.woocommerce div.product div.images img { border-radius: var(--hl-radius); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: var(--hl-radius) var(--hl-radius) 0 0; background: var(--hl-mist); border-color: var(--hl-line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; }
.woocommerce div.product form.cart .variations td, .woocommerce div.product form.cart .variations th { padding: 6px 0; vertical-align: middle; }
.woocommerce div.product form.cart .variations label { font-weight: 600; }
.woocommerce .quantity .qty { padding: .7em .4em; border: 1px solid var(--hl-line); border-radius: var(--hl-radius); }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { border-top-color: var(--hl-heather) !important; background: var(--hl-mist) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--hl-heather) !important; }

.hl-uk-notice {
	display: flex; gap: 12px; align-items: flex-start;
	background: var(--hl-mist); border-left: 3px solid var(--hl-moss);
	padding: 14px 16px; border-radius: 0 var(--hl-radius) var(--hl-radius) 0;
	font-size: .93rem; margin: 18px 0;
}
.hl-uk-notice svg { flex: 0 0 auto; margin-top: 3px; color: var(--hl-moss); }

/* Block-based cart/checkout */
.wc-block-cart, .wc-block-checkout { font-family: var(--hl-sans); }
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { padding: 32px 0 80px; }

/* Fallback header/footer */
.hl-fallback-header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.hl-fallback-brand { font-family: var(--hl-serif); font-size: 1.4rem; color: var(--hl-ink); text-decoration: none; }
.hl-fallback-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.hl-fallback-footer { padding: 40px 24px; border-top: 1px solid var(--hl-line); }

.hl-404 { padding: 120px 24px; text-align: center; }
