body,
h1,
h2,
h3,
h4,
p,
ul[class],
ol[class],
li,
figure,
figcaption,
blockquote,
dl,
dd {
	margin: 0;
	padding: 0;
}

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

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
	transition: background-color 5000s ease-in-out 0s;
}

/*
 * Site header (header.php, js/header.js), in the home page's language: white, Neue Haas Unica,
 * brand ink and gold, hairlines, 1.5px line icons. Two tiers on larger screens: the search
 * field, the centred logo and the account links, then the catalogue menu. Sticky: always in
 * view while the page scrolls. Phones: menu and search
 * on the left, the logo in the middle, wishlist and cart on the right.
 */

.site-header {
	--ink: #201600;
	--text: #565049;
	--muted: #6F6A63;
	--gold: #C49564;
	--gold-dark: #A97B4B;
	--line: #E3DED6;
	--porcelain: #ECEFED;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--gutter: 24px;
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 1000;
	background: #fff;
	color: var(--ink);
	font-family: "Neue Haas Unica", sans-serif;
	transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
	box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(32, 22, 0, 0.05);
}

.site-header a {
	color: inherit;
	text-decoration: none;
}

.site-header :focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}

/* Top tier: search, logo, links and icons */

.site-header__bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 24px;
	max-width: calc(1180px + 2 * var(--gutter));
	height: 76px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.site-header__start,
.site-header__end,
.site-header__actions {
	display: flex;
	align-items: center;
	min-width: 0;
}

.site-header__start {
	gap: 4px;
}

.site-header__end {
	justify-content: flex-end;
	gap: 28px;
}

.site-header__actions {
	gap: 8px;
	margin-right: -6px;
}

.site-header__logo {
	display: flex;
	justify-content: center;
	width: 150px;
}

.site-header__logo a {
	display: block;
	width: 100%;
}

