@import url(fonts.css);
@import url(vars.css);

html {
	overflow-y: overlay;
	scrollbar-gutter: stable;
}

html.scroll-lock,
body.scroll-lock {
	overflow: hidden !important;
}

html.scroll-lock {
	height: 100%;
}

body.scroll-lock:not(.scroll-lock-mobile) {
	position: fixed;
	width: 100%;
	left: 0;
	right: 0;
	height: 100%;
}

body.scroll-lock-mobile {
	overflow: hidden;
	touch-action: none;
}

/* Premium custom overlay scrollbar */
html::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
html::-webkit-scrollbar-track {
	background: transparent;
}
html::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	border: 2px solid transparent;
	background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
	font-family: "9506", sans-serif;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-size: 16px;
	min-width: 360px;
	font-weight: 400;
	position: relative;
	line-height: 1.5;
	overflow-x: hidden;
	color: var(--dark);
	background: var(--white);
	-webkit-text-size-adjust: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.main-content {
	flex: 1 0 auto;
	width: 100%;
}

body.no-scroll {
	overflow: hidden;
}

b,
strong {
	font-weight: 700;
}

img {
	display: block;
	max-width: 100%;
}

a {
	text-decoration: none;
}

ul {
	list-style: none;
}

.container {
	max-width: 1240px;
	width: 100%;
	padding-left: max(20px, env(safe-area-inset-left));
	padding-right: max(20px, env(safe-area-inset-right));
	margin: 0 auto;
}

.pagination {
	display: flex;
	align-items: center;
}

.pagination li.disabled a {
	color: var(--dark50);
}

.pagination a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	font-size: 18px;
	font-weight: 500;
	color: var(--dark);
	transition: color 0.3s ease;
}

.pagination a[href]:hover {
	color: var(--accent);
}

.pagination li.active a {
	background: var(--gray);
	border-radius: 8px;
}

.pagination-dots a {
	min-width: auto;
	padding: 0 3px;
}

.link-as-button {
	background: none;
	border: none;
	color: #007bff;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font: inherit;
}

.auth-switcher {
	text-align: center;
	margin-bottom: 1rem;
}

.auth-switcher a {
	color: #666;
	text-decoration: underline;
	font-size: 0.9rem;
}

.cookie-consent {
	position: fixed;
	inset: 0;
	z-index: 1300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	padding-bottom: max(20px, env(safe-area-inset-bottom));
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.cookie-consent.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.cookie-consent[hidden] {
	display: none !important;
}

.cookie-consent-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(22, 22, 24, 0.42);
}

.cookie-consent-dialog {
	position: relative;
	width: min(100%, 360px);
	padding: 28px 24px 22px;
	border-radius: 24px;
	background: var(--white);
	text-align: center;
	box-shadow: 0 24px 64px rgba(22, 22, 24, 0.18);
	transform: translateY(12px) scale(0.97);
	transition: transform 0.28s ease;
}

.cookie-consent.is-visible .cookie-consent-dialog {
	transform: translateY(0) scale(1);
}

.cookie-consent-illustration {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
}

.cookie-consent-title {
	margin: 0 0 10px;
	color: var(--dark);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}

.cookie-consent-text {
	margin: 0 0 22px;
	color: #7e7e7e;
	font-size: 15px;
	line-height: 1.45;
}

.cookie-consent-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 999px;
	background: var(--dark);
	color: var(--white);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.2s ease;
}

html.cookie-consent-open,
body.cookie-consent-open {
	overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
	.cookie-consent-btn:hover {
		background: var(--dark92);
	}
}

@media (max-width: 767px) {
	.cookie-consent {
		align-items: flex-end;
		padding: 16px;
		padding-bottom: max(16px, env(safe-area-inset-bottom));
	}

	.cookie-consent-dialog {
		width: 100%;
		border-radius: 22px;
		padding: 24px 20px 20px;
	}

	.cookie-consent-title {
		font-size: 20px;
	}

	.cookie-consent-text {
		font-size: 14px;
	}
}

/* Красная подложка у цены — дубль post-price-highlight.css */
.post-card-price:has(.post-price--highlighted),
.post-item-price-row:has(.post-price--highlighted),
.post-item-price-container:has(.post-price--highlighted),
.post-card:has(.post-price--highlighted),
.post-info .post-price:has(.post-price--highlighted),
.filtered-posts .post-item-content:has(.post-price--highlighted) {
	overflow: visible;
}

.post-price--highlighted,
span.post-price--highlighted,
.post-item-price.post-price--highlighted,
.post-card-price .post-price-value.post-price--highlighted,
.post-card-price .post-price--highlighted,
.post-info .post-price .post-price--highlighted,
.post-info .post-price > .post-price--highlighted {
	display: inline-block !important;
	box-sizing: border-box;
	width: auto;
	max-width: max-content;
	padding: 0.08em 0.28em !important;
	color: #fff !important;
	font-weight: 700 !important;
	line-height: 1.05 !important;
	vertical-align: baseline;
	background: #fb544b !important;
	background-color: #fb544b !important;
	background-image: none !important;
	border-radius: 0.36em 0.14em 0.32em 0.12em / 0.12em 0.34em 0.16em 0.36em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	clip-path: none !important;
	-webkit-clip-path: none !important;
}

.post-card-price:has(.post-price--highlighted),
.post-item-price-row:has(.post-price--highlighted) {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.post-card--highlighted::before,
.post-item-wrap--highlighted::before,
.filtered-posts .post-item-wrap--highlighted .post-item-media::before {
	content: none !important;
	display: none !important;
	background: none !important;
	background-image: none !important;
}
