.site-header {
	background: #fff;
	border-bottom: 1px solid #e7e7e7;
	position: relative;
	z-index: 20;
}

.site-header__top {
	display: grid;
	grid-template-columns: 140px minmax(300px, 1fr) auto;
	align-items: center;
	gap: 22px;
	min-height: 72px;
	position: relative;
}

.site-branding {
	display: flex;
	justify-content: center;
	align-items: center;
}

.site-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.site-header .site-branding .site-logo-image {
	display: block;
	width: auto;
	height: 56px;
	max-width: 340px;
	object-fit: contain;
	flex: 0 0 auto;
}

.site-search {
	width: 100%;
}

.site-search form {
	display: flex;
	align-items: center;
	height: 40px;
	border: 1px solid #cfcfcf;
	background: #fff;
}

.site-search input[type="search"] {
	flex: 1;
	height: 100%;
	border: 0;
	padding: 0 12px;
	outline: none;
	background: transparent;
	font-size: 16px;
}

.site-search button {
	height: 100%;
	padding: 0 16px;
	border: 1px solid #cfcfcf;
	margin-left: -1px;
	background: #fff;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.site-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	justify-content: flex-end;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	position: relative;
}

.site-actions__sell,
.site-actions__signup,
.site-actions__login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 16px;
	border: 1px solid #111;
}

.site-actions__login {
	background: #111;
	color: #fff;
}

.site-actions__feed {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.site-actions__icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: #111;
	flex: 0 0 auto;
}

.site-actions__icon-link svg {
	display: block;
	width: 24px;
	height: 24px;
}

.site-actions__messages {
	position: relative;
}

.site-actions__messages-badge {
	position: absolute;
	top: -4px;
	right: -5px;
	width: 14px;
	height: 14px;
	border-radius: 999px;
	background: #d93025;
	border: 2px solid #fff;
	box-sizing: border-box;
	pointer-events: none;
}

.site-actions__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.site-actions__avatar-image {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	object-fit: cover;
}

.site-nav {
	border-top: 1px solid #f4f4f4;
	border-bottom: 1px solid #e7e7e7;
}

.site-nav__menu {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
	min-height: 42px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.site-mobile-left {
	display: none;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	z-index: 2;
}

.site-mobile-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	border-radius: 0;
	box-shadow: none;
	color: #111;
	flex: 0 0 auto;
}

.site-mobile-icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* Desktop account dropdown */

.desktop-account-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 160px;
	background: #fff;
	border: 1px solid #d9d9d9;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	padding: 18px 0 14px;
	display: none;
	z-index: 40;
}

.desktop-account-menu.is-open {
	display: block;
}

.desktop-account-menu__header,
.desktop-account-menu__subhead,
.desktop-account-menu__link,
.desktop-account-menu__logout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 26px;
	color: #111;
}

.desktop-account-menu__header {
	padding-bottom: 14px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: none;
}