.site-header__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.site-header__utility ul {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__utility a {
	position: relative;
	display: block;
	padding: 6px 0;
	color: var(--text);
	font-size: 14px;
	line-height: 1.2;
	white-space: nowrap;
	transition: color 0.2s;
}

/* Round icon buttons; the count sits on the icon's shoulder and hides at zero. */

.site-header__icon {
	position: relative;
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ink);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.site-header__svg {
	display: block;
	width: 24px;
	height: 24px;
}

/*
 * The count: a round badge just past the icon's top right corner, clear of the drawing.
 * It grows out of its centre when something is added and shrinks away at zero; a new number
 * drops in from above while the old one falls out below (js/header.js).
 */
.site-header .cart-count {
	position: absolute;
	top: 5px;
	right: -7px;
	display: grid;
	place-items: center;
	width: 17px;
	height: 17px;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 50%;
	background: var(--ink);
	color: #fff;
	font-family: "Neue Haas Unica", sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	pointer-events: none;
	box-sizing: border-box;
	transform-origin: center;
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-header .cart-count[data-count="0"] {
	transform: scale(0);
	transition-duration: 0.3s;
	transition-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
}

/* Both numbers share the one cell while they swap. */
.site-header .cart-count__num {
	grid-area: 1 / 1;
}

.site-header .cart-count__num.is-in {
	animation: site-header-count-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-header .cart-count__num.is-out {
	animation: site-header-count-out 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes site-header-count-in {
	from { opacity: 0; transform: translateY(-110%); }
}

@keyframes site-header-count-out {
	to { opacity: 0; transform: translateY(110%); }
}

.site-header .site-header__burger {
	display: none;
}

/* The search field in the header (inc/search.php): a soft pill, as in the search dialog. */

.site-header .ags-search-trigger {
	flex: 0 1 300px;
	height: 44px;
	padding: 0 18px 0 14px;
	border: 1px solid transparent;
	background: #F4F6F5;
	color: #8F877C;
	font-family: inherit;
	font-size: 14px;
	transition: border-color 0.2s, background-color 0.2s;
}

.site-header .ags-search-trigger .ags-search-icon {
	color: var(--ink);
}

/* Bottom tier: the catalogue menu */

.site-header__nav {
	position: relative;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.site-header .main-navigation {
	width: auto;
}

.site-header .main-navigation > div > ul {
	display: flex;
	justify-content: center;
	gap: 6px 36px;
	max-width: calc(1180px + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.site-header .main-navigation > div > ul > li {
	position: static;
}

.site-header .main-navigation > div > ul > li.menu-item-has-children:not(:first-child) {
	position: relative;
}

.site-header .main-navigation > div > ul > li > a {
	position: relative;
	display: flex;
	align-items: center;
	height: 50px;
	color: var(--ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.2s;
}

/* A gold line grows under the item on hover and stays under the current section. */
.site-header .main-navigation > div > ul > li > a::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 2px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--ease);
}

.site-header .main-navigation > div > ul > li.current-menu-item > a::after,
.site-header .main-navigation > div > ul > li.current-menu-ancestor > a::after,
.site-header .main-navigation > div > ul > li:hover > a::after {
	transform: scaleX(1);
}

.site-header .main-navigation > div > ul > li.is-open > a::after {
	transform: scaleX(1);
}

.site-header .main-navigation > div > ul > li.menu-item-has-children > a {
	gap: 6px;
}

/* A small chevron after items with a dropdown. */
.site-header .main-navigation > div > ul > li.menu-item-has-children > a::before {
	content: "";
	order: 2;
	width: 12px;
	height: 12px;
	background: currentColor;
	-webkit-mask: url('/wp-content/themes/agskindermo/css/../img/ph/caret-down.svg') center / contain no-repeat;
	mask: url('/wp-content/themes/agskindermo/css/../img/ph/caret-down.svg') center / contain no-repeat;
	transition: transform 0.3s var(--ease);
}

.site-header .main-navigation > div > ul > li.menu-item-has-children:hover > a::before {
	transform: rotate(180deg);
}

.site-header .main-navigation > div > ul > li.menu-item-has-children.is-open > a::before {
	transform: rotate(180deg);
}

/* Dropdowns: open on hover and on keyboard focus (not on a mouse click, which would keep them open).
   Focus sets .is-open from js/header.js: with :has(:focus-visible) the panel hid the moment Tab
   left the menu item, before focus could reach the panel, and focus fell to the page.
   Top tier only: a list inside a panel is not a dropdown, and replaying the animation on it each
   time the pointer crossed it made the text jump.
   Both ways on the short motion tokens (css/pages.css): a panel drops in and, when the pointer
   leaves, lifts and fades out the same way (display waits for it, allow-discrete); the pointer
   coming back while it fades keeps it open. Moved by translate, so the card's own transform
   (its centring) stays. */

.site-header .main-navigation > div > ul > li > ul,
.site-header .main-navigation > div > ul > li > .ags-mega {
	opacity: 0;
	transition:
		opacity var(--ags-pop-close, 0.2s) var(--ags-ease-close, ease),
		translate var(--ags-pop-close, 0.2s) var(--ags-ease-close, ease),
		display var(--ags-pop-close, 0.2s) allow-discrete;
}

/* The small cards drop; the mega panel, which spans the width under the menu tier, only fades. */
.site-header .main-navigation > div > ul > li > ul {
	translate: 0 -6px;
}

.site-header .main-navigation > div > ul > li:hover > ul,
.site-header .main-navigation > div > ul > li.is-open > ul,
.site-header .main-navigation > div > ul > li:hover > .ags-mega,
.site-header .main-navigation > div > ul > li.is-open > .ags-mega {
	opacity: 1;
	translate: none;
	transition:
		opacity var(--ags-pop-open, 0.3s) var(--ags-ease, ease-out),
		translate var(--ags-pop-open, 0.3s) var(--ags-ease, ease-out),
		display 0s allow-discrete;
}

.site-header .main-navigation > div > ul > li:hover > ul,
.site-header .main-navigation > div > ul > li.is-open > ul {
	display: flex;
}

.site-header .main-navigation > div > ul > li:hover > .ags-mega,
.site-header .main-navigation > div > ul > li.is-open > .ags-mega {
	display: block;
}

@starting-style {
	.site-header .main-navigation > div > ul > li:hover > ul,
	.site-header .main-navigation > div > ul > li.is-open > ul {
		opacity: 0;
		translate: 0 -6px;
	}

	.site-header .main-navigation > div > ul > li:hover > .ags-mega,
	.site-header .main-navigation > div > ul > li.is-open > .ags-mega {
		opacity: 0;
	}
}

/* Browsers without allow-discrete (Safari before 17.4): the opening as a keyframe animation. */
@supports not (transition-behavior: allow-discrete) {
	.site-header .main-navigation > div > ul > li:hover > ul,
	.site-header .main-navigation > div > ul > li.is-open > ul,
	.site-header .main-navigation > div > ul > li:hover > .ags-mega,
	.site-header .main-navigation > div > ul > li.is-open > .ags-mega {
		animation: site-header-drop var(--ags-pop-open, 0.3s) var(--ags-ease, ease-out);
	}
}

@keyframes site-header-drop {
	from { opacity: 0; }
}

/*
 * Mega menu "Атлас" (inc/mega-menu.php, js/header.js): a white panel under the menu tier. The
 * groups on the left switch on hover, the chosen group's items run as an index between
 * hairlines with their counts, and the preview on the right shows the group's photo, then the
 * bestseller of the item under the pointer. A porcelain strip at the foot.
 */
.site-header .ags-mega {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 99999;
	display: none;
	max-height: calc(100dvh - var(--ags-header-h, 170px));
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--line);
	background: #fff;
	box-shadow: 0 30px 60px rgba(32, 22, 0, 0.1);
	color: var(--ink);
	font-size: 16px;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	scrollbar-color: var(--gold) transparent;
}


.site-header .ags-mega p,
.site-header .ags-mega figure {
	margin: 0;
}

.site-header .ags-mega__inner {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr) 320px;
	gap: 64px;
	max-width: calc(1180px + 2 * var(--gutter));
	margin: 0 auto;
	padding: 40px var(--gutter) 44px;
}

.site-header .ags-mega__eyebrow {
	margin-bottom: 18px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* "Дивитись усе →": tracked capitals, a gold line grows under them on hover. */
.site-header .ags-mega__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
	color: var(--ink);
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-size 0.35s var(--ease);
}

.site-header .ags-mega__more::after {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url('/wp-content/themes/agskindermo/css/../img/ph/arrow-right.svg') center / contain no-repeat;
	mask: url('/wp-content/themes/agskindermo/css/../img/ph/arrow-right.svg') center / contain no-repeat;
	transition: transform 0.35s var(--ease);
}

/* Groups: large, pale until chosen; the chosen one moves aside for a short gold line. */
.site-header .ags-mega__rail {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.site-header .ags-mega__groups {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: auto;
	padding-bottom: 40px;
}

.site-header .ags-mega__group {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding: 6px 0;
	color: #A8A196;
	font-size: 26px;
	line-height: 1.15;
	letter-spacing: -0.015em;
	transition: color 0.25s, padding 0.45s var(--ease);
}

.site-header .ags-mega__group::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 18px;
	height: 1px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.45s var(--ease);
}

.site-header .ags-mega__group sup {
	position: static;
	margin-top: 4px;
	color: var(--gold);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.04em;
	vertical-align: baseline;
}

.site-header .ags-mega__group[aria-current="true"] {
	padding-left: 28px;
	color: var(--ink);
}

.site-header .ags-mega__group[aria-current="true"]::before {
	transform: scaleX(1);
}

.site-header .ags-mega__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 6px;
}

.site-header .ags-mega__head .ags-mega__eyebrow {
	margin: 0;
}

.site-header .ags-mega__panel[hidden] {
	display: none;
}

.site-header .ags-mega__panel.is-entering {
	animation: ags-mega-panel 0.4s var(--ease);
}

@keyframes ags-mega-panel {
	from { opacity: 0; transform: translateY(6px); }
}

/* The index: rows between hairlines, a gold step number, the count at the end. More than eight
   items run in two columns. (style.css hides and flexes every list in the menu.) */
.site-header .ags-mega ul.ags-mega__index {
	display: grid;
	grid-auto-flow: row;
	column-gap: 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header .ags-mega ul.ags-mega__index--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-header .ags-mega__index a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	font-size: 16px;
	line-height: 1.35;
}

.site-header .ags-mega__index--steps a {
	grid-template-columns: 18px minmax(0, 1fr) auto;
}

.site-header .ags-mega__num {
	display: none;
	color: var(--gold);
	font-size: 11px;
	letter-spacing: 0.1em;
	font-variant-numeric: tabular-nums;
}

.site-header .ags-mega__index--steps .ags-mega__num {
	display: block;
}

/* Items after the steps ("Додатковий догляд") get a dash in place of a number. */
.site-header .ags-mega__index--steps .ags-mega__num:empty::before {
	content: "—";
}

.site-header .ags-mega__name {
	transition: color 0.2s, transform 0.35s var(--ease);
}

.site-header .ags-mega__count {
	color: #A8A196;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.site-header .ags-mega__index a:focus-visible .ags-mega__name,
.site-header .ags-mega__index a.is-previewed .ags-mega__name {
	color: var(--gold-dark);
	transform: translateX(4px);
}

/* Preview: a porcelain tile; product shots (white backgrounds) multiply into it. */
.site-header .ags-mega__preview {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.site-header .ags-mega__frame {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 14px;
	background: #F4F6F5;
}

.site-header .ags-mega__frame img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transition: opacity 0.4s, transform 0.8s var(--ease);
}

.site-header .ags-mega__frame img.is-photo {
	object-fit: cover;
}

.site-header .ags-mega__frame img.is-product {
	object-fit: contain;
	mix-blend-mode: multiply;
	transform: scale(1.12);
}

.site-header .ags-mega__frame img.is-out {
	opacity: 0;
	transform: scale(1.03);
}

.site-header .ags-mega__frame img.is-product.is-out {
	transform: scale(1.16);
}

.site-header .ags-mega__cap-k {
	display: block;
	min-height: 15px;
	margin-bottom: 4px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-header .ags-mega__cap-t {
	display: block;
	font-size: 20px;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.site-header .ags-mega__cap-p {
	display: block;
	min-height: 20px;
	margin-top: 6px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}

.site-header .ags-mega__foot {
	border-top: 1px solid var(--line);
	background: #F4F6F5;
}

.site-header .ags-mega__foot-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: calc(1180px + 2 * var(--gutter));
	margin: 0 auto;
	padding: 16px var(--gutter);
	color: var(--text);
	font-size: 14px;
}

.site-header .ags-mega__foot-in p {
	display: flex;
	align-items: center;
	gap: 16px;
}

.site-header .ags-mega__foot-links {
	display: flex;
	gap: 32px;
}

/* Small dropdowns ("Про нас"): a square panel hanging from the menu tier's lower hairline,
   which serves as its top edge; items in the menu's tracked capitals. */
.site-header .main-navigation ul .sub-menu {
	top: calc(100% + 1px);
	left: 50%;
	min-width: 240px;
	margin-top: 0;
	padding: 14px 0;
	transform: translateX(-50%);
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: 0 30px 60px rgba(32, 22, 0, 0.1);
	text-align: left;
}

.site-header .main-navigation ul .sub-menu > li {
	border: 0;
}

.site-header .main-navigation ul .sub-menu > li > a {
	display: block;
	padding: 10px 28px;
	color: var(--ink);
	font-family: inherit;
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.2s, transform 0.3s var(--ease);
}

@media (hover: hover) {
	.site-header__icon:hover {
		background: #F4F6F5;
	}

	.site-header__utility a:hover {
		color: var(--ink);
	}

	.site-header .ags-search-trigger:hover {
		border-color: var(--line);
		background: #fff;
	}

	.site-header .ags-mega__more:hover {
		background-size: 100% 1px;
	}

	.site-header .ags-mega__more:hover::after {
		transform: translateX(3px);
	}

	.site-header .ags-mega__group:hover {
		color: var(--ink);
	}

	.site-header .ags-mega__index a:hover .ags-mega__name {
		color: var(--gold-dark);
		transform: translateX(4px);
	}

	.site-header .main-navigation ul .sub-menu > li:hover {
		background: none;
	}

	.site-header .main-navigation ul .sub-menu > li > a:hover {
		color: var(--gold-dark);
		transform: translateX(4px);
	}
}

/* Narrower screens */

@media (max-width: 1200px) {
	.site-header__utility {
		display: none;
	}

	.site-header .main-navigation > div > ul {
		gap: 6px 26px;
	}

	.site-header .ags-mega__inner {
		grid-template-columns: 200px minmax(0, 1fr) 240px;
		gap: 40px;
		padding-top: 32px;
		padding-bottom: 36px;
	}

	.site-header .ags-mega__group {
		font-size: 22px;
	}

	.site-header .ags-mega ul.ags-mega__index--two {
		column-gap: 28px;
	}

	.site-header .ags-mega__foot-links {
		gap: 24px;
	}
}

@media (max-width: 998px) {
	.site-header {
		--gutter: 12px;
	}

	.site-header__bar {
		height: 64px;
		gap: 8px;
	}

	.site-header {
		box-shadow: 0 1px 0 var(--line);
	}

	.site-header__nav,
	.site-header__account {
		display: none !important;
	}

	.site-header .site-header__burger {
		display: grid;
	}

	/* Only the magnifier: the dialog takes the whole screen on phones. */
	.site-header .ags-search-trigger {
		flex: 0 0 auto;
		justify-content: center;
		width: 44px;
		padding: 0;
		border: 0;
		background: none;
	}

	.site-header .ags-search-trigger span {
		display: none;
	}

	.site-header .ags-search-trigger .ags-search-icon {
		width: 24px;
		height: 24px;
	}

	.site-header__start {
		margin-left: -10px;
		gap: 0;
	}

	/* Room for the cart's count at the screen edge. */
	.site-header__actions {
		gap: 2px;
		margin-right: -2px;
	}

	.site-header__logo {
		width: 124px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header * {
		transition: none !important;
		animation: none !important;
	}
}

/*
 * The running line above the header (inc/running-line.php): the messages twice in a row, moving
 * left by half; it stops under the pointer.
 */
.agskin-running-line {
	position: relative;
	width: 100%;
	background: #201600;
	color: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	padding: 9px 0;
	z-index: 9999;
	box-sizing: border-box;
}
.agskin-running-line__track {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
}
.agskin-running-line__content {
	display: inline-flex;
	animation: agskin-marquee 30s linear infinite;
	will-change: transform;
}
.agskin-running-line__track:hover .agskin-running-line__content {
	animation-play-state: paused;
}
.agskin-running-line__item {
	display: inline-block;
	padding: 0 36px;
	font-family: "Neue Haas Unica", sans-serif;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.agskin-running-line__item a {
	color: inherit;
	text-decoration: none;
}
.agskin-running-line__item a:hover {
	text-decoration: underline;
}
@keyframes agskin-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
@media (max-width: 600px) {
	.agskin-running-line__item { padding: 0 24px; font-size: 12px; }
	.agskin-running-line__content { animation-duration: 20s; }
}
