/* ==========================================================================
   Hemp Life SoCal - late corrections.

   Loads after the whole ported Shopify cascade. Two jobs:

   1. Restore a handful of Dawn rules that are present in base.css but never
      reach the page in this build - the inline header menu was rendering as a
      stacked list because of it, making the header 316px tall.
   2. WooCommerce-only adjustments with no Shopify equivalent.

   Nothing here should invent a new hl- class. Anything WordPress-only is hlw-.
   ========================================================================== */

/* ------------------------------------------- restored Dawn list menus --- */

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

.list-menu--inline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
}

.list-menu__item {
	display: flex;
	align-items: center;
	line-height: calc(1 + 0.3 / var(--font-body-scale, 1));
}

.list-menu__item--link {
	text-decoration: none;
	padding-bottom: 1rem;
	padding-top: 1rem;
	line-height: calc(1 + 0.8 / var(--font-body-scale, 1));
}

@media screen and (min-width: 750px) {
	.list-menu__item--link {
		padding-bottom: 0.5rem;
		padding-top: 0.5rem;
	}
}

/* the header's own menu items */
.header__menu-item {
	display: flex;
	align-items: center;
	padding: 1.2rem;
	text-decoration: none;
	color: rgb(var(--color-foreground));
	word-wrap: break-word;
}

.header__menu-item span { line-height: 1; }

.header__menu-item:hover { color: rgba(var(--color-foreground), 0.75); }

.header__inline-menu .mega-menu > summary { list-style: none; cursor: pointer; }
.header__inline-menu .mega-menu > summary::-webkit-details-marker { display: none; }
.header__inline-menu .mega-menu > summary::marker { content: ''; }

/* the caret should flip when its panel is open */
.header__inline-menu details[open] > summary .icon-caret { transform: rotate(180deg); }
.header__menu-item .icon-caret { height: 0.6rem; margin-left: 0.4rem; transition: transform 0.15s ease; }

/* ------------------------------------------------ WooCommerce layer ---- */

/* Woo's default loop is replaced by the hl-pc card, but the cart, checkout and
   account pages still render Woo markup inside .page-width. */
.woocommerce-cart .page-width,
.woocommerce-checkout .page-width,
.woocommerce-account .page-width {
	padding-block: clamp(3.2rem, 5vw, 6.4rem);
}

.woocommerce-cart main .woocommerce,
.woocommerce-checkout main .woocommerce,
.woocommerce-account main .woocommerce {
	max-width: var(--page-width, 130rem);
	margin-inline: auto;
	padding-inline: clamp(1.6rem, 4vw, 5rem);
	padding-block: clamp(3.2rem, 5vw, 6.4rem);
}

.woocommerce table.shop_table {
	border-radius: var(--hl-r-md, 1.6rem);
	border-color: rgba(var(--color-foreground), 0.12);
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: rgb(var(--color-button));
	color: rgb(var(--color-button-text));
	border-radius: var(--hl-pill, 999px);
	padding: 1.2rem 2.6rem;
	font-weight: 600;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover {
	background: rgb(var(--color-button));
	opacity: 0.88;
}

/* the single add-to-cart form inside the ported PDP */
.hl-pdp__buy form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
	align-items: center;
	margin: 2rem 0;
}

.hl-pdp__buy .quantity input {
	height: 4.8rem;
	width: 7rem;
	border-radius: var(--hl-pill, 999px);
	border: 0.1rem solid rgba(var(--color-foreground), 0.18);
	text-align: center;
}

.hl-pdp__buy .single_add_to_cart_button { flex: 1 1 22rem; min-height: 4.8rem; }

.hl-pdp__buy .variations { width: 100%; }
.hl-pdp__buy .variations td,
.hl-pdp__buy .variations th { padding: 0.6rem 0; }
.hl-pdp__buy .variations select {
	width: 100%;
	min-height: 4.4rem;
	border-radius: var(--hl-r-sm, 1.2rem);
	border: 0.1rem solid rgba(var(--color-foreground), 0.18);
	padding: 0 1.2rem;
	background-color: rgb(var(--color-background));
}

/* ----------------------------------------------------- page defaults --- */

