/* Страница «Цены» (page-prices.php): таблица цен и попап кладовки.
   Подключается только на этой странице. Цвета — переменные темы из project-style.scss:
   $color-blue #0077FF, $color-grey2 #EEF0F6, $color-grey3 #FAFAFA, $color-line2 #A8ADBA, $color-dark #1A1A18. */

.prices__wrap {
	padding: 40px 0 60px 0;
}

.prices__inner {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.prices__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.prices__btn {
	flex-shrink: 0;
}

/* Таблица: каждая строка (и шапка) — сетка с общими колонками, отступы 15px 20px — у самой строки */
.prices__table,
.prices__table thead,
.prices__table tbody {
	display: block;
	width: 100%;
}

.prices__table tr {
	display: grid;
	grid-template-columns: 11% 11% minmax(0, 1fr) 15% 24% 24px;
	align-items: center;
	column-gap: 20px;
}

.prices__table thead tr {
	padding: 0 20px 10px 20px;
	align-items: end;
}

.prices__table th {
	padding: 0;
	text-align: start;
	font-weight: 400;
	color: #A8ADBA;
}

.prices__row {
	padding: 15px 20px;
	background-color: #EEF0F6;
	cursor: pointer;
	outline: none;
	transition: background-color 0.3s;
}

.prices__row:nth-child(even) {
	background-color: #FAFAFA;
}

.prices__row:hover,
.prices__row:focus-visible {
	background-color: #E2E6F0;
}

.prices__cell {
	padding: 0;
	min-width: 0;
}

.prices__cell_area,
.prices__cell_price {
	white-space: nowrap;
}

.prices__cell_arrow {
	display: flex;
	justify-content: flex-end;
}

.prices__cell_arrow svg {
	width: 24px;
	height: 24px;
}

.prices__cell_arrow path {
	stroke: #A8ADBA;
	transition: stroke 0.3s;
}

.prices__row:hover .prices__cell_arrow path,
.prices__row:focus-visible .prices__cell_arrow path {
	stroke: #0077FF;
}

[dir="rtl"] .prices__cell_arrow svg {
	transform: scaleX(-1);
}

.prices__badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	background-color: #0077FF;
	color: #FFFFFF;
	white-space: nowrap;
}

.prices__badge span,
.prices__cell_price span {
	margin-right: 3px;
	font-size: 0.78em;
}

@media (max-width: 991px) {
	.prices__wrap {
		padding: 30px 0 50px 0;
	}

	.prices__inner {
		gap: 30px;
	}

	.prices__table tr {
		grid-template-columns: 9% 11% minmax(0, 1fr) 15% 22% 24px;
		column-gap: 12px;
	}

	.prices__table thead tr {
		padding: 0 15px 10px 15px;
	}

	.prices__row {
		padding: 15px;
	}
}

/* Мобильные: строки превращаются в карточки */
@media (max-width: 767px) {
	.prices__top {
		flex-direction: column;
		align-items: flex-start;
	}

	.prices__btn,
	.prices__btn .btn-blue-back {
		width: 100%;
		max-width: 100%;
	}

	.prices__table thead {
		display: none;
	}

	.prices__table tr.prices__row {
		position: relative;
		grid-template-columns: auto auto minmax(0, 1fr);
		column-gap: 16px;
		row-gap: 8px;
		align-items: start;
		padding: 15px 52px 15px 15px;
	}

	.prices__cell_price,
	.prices__cell_sale {
		grid-column: 1 / -1;
	}

	.prices__cell_price::before,
	.prices__cell_sale::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 4px;
		font-size: 12px;
		line-height: 1.4;
		font-weight: 400;
		color: #A8ADBA;
	}

	.prices__cell_sale:empty {
		display: none;
	}

	.prices__cell_arrow {
		position: absolute;
		inset-inline-end: 15px;
		bottom: 15px;
	}
}

/* Попап кладовки */
.modal-price {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	background: rgba(26, 26, 24, 0.5);
}

.modal-price .container {
	height: 100%;
	display: flex;
	padding: 60px 20px;
}

.modal-price-wrap {
	position: relative;
	width: 530px;
	max-width: 100%;
	margin: auto;
	padding: 15px;
	border-radius: 20px;
	background-color: #FFFFFF;
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.modal-price__img {
	width: 100%;
	aspect-ratio: 500 / 350;
	border-radius: 12px;
	overflow: hidden;
	background-color: #EEF0F6;
	margin-bottom: -15px; /* до контента 15px, до кнопки — gap 30px */
}

.modal-price__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.modal-price__content {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.modal-price__location {
	display: flex;
	align-items: center;
	gap: 10px;
}

.modal-price__location svg {
	width: 30px;
	height: 30px;
	flex-shrink: 0;
}

.modal-price__info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.modal-price__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.modal-price__price-month {
	color: #A8ADBA;
}

.modal-price__area {
	flex-shrink: 0;
	padding: 4px 25px;
	border-radius: 20px;
	background-color: #EEF0F6;
	white-space: nowrap;
}

.modal-price__area:empty {
	display: none;
}

.modal-price__btn .btn-blue-back {
	width: 100%;
	max-width: 100%;
}

.modal-price__close {
	position: absolute;
	top: -42px;
	inset-inline-end: -42px;
	width: 42px;
	height: 42px;
	cursor: pointer;
}

.modal-price__close path {
	stroke: #FAFAFA;
	transition: 0.3s;
}

.modal-price__close:hover path {
	stroke: #0077FF;
}

@media (max-width: 991px) {
	.modal-price__close {
		top: -52px;
		inset-inline-end: 0;
	}
}

/* Телефон: попап на весь экран, белый фон */
@media (max-width: 767px) {
	.modal-price {
		background: #FFFFFF;
	}

	.modal-price .container {
		height: auto;
		min-height: 100%;
		padding: 0;
	}

	.modal-price-wrap {
		width: 100%;
		min-height: 100%;
		margin: 0;
		padding: 60px 15px 15px 15px;
		border-radius: 0;
	}

	.modal-price__close {
		top: 10px;
		inset-inline-end: 15px;
		width: 36px;
		height: 36px;
	}

	.modal-price__close path {
		stroke: #1A1A18;
	}

	.modal-price__info {
		flex-wrap: wrap;
	}
}
