/*
  Component: site header (top bar + main nav).
  Figma: 545:8233 (top bar) + 30:926 (main nav).
*/

.c-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--c-light);
	transition: box-shadow 200ms ease;
}

.c-site-header.is-scrolled {
	box-shadow: var(--shadow-card);
}

/* ---------- Top bar ---------- */
.c-topbar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 46px;
	column-gap: var(--space-4);
}
.c-topbar.c-topbar--cat {
	grid-template-columns: 1fr;
}

.c-topbar__lang {
	display: flex;
	align-items: center;
	gap: 0;
}
.c-topbar__lang li + li .c-topbar__lang-link {
	border-left: 1px solid var(--c-border);
}
.c-topbar__lang-link {
	display: inline-flex;
	align-items: center;
	padding-inline: 6px;
	font-size: var(--fs-link-14);
	line-height: var(--lh-link-14);
	font-weight: var(--fw-semibold);
	color: var(--c-grey-dark);
	text-decoration: none;
}
.c-topbar__lang-link.is-active {
	color: var(--c-accent);
}

.c-topbar__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--c-fg);
	text-decoration: none;
	font-weight: var(--fw-bold);
	font-size: 22px;
	letter-spacing: -0.4px;
}
.c-topbar__brand img,
.c-topbar__brand-logo {
	display: block;
	height: 39px;
	width: auto;
}

.c-topbar__brand-logo {
	color: var(--c-fg);
}

.c-topbar__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--space-2);
}
.c-topbar.c-topbar--cat .c-topbar__actions {
	justify-content: flex-end;
}

.c-topbar__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--radius-pill);
	background: transparent;
	border: 1px solid transparent;
	color: var(--c-fg);
	cursor: pointer;
	transition: background 150ms ease, border-color 150ms ease;
}
.c-topbar__icon-btn:hover {
	background: var(--c-grey-light);
	border-color: var(--c-border);
}
.c-topbar__icon-btn:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}

/* ---------- Main nav ---------- */
.c-main-nav {
	display: flex;
	align-items: center;
	height: 44px;
	gap: var(--space-3);
	border-top: 1px solid var(--c-border);
	border-bottom: 1px solid var(--c-border);
}

.c-main-nav__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
	color: inherit;
	text-decoration: none;
	padding: 4px;
	border-radius: var(--radius-sm);
}
.c-main-nav__brand:hover { background: var(--c-grey-light); }
.c-main-nav__brand:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}
.c-main-nav__brand svg { display: block; }

.c-main-nav__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 32px;
	background: transparent;
	border: 0;
	color: var(--c-fg);
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}
.c-main-nav__toggle:hover { background: var(--c-grey-light); border-radius: var(--radius-sm); }
.c-main-nav__toggle:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

.c-main-nav__list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.c-main-nav__item { display: flex; }

.c-main-nav__link,
.c-main-nav__list a {
	display: inline-flex;
	align-items: center;
	padding: 10px;
	font-size: var(--fs-link-18);
	line-height: var(--lh-link-18);
	font-weight: var(--fw-semibold);
	letter-spacing: -0.6px;
	color: var(--c-fg);
	text-decoration: none;
	white-space: nowrap;
}
.c-main-nav__link:hover,
.c-main-nav__link.current-menu-item,
.c-main-nav__list a:hover {
	color: var(--c-accent);
	text-decoration: none;
}

/* ---------- Bizneset compact header ---------- */
.c-biz-nav {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	height: 44px;
	border-top: 1px solid var(--c-border);
	border-bottom: 1px solid var(--c-border);
}

.c-biz-nav__bar {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	gap: var(--space-5);
}

.c-biz-nav__title {
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	font-weight: var(--fw-bold);
	letter-spacing: -0.6px;
	color: var(--c-fg);
	text-decoration: none;
	white-space: nowrap;
}

.c-biz-nav__list {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex: 1;
	min-width: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.c-biz-nav__list::-webkit-scrollbar {
	display: none;
}

.c-biz-nav__item {
	display: flex;
	flex-shrink: 0;
}

.c-biz-nav__link {
	display: inline-flex;
	align-items: center;
	padding-block: 6px;
	font-size: var(--fs-link-14);
	line-height: var(--lh-link-14);
	font-weight: var(--fw-semibold);
	color: var(--c-fg);
	text-decoration: none;
	white-space: nowrap;
}

.c-biz-nav__link:hover,
.c-biz-nav__link.is-current {
	color: var(--c-accent);
	text-decoration: none;
}

/* ---------- Category header nav (Figma 91:5808) ---------- */
.c-cat-nav {
	display: flex;
	align-items: center;
	gap: var(--space-8);
	min-height: 49px;
	border-top: 1px solid var(--c-border);
	border-bottom: 1px solid var(--c-border);
}

.c-cat-nav__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	min-width: 0;
}

.c-cat-nav .c-topbar__actions {
	flex-shrink: 0;
	margin-left: var(--space-4);
}

.c-cat-nav__list {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex: 1;
	min-width: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.c-cat-nav__list::-webkit-scrollbar { display: none; }

.c-cat-nav__item { display: flex; flex-shrink: 0; }
.c-cat-nav__item--title { margin-right: var(--space-2); }

.c-cat-nav__title {
	font-size: var(--fs-h1);          /* 36px / 700 */
	line-height: var(--lh-h1);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-tighter);
	color: var(--c-fg);
	text-decoration: none;
	white-space: nowrap;
}
.c-cat-nav__title:hover { text-decoration: none; }

.c-cat-nav__link {
	display: inline-flex;
	align-items: center;
	padding-inline: var(--space-2);
	font-size: var(--fs-link-18);     /* 18px / 600 */
	line-height: var(--lh-link-18);
	font-weight: var(--fw-semibold);
	letter-spacing: -0.6px;
	color: var(--c-fg);
	text-decoration: none;
	white-space: nowrap;
}
.c-cat-nav__link:hover,
.c-cat-nav__link.is-current {
	color: var(--c-accent);
	text-decoration: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.c-topbar {
		grid-template-columns: auto 1fr auto;
		height: 56px;
	}
	.c-topbar.c-topbar--cat { grid-template-columns: 1fr; }
	.c-topbar__lang { order: 0; }
	.c-topbar__brand { order: 1; justify-self: center; }
	.c-topbar__actions { order: 2; }

	.c-main-nav__list {
		/* Hide horizontal menu on small screens — the hamburger opens a drawer. */
		display: none;
	}

	.c-biz-nav {
		gap: var(--space-2);
	}

	.c-biz-nav__bar {
		gap: var(--space-3);
	}

	.c-biz-nav__title {
		font-size: var(--fs-link-18);
		line-height: var(--lh-link-18);
	}

	.c-biz-nav__list {
		gap: var(--space-3);
	}

	.c-biz-nav__link {
		font-size: var(--fs-link-12);
		line-height: var(--lh-link-12);
	}

	.c-cat-nav { gap: var(--space-3); }
	.c-cat-nav__title {
		font-size: var(--fs-h2);   /* 24px on mobile */
		line-height: var(--lh-h2);
	}
}
