/**
 * Grovidex base layer.
 *
 * Scoped foundations for Grovidex storefront sections. Every rule is
 * attached to a gvx- class (never a bare global element), so Astra,
 * Elementor, WooCommerce and existing pages are not restyled.
 */

/* ------------------------------------------------------------------
 * Box model — scoped to Grovidex sections only.
 * ------------------------------------------------------------------ */

.gvx-section,
.gvx-section *,
.gvx-section *::before,
.gvx-section *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------
 * Section foundation and vertical rhythm.
 * ------------------------------------------------------------------ */

.gvx-section {
	padding-block: var(--gvx-section-pad);
	font-family: var(--gvx-font-sans);
	font-size: var(--gvx-text-base);
	line-height: var(--gvx-leading-body);
	color: var(--gvx-ink-soft);
}

.gvx-section--tight {
	padding-block: calc(var(--gvx-section-pad) / 2);
}

.gvx-section--wash {
	background-color: var(--gvx-teal-wash);
}

/* ------------------------------------------------------------------
 * Container.
 * ------------------------------------------------------------------ */

.gvx-container {
	width: 100%;
	max-width: var(--gvx-container-max);
	margin-inline: auto;
	padding-inline: var(--gvx-container-pad);
}

/* ------------------------------------------------------------------
 * Typography foundation within Grovidex sections.
 * Margins are zeroed because Grovidex layouts space children with
 * flex/grid gap, not element margins.
 * ------------------------------------------------------------------ */

.gvx-section h1,
.gvx-section h2,
.gvx-section h3,
.gvx-section h4 {
	margin: 0;
	font-family: var(--gvx-font-sans);
	color: var(--gvx-ink);
	line-height: var(--gvx-leading-tight);
	overflow-wrap: break-word;
}

.gvx-section p {
	margin: 0;
}

.gvx-section ul,
.gvx-section ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ------------------------------------------------------------------
 * Accessible links inside Grovidex sections.
 * Interactive components (buttons, chips, cards) override as needed.
 * ------------------------------------------------------------------ */

.gvx-section a {
	color: var(--gvx-teal);
	text-underline-offset: 0.15em;
}

.gvx-section a:hover {
	color: var(--gvx-teal-dark);
}

/* ------------------------------------------------------------------
 * Responsive media defaults.
 * ------------------------------------------------------------------ */

.gvx-section img,
.gvx-section svg {
	max-width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------
 * Visually-hidden utility — content stays available to assistive
 * technology (suitable for real labels, e.g. the search field label).
 * ------------------------------------------------------------------ */

.gvx-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------
 * Focus visibility.
 * Outlines are never removed anywhere in Grovidex CSS; this only
 * standardizes the visible ring. Gold ring on dark teal surfaces.
 * ------------------------------------------------------------------ */

.gvx-section :focus-visible,
[class*="gvx-"]:focus-visible {
	outline: 2px solid var(--gvx-teal);
	outline-offset: 2px;
}

.gvx-on-dark :focus-visible,
.gvx-on-dark:focus-visible {
	outline-color: var(--gvx-gold);
}

/* ------------------------------------------------------------------
 * Reduced motion — neutralize Grovidex transitions and animations.
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	[class*="gvx-"],
	[class*="gvx-"]::before,
	[class*="gvx-"]::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
