/* ==========================================================================
   Global tokens, reset, layout primitives.
   ========================================================================== */

:root {
	--color-bg: #ffffff;
	--color-bg-soft: #faf6ec;
	--color-header-bg: #f4efe5;
	--color-text: #2a2118;
	--color-text-soft: #5a4f44;
	--color-accent: #8b1f4f;
	--color-accent-dark: #6f1840;
	--color-accent-soft: #b1487a;
	--color-active: #6d903d;
	--color-active-dark: #587630;
	--color-border: #e5dccd;
	--color-white: #ffffff;
	--color-black: #000000;

	--font-sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;

	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 16px;
	--radius-pill: 999px;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
	--shadow-md: 0 6px 18px rgba(0, 0, 0, .08);

	--container-max: 1440px;
	--container-pad: 16px;

	--header-height: 96px;
	--transition-fast: 150ms ease;
	--transition-base: 220ms ease;
}

/* Modern reset --------------------------------------------------------- */

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	-moz-tab-size: 4;
	tab-size: 4;
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-fast);
}

.primary-nav__list,
.primary-nav__list .sub-menu,
.social-icons,
.footer-nav__list,
.woocommerce-MyAccount-navigation ul,
.woocommerce-checkout-payment ul.payment_methods {
	padding: 0;
	list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

#primary,
.site-main {
	min-height: 50vh;
}

/* WordPress editor compatibility -------------------------------------- */

.alignleft {
	float: left;
	margin: 0.35em var(--space-5) var(--space-4) 0;
}

.alignright {
	float: right;
	margin: 0.35em 0 var(--space-4) var(--space-5);
}

.aligncenter {
	clear: both;
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	margin-top: var(--space-2);
	color: var(--color-text-soft);
	font-size: 0.875em;
	line-height: 1.5;
}

@media (max-width: 639px) {

	.alignleft,
	.alignright {
		float: none;
		margin-inline: 0;
	}
}

/* Layout primitives ---------------------------------------------------- */

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

@media (min-width: 768px) {
	:root {
		--container-pad: 24px;
	}
}

/* Accessibility -------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	z-index: 1000;
	padding: 12px 16px;
	background: var(--color-text);
	color: var(--color-bg);
}

.skip-link:focus {
	top: 0;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* WooCommerce global notices ------------------------------------------ */

.herbatki-notice-region {
	position: fixed;
	z-index: 1000;
	top: calc(var(--header-height) + var(--space-4));
	right: var(--container-pad);
	display: grid;
	gap: var(--space-2);
	width: min(420px, calc(100vw - (var(--container-pad) * 2)));
	pointer-events: none;
}

.herbatki-notice {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) 28px;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-4) var(--space-4) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-white);
	color: var(--color-text);
	font-size: .9375rem;
	line-height: 1.45;
	box-shadow: 0 14px 36px rgba(42, 33, 24, .16);
	opacity: 0;
	transform: translateY(-12px) scale(.98);
	transition: opacity 260ms ease, transform 260ms cubic-bezier(.2, .8, .2, 1);
	pointer-events: auto;
}

.herbatki-notice__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--color-active);
	color: var(--color-white);
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 6px 14px color-mix(in srgb, var(--color-active) 30%, transparent);
}

.herbatki-notice.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.herbatki-notice__body {
	display: grid;
	gap: var(--space-2);
	min-width: 0;
}

.herbatki-notice__title {
	color: var(--color-text);
	font-weight: 800;
}

.herbatki-notice__link {
	justify-self: start;
	color: var(--color-accent);
	font-size: .9rem;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.herbatki-notice__link:hover,
.herbatki-notice__link:focus-visible {
	color: var(--color-accent-dark);
}

.herbatki-notice__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--radius-sm);
	color: var(--color-text-soft);
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1;
}

.herbatki-notice__close:hover,
.herbatki-notice__close:focus-visible {
	background: var(--color-bg-soft);
	color: var(--color-accent);
}
