@import url(base.css);

.top-bar {
	background: var(--dark);
}

.top-bar-grid {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 36px;
}

.location-btn {
	display: flex;
	align-items: center;
	background: 0;
	border: 0;
	color: var(--white);
	font-size: 15px;
	font-weight: 400;
	gap: 2px;
	height: 100%;
	cursor: pointer;
	transition: color 0.3s ease;
}

.top-bar-favorite {
	display: flex;
	align-items: center;
	gap: 2px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--white);
	height: 100%;
	transition: color 0.3s ease;
}

.location-btn:hover,
.top-bar-favorite:hover {
	color: var(--accent);
}

.header {
	position: sticky;
	top: 0;
	background: var(--white);
	margin-bottom: 60px;
	z-index: 20;
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 4%);
}

.header-grid {
	position: relative;
	display: flex;
	align-items: center;
	height: 80px;
}

.header .logo {
	flex-shrink: 0;
	margin-right: 30px;
}

.menu-btn {
	display: flex;
	align-items: center;
	background: var(--accent);
	border: 0;
	color: var(--white);
	font-size: 16px;
	height: 42px;
	border-radius: 12px;
	padding: 0 16px 0 12px;
	margin-right: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.3s ease;
}

.menu-btn:hover {
	background: var(--accent-darken);
}

.menu-btn svg {
	margin-top: -2px;
}

.menu-btn.active .menu-icon,
.menu-btn .cross-icon {
	display: none;
}

.menu-btn .cross-icon {
	margin: 0 2px 0 -2px;
}

.menu-btn.active .cross-icon {
	display: block;
}

.main-menu {
	position: absolute;
	top: 80px;
	left: 0;
	width: 100%;
	height: calc(100vh - (80px + var(--scroll-top)));
	background: rgb(22 22 24 / 50%);
	padding: 20px 0;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.3s ease, opacity 0.3s ease;
}

.main-menu.active {
	visibility: visible;
	opacity: 1;
}

.main-menu .container {
	display: grid;
}

.main-menu-wrap {
	position: relative;
	background: var(--white);
	padding: 20px;
	border-radius: 20px;
	height: auto;
	max-height: calc(100vh - (120px + var(--scroll-top)));
	visibility: hidden;
	opacity: 0;
	transform: translateY(-10px);
	z-index: 5;
	will-change: transform;
	transition: visibility 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.main-menu.active .main-menu-wrap {
	visibility: visible;
	opacity: 1;
	transform: translateY(0px);
}

.menu-categories {
	width: 300px;
	height: 100%;
	overflow-y: auto;
	scrollbar-width: thin;
	padding-right: 10px;
}

.menu-categories-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	cursor: default;
	padding: 8px 8px 8px 18px;
	border-radius: 12px;
	line-height: 1.3;
	font-weight: 500;
}

.menu-categories-item:after {
	content: "";
	background: url(../img/right-angle-icon.svg);
	background-size: 100%;
	background-repeat: no-repeat;
	background-position: right center;
	width: 25px;
	height: 25px;
	flex-shrink: 0;
}

.menu-categories-item.active {
	background: var(--gray);
}

.menu-categories-item .sub-menu {
	display: none;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px 20px;
	position: absolute;
	top: 20px;
	left: 350px;
	padding-top: 4px;
	width: calc(100% - 360px);
	max-height: calc(100% - 40px);
	height: auto;
	overflow-y: auto;
	scrollbar-width: thin;
	padding-right: 20px;
}

.menu-categories-item.active .sub-menu {
	display: grid;
}

.menu-category-link {
	grid-column: 1 / 4;
	font-size: 26px;
	font-weight: 600;
	color: var(--dark);
	margin-bottom: 10px;
	transition: color 0.3s ease;
}

.menu-categories-item.active .sub-menu a:hover {
	color: var(--accent);
}

.menu-categories-item .sub-menu li a {
	display: block;
	color: var(--dark75);
	font-weight: 400;
	transition: color 0.3s ease;
}

.search {
	max-width: 535px;
	width: 100%;
	margin-right: auto;
}

.search-grid {
	position: relative;
	z-index: 10;
}

.search input {
	width: 100%;
	height: 42px;
	position: relative;
	border: 0;
	background: var(--gray);
	border-radius: 12px;
	font-size: 16px;
	font-weight: 400;
	padding: 0 16px 0 40px;
	outline: none;
	transition: background 0.3s ease;
}

.search input::placeholder {
	color: var(--dark50);
}

.search input:focus {
	background: var(--white);
}

.search-icon {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	color: var(--dark50);
	z-index: 2;
	pointer-events: none;
	transition: color 0.3s ease;
}

.search input:focus ~ .search-icon {
	color: var(--accent);
}

.search-suggestions {
	visibility: hidden;
	opacity: 0;
	transform: translateY(-10px);
	position: absolute;
	top: 52px;
	background: var(--white);
	width: 100%;
	border-radius: 12px;
	padding: 10px;
	z-index: 2;
	will-change: transform;
}

.search-suggestions.active {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	transition: all 0.3s ease;
}

