/*
 * The theme header of the module «Шапка і підвал сайту» (template common/header.twig): the top bar, header row,
 * popovers, catalog menu and login window of wide screens, the header and search panel of narrow screens, and the
 * side menu of both, and the footer (template common/footer.twig) in the look the store has had from the start.
 * Built from the tokens in design.css.
 */

/* ---------- Top bar (wide screens; scrolls away while the sticky header row stays) ---------- */

.top-bar {
	border-bottom: 1px solid #ececec;
	background: #fff;
	color: #7d7d7d;
	font-family: var(--font-family);
	font-size: 14px;
	line-height: 1.4;
}

.top-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: 34px;
}

.top-bar__hours {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: #8c8c8c;
}

.top-bar__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) 22px;
}

.top-bar__link {
	color: #7d7d7d;
}

.top-bar__link:hover,
.top-bar__link:focus {
	color: var(--color-primary);
}

/* ---------- Header row of wide screens (sticky) ---------- */

.desktop-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.desktop-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	height: 80px;
}

.desktop-header__brand {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 15px;
}

/* Three bars as tall as the logo lettering, as on Rozetka */
.desktop-header__menu {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--color-accent);
	cursor: pointer;
	transition: color var(--transition);
}

.desktop-header__menu:hover {
	color: var(--color-primary);
}

.desktop-header__logo img {
	display: block;
	width: auto;
	max-height: 50px;
	mix-blend-mode: multiply;
}

.desktop-header__search {
	flex-grow: 1;
	max-width: 700px;
}

.desktop-header__actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 25px;
}

/* ---------- Search field of the header row ---------- */

.header-search {
	position: relative;
	margin: 0;
}

.header-search__input {
	width: 100%;
	height: 48px;
	padding: 0 50px 0 20px;
	border: 1px solid var(--color-accent);
	border-radius: var(--radius-md);
	background: #fff;
	color: var(--color-text);
	font-family: var(--font-family);
	font-size: 16px;
	outline: none;
	appearance: none;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search__input::placeholder {
	color: var(--color-text-subtle);
}

.header-search__input::-webkit-search-cancel-button {
	appearance: none;
}

.header-search__input:focus {
	border-color: var(--color-primary);
	box-shadow: inset 0 0 0 1px var(--color-primary);
}

.header-search__submit {
	display: flex;
	position: absolute;
	top: 5px;
	right: 5px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 38px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-accent);
	cursor: pointer;
	transition: color var(--transition);
}

.header-search__input:focus + .header-search__submit,
.header-search__submit:hover {
	color: var(--color-primary);
}

/* ---------- Search suggestions under the search fields (js/search.js) ---------- */

