/* Brand defaults: unlayered Elementor styles override this layer. */
@layer pogi-vendor, pogi-theme;
@layer pogi-theme {
/* Automatic brand typography, actions and fields; no utility class required. */
body {
	color: var(--hp-color-text);
	background-color: var(--hp-color-surface);
	font-family: var(--hp-font-body);
	font-size: var(--v-font-size-md);
	line-height: var(--hp-line-height-base);
}

/* Keep rich-text emphasis readable in Parkinsans at body sizes. */
:where(p, li, dd, figcaption, .e-paragraph-base) :is(strong, b) {
	font-weight: var(--hp-font-weight-emphasis);
	letter-spacing: var(--hp-letter-spacing-emphasis);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--hp-color-heading);
	font-family: var(--hp-font-heading);
	font-weight: 600;
	line-height: var(--hp-line-height-tight);
	letter-spacing: var(--hp-letter-spacing-tight);
}

h1 {
	font-size: var(--v-font-size-2xl);
}

h2 {
	font-size: var(--v-font-size-xl);
}

h3 {
	font-size: var(--v-font-size-lg);
}
h4 { font-size: var(--v-font-size-h4); }
h5 { font-size: var(--v-font-size-h5); }
h6 { font-size: var(--v-font-size-h6); }
:where(a) { color: var(--hp-color-link); }
:where(a:hover) { color: var(--hp-color-link-hover); }

/* Default heading rhythm; component and Elementor overrides remain available. */
html:root :where(h1) { margin-block: var(--hp-heading-h1-margin); }
html:root :where(h2) { margin-block: var(--hp-heading-h2-margin); }
html:root :where(h3) { margin-block: var(--hp-heading-h3-margin); }
html:root :where(h4) { margin-block: var(--hp-heading-h4-margin); }
html:root :where(h5) { margin-block: var(--hp-heading-h5-margin); }
html:root :where(h6) { margin-block: var(--hp-heading-h6-margin); }

/* Container padding owns the leading space; nearby headings stay grouped. */
html:root :where(h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child) {
	margin-block-start: 0;
}
html:root :where(h1, h2, h3, h4, h5, h6) + :where(h1, h2, h3, h4, h5, h6) {
	margin-block-start: var(--v-space-md);
}

:where(p, li, label, input, textarea, select, button):not(:where(.wp-block-woocommerce-checkout *, .wp-block-woocommerce-cart *)) {
	font-size: var(--v-font-size-md);
}

/* Sitewide actions share the single-product button treatment. Widget layout stays editable. */
html:root body :is(.hp-button, .elementor-button, .e-button-base, .e-form-submit-button-base,
.wp-block-button__link, button[type="submit"], input[type="submit"], .woocommerce .button, .wc-block-components-button,
.pogi-products__button, .pogi-account-modal__primary-link, .hp-updates-form button, .hp-prose button) {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--hp-button-min-height);
	max-width: 100%;
	padding: var(--hp-button-padding);
	border: 1px solid var(--hp-button-border);
	border-radius: var(--hp-radius-button);
	background: var(--hp-color-button);
	color: var(--v-palette-white);
	box-shadow: none;
	font-family: var(--hp-font-heading);
	font-size: var(--hp-button-font-size, var(--v-font-size-md));
	font-weight: var(--hp-button-font-weight);
	line-height: 1.4;
	letter-spacing: var(--hp-button-letter-spacing);
	text-align: center;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
	transition: background-color var(--hp-duration-fast) var(--hp-ease-standard), border-color var(--hp-duration-fast) var(--hp-ease-standard);
}
html:root body :is(.hp-button, .elementor-button, .e-button-base, .e-form-submit-button-base,
.wp-block-button__link, button[type="submit"], input[type="submit"], .woocommerce .button, .wc-block-components-button,
.pogi-products__button, .pogi-account-modal__primary-link, .hp-updates-form button, .hp-prose button):is(:hover, :active, :focus-visible):not(:disabled):not([aria-disabled="true"]) {
	background: var(--hp-color-button-hover);
	border-color: var(--hp-color-button-hover);
	color: var(--v-palette-white);
	box-shadow: none;
	filter: none;
	transform: none;
}
html:root body :is(.hp-button, .elementor-button, .e-button-base, .e-form-submit-button-base,
.wp-block-button__link, button[type="submit"], input[type="submit"], .woocommerce .button, .wc-block-components-button,
.pogi-products__button, .pogi-account-modal__primary-link, .hp-updates-form button, .hp-prose button):focus-visible {
	outline: 2px solid var(--hp-color-brand-primary);
	outline-offset: 4px;
}
html:root body .hp-hero :is(.e-button-base, .elementor-button):focus-visible {
	outline-color: var(--hp-hero-ink, var(--hp-color-brand-primary));
}
html:root body :is(.hp-button, .elementor-button, .e-button-base, .e-form-submit-button-base,
.wp-block-button__link, button[type="submit"], input[type="submit"], .woocommerce .button, .wc-block-components-button,
.pogi-products__button, .pogi-account-modal__primary-link, .hp-updates-form button, .hp-prose button):is(:disabled, [aria-disabled="true"]) {
	cursor: not-allowed;
	opacity: 0.55;
	transform: none;
}

/* Field defaults sit below authored Elementor styles and specialized commerce controls.
 * Leave hidden, check/radio, file, range, and submit inputs in their native roles. */
html:root :where(input:not([type]), input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="search"], [type="password"], [type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]), textarea, select:not(.select2-hidden-accessible)):not(:where(.wp-block-woocommerce-checkout *, .wp-block-woocommerce-cart *)) {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: var(--hp-field-min-height);
	padding: var(--hp-field-padding);
	border: 1px solid var(--hp-field-border);
	border-radius: var(--hp-field-radius);
	background-color: var(--hp-field-background);
	color: var(--hp-color-text);
	font: 400 1rem/1.4 var(--hp-font-body);
}
html:root :where(input, textarea)::placeholder {
	color: var(--hp-color-muted);
	opacity: 1;
}
html:root :where(textarea) { min-height: 9rem; resize: vertical; }
html:root :where(label:not(:has(input:is([type="checkbox"], [type="radio"]))):not(.woocommerce-form__label-for-checkbox)):not(:where(.wp-block-woocommerce-checkout *, .wp-block-woocommerce-cart *)) {
	display: block;
	margin-block-end: 0.625rem;
	font-size: var(--v-font-size-sm);
	font-weight: 600;
	line-height: 1.5;
}
html:root :where(input, textarea, select):focus-visible {
	outline: 2px solid var(--hp-field-focus);
	outline-offset: 2px;
}
html:root :where(input, textarea, select)[aria-invalid="true"] { border-color: var(--hp-color-danger); }
html:root :where(input, textarea, select):disabled {
	background-color: var(--hp-color-surface-alt);
	cursor: not-allowed;
}
html:root :where(input:is([type="checkbox"], [type="radio"])) {
	accent-color: var(--hp-color-brand-primary);
}

/* Semantic, top-level page sections receive the default without a utility class.
 * Nested containers and site header/footer templates are intentionally excluded.
 * Atomic modifier classes set --hp-section-gap; explicit Elementor margins also win.
 * The editor canvas nests top-level elements in .elementor-section-wrap; match both. */
:where(main > section, :is([data-elementor-type="wp-page"], [data-elementor-type="wp-post"]) > section,
:is([data-elementor-type="wp-page"], [data-elementor-type="wp-post"]) > .elementor-section-wrap > section) {
	margin-block-start: 0;
	margin-block-end: var(--hp-section-gap, var(--v-section-gap-md));
}

}