.search-suggestions a {
	color: var(--dark);
	display: block;
	padding: 8px 16px;
	border-radius: 10px;
	transition: background 0.3s ease;
}

.search-suggestions a:hover {
	background: var(--gray);
}

.search-suggestions a span {
	font-weight: 500;
}

.not-found-suggestion {
	text-align: center;
	padding: 8px 26px 12px;
	color: var(--dark75);
}

.search-cover {
	position: fixed;
	inset: 0;
	background: var(--dark);
	opacity: 0;
	pointer-events: none;
	cursor: pointer;
	z-index: -1;
	transition: all 0.3s ease;
}

.search input:focus ~ .search-cover {
	opacity: 0.5;
	pointer-events: all;
}

.add-link,
.login-link {
	font-weight: 500;
	height: 42px;
	display: flex;
	align-items: center;
	padding: 0 26px;
	border-radius: 12px;
}

.add-link {
	flex-shrink: 0;
	border: 1px solid var(--accent);
	color: var(--accent);
	margin-left: 30px;
	transition: all 0.3s ease;
}

.add-link:hover {
	background: var(--accent);
	color: var(--white);
}

.login-link {
	background: var(--gray);
	color: var(--dark);
	margin-left: 15px;
	transition: all 0.3s ease;
}

.login-link:hover {
	background: var(--dark);
	color: var(--white);
}

.profile-btn {
	flex-shrink: 0;
	height: 42px;
	background: var(--dark);
	border: 0;
	border-radius: 12px;
	padding-right: 8px;
	margin-left: 15px;
	color: var(--white);
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

.profile-btn img {
	width: 34px;
	height: 34px;
	object-fit: cover;
	border-radius: 8px;
	margin-left: 4px;
}

.profile-letter {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: var(--white);
	border-radius: 8px;
	margin-left: 4px;
	font-size: 20px;
	font-weight: 700;
	color: var(--dark);
}

.profile-btn svg {
	will-change: transform;
	transition: all 0.3s ease;
}

.profile-btn.active svg {
	transform: rotate(180deg);
}

.profile-popup {
	position: absolute;
	width: 250px;
	top: 75px;
	right: 0;
	background: var(--white);
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 10%);
	padding: 10px 20px;
	border-radius: 12px;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-10px);
	z-index: 5;
	will-change: transform;
	transition: all 0.3s ease;
}

.profile-popup.active {
	visibility: visible;
	opacity: 1;
	transform: translateY(0px);
}

.profile-popup li {
	border-bottom: 1px solid var(--gray);
}

.profile-popup li:last-child {
	border: 0;
}

.profile-popup li a {
	font-size: 15px;
	color: var(--dark75);
	padding: 8px 0;
	display: block;
	transition: color 0.3s ease;
}

.profile-popup li a:hover {
	color: var(--accent);
}

h1,
.section-title {
	font-size: 36px;
	line-height: 1.1;
	margin-bottom: 30px;
}

.footer {
	background: var(--dark92);
	padding-top: 50px;
	color: var(--white);
	margin-top: 140px;
}

.footer-start {
	display: flex;
	align-items: start;
	justify-content: space-between;
	margin-bottom: 50px;
}

.footer a {
	display: table;
	color: var(--white);
	transition: color 0.3s ease;
}

.footer-start p,
.footer-start a {
	margin-bottom: 5px;
}

.footer-start a:hover,
.footer-middle nav ul a:hover {
	color: var(--accent);
}

.footer-item:last-child {
	justify-items: end;
}

.footer-middle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 45px;
}

.footer-middle nav ul {
	display: flex;
	align-items: center;
	gap: 30px;
}

.footer-social {
	display: flex;
	align-items: center;
	gap: 20px;
}

.footer-social a {
	padding: 5px 18px;
	border-radius: 10px;
	transition: opacity 0.3s ease;
}

.footer-social a.vk-link {
	background: #0077ff;
}

.footer-social a.inst-link {
	background: linear-gradient(
		45deg,
		#405de6,
		#5851db,
		#833ab4,
		#c13584,
		#e1306c,
		#fd1d1d
	);
}

.footer-social a:hover {
	opacity: 0.75;
}

.footer-end {
	background: var(--dark);
	padding: 28px 0;
}

.footer-end-grid {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.footer-end-grid p {
	font-size: 15px;
}

.footer-end-grid p a {
	display: inline;
	text-transform: uppercase;
	color: #135eff;
	font-weight: 500;
	border-bottom: 1px solid;
}

.post-grid {
	display: grid;
	grid-template-columns: 750px 1fr;
	gap: 70px;
	align-items: start;
	margin-bottom: 100px;
}

.post-content h1 {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-bottom: 20px;
	margin-bottom: 0;
}

.post-slider .slider-nav {
	visibility: hidden;
	opacity: 0;
	top: calc(50% - 23px);
	left: 23px;
	width: calc(100% - 46px);
	transition: all 0.3s ease;
}

.post-slider:hover .slider-nav {
	opacity: 1;
	visibility: visible;
}

.post-slider {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 20px;
}

.post-slider img {
	aspect-ratio: 4 / 3;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0 auto;
}

.post-slider:after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--dark);
	opacity: 0.05;
	z-index: 2;
	pointer-events: none;
}

