/* Переопределения поверх сборки. Не править hashed CSS. */

#header {
	position: relative;
	z-index: 20;
	overflow: visible;
}

.mobile-menu {
	z-index: 22;
}

.account-menu-item.account-menu-item--name,
.account-menu-item.account-menu-item--name .account-menu-item-text {
	font-family: Inter, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 12px;
}

.account-menu-item--name .account-menu-item-text {
	overflow: visible;
	text-overflow: clip;
	max-width: none;
}

.content-wrapper {
	position: relative;
	z-index: 1;
}

#login-dialog,
#register-dialog {
	z-index: 80;
}

#register-dialog .dialog-login {
	width: 450px;
	max-width: 90%;
	max-height: 90vh !important;
	min-height: 0 !important;
	overflow: auto !important;
	overscroll-behavior: contain;
}

#register-dialog .dialog-register-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (max-width: 600px) {
	#register-dialog .dialog-login {
		max-height: 95vh;
		max-width: 95%;
		padding: 20px 16px;
	}
}

.search-form-root {
	position: relative;
	z-index: 5;
	overflow: visible;
}

.search-form-root.active {
	z-index: 40;
}

.search-form-input {
	padding-right: 16px;
}

@media (max-width: 768px) {
	.content-with-aside .listing {
		grid-auto-rows: auto;
	}
}

.listing__sort .ss-main,
.content-with-aside .listing__sort .ss-main {
	box-sizing: border-box;
	padding: 10px 16px;
	width: 163px;
	background: #f9f9f9;
	border: none;
	border-radius: 14px;
	color: #25282D;
	--ss-primary-color: transparent;
	--ss-focus-color: transparent;
}

.listing__sort .ss-main:focus,
.content-with-aside .listing__sort .ss-main:focus {
	box-shadow: none;
	outline: none;
}

.listing__sort-content.ss-content {
	box-sizing: border-box;
	width: 191px !important;
	min-width: 191px !important;
	max-width: 191px !important;
	background: #FFFFFF;
	border: 1px solid #E3E4E8;
	box-shadow: 0px 211px 84px rgba(166, 166, 166, 0.01), 0px 119px 71px rgba(166, 166, 166, 0.05), 0px 53px 53px rgba(166, 166, 166, 0.09), 0px 13px 29px rgba(166, 166, 166, 0.1);
	border-radius: 16px;
	padding-left: 10px;
	padding-right: 10px;
}

.listing__sort-content.ss-content.ss-open.ss-dir-below {
	transform: translate(calc(163px - 100%), 5px) scaleY(1);
}

.listing__sort-content .ss-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-radius: 12px;
	padding-left: 10px;
	padding-right: 10px;
}

.listing__sort-content .ss-option.ss-selected::after {
	content: "";
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-left: auto;
	background: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.1625 13.5002L2.8875 9.22519L3.95625 8.15645L7.1625 11.3627L14.0437 4.48145L15.1125 5.5502L7.1625 13.5002Z' fill='%23FF9B46'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 50;
	padding: 12px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 13px 29px 0 #A6A6A61A, 0 4px 16px rgba(37, 40, 45, 0.08);
}

.search-suggest[hidden] {
	display: none;
}

.search-suggest__inner {
	max-height: min(70vh, 420px);
	overflow: auto;
}

.search-suggest__group + .search-suggest__group {
	margin-top: 10px;
}

.search-suggest__group-title {
	padding: 6px 12px 4px;
	color: #828897;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
}

.search-suggest__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.search-suggest__link {
	display: block;
	padding: 8px 12px;
	border-radius: 12px;
	color: #25282D;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	text-decoration: none;
}

.search-suggest__link:hover,
.search-suggest__link.is-active {
	background: #F9F9F9;
	color: #25282D;
}