.search-suggest {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	z-index: 1003;
	max-height: min(70vh, 560px);
	padding: var(--space-2) 0;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	box-shadow: var(--shadow-raised);
	font-family: var(--font-family);
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* In the search panel of narrow screens the suggestions continue the panel */
.search-suggest--panel {
	position: static;
	max-height: calc(100vh - 180px);
	max-height: calc(100dvh - 180px);
	margin: var(--space-2) calc(var(--space-3) * -1) calc(var(--space-3) * -1);
	padding: 0 0 var(--space-2);
	border: 0;
	border-top: 1px solid var(--color-border);
	border-radius: 0;
	box-shadow: none;
}

.search-suggest__note,
.search-suggest__empty {
	margin: 0;
	padding: 10px 16px;
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

.search-suggest__note {
	padding-bottom: 2px;
	color: var(--color-primary-text);
	font-weight: 600;
}

.search-suggest__title {
	margin: 0;
	padding: 10px 16px 4px;
	color: var(--color-text-subtle);
	font-size: var(--font-size-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.search-suggest__option {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 6px 16px;
	color: var(--color-text);
	font-size: var(--font-size-md);
	line-height: 1.35;
	text-decoration: none;
}

.search-suggest__option:hover,
.search-suggest__option:focus,
.search-suggest__option.is-active {
	background: var(--color-primary-soft);
	color: var(--color-text);
	outline: none;
	text-decoration: none;
}

.search-suggest__icon {
	flex-shrink: 0;
	color: var(--color-primary);
}

.search-suggest__category-name {
	font-weight: 600;
}

.search-suggest__category-parent {
	margin-left: auto;
	overflow: hidden;
	color: var(--color-text-subtle);
	font-size: var(--font-size-sm);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-suggest__image {
	display: flex;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	height: 48px;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: var(--color-surface-muted);
}

.search-suggest__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.search-suggest__product.is-unavailable .search-suggest__image img {
	opacity: 0.5;
}

.search-suggest__product-text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.search-suggest__product-name {
	display: -webkit-box;
	overflow: hidden;
	font-size: var(--font-size-sm);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.search-suggest__product-meta {
	color: var(--color-text-subtle);
	font-size: var(--font-size-xs);
}

.search-suggest__price {
	flex-shrink: 0;
	color: var(--color-accent);
	font-size: var(--font-size-sm);
	font-weight: 700;
	white-space: nowrap;
}

.search-suggest__unit {
	color: var(--color-text-subtle);
	font-weight: 400;
}

/* The link to all results stays at the bottom while the suggestions scroll */
.search-suggest__all {
	position: sticky;
	bottom: 0;
	justify-content: center;
	margin-top: var(--space-1);
	border-top: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-primary-text);
	font-weight: 600;
}

/* ---------- Phone, account and cart of the header row, with their popovers ---------- */

.header-action {
	position: relative;
	padding: 10px 0;
}

.header-action__button {
	display: flex;
	position: relative;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: 100%;
	height: 50px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-text);
	font-family: inherit;
	font-size: var(--font-size-sm);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--transition);
}

.header-action__icon {
	display: flex;
	position: relative;
	align-items: center;
	justify-content: center;
	height: 28px;
}

.header-action__icon,
.header-action__button > svg {
	color: var(--color-accent);
	transition: color var(--transition);
}

.header-action__label {
	line-height: 1;
}

/* Hovered, reached with the keyboard, or its popover open: the whole button turns orange */
.header-action__button:hover,
.header-action__button:focus-visible,
.header-action.is-open .header-action__button,
.header-action__button:hover .header-action__icon,
.header-action__button:hover > svg,
.header-action__button:focus-visible .header-action__icon,
.header-action__button:focus-visible > svg,
.header-action.is-open .header-action__icon,
.header-action.is-open .header-action__button > svg {
	color: var(--color-primary);
	text-decoration: none;
}

.header-action__button:focus-visible {
	outline: none;
	border-radius: var(--radius-sm);
	box-shadow: var(--focus-ring);
}

.header-action--phone .header-action__button {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	height: auto;
	font-size: var(--font-size-md);
	font-weight: 700;
}

.header-action__number {
	display: flex;
	align-items: center;
	gap: 4px;
	line-height: 1;
}

.header-action__number svg {
	width: 24px;
	height: 24px;
	color: var(--color-accent);
	transition: color var(--transition);
}

.header-action__button:hover .header-action__number svg,
.header-action__button:focus-visible .header-action__number svg,
.header-action.is-open .header-action__number svg {
	color: var(--color-primary);
}

/* The number of items is always shown, 0 included; three digits widen the circle */
.header-action__badge {
	display: flex;
	position: absolute;
	top: -6px;
	right: -8px;
	z-index: 2;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 1px 2px 0;
	border: 2px solid #fff;
	border-radius: var(--radius-pill);
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-family);
	font-size: var(--font-size-xs);
	font-weight: 700;
	line-height: 1;
}

.header-action__panel {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 1001;
	min-width: 240px;
	padding: 20px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: #fff;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	cursor: default;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.header-action.is-open .header-action__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* The corner that points at the button */
.header-action__panel::before {
	content: '';
	position: absolute;
	top: -6px;
	right: 30px;
	width: 12px;
	height: 12px;
	border-top: 1px solid var(--color-border);
	border-left: 1px solid var(--color-border);
	background: #fff;
	transform: rotate(45deg);
}

.header-action__panel--menu {
	min-width: 200px;
}

.header-action__panel--cart {
	width: 320px;
	padding: 0;
}

.header-contacts__link {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
	color: var(--color-text);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

.header-contacts__link svg {
	flex: 0 0 auto;
	color: var(--color-primary);
}

.header-contacts__link:hover,
.header-contacts__link:focus {
	color: var(--color-primary);
	text-decoration: none;
}

.header-contacts__hours {
	margin: 0;
	padding-top: 15px;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
	line-height: 1.5;
}

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

.header-menu__item + .header-menu__item {
	margin-top: 10px;
}

.header-menu__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	color: var(--color-text);
	font-size: var(--font-size-md);
	font-weight: 500;
	text-decoration: none;
}

.header-menu__link svg {
	flex: 0 0 auto;
	color: var(--color-text-subtle);
	transition: color var(--transition);
}

.header-menu__link:hover,
.header-menu__link:focus,
.header-menu__link:hover svg {
	color: var(--color-primary);
	text-decoration: none;
}

/* ---------- Mini-cart of the cart popover (template extension/custom/cart_mini.twig) ---------- */

.mini-cart__items {
	max-height: 300px;
	margin: 0;
	padding: 15px;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.mini-cart__item {
	display: flex;
	align-items: center;
	gap: 15px;
}

.mini-cart__item + .mini-cart__item {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid var(--color-surface-muted);
}

.mini-cart__image {
	flex: 0 0 auto;
}

.mini-cart__image img {
	display: block;
	width: 50px;
	height: auto;
	border: 1px solid var(--color-border);
	border-radius: 4px;
}

.mini-cart__details {
	flex: 1 1 auto;
	min-width: 0;
}

.mini-cart__name {
	display: block;
	margin-bottom: 5px;
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: 600;
	text-decoration: none;
}

.mini-cart__name:hover,
.mini-cart__name:focus {
	color: var(--color-primary-text);
	text-decoration: none;
}

.mini-cart__quantity {
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

.mini-cart__price {
	color: var(--color-accent);
	font-weight: 700;
}

.mini-cart__remove {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--color-danger-soft);
	color: var(--color-danger);
	cursor: pointer;
	transition: background-color var(--transition), color var(--transition);
}

.mini-cart__remove:hover {
	background: var(--color-danger);
	color: #fff;
}

.mini-cart__remove:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

.mini-cart__summary {
	padding: 15px;
	border-top: 1px solid var(--color-border);
	border-radius: 0 0 var(--radius-md) var(--radius-md);
	background: #fafafa;
}

.mini-cart__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	margin: 0 0 var(--space-3);
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

.mini-cart__total strong {
	color: var(--color-accent);
	font-size: var(--font-size-md);
	font-weight: 700;
}

.mini-cart__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.mini-cart__empty {
	padding: 40px 20px;
	text-align: center;
}

.mini-cart__empty svg {
	margin-bottom: 15px;
	color: var(--color-border-strong);
}

.mini-cart__empty-text {
	margin: 0 0 20px;
	color: var(--color-text-muted);
	font-size: 16px;
	font-weight: 500;
}

/* ---------- Login window of the desktop header account button ---------- */

.login-dialog {
	width: min(400px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	padding: 40px 30px 32px;
	border: 0;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	color: var(--color-text);
	font-family: var(--font-family);
	overflow-y: auto;
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.25s ease, transform 0.25s ease, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

.login-dialog[open] {
	opacity: 1;
	transform: none;
}

.login-dialog::backdrop {
	background: rgba(3, 27, 61, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

.login-dialog[open]::backdrop {
	opacity: 1;
}

@starting-style {
	.login-dialog[open],
	.login-dialog[open]::backdrop {
		opacity: 0;
	}

	.login-dialog[open] {
		transform: scale(0.95);
	}
}

.login-dialog__close {
	display: inline-flex;
	position: absolute;
	top: 12px;
	right: 12px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-text-subtle);
	cursor: pointer;
	transition: background-color var(--transition), color var(--transition);
}

.login-dialog__close:hover {
	background: var(--color-surface-muted);
	color: var(--color-primary);
}

.login-dialog__close:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

.login-dialog__title {
	margin: 0 0 25px;
	color: var(--color-accent);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
}

/* ---------- Catalog button and menu (wide screens) ---------- */

.catalog-menu__toggle {
	flex: 0 0 auto;
}

.catalog-menu__toggle[aria-expanded="true"] {
	background: var(--color-primary-hover);
}

/* Inside the sticky header, so it opens under the header wherever the page is scrolled */
.catalog-menu {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 1001;
	max-height: calc(100vh - 100px);
	border-top: 1px solid var(--color-border);
	background: var(--color-surface);
	box-shadow: var(--shadow-raised);
	font-family: var(--font-family);
	opacity: 0;
	overflow-y: auto;
	transform: translateY(-8px);
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.catalog-menu.is-open {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.catalog-menu__inner {
	display: flex;
	align-items: stretch;
	padding-top: var(--space-4);
	padding-bottom: var(--space-6);
}

.catalog-menu__sections {
	flex: 0 0 300px;
	margin: 0;
	padding: 0 var(--space-4) 0 0;
	border-right: 1px solid var(--color-border);
	list-style: none;
}

.catalog-menu__section {
	display: block;
	padding: 10px var(--space-3);
	border-radius: var(--radius-md);
	color: var(--color-text);
	font-size: var(--font-size-md);
	font-weight: 500;
	text-decoration: none;
}

.catalog-menu__section:hover,
.catalog-menu__section:focus,
.catalog-menu__section.is-active {
	background: var(--color-primary-soft);
	color: var(--color-primary-text);
	text-decoration: none;
}

.catalog-menu__panels {
	flex: 1 1 auto;
	min-width: 0;
	padding: var(--space-2) var(--space-6);
}

.catalog-menu__panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
}

.catalog-menu__title {
	color: var(--color-text);
	font-size: var(--font-size-xl);
	font-weight: 700;
	text-decoration: none;
}

.catalog-menu__title:hover,
.catalog-menu__title:focus {
	color: var(--color-primary-text);
	text-decoration: none;
}

.catalog-menu__children {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 3 220px;
	column-gap: var(--space-6);
}

.catalog-menu__children li {
	break-inside: avoid;
}

.catalog-menu__child {
	display: inline-block;
	padding: 6px 0;
	color: var(--color-text-muted);
	font-size: var(--font-size-md);
	text-decoration: none;
}

.catalog-menu__child:hover,
.catalog-menu__child:focus {
	color: var(--color-primary-text);
	text-decoration: none;
}

/* ---------- Header of narrow screens ---------- */

.mobile-header {
	display: none;
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	font-family: var(--font-family);
}

.mobile-header__inner {
	display: flex;
	align-items: center;
	gap: 2px;
	height: 60px;
	padding: 0 var(--space-2);
}

.mobile-header__logo {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	min-width: 0;
	margin: 0 var(--space-1);
	color: var(--color-accent);
	font-weight: 700;
	text-decoration: none;
}

.mobile-header__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 34px;
	object-fit: contain;
	object-position: left center;
}

.mobile-header__button {
	display: inline-flex;
	position: relative;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-accent);
	cursor: pointer;
	transition: background-color var(--transition), color var(--transition);
}

.mobile-header__button:hover,
.mobile-header__button:focus {
	color: var(--color-accent);
}

/* Highlighted while its panel is open, not after a tap: phones keep focus and hover on the tapped button */
.mobile-header__button[aria-expanded="true"] {
	background: var(--color-surface-muted);
}

@media (hover: hover) {
	.mobile-header__button:hover {
		background: var(--color-surface-muted);
	}
}

.mobile-header__button:focus-visible {
	outline: none;
	background: var(--color-surface-muted);
	box-shadow: var(--focus-ring);
}

/* The number of items is always shown, 0 included */
.mobile-header__badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: var(--radius-pill);
	background: var(--color-primary);
	color: #fff;
	font-size: var(--font-size-xs);
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.mobile-header__account {
	position: relative;
}

.mobile-header__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 1002;
	display: flex;
	flex-direction: column;
	min-width: 210px;
	padding: var(--space-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: var(--shadow-raised);
	opacity: 0;
	transform: translateY(-6px);
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.mobile-header__dropdown.is-open {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-header__dropdown-link {
	padding: 10px var(--space-3);
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-size: var(--font-size-md);
	text-decoration: none;
}

.mobile-header__dropdown-link:hover,
.mobile-header__dropdown-link:focus {
	background: var(--color-primary-soft);
	color: var(--color-primary-text);
	text-decoration: none;
}

/* ---------- Search panel of narrow screens: slides down under the header row ---------- */

.mobile-search {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	padding: 10px var(--space-3) var(--space-3);
	background: #fff;
	box-shadow: 0 8px 16px rgba(3, 27, 61, 0.08);
	opacity: 0;
	transform: translateY(-8px);
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.mobile-search.is-open {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-search__form {
	position: relative;
	margin: 0;
}

.mobile-search__input {
	width: 100%;
	height: 48px;
	padding: 0 52px 0 var(--space-4);
	border: 1px solid var(--color-accent);
	border-radius: var(--radius-md);
	background: #fff;
	color: var(--color-text);
	font-family: var(--font-family);
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

.mobile-search__input::placeholder {
	color: var(--color-text-subtle);
}

.mobile-search__input:focus {
	border-color: var(--color-primary);
	outline: none;
	box-shadow: var(--focus-ring);
}

.mobile-search__submit {
	display: inline-flex;
	position: absolute;
	top: 2px;
	right: 2px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-accent);
	cursor: pointer;
}

/* ---------- Side menu: the menu buttons of every width ---------- */

.side-menu {
	position: fixed;
	inset: 0;
	z-index: 1100;
	visibility: hidden;
	transition: visibility 0s linear 0.3s;
}

.side-menu.is-open {
	visibility: visible;
	transition: none;
}

.side-menu__overlay {
	position: absolute;
	inset: 0;
	background: rgba(3, 27, 61, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.side-menu.is-open .side-menu__overlay {
	opacity: 1;
}

.side-menu__panel {
	display: flex;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	flex-direction: column;
	width: min(360px, 88vw);
	background: #fff;
	font-family: var(--font-family);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}

.side-menu.is-open .side-menu__panel {
	transform: none;
}

/* The page under an open menu does not scroll. The lock sits on the body, so the sticky header keeps sticking to
   the window, and the body takes the place of the hidden scrollbar (its width comes from layout.js), so the page
   does not shift. */
.is-scroll-locked body {
	overflow: hidden;
	padding-right: var(--scrollbar-width, 0);
}

.side-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 60px;
	padding: 0 var(--space-2) 0 var(--space-4);
	border-bottom: 1px solid var(--color-border);
}

.side-menu__logo img {
	display: block;
	width: auto;
	height: 34px;
}

.side-menu__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-accent);
	cursor: pointer;
}

.side-menu__close:hover {
	background: var(--color-surface-muted);
}

.side-menu__close:focus-visible,
.desktop-header__menu:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

.side-menu__body {
	padding: 0 var(--space-4) var(--space-8);
}

/* Headings of the drawer groups: the same left edge and rhythm as the rows */
.side-menu__heading {
	margin: var(--space-6) 0 var(--space-2);
	color: var(--color-accent);
	font-size: var(--font-size-lg);
	font-weight: 700;
	line-height: 1.3;
}

/* Account block of wide screens; phones have the account button in the header */
.side-menu__note {
	margin: 0 0 var(--space-4);
	color: var(--color-text-muted);
	font-size: var(--font-size-md);
	line-height: 1.45;
}

.side-menu__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
}

.side-menu__actions .button {
	padding: 0 var(--space-3);
}

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

.side-menu__item {
	border-bottom: 1px solid var(--color-border);
}

.side-menu__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 48px;
	padding: 10px 0;
	color: var(--color-text);
	font-size: var(--font-size-md);
	font-weight: 500;
	cursor: pointer;
	list-style: none;
	text-decoration: none;
}

/* An open section is highlighted; a tapped one keeps focus on phones, so focus alone changes nothing */
.side-menu__row:focus {
	color: var(--color-text);
	text-decoration: none;
}

.side-menu__row:focus-visible,
.side-menu__section[open] > .side-menu__row {
	color: var(--color-primary-text);
}

@media (hover: hover) {
	.side-menu__row:hover {
		color: var(--color-primary-text);
	}
}

.side-menu__row::-webkit-details-marker {
	display: none;
}

.side-menu__row--icon {
	justify-content: flex-start;
}

.side-menu__row--static {
	cursor: default;
}

.side-menu__row--static:hover {
	color: var(--color-text);
}

.side-menu__icon {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--color-primary);
}

.side-menu__text {
	flex: 0 1 auto;
	min-width: 0;
}

.side-menu__chevron {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--color-text-subtle);
	transition: transform 0.2s ease;
}

.side-menu__section[open] > .side-menu__row .side-menu__chevron {
	transform: rotate(180deg);
}

.side-menu__children {
	margin: 0;
	padding: 0 0 var(--space-3) var(--space-3);
	list-style: none;
	overflow: hidden;
}

.side-menu__child {
	display: block;
	padding: 8px 0;
	color: var(--color-text-muted);
	font-size: var(--font-size-md);
	text-decoration: none;
}

.side-menu__child:hover,
.side-menu__child:focus {
	color: var(--color-primary-text);
	text-decoration: none;
}

.side-menu__child--all {
	color: var(--color-primary-text);
	font-weight: 600;
}

.side-menu__instagram {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-top: var(--space-6);
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--color-text);
	text-decoration: none;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.side-menu__instagram:hover,
.side-menu__instagram:focus {
	border-color: var(--color-border-strong);
	box-shadow: var(--shadow-card);
	color: var(--color-text);
	text-decoration: none;
}

.side-menu__instagram-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
	color: #fff;
}

.side-menu__instagram-text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.side-menu__instagram-name {
	font-size: var(--font-size-md);
	font-weight: 600;
}

.side-menu__instagram-handle {
	color: var(--color-accent);
	font-size: var(--font-size-md);
	font-weight: 500;
}

.side-menu__instagram-note {
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

/* ---------- Which header shows ---------- */

@media (max-width: 991px) {
	.top-bar,
	.desktop-header,
	.catalog-menu {
		display: none;
	}

	.mobile-header {
		display: block;
	}

	.side-menu__account {
		display: none;
	}
}

@media (min-width: 992px) {
	.mobile-search {
		display: none;
	}
}

/* Narrow desktops: the phone number stays in its popover, so the search field keeps room for its placeholder */
@media (min-width: 992px) and (max-width: 1199px) {
	.header-action__number {
		display: none;
	}
}

/* ---------- Notices (js/layout.js, event «toast») ---------- */

.toast-region {
	display: flex;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1200;
	flex-direction: column;
	gap: 8px;
	width: min(400px, calc(100% - 32px));
	pointer-events: none;
}

.toast {
	display: flex;
	position: relative;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	padding: 14px 52px 14px 18px;
	border-radius: var(--radius-lg);
	background: var(--color-accent);
	box-shadow: var(--shadow-raised);
	color: #fff;
	font-family: var(--font-family);
	font-size: var(--font-size-md);
	line-height: 1.4;
	pointer-events: auto;
	animation: toast-in 0.2s ease;
}

.toast.is-leaving {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--error {
	background: var(--color-danger);
}

.toast__text {
	flex: 1 1 200px;
	margin: 0;
}

.toast__action {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

.toast__action:hover,
.toast__action:focus {
	color: #fff;
	text-decoration: none;
}

.toast__close {
	display: inline-flex;
	position: absolute;
	top: 10px;
	right: 10px;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
}

.toast__close:hover {
	background: rgba(255, 255, 255, 0.24);
}

/* The icon of a notice shows in the classic look only */
.toast__icon {
	display: none;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* ---------- Notices, the classic look (module «Шапка і підвал сайту»): the floating alert of the theme before the
   design system, kept to the pixel with its own colours: a pale orange plate in the middle at the top ---------- */

.toast-region.toast-region--classic {
	top: 20px;
	right: auto;
	bottom: auto;
	left: 50%;
	z-index: 9999;
	width: 90%;
	max-width: 500px;
	transform: translateX(-50%);
}

/* One notice at a time, as before: a new one takes the place of the last, and a closed one goes at once */
.toast-region--classic .toast:not(:last-child),
.toast-region--classic .toast.is-leaving {
	display: none;
}

.toast-region--classic .toast {
	display: block;
	padding: 15px 40px 15px 15px;
	border: 1px solid #f07f1f;
	border-radius: 8px;
	background: #fff5eb;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	color: #333;
	font: inherit;
	animation: none;
}

/* The glyph box of the icon font at 18 px: its advance as the browser laid it out, the baseline 2.57 px above the
   bottom, so the text after it starts where it did */
.toast-region--classic .toast__icon {
	display: inline-block;
	width: 15.4375px;
	height: 18px;
	margin-right: 8px;
	color: #f07f1f;
	vertical-align: -2.5714px;
}

.toast-region--classic .toast__text {
	display: inline;
}

.toast-region--classic .toast__action,
.toast-region--classic .toast__action:hover,
.toast-region--classic .toast__action:focus {
	color: #c45a00;
	font-weight: 700;
	text-decoration: underline;
	white-space: normal;
}

.toast-region--classic .toast__close {
	top: 50%;
	right: 15px;
	width: auto;
	height: auto;
	border-radius: 0;
	background: none;
	color: #f07f1f;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	opacity: 0.8;
	transform: translateY(-50%);
}

.toast-region--classic .toast__close:hover {
	background: none;
	opacity: 1;
}

.toast-region--classic .toast__close svg {
	display: none;
}

.toast-region--classic .toast__close::before {
	content: "\00d7";
}

.toast-region--classic .toast--error {
	border-color: var(--color-danger);
	background: var(--color-danger-soft);
}

.toast-region--classic .toast--error .toast__icon,
.toast-region--classic .toast--error .toast__close {
	color: var(--color-danger);
}

@media (max-width: 575px) {
	.toast-region {
		right: 16px;
		bottom: 16px;
		left: 16px;
		width: auto;
	}

	/* A phone has no room for the section of a suggested category beside its name */
	.search-suggest__category-parent {
		display: none;
	}
}

/* ---------- Footer: five columns, three below 992 px; on phones each column folds under its heading ---------- */

.site-footer {
	margin-top: 50px;
	padding: 50px 0 20px;
	background: var(--color-accent);
	color: #fff;
	font-size: 14px;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
}

.site-footer__heading {
	margin: 10px 0 20px;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.1;
}

/* A plain heading on wide screens; on phones the button folds the column (js/layout.js) */
.site-footer__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: default;
}

.site-footer__toggle svg {
	display: none;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	transition: transform 0.3s;
}

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

.site-footer__list li {
	margin-bottom: 12px;
}

.site-footer__link {
	color: #a0aec0;
	text-decoration: none;
	transition: var(--transition);
}

.site-footer__link:hover {
	padding-left: 5px;
	color: var(--color-primary);
}

.site-footer__bottom {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #a0aec0;
	font-size: 13px;
	text-align: center;
}

.site-footer__copyright {
	margin: 0 0 10px;
}

@media (max-width: 991px) {
	.site-footer__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 30px 20px;
	}
}

@media (max-width: 767px) {
	.site-footer__grid {
		display: block;
	}

	.site-footer__column {
		margin-bottom: 5px;
		padding-bottom: 5px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	}

	.site-footer__column:last-child {
		border-bottom: 0;
	}

	.site-footer__heading {
		margin-bottom: 5px;
	}

	.site-footer__toggle {
		cursor: pointer;
	}

	.site-footer__toggle svg {
		display: block;
	}

	.site-footer__toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}

	.site-footer__list {
		display: none;
		margin: 15px 0;
	}

	.site-footer__column.is-open .site-footer__list {
		display: block;
	}

	.site-footer__bottom {
		margin-top: 0;
	}
}
