/* Стили для каталога недвижимости - только дополнительные стили, не конфликтующие с основными */

/* Исправления для детальной страницы в стиле aparts */
#realty-detail .aparts {
	max-height: none !important;
	overflow: visible !important;
	padding-top: 0 !important;
	height: auto !important;
}

@media (min-width: 1250px) {
	#realty-detail .aparts__col-1-2 {
		margin-left: 2vw !important;
		padding-top: 0 !important;
		margin-top: 0 !important;
		width: auto !important;
		flex: 1 !important;
	}
	
	#realty-detail .aparts__opts-2 {
		margin-top: 2.6vw !important;
	}
	
	#realty-detail .aparts__opts-3 {
		margin-top: 2.6vw !important;
	}
}

/* Увеличение ширины контейнера с карточками на больших экранах (только страница каталога) */
@media (min-width: 1250px) {
	#realty-catalog .cases__left {
		width: 100% !important;
		max-width: 100% !important;
	}
	
	#realty-catalog .cases__items {
		margin: 0 -1.5vmin !important;
	}
	
	#realty-catalog .cases__item {
		width: calc(25% - 3vmin) !important;
		margin: 0 1.5vmin 8vmin !important;
	}
}

/* На главной (CONTEXT=index) делаем сетку из 2 колонок,
   чтобы справа помещалась карта, независимо от базовых flex-стилей */
@media (min-width: 1024px) {
	.cases--realty-index .cases__items {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin: 0 -1.5vmin !important;
		column-gap: 3vmin;
		row-gap: 8vmin;
	}

	.cases--realty-index .cases__item {
		width: auto !important;
		margin: 0 !important;
	}
}

/* Скрытая форма фильтров */
#realty-filter-form {
	display: none;
}

@media (min-width: 1250px) {
	.cases__tabs#realty-filters {
		flex-wrap: wrap !important;
		margin-right: 0;
		justify-content: flex-start;
		gap: 0 4.4vw;
		row-gap: 2vmin;
	}
	
	.cases__tabs#realty-filters li {
		margin-right: 0 !important;
		margin-bottom: 0 !important;
		width: auto !important;
		padding-right: 0 !important;
		flex: 0 0 auto;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}
	
	.cases__tabs#realty-filters li:nth-child(1),
	.cases__tabs#realty-filters li:nth-child(2),
	.cases__tabs#realty-filters li:nth-child(3),
	.cases__tabs#realty-filters li:nth-child(4),
	.cases__tabs#realty-filters li:nth-child(5),
	.cases__tabs#realty-filters li:nth-child(6),
	.cases__tabs#realty-filters li:nth-child(7),
	.cases__tabs#realty-filters li:nth-child(8) {
		width: auto !important;
	}
	
	.cases__tabs#realty-filters li.js-filters-bedrooms,
	.cases__tabs#realty-filters li.js-filters-area {
		min-width: 120px;
	}
}

#realty-filters li .cases__tab {
	white-space: nowrap;
}

#realty-filters li .cases__sub {
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
	line-height: 1.3;
	word-break: break-word;
	max-width: 11vw;
}

/* Стили для tooltip с полями ввода (используем существующие стили filter-form и filter-input) */
.filter-form {
	position: relative;
	display: flex;
	padding: 0.65em .9em;
	border-radius: 2em 0;
	background: rgba(255, 255, 255, 0.6);
	gap: 0.5em;
}

.filter-form .filter-input {
	flex: 1;
	display: block;
	background: none;
	border: 0;
	outline: none;
	font-size: .9em;
	font-weight: 500;
	font-family: inherit;
	letter-spacing: 0.01em;
}

.filter-form .filter-input::placeholder {
	color: rgba(0, 0, 0, 0.4);
}

.filter-form .filter-input.filter-input_v1 {
	padding-left: 1.5em;
}

/* Стили для пагинации - используем существующие стили pagi */
.cases__bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8vmin;
	flex-wrap: wrap;
	gap: 2vmin;
}

.cases__bottom-1 {
	font-weight: 500;
}

/* Обновление значений фильтров через JS - стили уже есть в основном шаблоне для cases__sub */

/* Исправление расположения заголовка и цены в карточках */
.cases__desc-head > div:first-child {
	display: flex !important;
	justify-content: space-between !important;
	align-items: flex-start !important;
	gap: 2vmin;
	width: 100%;
}

.cases__title {
	flex: 1;
	min-width: 0;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal !important;
	display: inline-block;
	border-bottom: none !important;
}

.cases__title > span {
	display: inline;
	letter-spacing: 0.01em;
	color: var(--color-braun);
	font-weight: 800;
	border-bottom: 1px solid;
}

.cases__price {
	display: inline-block !important;
	margin-top: 0 !important;
	flex-shrink: 0;
	margin-left: auto;
	white-space: nowrap;
}

/* Пустое состояние */
.cases__empty {
	padding: 10vmin 0;
	text-align: center;
	color: rgba(0, 0, 0, 0.5);
	font-size: 1.2em;
}

/* Лоадер */
.realty-loader {
	position: relative;
	text-align: center;
	padding: 4vmin 0;
}

.realty-loader__spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(174, 150, 133, 0.3);
	border-top-color: #AE9685;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

#top .top__container{
	min-height:auto !important;
}
.section_detail{
	background: #EFEDEA;
}
.detail__wrap {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}