/* content pages (About, FAQ, policies) get the same measure as Shopify */
.hlw-page {
	max-width: var(--page-width, 130rem);
	margin-inline: auto;
	padding-inline: clamp(1.6rem, 4vw, 5rem);
	padding-block: clamp(3.2rem, 6vw, 7.2rem);
}

.hlw-page .entry-content,
.hlw-page .rte { max-width: 78ch; }

.hlw-page h1 { margin-bottom: 1.6rem; }

/* ---------------------------------------------------------- logo size -- */
/* Dawn sets the logo width from a theme setting that has no equivalent here,
   so without this the full 986px artwork pushed the header to 131px tall. */

.header__heading-logo {
	width: 13rem;
	max-width: 100%;
	height: auto;
	display: block;
}

@media screen and (min-width: 990px) {
	.header__heading-logo { width: 16rem; }
}

.header__heading,
.header__heading-link {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}

/* the footer logo sits on the green ground, and the artwork is black */
.footer__logo {
	width: 15rem;
	max-width: 100%;
	height: auto;
	display: block;
	margin-bottom: 1.6rem;
	filter: brightness(0) invert(1);
}

/* ------------------------------------------------- content pages ------- */

.hlw-page__head { margin-bottom: clamp(2rem, 3vw, 3.2rem); }
.hlw-page .entry-content > :first-child { margin-top: 0; }
.hlw-page .entry-content h2 { margin-top: 3.2rem; }
.hlw-page .entry-content ul,
.hlw-page .entry-content ol { padding-left: 2.2rem; }
.hlw-page .entry-content li { margin-bottom: 0.6rem; }

/* the Affiliates page ships its own full-width design */
.hlw-page .hl { width: auto; margin-left: 0; }


/* ======================================================== product card ===
   WooCommerce's own a.button rules out-specify hl-mobile.css here: they
   reset the card button to inline-block and hang a block ::after clearfix
   off it, which is what pushed "Add to cart" off centre. */
.hl-pc .hl-pc__actions .hl-pc__add {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
}

.hl-pc .hl-pc__actions .hl-pc__add::before,
.hl-pc .hl-pc__actions .hl-pc__add::after {
	content: none;
}

/* Woo appends its own "View cart" link after an ajax add. The drawer opens
   and says the same thing, and the extra link breaks the card's rhythm. */
.hl-pc .hl-pc__actions .added_to_cart {
	display: none;
}

/* ============================================================ buy box ===
   Quantity stepper and Add to cart, matching the Shopify product page.
   Border thickness and radius come from the theme settings there:
   buttons_border_thickness 3, buttons_radius 32. */
.hl-pdp__buy form.cart {
	display: grid;
	gap: 1.2rem;
	margin: 0 0 2.4rem;
}

.hl-pdp__buy .hlw-qty-label {
	display: block;
	margin: 0;
	font-size: 1.4rem;
	color: rgba(var(--color-foreground, 4 34 5) / 0.75);
}

.hl-pdp__buy .quantity {
	display: inline-flex;
	align-items: center;
	width: 14rem;
	height: 5.2rem;
	border: 0.1rem solid rgba(var(--color-foreground, 4 34 5) / 0.2);
	border-radius: 4rem;
	background: transparent;
	overflow: hidden;
}

.hl-pdp__buy .quantity .quantity__button {
	flex: 0 0 4.4rem;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: none;
	color: rgb(var(--color-foreground, 4 34 5));
	cursor: pointer;
}

.hl-pdp__buy .quantity .quantity__button svg {
	width: 1.2rem;
	height: 1.2rem;
}

.hl-pdp__buy .quantity input.qty {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: center;
	font-size: 1.5rem;
	color: rgb(var(--color-foreground, 4 34 5));
	-moz-appearance: textfield;
	appearance: textfield;
}

.hl-pdp__buy .quantity input.qty::-webkit-outer-spin-button,
.hl-pdp__buy .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hl-pdp__buy form.cart button.single_add_to_cart_button,
.hl-pdp__buy form.cart .single_add_to_cart_button.button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 5.2rem;
	padding: 1.2rem 2.4rem;
	border: 0.3rem solid rgb(var(--color-foreground, 4 34 5));
	border-radius: 3.2rem;
	background: transparent;
	color: rgb(var(--color-foreground, 4 34 5));
	font-size: 1.5rem;
	font-weight: 600;
	text-align: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.hl-pdp__buy form.cart button.single_add_to_cart_button:hover,