.post-thumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 70px;
}

.post-thumbs .post-thumb-btn {
	position: relative;
	aspect-ratio: 1;
	width: calc((100% - 70px) / 8);
	border-radius: 15px;
	overflow: hidden;
	border: 0;
	background: 0;
	cursor: pointer;
}

.post-thumbs .post-thumb-btn.active {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}

.post-thumbs .post-thumb-btn.active img {
    outline: 4px solid #fff;
    outline-offset: -4px;
}

.post-thumbs .post-thumb-btn:after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--dark);
	opacity: 0.05;
	z-index: 2;
	pointer-events: none;
}

.post-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 15px;
}

body:not(.is-using-mouse) .fancybox__container :focus {
	box-shadow: 0 0 0 1px #fff !important;
}

.fancybox__thumb,
.fancybox__thumbs .carousel__slide .fancybox__thumb::after {
	border-radius: 10px !important;
}

.fancybox__thumbs .carousel__slide {
	padding: 8px 5px !important;
}

.fancybox__thumbs .carousel__slide .fancybox__thumb::after {
	border: 0 !important;
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.post-content h2 {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	margin-top: 50px;
	margin-bottom: 10px;
}

.post-content p {
	font-size: 16px;
	font-weight: 400;
	color: var(--dark75);
}

.post-attributes {
	display: grid;
	gap: 5px;
}

.post-attributes li {
	color: var(--dark75);
}

.post-attributes li span {
	color: var(--dark);
	font-weight: 500;
}

.post-info {
	position: sticky;
	top: 130px;
}

.post-price {
	font-size: 36px;
	line-height: 1.1;
	font-weight: 700;
	margin-bottom: 20px;
}

.post-contacts a {
	display: grid;
	align-items: center;
	justify-content: center;
	color: var(--white);
	border-radius: 12px;
	height: 42px;
	font-weight: 500;
	transition: background 0.3s ease, opacity 0.3s ease;
}

.post-call {
	background: var(--accent);
	margin-bottom: 15px;
}

.post-call:hover {
	background: var(--accent-darken);
}

.post-contacts-messengers {
	display: flex;
	align-items: center;
	gap: 15px;
}

.post-telegram {
	flex: 1 0 0;
	background: linear-gradient(0deg, #229ed9, #2aabee);
}

.post-whatsapp {
	flex: 1 0 0;
	background: linear-gradient(0deg, #28d146, #5ffc7b);
}

.post-telegram:hover,
.post-whatsapp:hover {
	opacity: 0.75;
}

.post-author {
	display: grid;
	grid-template-columns: 55px 1fr;
	align-items: center;
	gap: 15px;
	border-top: 1px solid var(--dark10);
	border-bottom: 1px solid var(--dark10);
	padding: 20px 0;
	margin: 20px 0;
}

.post-author .profile-letter {
	width: 55px;
	height: 55px;
	background: var(--dark10);
	margin: 0;
	border-radius: 12px;
	font-size: 28px;
}

.post-author img {
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 12px;
}

.post-user-name {
	font-size: 18px;
	font-weight: 500;
	color: var(--dark);
	transition: all 0.3s ease;
}

.post-author:hover .post-user-name {
	color: var(--accent);
}

.post-user-date {
	color: var(--dark75);
}

.post-favorite-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: var(--accent);
	background: 0;
	border: 1px solid var(--accent);
	border-radius: 12px;
	width: 100%;
	height: 42px;
	padding-left: 10px;
	margin-bottom: 20px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease;
}

.post-favorite-btn:hover {
	background: var(--accent);
	color: var(--white);
}

.post-data-info {
	display: grid;
	gap: 8px;
}

.post-data-info p {
	color: var(--dark75);
}

.post-data-info p a {
	transition: color 0.3s ease;
}

.post-data-info p a:hover {
	color: var(--accent);
}

.post-data-info p a,
.post-data-info p b {
	color: var(--dark);
	font-weight: 500;
}

.home-categories {
	margin-bottom: 100px;
}

.categories-slider {
	position: relative;
}

.swiper-container {
	overflow: hidden;
}

.category-item-cover {
	aspect-ratio: 1;
	background: var(--gray);
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 10px;
}

.category-item-cover img {
	transition: all 0.3s ease !important;
}

.category-item:hover img {
	filter: brightness(0.9);
}

.category-item h4 {
	font-size: 16px;
	font-weight: 500;
	color: var(--dark75);
	line-height: 1.2;
	text-align: center;
	transition: color 0.3s ease;
}

.category-item:hover h4 {
	color: var(--accent);
}

.slider-nav {
	position: absolute;
	top: calc(50% - 48px);
	left: -23px;
	width: calc(100% + 46px);
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 2;
}

.slider-nav .prev,
.slider-nav .next {
	border: 0;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	box-shadow: 0 0 15px rgb(22 22 24 / 10%);
	pointer-events: all;
	cursor: pointer;
}

.slider-nav .prev {
	background: url(../img/left-arrow-icon.svg) var(--white) center / 26px
		no-repeat;
}

.slider-nav .next {
	background: url(../img/right-arrow-icon.svg) var(--white) center / 26px
		no-repeat;
}

.slider-nav .swiper-button-disabled {
	visibility: hidden;
}

.promo-slider {
	margin-bottom: 100px;
}

.promo-slider-wrap {
	position: relative;
}

.promo-slider .swiper-container {
	border-radius: 20px;
}

.promo-item {
	display: block;
	background: var(--gray);
	aspect-ratio: 8 / 2.1;
}

.promo-item img {
	aspect-ratio: 8 / 2.1;
	object-fit: cover;
}

.promo-slider .slider-nav {
	top: calc(50% - 23px);
}

.swiper-pagination {
	bottom: -30px !important;
}

.swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dark10);
	opacity: 1;
}

