/**
 * Mobile catalog menu — fade overlay (данные как у десктоп мега-меню).
 */

@media (max-width: 1023px) {
	.catalog-mobile {
		position: fixed;
		top: var(--head-height, 60px);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 240;
		pointer-events: none;
		visibility: hidden;
		transition: visibility 0s linear 0.38s;
	}

	html:has(#site-nav-toggle:checked) .catalog-mobile {
		pointer-events: auto;
		visibility: visible;
		transition-delay: 0s;
	}

	.catalog-mobile__backdrop {
		position: absolute;
		inset: 0;
		display: block;
		margin: 0;
		border: 0;
		background: var(--asic-overlay-backdrop, rgba(12, 11, 13, 0.55));
		cursor: pointer;
		opacity: 0;
		transition: opacity 0.35s ease;
	}

	html:has(#site-nav-toggle:checked) .catalog-mobile__backdrop {
		opacity: 1;
	}

	.catalog-mobile__panel {
		position: absolute;
		top: var(--header-mobile-sheet-gap, 8px);
		right: max(var(--header-mobile-sheet-inset, 10px), env(safe-area-inset-right, 0px));
		bottom: 0;
		left: max(var(--header-mobile-sheet-inset, 10px), env(safe-area-inset-left, 0px));
		display: flex;
		flex-direction: column;
		border-radius: 24px 24px 0 0;
		background: #fff;
		transform: translateY(-12px);
		transform-origin: top center;
		opacity: 0;
		transition:
			opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	}

	html:has(#site-nav-toggle:checked) .catalog-mobile__panel {
		opacity: 1;
		transform: translateY(0);
	}

	.catalog-mobile__scroll {
		flex: 1 1 auto;
		overflow-y: auto;
		padding: 8px 16px 24px;
		-webkit-overflow-scrolling: touch;
	}

	.catalog-mobile__list {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.catalog-mobile__item + .catalog-mobile__item {
		border-top: 1px solid #f0f1f3;
	}

	.catalog-mobile__row {
		display: flex;
		align-items: center;
		gap: 12px;
		width: 100%;
		min-height: 56px;
		padding: 8px 4px 8px 0;
		color: #2e2d33;
		text-decoration: none;
		list-style: none;
		cursor: pointer;
	}

	.catalog-mobile__icon {
		flex: 0 0 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border-radius: 10px;
		background: #f3f4f7;
		color: #5c5c66;
	}

	.catalog-mobile__icon img {
		display: block;
		width: 22px;
		height: 22px;
		object-fit: contain;
	}

	.catalog-mobile__icon svg {
		display: block;
	}

	.catalog-mobile__label {
		flex: 1 1 auto;
		min-width: 0;
		font-weight: 500;
		font-size: 15px;
		line-height: 1.35;
	}

	.catalog-mobile__chevron {
		flex: 0 0 16px;
		width: 8px;
		height: 12px;
		margin-left: auto;
		background-color: #9a9ea6;
		-webkit-mask: url(../../../img/icons/arrow_right_single.svg) center / contain no-repeat;
		mask: url(../../../img/icons/arrow_right_single.svg) center / contain no-repeat;
		transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.catalog-mobile__toggle > .catalog-mobile__row {
		list-style: none;
	}

	.catalog-mobile__toggle > .catalog-mobile__row::marker,
	.catalog-mobile__toggle > .catalog-mobile__row::-webkit-details-marker {
		display: none;
		content: '';
	}

	.catalog-mobile__sub-panel-inner {
		min-height: 0;
		overflow: hidden;
	}

	.catalog-mobile__list--js .catalog-mobile__toggle > .catalog-mobile__sub-panel {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.catalog-mobile__list--js .catalog-mobile__toggle[open]:not(.catalog-mobile__toggle--opening):not(.catalog-mobile__toggle--closing) > .catalog-mobile__sub-panel {
		grid-template-rows: 1fr;
	}

	.catalog-mobile__list--js .catalog-mobile__toggle[open].catalog-mobile__toggle--opening > .catalog-mobile__sub-panel,
	.catalog-mobile__list--js .catalog-mobile__toggle[open].catalog-mobile__toggle--closing > .catalog-mobile__sub-panel {
		grid-template-rows: 0fr;
	}

	@media (prefers-reduced-motion: reduce) {
		.catalog-mobile__list--js .catalog-mobile__toggle > .catalog-mobile__sub-panel,
		.catalog-mobile__chevron {
			transition: none;
		}
	}

	.catalog-mobile__toggle[open] > .catalog-mobile__row .catalog-mobile__chevron {
		transform: rotate(90deg);
	}

	.catalog-mobile__row:hover .catalog-mobile__label,
	.catalog-mobile__row:focus-visible .catalog-mobile__label,
	.catalog-mobile__toggle[open] > .catalog-mobile__row .catalog-mobile__label {
		color: var(--orange);
	}

	.catalog-mobile__row:hover .catalog-mobile__icon,
	.catalog-mobile__row:focus-visible .catalog-mobile__icon,
	.catalog-mobile__toggle[open] > .catalog-mobile__row .catalog-mobile__icon {
		background: rgba(255, 106, 22, 0.12);
		color: var(--orange);
	}

	.catalog-mobile__sub {
		margin: 0;
		padding: 0 0 12px 52px;
		list-style: none;
	}

	.catalog-mobile__sub-item + .catalog-mobile__sub-item {
		margin-top: 4px;
	}

	.catalog-mobile__sub-link {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		padding: 8px 0;
		color: #5c5c66;
		font-size: 14px;
		line-height: 1.35;
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.catalog-mobile__sub-icon {
		display: inline-flex;
		flex: 0 0 20px;
		align-items: center;
		justify-content: center;
		width: 20px;
		height: 20px;
	}

	.catalog-mobile__sub-icon img {
		display: block;
		width: 20px;
		height: 20px;
		object-fit: contain;
	}

	.catalog-mobile__sub-label {
		min-width: 0;
	}

	.catalog-mobile__sub-link:hover,
	.catalog-mobile__sub-link:focus-visible {
		color: var(--orange);
	}

	.catalog-mobile__all-link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		min-height: 52px;
		margin-top: 16px;
		padding: 0 18px;
		border-radius: 14px;
		background: #eef0f3;
		color: #2e2d33;
		font-weight: 600;
		font-size: 15px;
		text-decoration: none;
		transition: background 0.2s ease, color 0.2s ease;
	}

	.catalog-mobile__all-link:hover,
	.catalog-mobile__all-link:focus-visible {
		background: #e4e7ec;
		color: var(--orange);
	}

	.catalog-mobile__footer {
		flex: 0 0 auto;
		padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid #eef0f3;
		background:
			linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 18%),
			#fff;
		box-shadow: 0 -10px 28px rgba(12, 11, 13, 0.04);
	}

	.catalog-mobile__quick {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		margin-bottom: 14px;
	}

	.catalog-mobile__quick-link {
		position: relative;
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 72px;
		padding: 12px 12px 12px 10px;
		border: 1px solid #e8eaee;
		border-radius: 16px;
		background: linear-gradient(180deg, #fafbfc 0%, #f3f4f7 100%);
		color: #2e2d33;
		text-decoration: none;
		transition:
			border-color 0.22s ease,
			background 0.22s ease,
			box-shadow 0.22s ease,
			transform 0.18s ease;
		-webkit-tap-highlight-color: transparent;
	}

	.catalog-mobile__quick-link:hover,
	.catalog-mobile__quick-link:focus-visible {
		border-color: rgba(255, 106, 22, 0.35);
		background: linear-gradient(180deg, #fff 0%, #fff5ef 100%);
		box-shadow: 0 8px 20px rgba(255, 106, 22, 0.1);
	}

	.catalog-mobile__quick-link:active {
		transform: scale(0.985);
	}

	.catalog-mobile__quick-icon {
		flex: 0 0 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border-radius: 12px;
		background: #fff;
		color: #5c5c66;
		box-shadow: inset 0 0 0 1px #eceef2;
		transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
	}

	.catalog-mobile__quick-link:hover .catalog-mobile__quick-icon,
	.catalog-mobile__quick-link:focus-visible .catalog-mobile__quick-icon {
		background: rgba(255, 106, 22, 0.1);
		color: var(--orange);
		box-shadow: inset 0 0 0 1px rgba(255, 106, 22, 0.18);
	}

	.catalog-mobile__quick-link--wish.wishlist-counter-with-products .catalog-mobile__quick-icon,
	.catalog-mobile__quick-link--compare.is-compare .catalog-mobile__quick-icon {
		background: rgba(255, 106, 22, 0.12);
		color: var(--orange);
		box-shadow: inset 0 0 0 1px rgba(255, 106, 22, 0.2);
	}

	.catalog-mobile__quick-body {
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 2px;
	}

	.catalog-mobile__quick-label {
		font-weight: 600;
		font-size: 14px;
		line-height: 1.25;
		letter-spacing: -0.01em;
	}

	.catalog-mobile__quick-meta {
		color: #8b9099;
		font-size: 11px;
		line-height: 1.3;
	}

	.catalog-mobile__quick-link .wishlist_products_counter_number,
	.catalog-mobile__quick-link .count-compare,
	.catalog-mobile__quick-badge {
		position: absolute;
		top: 8px;
		right: 8px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border-radius: 999px;
		background: linear-gradient(105.86deg, #ff6a16 -14.72%, #ffa216 111.57%);
		color: #fff;
		font-weight: 700;
		font-size: 11px;
		line-height: 1;
		box-shadow: 0 2px 8px rgba(255, 106, 22, 0.35);
	}

	.catalog-mobile__quick-link .wishlist_products_counter_number:empty,
	.catalog-mobile__quick-link .count-compare:empty {
		display: none;
	}

	.catalog-mobile__langs-title {
		margin: 0 0 8px;
		color: #8b9099;
		font-weight: 600;
		font-size: 11px;
		line-height: 1.3;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.catalog-mobile__langs-list {
		display: flex;
		align-items: stretch;
		gap: 6px;
		margin: 0;
		padding: 4px;
		border-radius: 14px;
		background: #f3f4f7;
		box-shadow: inset 0 0 0 1px #e8eaee;
		list-style: none;
	}

	.catalog-mobile__lang-item {
		flex: 1 1 0;
		display: flex;
		align-items: stretch;
		min-width: 0;
	}

	.catalog-mobile__langs-list.lang-select .catalog-mobile__lang-btn,
	.catalog-mobile__langs-list.lang-select a.catalog-mobile__lang-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 44px;
		min-height: 44px;
		padding: 0 8px;
		border: 1px solid transparent;
		border-radius: 10px;
		background: transparent;
		color: #9a9ea6;
		font-weight: 700;
		font-size: 13px;
		line-height: 1;
		letter-spacing: 0.06em;
		text-decoration: none;
		text-transform: uppercase;
		box-sizing: border-box;
		transition:
			color 0.22s ease,
			background 0.22s ease,
			border-color 0.22s ease,
			box-shadow 0.22s ease;
	}

	.catalog-mobile__langs-list.lang-select .catalog-mobile__lang-btn.is-current,
	.catalog-mobile__langs-list.lang-select .lang-item.current-lang .catalog-mobile__lang-btn {
		border-color: rgba(255, 106, 22, 0.35);
		background: #fff;
		color: var(--orange);
		box-shadow: 0 4px 14px rgba(255, 106, 22, 0.16);
	}

	.catalog-mobile__lang-btn:hover,
	.catalog-mobile__lang-btn:focus-visible {
		color: var(--orange);
		background: rgba(255, 255, 255, 0.72);
	}

	.catalog-mobile__langs-list.lang-select .catalog-mobile__lang-btn.is-current:hover,
	.catalog-mobile__langs-list.lang-select .catalog-mobile__lang-btn.is-current:focus-visible {
		border-color: rgba(255, 106, 22, 0.35);
		background: #fff;
		color: var(--orange);
	}

	.catalog-mobile__quick:has(> :only-child) {
		grid-template-columns: 1fr;
	}

	.catalog-mobile__lang-item.lang-item--missing .catalog-mobile__lang-btn {
		opacity: 0.45;
		pointer-events: none;
	}

	.catalog-mobile__quick-link--compare .compare-text,
	.catalog-mobile__quick-link .wishlist_products_counter_text {
		display: none;
	}

	html:has(#site-nav-toggle:checked) .site-header__bar {
		z-index: 245;
	}
}

@media (min-width: 1024px) {
	.catalog-mobile {
		display: none !important;
	}
}