.search-suggest__all {
	display: inline-block;
	margin: 8px 12px 4px;
	color: #FF9B46;
	font-size: 14px;
	line-height: 1.35;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.search-suggest__all:hover,
.search-suggest__all.is-active {
	color: #FFA960;
}

.mobile-menu .search-form-root {
	flex-grow: 0;
	width: 100%;
}

.mobile-menu .search-suggest {
	position: relative;
	top: 8px;
	max-height: none;
}

.mobile-menu .search-suggest__inner {
	max-height: min(50vh, 360px);
}

.listing--search {
	width: 100%;
}

.listing--search .heading:has(.categories) {
	width: 100%;
}

.search-page__heading {
	gap: 16px;
}

.search-page__title {
	margin: 0;
}

.search-page__form {
	max-width: 640px;
}

.search-page__count,
.search-page__empty {
	margin: 0;
	color: #828897;
}

.categories__tabs {
	margin: 0;
}

.listing--search .categories__tabs {
	flex-wrap: nowrap;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.listing--search .categories__tabs::-webkit-scrollbar {
	display: none;
}

@media (max-width: 999px) {
	.search-suggest {
		left: 0;
		right: 0;
	}
}

@media (max-width: 768px) {
	.search-page__form {
		max-width: none;
	}

	.listing--search .categories-overflow {
		align-items: start;
		flex-direction: column-reverse;
		gap: 16px;
	}

	.listing--search .listing__sort {
		justify-content: space-between;
		width: 100%;
	}

	.listing--search .categories__tabs {
		width: 100%;
	}
}

/* Избранное: заливка сердца */
.card__actions__like.is-active {
	box-shadow: none;
}

.card__actions__like.is-active svg,
.product-header__like.is-active svg,
.product-poster__sub-action-item[data-action="add-to-favorites"].is-active svg,
.product-poster__sub-action-item[data-action="add-to-favorites"].active svg,
.basket-item__favorite.is-active svg {
	fill: #FF9B46;
	stroke: #FF9B46;
}

.product-header__like.is-active,
.product-header__like.active {
	color: #FF9B46;
}

.favorites {
	margin-bottom: 64px;
}

@media (max-width: 899px) {
	.favorites .article__heading {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

.favorites__count {
	color: #828897;
	line-height: 1;
}

@media (min-width: 900px) {
	.favorites__count {
		display: none;
	}
}

.main-content:has(.favorites-empty:not([hidden])) {
	display: flex;
	flex-direction: column;
}

.main-content:has(.favorites-empty:not([hidden])) .article {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.favorites-empty {
	flex: 1;
	flex-direction: column;
	gap: 16px;
	text-align: center;
}

.favorites-empty[hidden],
.favorites-list[hidden],
.favorites__count[hidden],
.favorites__clear[hidden] {
	display: none;
}

.favorites-list {
	display: flex;
	flex-direction: column;
}

@media (max-width: 899px) {
	.favorites-list {
		gap: 12px;
	}
}

.favorites-item {
	display: grid;
	grid-template-columns: 106px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px 24px;
	padding: 20px 0;
	border-bottom: 1px solid #E3E4E8;
}

.favorites-item:first-child {
	padding-top: 0;
}

.favorites-item:last-of-type {
	border-bottom: none;
}

@media (max-width: 899px) {
	.favorites-item {
		grid-template-columns: 124px minmax(0, 1fr);
		grid-template-areas: "poster info" "actions actions";
		align-items: start;
		gap: 8px 16px;
		padding: 16px 0;
		border-bottom: 0;
		border-radius: 16px;
	}
}

.favorites-item__poster {
	width: 106px;
	height: 106px;
	border-radius: 8px;
	background: #f9f9f9;
	flex-shrink: 0;
}

@media (max-width: 899px) {
	.favorites-item__poster {
		grid-area: poster;
		width: 124px;
		height: 124px;
	}
}

.favorites-item__image {
	width: 76px;
	height: 76px;
	object-fit: contain;
}

@media (max-width: 899px) {
	.favorites-item__image {
		width: 48px;
		height: 48px;
	}
}

.favorites-item__info {
	gap: 8px;
	min-width: 0;
}

@media (max-width: 899px) {
	.favorites-item__info {
		grid-area: info;
	}
}

.favorites-item__title {
	margin: 0;
	line-height: 1.35;
}

.favorites-item__title-link {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease-out;
}

.favorites-item__title-link:hover {
	color: #ffa960;
}

.favorites-item__sku {
	margin: 0;
	color: #828897;
	line-height: 1;
}

.favorites-item__actions {
	gap: 16px;
	flex-shrink: 0;
}

@media (max-width: 899px) {
	.favorites-item__actions {
		grid-area: actions;
		gap: 8px;
		width: 100%;
	}
}

.favorites-item__cart {
	--btn-h: 48px;
	--btn-p-x: 16px;
	flex-grow: 0;
	min-width: 148px;
	gap: 0;
}

.favorites-item__cart.is-added .btn-basket-icon {
	display: none;
}

@media (max-width: 899px) {
	.favorites-item__cart {
		--btn-h: 54px;
		flex-grow: 1;
		min-width: 0;
	}
}

.favorites-item__delete {
	--btn-h: auto;
	color: #828897;
	flex-shrink: 0;
	transition: color .2s ease-out;
}

.favorites-item__delete svg {
	display: block;
	stroke: currentColor;
}

.favorites-item__delete:hover {
	color: #f14646;
}

@media (max-width: 899px) {
	.favorites-item__delete {
		--btn-h: 54px;
		--btn-w: 54px;
		width: 54px;
		height: 54px;
		border-radius: 16px;
		background: #fff;
	}
}

.favorites__clear {
	--btn-h: auto;
	align-self: flex-start;
	gap: 8px;
	margin-top: 16px;
	color: #828897;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	transition: color .2s ease-out;
}

.favorites__clear svg {
	flex-shrink: 0;
	stroke: currentColor;
}

.favorites__clear:hover {
	color: #3d4452;
}

@media (max-width: 899px) {
	.favorites__clear {
		align-self: center;
		margin-top: 4px;
		color: #f14646;
	}
}

.dialog-favorites-confirm {
	width: 400px;
	padding: 24px;
}

.dialog-favorites-confirm .dialog-header {
	margin-bottom: 12px;
	align-items: flex-start;
}

.dialog-favorites-confirm .dialog-header__title {
	font-size: 18px;
	padding-right: 12px;
}

@media (max-width: 899px) {
	.dialog-favorites-confirm {
		max-width: 95%;
		padding: 20px 16px;
	}
}

.dialog-favorites-confirm__text {
	margin: 0 0 20px;
	color: #828897;
	line-height: 1.3;
}

.dialog-favorites-confirm__actions {
	gap: 12px;
}

@media (max-width: 899px) {
	.dialog-favorites-confirm__actions {
		flex-direction: column;
	}

	.dialog-favorites-confirm__keep,
	.dialog-favorites-confirm__apply {
		flex: none;
		width: 100%;
	}
}

.dialog-favorites-confirm__keep,
.dialog-favorites-confirm__apply {
	flex: 1;
}

.dialog-favorites-confirm__apply {
	--btn-bg: #FEEDED;
	--btn-clr: #F14646;
	--btn-fw: 600;
}

.dialog-favorites-confirm__apply:hover {
	--btn-bg: #fad4d4;
}

body.hero-podbor-open .content-wrapper {
	z-index: 30;
}

.page-404 {
	width: 100%;
	padding: 8px 0 72px;
}

.page-404__title {
	margin: 0 0 40px;
	color: #25282d;
}

.page-404__layout {
	display: flex;
	align-items: center;
	gap: 56px;
}

.page-404__code {
	margin: 0;
	flex-shrink: 0;
	color: #ff9b46;
	font-size: clamp(120px, 16vw, 200px);
	font-weight: 600;
	line-height: 0.85;
	letter-spacing: -0.03em;
}

.page-404__content {
	max-width: 360px;
}

.page-404__heading {
	margin: 0 0 12px;
	color: #25282d;
	font-size: 28px;
	line-height: 1.15;
}

.page-404__text {
	margin: 0 0 24px;
	color: #5f697c;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
}

.page-404__home {
	width: auto;
}

.page-404__back {
	margin: 12px 0 0;
	color: #25282d;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.page-404__back a {
	color: #ff9b46;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.page-404__back a:hover {
	color: #ffa960;
}

.listing__title {
	margin: 0 0 16px;
}

.wd-seo-text {
	margin: 0 0 28px;
	color: #25282d;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
}

.wd-seo-text--bottom,
.wd-seo-text--description_bottom {
	margin-top: 28px;
}

.wd-seo-text p + p,
.wd-seo-text ul,
.wd-seo-text ol,
.wd-seo-text h2,
.wd-seo-text h3 {
	margin-top: 12px;
}

.wd-seo-text h2,
.wd-seo-text h3 {
	margin-bottom: 8px;
	font-weight: 600;
	line-height: 1.3;
}

.wd-seo-text ul,
.wd-seo-text ol {
	padding-left: 1.25em;
}

.wd-seo-text ul {
	list-style: disc;
}

.wd-seo-text ol {
	list-style: decimal;
}

.wd-seo-text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 768px) {
	.page-404 {
		padding-bottom: 48px;
	}

	.page-404__title {
		margin-bottom: 24px;
	}

	.page-404__layout {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.page-404__heading {
		font-size: 22px;
	}

	.page-404__text {
		font-size: 14px;
	}
}

/* Карточки в строке одной высоты, кнопка «В корзину» на одной линии */
@media (min-width: 769px) {
	.popular-listing {
		align-items: stretch;
	}

	.popular-listing > * {
		display: flex;
		flex-direction: column;
		height: 100%;
		min-width: 0;
		overflow: visible;
	}

	.popular-listing .card {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100%;
		overflow: visible;
	}

	.popular-listing .card__content {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
	}

	.popular-listing .card__actions {
		margin-top: auto;
	}

	/* После flex-выравнивания абсолютный promo иначе встаёт внутрь карточки */
	.popular-listing .card__promo-active {
		top: 100%;
		left: 0;
		z-index: 1;
	}
}

.card__title a,
.card__title a:hover,
.card__title a:focus {
	color: inherit;
	text-decoration: none;
}

/* Фильтры: закрытый блок — стрелка вниз, открытый — вверх */
.aside__filters .btn-collapse > * {
	pointer-events: none;
}

.aside__filters .btn-collapse .icon {
	--i-r: 90deg;
	transform: rotate(90deg);
}

.aside__filters .btn-collapse.active .icon {
	--i-r: -90deg;
	transform: rotate(-90deg);
}

.aside__articles-item.is-active {
	padding: 18px;
	background: #F9F9F9;
	border-radius: 16px;
	color: #25282D;
}