.swiper-pagination-bullet-active {
	background: var(--dark) !important;
}

.popup-wrap {
	visibility: hidden;
	opacity: 0;
	position: fixed;
	inset: 0;
	z-index: 99;
	background: rgb(22 22 24 / 50%);
	display: grid;
	align-items: center;
	padding-left: max(20px, env(safe-area-inset-left));
	padding-right: max(20px, env(safe-area-inset-right));
	transition: visibility 0.3s ease, opacity 0.3s ease;
}

.popup-wrap.active {
	visibility: visible;
	opacity: 1;
}

.popup-wrap .popup {
	background: var(--white);
	margin: 40px auto;
	border-radius: 20px;
	padding: 30px;
	opacity: 0;
	transform: translateY(-10px);
	will-change: transform;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup-wrap.active .popup {
	transform: none;
	opacity: 1;
}

.select-location {
	align-items: start;
	overflow-y: auto;
}

.select-location-popup {
	max-width: 420px;
	width: 100%;
}

.select-location-popup h3 {
	line-height: 1;
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 5px;
}

.select-location-popup h4 {
	font-size: 20px;
	margin-bottom: 20px;
}

.select-location-btns {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.select-location-btn {
	color: var(--white);
	border: 0;
	font-size: 16px;
	height: 42px;
	border-radius: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease;
}

.select-location-btn-yes {
	background: var(--green);
}

.select-location-btn-yes:hover {
	background: var(--green-darken);
}

.select-location-btn-no {
	background: var(--gray);
	color: var(--dark);
}

.select-location-btn-no:hover {
	background: var(--dark10);
}

.list-location-popup {
	display: none;
}

.list-location-popup h2 {
	font-size: 20px;
	line-height: 1;
	margin-bottom: 15px;
}

.list-location-popup input {
	width: 100%;
	height: 44px;
	position: relative;
	border: 1px solid var(--dark20);
	background: 0;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 400;
	padding: 0 20px;
	margin-bottom: 15px;
	outline: 2px solid transparent;
	transition: all 0.3s ease;
}

.list-location-popup input:focus {
	border-color: var(--accent);
}

.location-regions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 15px;
}

.location-regions .list-location-btn {
	background: var(--gray);
	text-align: center;
	padding: 10px;
	font-weight: 500;
	transition: all 0.3s ease;
}

.location-regions .list-location-btn:hover {
	background: var(--dark10);
}

.list-location-btn {
	display: block;
	background: 0;
	border: 0;
	-webkit-appearance: none;
	appearance: none;
	font-size: 16px;
	color: var(--dark);
	padding: 10px 16px;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	width: 100%;
	transition: all 0.3s ease;
}

.list-location-btn:hover {
	background: var(--gray);
}

.no-location-posts {
	background: var(--gray);
	padding: 50px 30px;
	border-radius: 20px;
}

.no-location-posts .section-title {
	text-align: center;
}

.no-location-posts img {
	max-width: 100px;
	margin: 0 auto;
}

.no-location-posts p {
	text-align: center;
	font-size: 18px;
	color: var(--dark75);
	max-width: 415px;
	margin: 0 auto 10px;
}

.posts-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 50px 20px;
}

.post-card {
	position: relative;
}

.post-card-cover {
	position: relative;
	display: block;
	aspect-ratio: 1;
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 10px;
}

.post-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card-cover:after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--dark);
	opacity: 0.05;
	z-index: 2;
	pointer-events: none;
}

.post-card-title {
	font-size: 16px;
	font-weight: 500;
	height: 42px;
	line-height: 1.3;
	color: var(--dark);
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	white-space: normal;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	word-break: break-word;
	margin-bottom: 5px;
	transition: color 0.3s ease;
}

.post-card-title:hover {
	color: var(--accent);
}

.post-card-price {
	font-size: 16px;
	font-weight: 700;
}

.post-card-location {
	font-size: 14px;
	color: var(--dark50);
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	white-space: normal;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
}

.post-card-favorite {
	position: absolute;
	top: 7px;
	right: 7px;
	width: 26px;
	height: 26px;
	background: var(--white);
	border: 0;
	padding: 0;
	z-index: 2;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	will-change: transform;
	color: var(--dark);
}

.post-card-favorite.active svg {
	color: var(--accent);
	fill: var(--accent);
}

.filtered-page-grid {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 60px;
	align-items: start;
}