.detail__back {
	margin-bottom: 6vmin;
}

.detail__back a {
	color: #AE9685;
	text-decoration: none;
	font-weight: 600;
}

.detail__back a:hover {
	text-decoration: underline;
}

.detail__head {
	margin-bottom: 6vmin;
}

.detail__title {
	font-size: 6vmin;
	font-weight: 800;
	color: #AE9685;
	letter-spacing: 0.01em;
	line-height: 1.1;
	margin-bottom: 2vmin;
}

.detail__price {
	font-size: 4vmin;
	font-weight: 700;
	color: #000;
	margin-bottom: 3vmin;
}

.detail__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2vmin;
	align-items: center;
}

.detail__badge {
	display: inline-block;
	padding: 1vmin 2.5vmin;
	background: #AE9685;
	color: #fff;
	font-weight: 600;
	font-size: 0.9em;
	border-radius: 4px;
}

.detail__ref {
	color: rgba(0, 0, 0, 0.5);
	font-size: 0.9em;
}

.detail__gallery {
	margin-bottom: 8vmin;
}

.detail__gallery-main {
	position: relative;
	margin-bottom: 2vmin;
	width: 100%;
	overflow: hidden;
}

.detail__gallery-main::after {
	content: '';
	display: block;
	padding-bottom: 60%;
}

.detail__gallery-main img {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	object-fit: cover;
}

.detail__gallery-thumbs {
	display: flex;
	gap: 1vmin;
	flex-wrap: wrap;
}

.detail__gallery-thumb {
	position: relative;
	width: calc(20% - 0.8vmin);
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.3s;
}

.detail__gallery-thumb::after {
	content: '';
	display: block;
	padding-bottom: 100%;
}

.detail__gallery-thumb.active,
.detail__gallery-thumb:hover {
	opacity: 1;
}

.detail__gallery-thumb img {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	object-fit: cover;
}

.detail__content {
	display: flex;
	gap: 6vmin;
	flex-wrap: wrap;
}

.detail__main {
	flex: 1;
	min-width: 300px;
}

.detail__sidebar {
	width: 100%;
	max-width: 400px;
}

.detail__description {
	margin-bottom: 6vmin;
}

.detail__description h2 {
	font-size: 3vmin;
	font-weight: 700;
	color: #AE9685;
	margin-bottom: 3vmin;
}

.detail__description .content {
	line-height: 1.6;
	color: rgba(0, 0, 0, 0.7);
}

.detail__specs {
	margin-bottom: 6vmin;
}

.detail__specs h2 {
	font-size: 3vmin;
	font-weight: 700;
	color: #AE9685;
	margin-bottom: 3vmin;
}

.detail__specs h3 {
	font-size: 2.2vmin;
	font-weight: 600;
	margin-top: 4vmin;
	margin-bottom: 2vmin;
}

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

.detail__specs-list li {
	padding: 1.5vmin 0;
	border-bottom: 1px solid rgba(174, 150, 133, 0.2);
}

.detail__specs-list li strong {
	color: #AE9685;
	margin-right: 1vmin;
}

.detail__amenities {
	margin-top: 4vmin;
}

.detail__amenities-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 2vmin;
}

.detail__amenities-list li {
	padding: 1vmin 2vmin;
	background: rgba(174, 150, 133, 0.1);
	border-radius: 4px;
}

.detail__map {
	width: 100%;
	height: 400px;
	margin-top: 6vmin;
	background: #f5f5f5;
	border-radius: 4px;
}

.detail__contacts {
	background: #EFEDEA;
	padding: 4vmin;
	margin-bottom: 4vmin;
	border-radius: 4px;
}

.detail__contacts h3 {
	font-size: 2.5vmin;
	font-weight: 700;
	color: #AE9685;
	margin-bottom: 3vmin;
}

.detail__contacts-item {
	margin-bottom: 2vmin;
}

.detail__contacts-item strong {
	display: block;
	margin-bottom: 0.5vmin;
	color: rgba(0, 0, 0, 0.7);
}

.detail__contacts-item a {
	color: #AE9685;
	text-decoration: none;
}

.detail__contacts-item a:hover {
	text-decoration: underline;
}

.detail__contacts-btns {
	display: flex;
	flex-direction: column;
	gap: 2vmin;
	margin-top: 4vmin;
}

.detail__contacts-btns a,
.detail__contacts-btns button {
	padding: 1.5vmin 3vmin;
	background: #AE9685;
	color: #fff;
	border: none;
	border-radius: 4px;
	text-decoration: none;
	text-align: center;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
}

.detail__contacts-btns a:hover,
.detail__contacts-btns button:hover {
	background: #8d7a6a;
}
#realty-filters li .cases__sub{
	max-width: none;
}
/* Адаптивность */
@media (max-width: 780px) {
	.detail__gallery-thumb {
		width: calc(25% - 0.75vmin);
	}
	
	.detail__content {
		flex-direction: column;
	}
	
	.detail__sidebar {
		max-width: 100%;
	}
	
	.detail__title {
		font-size: 8vmin;
	}
	
	.detail__price {
		font-size: 5vmin;
	}
}
.tooltipster-content{
	max-height: inherit !important;
}


.pagi.cases__pagi{
	min-width: 230px !important;
}