.hl-pdp__buy form.cart .single_add_to_cart_button.button:hover {
	background: rgb(var(--color-foreground, 4 34 5));
	color: rgb(var(--color-background, 255 255 255));
}

.hl-pdp__buy form.cart .single_add_to_cart_button::before,
.hl-pdp__buy form.cart .single_add_to_cart_button::after {
	content: none;
}


/* ========================================================= link colour ===
   Hello Elementor's reset colours a bare <a> #c36, and the ported Shopify
   layer only ever set link colours per component - so anything Dawn left
   to inherit came out pink. :where() keeps the specificity at a single
   element so component rules still win. */
body a:where(:not([class])) {
	color: rgb(var(--color-link, 4 34 5));
}

#hl-cart-drawer .cart-item__name,
#hl-cart-drawer .cart-item__media,
#hl-cart-drawer .hl-xsell__name,
#hl-cart-drawer .hl-xsell__media,
#hl-cart-drawer .cart__view,
#hl-cart-drawer .added_to_cart {
	color: rgb(var(--color-foreground, 4 34 5));
}

#hl-cart-drawer .cart-item__remove {
	color: rgba(var(--color-foreground, 4 34 5) / 0.65);
}

#hl-cart-drawer .cart-item__remove:hover {
	color: rgb(var(--color-foreground, 4 34 5));
}


/* ===================================================== contact confirm ===
   The sent state replaces the form, so it needs the same card treatment -
   hl-contact.css only styles the form itself. */
.hl-cform__done {
	padding: 3.2rem;
	border: 0.1rem solid rgba(var(--color-foreground, 4 34 5) / 0.14);
	border-radius: 2.2rem;
	background: rgb(var(--color-background, 255 255 255));
}

.hl-cform__done p {
	margin: 0.8rem 0 0;
	color: rgba(var(--color-foreground, 4 34 5) / 0.75);
}


/* ======================================================= search and 404 ===
   The search box reuses the collection hero, so it only needs the field and
   button laid out. */
.hl-searchform {
	display: flex;
	gap: 1rem;
	margin: 2.4rem 0 0;
	max-width: 48rem;
}

.hl-searchform input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 5.2rem;
	padding: 0 2rem;
	border: 0.1rem solid rgba(var(--color-foreground, 4 34 5) / 0.2);
	border-radius: 4rem;
	background: rgb(var(--color-background, 255 255 255));
	font-size: 1.5rem;
	color: rgb(var(--color-foreground, 4 34 5));
}

.hl-searchform .button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 5.2rem;
	padding: 0 2.8rem;
	border: 0;
	border-radius: 4rem;
	background: rgb(var(--color-foreground, 4 34 5));
	color: rgb(var(--color-background, 255 255 255));
	font-size: 1.5rem;
	font-weight: 600;
}

.hl-searchpages {
	margin: 6.4rem 0 0;
	padding: 3.2rem 0 0;
	border-top: 0.1rem solid rgba(var(--color-foreground, 4 34 5) / 0.12);
}

.hl-searchpages__list {
	list-style: none;
	margin: 1.6rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.8rem;
}

.hl-searchpages__list a {
	color: rgb(var(--color-foreground, 4 34 5));
	text-underline-offset: 0.3em;
}


/* ================================================ cart and checkout width ===
   main is a column flex container. A child with `margin: 0 auto` in one of
   those sizes to fit-content instead of stretching, which collapsed the cart
   and checkout pages into a ~280px column in the middle of the screen. */
.content-for-layout > .hlw-page,
.content-for-layout > .page-width,
.content-for-layout > article,
.content-for-layout > section {
	width: 100%;
}

/* The Woo cart and checkout blocks want room for their two-column layout. */
.woocommerce-cart .hlw-page,
.woocommerce-checkout .hlw-page {
	max-width: 120rem;
}

.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
	max-width: none;
}


/* ================================================ menu drawer stacking ===
   The drawer panel is absolutely positioned inside the header and sits at
   z-index 3. Without a stacking context on the header itself the hero
   section painted straight over it, so the menu opened invisibly. */
.section-header {
	position: relative;
	z-index: 20;
}

.menu-drawer {
	background-color: rgb(var(--color-background, 255 255 255));
}
