/*
 * Site footer (footer.php, inc/footer.php), made of the header's parts (css/header.css) with its
 * values: white with hairlines, Montserrat, the dark slate ink.
 * - The row: as the header's — the logo at its width, the social links as its round 22px icons
 *   (Phosphor Light) in 44px targets, their names in the dark tip (above here), the outer icon on
 *   the content edge.
 * - The columns: as the "Продукція" index — tracked grey names, 44px rows between hairlines,
 *   the count pale on the right, the name stepping aside in the darker orange on hover.
 * - The foot: the panel's grey foot (.ses-mega__foot) with its "Запитати косметолога" link
 *   (.ses-mega__more, styled in css/header.css) and the year.
 * Below 1025px, as the header: 16px gutters, a 64px row, a narrower logo; columns in two, then one.
 */

.ses-footer {
	--ink: #212b36;
	--text: #4a5561;
	--muted: #7a838c;
	--pale: #a7aeb5;
	--accent: #f48511;
	--accent-dark: #c96a07;
	--line: #e3e6e9;
	--soft: #f4f6f7;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--gutter: 24px;
	--wide: 1240px;
	--bar: 80px;
	--icon-box: 44px;
	--icon-inset: 11px;
	--row: 44px;
	/* Content edge: the page's width, or the gutter on narrower screens. */
	--edge: max(var(--gutter), calc((100% - var(--wide)) / 2));
	margin-top: 72px;
	border-top: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	-webkit-tap-highlight-color: transparent;
}

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

.ses-footer a {
	color: inherit;
	text-decoration: none;
}

.ses-footer p,
.ses-footer ul,
.ses-footer address {
	margin: 0;
	padding: 0;
}

.ses-footer ul {
	list-style: none;
}

.ses-footer :focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.ses-footer :focus:not(:focus-visible) {
	outline: none;
}

/* The row: the logo, the social links. */

.ses-footer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: var(--bar);
	padding: 0 var(--edge);
	border-bottom: 1px solid var(--line);
}

.ses-footer__logo {
	display: block;
	width: 168px;
}

.ses-footer__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.ses-footer__social {
	display: flex;
	gap: 6px;
	margin-right: calc(-1 * var(--icon-inset));
}

.ses-footer .ses-footer__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: var(--icon-box);
	height: var(--icon-box);
	border-radius: 50%;
	color: var(--ink);
	transition: background-color 0.2s, color 0.2s;
}

/* The header's tip, above the icon here. */
.ses-footer [data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	z-index: 60;
	padding: 6px 10px;
	border-radius: 6px;
	background: var(--ink);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity 0.2s, transform 0.3s var(--ease);
}

/* The columns. */

.ses-footer__main {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
	gap: 56px;
	padding: 36px var(--edge) 48px;
}

.ses-footer .ses-footer__eyebrow {
	display: flex;
	align-items: center;
	height: 32px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ses-footer__index a,
.ses-footer__address {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	min-height: var(--row);
	border-bottom: 1px solid var(--line);
	font-size: 15px;
	line-height: 1.35;
}

.ses-footer__name {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	transition: color 0.2s, transform 0.35s var(--ease);
}

.ses-footer__name .ses-icon {
	color: var(--ink);
}

/* The gift sets keep the header menu's orange gift. */
.ses-footer__name .ses-footer__gift {
	color: var(--accent);
}

.ses-footer__count {
	color: var(--pale);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.ses-footer__index a:focus-visible .ses-footer__name {
	color: var(--accent-dark);
	transform: translateX(4px);
}

.ses-footer .ses-footer__address {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 0;
	color: var(--text);
	font-style: normal;
}

.ses-footer__address .ses-icon {
	margin-top: 1px;
	color: var(--ink);
}

/* The foot: the panel's grey strip. */

.ses-footer__foot {
	border-top: 1px solid var(--line);
	background: var(--soft);
}

.ses-footer__foot-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding: 14px var(--edge);
	color: var(--text);
	font-size: 14px;
}

.ses-footer__foot-in p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
}

.ses-footer .ses-footer__copy {
	color: var(--muted);
	font-size: 13px;
}

@media (hover: hover) {
	.ses-footer .ses-footer__icon:hover {
		background: var(--soft);
	}

	.ses-footer [data-tip]:hover::after {
		opacity: 1;
		transform: translate(-50%, 0);
	}

	.ses-footer__index a:hover .ses-footer__name {
		color: var(--accent-dark);
		transform: translateX(4px);
	}
}

@media (max-width: 1280px) {
	.ses-footer__logo {
		width: 148px;
	}

	.ses-footer__main {
		gap: 40px;
	}
}

@media (max-width: 1024px) {
	.ses-footer {
		--gutter: 16px;
		--bar: 64px;
		margin-top: 56px;
	}

	.ses-footer__logo {
		width: 128px;
	}

	.ses-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 40px;
		padding-top: 28px;
	}
}

@media (max-width: 600px) {
	.ses-footer__main {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
		padding-bottom: 36px;
	}

	/* The floating contact button sits over the bottom right corner. */
	.ses-footer__foot-in {
		flex-direction: column;
		align-items: flex-start;
		padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.ses-footer *,
	.ses-footer *::after {
		transition: none !important;
	}
}