.filters-item {
	margin-bottom: 25px;
}

.filters-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.filters-top form {
	display: flex;
	align-items: center;
	gap: 10px;
}

.filters-top h3 {
	font-size: 16px;
	font-weight: 500;
}

.filter-form h4 {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 10px;
}

.input-range-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
}

.filter-select-wrap select,
.filter-form input {
	position: relative;
	background: var(--gray);
	border-radius: 12px;
	width: 100%;
	height: 42px;
	padding: 0 20px;
	appearance: none;
	-webkit-appearance: none;
	font-size: 16px;
	font-weight: 400;
	color: var(--dark);
	border: 1px solid transparent;
	outline: none;
	transition: border-color 0.3s ease;
}

.filter-select-wrap {
	position: relative;
}

.filter-select-wrap select {
	padding-right: 38px;
	padding-top: 1px;
	cursor: pointer;
}

.filter-select-wrap:after,
.filter-select-wrap:after {
	content: "";
	position: absolute;
	top: 10px;
	right: 12px;
	background: url(../img/down-arrow-icon.svg);
	background-size: 100%;
	width: 23px;
	height: 23px;
	pointer-events: none;
}

.filter-form input:focus {
	border-color: var(--dark);
}

.filter-form input::placeholder {
	color: var(--dark50);
}

.custom-checkbox {
	display: flex;
	align-items: start;
	cursor: pointer;
	gap: 10px;
	font-size: 16px;
	font-weight: 400;
	color: var(--dark75);
	margin-bottom: 5px;
}

.custom-checkbox:last-child {
	margin-bottom: 0;
}

.custom-checkbox input {
	display: none;
}

.custom-checkbox .checkmark {
	flex-shrink: 0;
	position: relative;
	width: 20px;
	height: 20px;
	background: var(--gray);
	border-radius: 4px;
	margin-top: 2px;
}

.custom-checkbox .checkmark::after {
	content: "";
	position: absolute;
	inset: 4px;
	background: transparent;
	border-radius: 2px;
	transition: background 0.3s ease;
}

.custom-checkbox input:checked + .checkmark::after {
	background: var(--accent);
}

.filter-sticky-btn {
	position: sticky;
	background: var(--white);
	bottom: 0;
	padding: 20px 0;
}

.filter-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 42px;
	background: var(--accent);
	border: 0;
	font-size: 16px;
	font-weight: 500;
	color: var(--white);
	padding: 0 26px;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.3s ease;
}

.filter-btn:hover {
	background: var(--accent-darken);
}

.filtered-posts {
	display: grid;
	gap: 60px;
}

.post-item-wrap {
	position: relative;
}

.post-item-wrap:not(:last-of-type):after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -30px;
	width: calc(100% - 186px);
	height: 1px;
	background: var(--dark10);
	will-change: transform;
}

.post-item {
	position: relative;
	display: grid;
	grid-template-columns: 166px 1fr;
	gap: 20px;
}

.post-item-cover {
	position: relative;
	border-radius: 20px;
	aspect-ratio: 1;
	overflow: hidden;
}

.post-item-cover:after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--dark);
	opacity: 0.05;
	z-index: 2;
	pointer-events: none;
}

.post-item-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-item-views {
	position: absolute;
	top: 7px;
	left: 7px;
	background: var(--white);
	height: 26px;
	display: flex;
	align-items: center;
	font-size: 12px;
	font-weight: 500;
	color: var(--dark);
	padding-right: 10px;
	padding-left: 5px;
	border-radius: 10em;
	z-index: 2;
}

.post-item-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 5px 0;
}

.post-item-content .post-item-title {
	margin: 0 0 5px;
	font-size: 20px;
	font-weight: 600;
	color: var(--dark);
	transition: color 0.3s ease;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	overflow: hidden;
	white-space: normal;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	word-break: break-word;
}

.post-item-content a[href]:hover {
	color: var(--accent);
}

.post-item-content p {
	line-height: 1.3;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	white-space: normal;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
    word-break: break-word;
	margin-bottom: 10px;
}

.post-item-price {
	font-weight: 700;
}

.post-item-address {
	font-size: 14px;
	color: var(--dark50);
}

.post-item-favorite {
	left: 133px;
}

.filter-search {
	margin-bottom: 15px;
}

.filter-search-results {
	max-height: 255px;
	height: 100%;
	overflow-y: auto;
	padding-right: 10px;
	scrollbar-width: thin;
}

.custom-radio.hidden {
	display: none;
}

.filter-search-selected-result {
	margin-top: 25px;
}

.filter-subcategory-grid {
	display: grid;
}

.filter-subcategory-grid a {
	color: var(--dark75);
	padding: 8px 0;
	background: transparent;
	border-radius: 10px;
	line-height: 1.2;
	transition: all 0.3s ease;
}

.filter-subcategory-grid a:hover {
	background: var(--gray);
	padding: 8px 18px;
	color: var(--dark);
}