.desktop-account-menu__header svg,
.desktop-account-menu__subhead svg {
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

.desktop-account-menu__username {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
}

.desktop-account-menu__link,
.desktop-account-menu__logout {
	padding-top: 9px;
	padding-bottom: 9px;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-transform: uppercase;
}

.desktop-account-menu__subhead {
	padding-top: 10px;
	padding-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-transform: uppercase;
}

.desktop-account-menu__separator {
	height: 1px;
	background: #e5e5e5;
	margin: 10px 26px;
}

.desktop-account-menu__logout {
	color: #b4b4b4;
}

body.mobile-menu-open,
body.mobile-account-open {
	overflow: hidden;
}

.mobile-drawer,
.mobile-account-drawer {
	display: none;
}

/* Auth login state feedback */

.auth-form--login .auth-form__submit {
	background: #d9d9d9;
	border-color: #d9d9d9;
	color: #6f6f6f;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-form--login .auth-form__submit.is-active,
.auth-form--login .auth-form__submit.is-loading {
	background: #111;
	border-color: #111;
	color: #fff;
}

.auth-form--login .auth-form__submit.is-loading {
	cursor: wait;
	box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.auth-login-toast {
	position: fixed;
	top: 88px;
	right: 24px;
	z-index: 10050;
	padding: 12px 16px;
	background: #111;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-login-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.site-account-trigger.is-just-signed-in .site-actions__avatar-image {
	animation: marketplaceAuthPulse 0.8s ease 2;
}

@keyframes marketplaceAuthPulse {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(17, 17, 17, 0);
	}
	50% {
		transform: scale(1.08);
		box-shadow: 0 0 0 8px rgba(17, 17, 17, 0.12);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(17, 17, 17, 0);
	}
}

@media (max-width: 780px) {
	.desktop-account-menu {
		display: none !important;
	}

	.site-header__top {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 16px;
		min-height: 59px;
		height: 59px;
		position: relative;
	}

	.site-mobile-left {
		display: flex;
		order: 1;
		margin-right: auto;
		gap: 16px;
	}

	.site-search,
	.site-nav {
		display: none;
	}

	.site-branding {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		z-index: 1;
		pointer-events: none;
	}

	.site-logo-link {
		pointer-events: auto;
	}

	.site-header .site-branding .site-logo-image {
		width: auto;
		height: 50px;
		max-width: 140px;
		object-fit: contain;
	}

	.site-actions {
		order: 3;
		margin-left: auto;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 16px;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.04em;
		z-index: 2;
	}

	.site-actions__sell,
	.site-actions__feed {
		display: none;
	}

	.site-actions__signup,
	.site-actions__login {
		min-height: 0;
		padding: 0;
		border: 0;
		background: transparent;
		color: #111;
		white-space: nowrap;
	}

	.site-actions__login {
		color: #111;
	}

	.site-actions__icon-link {
		width: 24px;
		height: 24px;
	}

	.site-actions__messages-badge {
		top: -3px;
		right: -4px;
		width: 13px;
		height: 13px;
	}

	.site-actions__avatar {
		width: 28px;
		height: 28px;
	}

	.site-actions__avatar-image {
		width: 28px;
		height: 28px;
	}

	.mobile-drawer,
	.mobile-account-drawer {
		display: block;
	}

	.mobile-drawer__overlay,
	.mobile-account-drawer__overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.34);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.22s ease, visibility 0.22s ease;
		z-index: 9997;
	}

	.mobile-drawer__panel {
		position: fixed;
		top: 0;
		left: 0;
		width: 86vw;
		max-width: 335px;
		height: 100vh;
		background: #fff;
		transform: translateX(-100%);
		transition: transform 0.22s ease;
		z-index: 9998;
		display: flex;
		flex-direction: column;
		padding-top: 68px;
		overflow-y: auto;
	}

	.mobile-account-drawer__panel {
		position: fixed;
		top: 0;
		right: 0;
		width: 86vw;
		max-width: 335px;
		height: 100vh;
		background: #fff;
		transform: translateX(100%);
		transition: transform 0.22s ease;
		z-index: 9998;
		display: flex;
		flex-direction: column;
		padding: 77px 0 28px;
		overflow-y: auto;
	}

	.mobile-drawer.is-open .mobile-drawer__overlay,
	.mobile-account-drawer.is-open .mobile-account-drawer__overlay {
		opacity: 1;
		visibility: visible;
	}

	.mobile-drawer.is-open .mobile-drawer__panel {
		transform: translateX(0);
	}

	.mobile-account-drawer.is-open .mobile-account-drawer__panel {
		transform: translateX(0);
	}

	.mobile-drawer__close,
	.mobile-account-drawer__close {
		position: absolute;
		top: 22px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent;
		cursor: pointer;
	}

	.mobile-drawer__close {
		left: 13px;
	}

	.mobile-account-drawer__close {
		right: 13px;
	}

	.mobile-drawer__close svg,
	.mobile-account-drawer__close svg {
		display: block;
		width: 24px;
		height: 24px;
	}

	.mobile-drawer__item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 15px;
		border-bottom: 1px solid #e6e6e6;
		color: #111;
	}

	.mobile-drawer__item span {
		font-size: 20px;
		font-weight: 600;
		line-height: 24px;
		letter-spacing: -0.01em;
	}

	.mobile-drawer__item svg {
		width: 24px;
		height: 24px;
		flex: 0 0 auto;
	}

	.mobile-drawer__subnav {
		margin-top: auto;
		padding: 30px 34px 28px;
		display: flex;
		flex-direction: column;
		gap: 18px;
	}

	.mobile-drawer__subnav a {
		font-size: 12px;
		font-weight: 400;
		line-height: 14px;
		text-transform: uppercase;
		color: #b3b3b3;
		letter-spacing: 0.02em;
	}

	.mobile-account-drawer__header {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 0 15px 22px;
		border-bottom: 1px solid #e5e5e5;
		color: #111;
	}

	.mobile-account-drawer__avatar {
		width: 36px;
		height: 36px;
		border-radius: 999px;
		object-fit: cover;
		flex: 0 0 auto;
	}

	.mobile-account-drawer__user {
		flex: 1;
		min-width: 0;
	}

	.mobile-account-drawer__username {
		font-size: 16px;
		font-weight: 700;
		line-height: 1.3;
		text-transform: none;
	}

	.mobile-account-drawer__view-profile {
		margin-top: 2px;
		font-size: 12px;
		line-height: 1.2;
		color: #7d7d7d;
		text-transform: none;
	}

	.mobile-account-drawer__header svg,
	.mobile-account-drawer__subhead svg {
		width: 24px;
		height: 24px;
		flex: 0 0 auto;
	}

	.mobile-account-drawer__menu {
		padding: 0 15px 12px;
	}

	.mobile-account-drawer__link,
	.mobile-account-drawer__subhead,
	.mobile-account-drawer__logout {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 17px 0;
		font-size: 12px;
		line-height: 1.2;
		color: #111;
		text-transform: uppercase;
	}

	.mobile-account-drawer__subhead {
		padding-top: 26px;
		font-weight: 700;
		letter-spacing: 0.01em;
	}

	.mobile-account-drawer__link,
	.mobile-account-drawer__logout {
		font-weight: 400;
	}

	.mobile-account-drawer__logout {
		color: #b4b4b4;
		padding-top: 20px;
	}

	.auth-login-toast {
		top: 72px;
		left: 16px;
		right: 16px;
		text-align: center;
	}
}