.notification {
	position: fixed;
	right: 20px;
	transform: translateX(110%);
	background-color: var(--dark);
	background-size: 30px;
	background-position: left 15px top 8px;
	background-repeat: no-repeat;
	color: var(--white);
	padding: 12px 30px 12px 47px;
	border-radius: 15px;
	max-width: calc(100% - 40px);
	z-index: 20;
	will-change: transform;
	transition: transform 0.3s ease, bottom 0.3s ease;
}

.notification.active {
	transform: translateX(0);
}

.notification.success {
	background-image: url(../img/check-icon.svg);
}

.notification.error {
	background-image: url(../img/circle-cross-icon.svg);
}

.page p {
	margin: 16px 0;
}

.page h2 {
	font-size: 26px;
	line-height: 1.3;
	margin-top: 30px;
}

.page a {
	color: var(--accent);
	border-bottom: 1px solid var(--accent);
}

.page a:hover {
	border-color: transparent;
}

.page .page-pattern {
	border-radius: 20px;
	height: 240px;
	object-fit: cover;
	width: 100%;
	margin-bottom: 30px;
}

.page .about-pattern {
	background: var(--dark);
}

.posts-not-found h2 {
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 10px;
}

.header-mobile,
.footer .footer-logo-mobile,
.tabbar-mobile,
.mobile-menu,
.category-select-btn,
.close-filter-popup,
.profile-mobile {
	display: none;
}

.author-page .pagination {
	border-top: 1px solid var(--gray);
	margin-top: 30px;
	padding-top: 30px;
}

.author-info {
	display: grid;
	grid-template-columns: 80px 1fr;
	align-items: center;
	gap: 20px;
}

.author-avatar {
	background: var(--gray);
	border-radius: 50%;
	overflow: hidden;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 500;
}

.author-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.author-name-wrap {
	overflow: hidden;
}

.author-info h1 {
	font-size: 26px;
	padding-bottom: 4px;
	margin-bottom: 0;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.author-date {
	color: var(--dark75);
}

.author-contacts {
	margin-top: 20px;
}

.author-contacts-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.author-contacts-messengers {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-contacts a {
	display: grid;
	align-items: center;
	justify-content: center;
	color: var(--white);
	border-radius: 12px;
	height: 42px;
	font-weight: 500;
	transition: background 0.3s ease, opacity 0.3s ease;
	padding: 0 30px;
}

.author-contacts .author-phone {
	background: var(--accent);
}

.author-contacts .author-phone:hover {
	background: var(--accent-darken);
}

.author-contacts .author-telegram {
	background: linear-gradient(0deg, #229ed9, #2aabee);
}

.author-contacts .author-whatsapp {
	background: linear-gradient(0deg, #28d146, #5ffc7b);
}

.author-contacts .author-whatsapp:hover,
.author-contacts .author-telegram:hover {
	opacity: 0.75;
}

.author-description {
	margin-top: 25px;
	border-top: 1px solid var(--gray);
	padding-top: 25px;
}

.author-description p {
	background: var(--gray);
	padding: 15px 20px;
	border-radius: 12px;
}

.author-posts {
	margin-top: 50px;
}

.close-location-popup {
	display: block;
	position: absolute;
	top: 10px;
	right: 10px;
	cursor: pointer;
	background: 0;
	border: 0;
	width: 28px;
	height: 28px;
	opacity: 0.75;
	color: var(--dark);
	transition: all 0.3s ease;
}

.close-location-popup:hover {
	opacity: 1;
}

@media (max-width: 1270px) {
	.categories-slider .slider-nav,
	.promo-slider-wrap .slider-nav {
		left: 23px;
		width: calc(100% - 46px);
	}
}

@media (max-width: 1240px) {
	.post-grid {
		grid-template-columns: calc(100% - 420px) 380px;
		gap: 40px;
	}

	.post-slider {
		width: calc(100vw - 460px);
	}
}

@media (max-width: 967px) {
	body {
		padding-bottom: 61px;
	}

	.top-bar,
	.header-grid,
	.footer .footer-logo,
	.main-menu {
		display: none;
	}

	.header {
		margin-bottom: 30px;
	}

	.header-mobile {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		gap: 10px;
		padding: 10px 0;
	}

	.header .logo {
		width: 42px;
		height: 42px;
		margin: 0;
	}

	.search {
		max-width: 100%;
	}

	.location-btn {
		color: var(--dark);
		border-radius: 12px;
		padding: 0 14px 0 10px;
		background: var(--gray);
	}

	h1,
	.section-title {
		font-size: 30px;
		margin-bottom: 20px;
	}

	.home-categories {
		margin-bottom: 60px;
	}

	.posts-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.footer .footer-logo-mobile {
		display: block;
	}

	.tabbar-mobile {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		align-items: end;
		justify-content: space-between;
		gap: 10px;
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 100;
		width: 100%;
		height: 62px;
		background: var(--white);
		padding-bottom: max(9px, env(safe-area-inset-right));
		box-shadow: 0px -4px 10px rgba(0, 0, 0, 4%);
	}

	.tabbar-mobile .tab-item a,
	.tabbar-mobile .tab-item .tab-btn {
		display: grid;
		justify-content: center;
		align-items: center;
		text-align: center;
		font-size: 12px;
		font-weight: 500;
		color: var(--dark);
	}

	.tabbar-mobile .tab-item .tab-btn {
		background: 0;
		border: 0;
		cursor: pointer;
		width: 100%;
		margin: 0;
		padding: 0;
		line-height: inherit;
	}

	.tabbar-mobile .tab-icon {
		width: 24px;
		height: 24px;
		margin: 0 auto 2px;
	}

	.tab-icon-menu-close {
		display: none;
	}

	.tab-menu-btn.active .tab-icon-menu-open {
		display: none;
	}

	.tab-menu-btn.active .tab-icon-menu-close {
		display: block;
	}

	.mobile-menu {
		display: grid;
		position: fixed;
		top: 62px;
		left: 0;
		width: 100%;
		height: 0;
		visibility: hidden;
		z-index: 50;
		background: var(--white);
		box-shadow: inset 0px 4px 10px rgba(0, 0, 0, 4%);
		overflow-y: auto;
		transition: all 0.3s ease;
		padding-bottom: 100px;
	}

	.mobile-menu.active {
		height: calc(100vh - 124px);
		visibility: visible;
	}

	.mobile-menu-wrap {
		padding: 10px 0;
	}

	.mobile-categories-item {
		position: relative;
		border-bottom: 1px solid var(--dark10);
		padding: 10px 0;
		line-height: 1.3;
		font-weight: 500;
		cursor: pointer;
	}

	.mobile-categories-item:last-child {
		border: 0;
	}

	.mobile-categories-item:after {
		content: "";
		position: absolute;
		top: 8px;
		right: -8px;
		background: url(../img/right-angle-icon.svg);
		background-size: 100%;
		background-repeat: no-repeat;
		background-position: right center;
		width: 25px;
		height: 25px;
		flex-shrink: 0;
		transition: transform 0.3s ease;
		will-change: transform;
	}

	.mobile-categories-item.active:after {
		transform: rotate(90deg);
	}

	.mobile-sub-menu {
		display: none;
		padding-left: 14px;
		border-left: 1px solid var(--dark10);
		margin: 10px 0 5px 5px;
	}

	.mobile-sub-menu li {
		margin-bottom: 10px;
	}

	.mobile-sub-menu li:last-child {
		margin-bottom: 0;
	}

	.mobile-sub-menu li a {
		display: block;
		color: var(--dark75);
		font-size: 15px;
		font-weight: 400;
	}

	.filtered-page-grid {
		grid-template-columns: 1fr;
	}

	.filter-wrap-popup {
		position: fixed;
		inset: 0;
		background: rgb(22 22 24 / 50%);
		visibility: hidden;
		opacity: 0;
		display: grid;
		align-items: center;
		overflow-y: auto;
		transition: all 0.3s ease;
		z-index: 30;
		padding: 0 20px;
	}

	.filter-wrap-popup.active {
		visibility: visible;
		opacity: 1;
	}

	.filter-body-popup {
		position: relative;
		background: var(--white);
		max-width: 420px;
		border-radius: 20px;
		padding: 30px;
		margin: 20px auto;
		width: 100%;
		transition: transform 0.3s ease;
		will-change: transform;
		transform: translateY(-10px);
	}

	.filter-wrap-popup.active .filter-body-popup {
		transform: translateY(0);
	}

	.filters-title-wrap {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.category-select-btn {
		display: block;
		background: var(--gray);
		border: 0;
		border-radius: 12px;
		height: 42px;
		padding: 0 20px;
		appearance: none;
		-webkit-appearance: none;
		font-size: 16px;
		font-weight: 400;
		color: var(--dark);
	}

	.category-select-btn span {
		display: none;
	}

	.close-filter-popup {
		display: block;
		position: absolute;
		top: 10px;
		right: 10px;
		cursor: pointer;
		background: 0;
		border: 0;
		width: 28px;
		height: 28px;
		opacity: 0.75;
		color: var(--dark);
	}

	.category-select-btn .filter-btn-text {
		display: inline-block;
	}

	.category-select-btn .filter-btn-text-alt {
		display: none;
	}

	.posts-not-found {
		grid-column: 1 / 4;
		margin-top: 20px;
	}

	.page h2 {
		font-size: 24px;
	}

	.profile-mobile {
		display: grid;
		position: fixed;
		top: 62px;
		left: 0;
		width: 100%;
		height: 0;
		visibility: hidden;
		z-index: 50;
		background: var(--white);
		box-shadow: inset 0px 4px 10px rgba(0, 0, 0, 4%);
		overflow-y: auto;
		transition: all 0.3s ease;
	}

	.profile-mobile.active {
		height: calc(100vh - 124px);
		visibility: visible;
	}

	.profile-mobile ul {
		padding: 10px 0;
	}

	.profile-mobile li a {
		display: block;
		color: var(--dark);
		font-weight: 500;
		line-height: 1.3;
		padding: 10px 0;
		border-bottom: 1px solid var(--dark10);
	}

	.profile-mobile li:last-child a {
		border: 0;
	}

	.post-page .container {
		max-width: 540px;
	}

	.post-grid {
		grid-template-columns: 100%;
		gap: 30px;
		margin-bottom: 40px;
	}

	.post-content h1 {
		font-size: 22px;
		font-weight: 600;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		white-space: normal;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.post-slider {
		width: 100%;
		overflow: initial;
		border-radius: 0;
		margin-bottom: 60px;
	}

	.post-slider .slider-nav {
		display: none;
	}

	.post-slider .swiper-slide {
		border-radius: 20px;
		overflow: hidden;
	}

	.post-slider:after {
		display: none;
	}

	.post-slider a {
		position: relative;
	}

	.post-slider .swiper-slide:after {
		content: "";
		position: absolute;
		inset: 0;
		background: var(--dark);
		opacity: 0.05;
		z-index: 2;
		pointer-events: none;
	}

	.post-thumbs {
		display: none;
	}

	.post-content h2 {
		font-size: 18px;
		font-weight: 500;
		margin-top: 40px;
	}

	.post-info {
		position: relative;
		top: 0;
		border-top: 1px solid var(--gray);
		border-bottom: 1px solid var(--gray);
		padding-top: 30px;
		padding-bottom: 38px;
	}

	.post-price {
		font-size: 28px;
	}

	.related-posts h2 {
		font-size: 22px;
		font-weight: 600;
	}

	.related-posts .posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.home-categories {
		overflow: hidden;
	}

	.categories-slider .swiper-container {
		overflow: initial;
	}

	.slider-nav {
		display: none;
	}

	.promo-item img {
		aspect-ratio: 8 / 3;
	}
}

@media (max-width: 860px) {
	.footer,
	.footer-end-grid p {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.footer {
		margin-top: 90px;
	}

	.footer-start {
		display: grid;
		justify-content: center;
		gap: 15px;
		margin-bottom: 20px;
	}

	.footer .footer-logo-mobile {
		margin: 0 auto;
	}

	.footer .footer-item {
		display: grid;
		justify-items: center;
		text-align: center;
	}

	.footer-middle {
		display: grid;
		gap: 20px;
		justify-content: center;
	}

	.footer-middle nav ul {
		display: grid;
		gap: 5px;
		justify-items: center;
	}

	.footer-social {
		display: grid;
		text-align: center;
		gap: 10px;
	}
}

@media (max-width: 700px) {
	.posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.post-item-wrap:not(:last-of-type):after {
	    display: none;
	}

	.filtered-posts .pagination {
	    grid-column: 1 / 3;
	}

	.promo-item img {
		aspect-ratio: 10 / 4;
	}

	.category-select-btn span {
		display: inline-block;
	}

	.filters-top h3 {
		display: none;
	}

	.filtered-posts {
		grid-template-columns: repeat(3, 1fr);
		gap: 50px 20px;
	}

	.filtered-posts .post-item {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.filtered-posts .post-item-content {
		padding: 0;
	}

	.filtered-posts .post-item-content .post-item-title {
		font-size: 16px;
		font-weight: 500;
		height: 42px;
		line-height: 1.3;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		margin: 0 0 10px 0;
	}

	.filtered-posts .post-item-content p {
		display: none;
	}

	.filtered-posts .post-item-favorite {
		left: initial;
	}

	.filtered-posts .post-item-address {
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
		white-space: normal;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.category-select-btn .filter-btn-text {
		display: none;
	}

	.category-select-btn .filter-btn-text-alt {
		display: inline-block;
	}

	.posts-not-found h2 {
		font-size: 20px;
	}
}

@media (max-width: 500px) {
	.location-btn {
		padding: 0 10px;
	}

	.location-btn span {
		display: none;
	}

	h1,
	.section-title {
		font-size: 24px;
	}

	.home-categories {
		margin-bottom: 50px;
	}

	.category-item h4 {
		font-size: 14px;
	}

	.promo-slider {
		margin-bottom: 70px;
	}

	.swiper-pagination {
		bottom: -20px !important;
	}

	.posts-grid,
	.related-posts .posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-end-grid {
		display: grid;
		justify-content: center;
		text-align: center;
		gap: 10px;
	}

	.category-select-btn {
		border-radius: 10px;
		height: 36px;
		padding: 0 15px;
		font-size: 14px;
		font-weight: 500;
	}

	.sort-form .filter-select-wrap select {
		border-radius: 10px;
		height: 36px;
		font-size: 14px;
		font-weight: 500;
		padding-left: 15px;
		padding-right: 30px;
	}

	.sort-form .filter-select-wrap:after {
		top: 9px;
		right: 8px;
		width: 20px;
		height: 20px;
	}

	.filtered-posts {
		grid-template-columns: repeat(2, 1fr);
	}

	.page h2 {
		font-size: 20px;
	}

	.select-location-btn {
		font-size: 14px;
	}

	.author-info {
		grid-template-columns: 60px 1fr;
		gap: 20px 15px;
	}

	.author-info h1 {
		font-size: 22px;
		padding-bottom: 0;
	}

	.author-contacts-wrap {
		display: grid;
	}

	.list-location-popup h2 {
		font-size: 16px;
	}
}

@media (max-width: 420px) {
	.posts-grid,
	.filtered-posts {
		gap: 40px 10px;
	}
}
