/* Catalog grid + trip card (Figma «Карточка S», 364×653 @ 1440) */

.catalog-section {
	margin-top: 0;
}

.catalog-section .wrapper {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

/* Figma: «Смотреть ещё» — outline pill на всю ширину каталога */
.catalog-section .show-more-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 4.8rem;
	margin: clamp(2.3rem, 2.94vw, 3.5rem) 0 0;
	padding: 1.6rem 2.4rem;
	border: 0.1rem solid rgba(3, 17, 25, 0.1) !important;
	border-radius: 10rem;
	background: rgba(0, 158, 199, 1) !important;
	color: #fff !important;
	font-size: 1.4rem;
	line-height: 1.15;
	font-weight: 500;
	text-align: center;

	cursor: pointer;
}

.catalog-section .loading-items {
	margin: clamp(2.3rem, 0, 3.5rem) auto 0;
}

.homepage .catalog-section .empty-result-text {
	max-width: 55rem;
	margin-top: 2.4rem;
	margin-left: auto;
	margin-right: auto;
	font-size: 1.8rem;
	line-height: 1.4;
	text-align: center;
}

/* Card shell */
.catalog-item {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 2rem;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 0 0.9rem 0 rgba(0, 0, 0, 0.09);
	padding: 0;
}

.catalog-item > a:first-child {
	display: block;
	flex-shrink: 0;
}

.catalog-item__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.6rem 0 0;
	background: #fff;
	border-bottom-right-radius: 2rem;
	border-bottom-left-radius: 2rem;
}

/* Image */
.catalog-item .image {
	position: relative;
	width: 100%;
	aspect-ratio: 328 / 200;
	border-radius: 2rem 2rem 0 0;
	overflow: hidden;
	background: #e8eef2;
}

.catalog-item .image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: center center;
}

/* Image overlays: badges row (left) + rating pill (right), Figma y/x 20px */
.catalog-item__badges {
	position: absolute;
	top: 2rem;
	left: 2rem;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.8rem;
	max-width: calc(100% - 7.2rem);
	pointer-events: none;
}

.catalog-item .image .tag,
.catalog-item__discount-badge {
	position: static;
	flex-shrink: 0;
	padding: 0.6rem 0.8rem;
	border-radius: 10rem;
	font-size: 1.4rem;
	line-height: normal;
	font-weight: 400;
	white-space: nowrap;
}

.catalog-item .image .tag {
	color: #fff;
}

.catalog-item__discount-badge {
	background: #ec3c3c;
	color: #fff;
}

.catalog-item__rating-badge {
	position: absolute;
	top: 2rem;
	right: 2rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.7rem 0.8rem;
	border-radius: 10rem;
	background: #fff;
	pointer-events: none;
}

.catalog-item__rating-badge.hide {
	display: none;
}

.catalog-item__rating-value {
	font-size: 1.4rem;
	line-height: 1;
	font-weight: 500;
	color: #031119;
}

.catalog-item__rating-star {
	display: inline-flex;
	flex-shrink: 0;
	width: 1.4rem;
	height: 1.4rem;
}

.catalog-item__rating-star svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Title */
.catalog-item .title {
	display: block;
	margin: 0 2rem 1.2rem;
	padding: 0;
	height: auto;
	max-height: none;
	overflow: visible;
	font-size: 1.8rem;
	line-height: 1.15;
	font-weight: 600;
	color: #031119;
}

.catalog-item .info {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.2rem;
	row-gap: 0.8rem;
	margin: 0 2rem 1.2rem;
	padding: 0;
}

.catalog-item .info .item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	width: auto;
	max-width: 100%;
}

.catalog-item .info .icon {
	width: 1.4rem;
	height: 1.4rem;
	flex-shrink: 0;
}

.catalog-item .info .item:nth-child(2) .icon {
	filter: none;
}

.catalog-item .info .text {
	margin: 0;
	height: auto;
	overflow: visible;
	font-size: 1.4rem;
	line-height: 1.15;
	color: #031119;
}

/* Advantages — Figma: wrap, gap 12px / 8px, dot 4px #009ec7 */
.catalog-item .advantages {
	display: flex;
	flex-wrap: wrap;
	/* align-items: center; */
	column-gap: 1.2rem;
	row-gap: 0.8rem;
	margin: 0 0 1.2rem;
	padding: 1.6rem 2rem;
	height: auto;
	min-height: 7.3rem;
	overflow: visible;
	border: 0;
	background: #f0faff;
}

.catalog-item .advantages .item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
}

.catalog-item .advantages .item::before {
	content: "";
	flex-shrink: 0;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: #009ec7;
}

.catalog-item .advantages .icon {
	display: none;
}

.catalog-item .advantages .text {
	margin: 0;
	width: auto;
	font-size: 1.4rem;
	line-height: 1.15;
	font-weight: 400;
	color: #031119;
	white-space: normal;
	overflow: visible;
	text-overflow: unset;
}

/* Nearest trips widget */
.catalog-item .teplohod-widget-nearest {
	margin: auto 2rem 1.2rem;
	padding: 0;
}

.catalog-item .teplohod-widget-nearest .name {
	margin: 0 0 0.8rem;
	font-size: 1.4rem;
	line-height: 1.15;
	font-weight: 400;
	color: #031119;
}

.catalog-item .teplohod-widget-nearest .name::after {
	content: ":";
}

.catalog-item .teplohod-widget-nearest .widget-loaded {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.8rem;
	margin: 0;
	font-size: 1.4rem;
	font-weight: 400;
}

.catalog-item .teplohod-widget-nearest .nearest-widget-date-label {
	width: 100%;
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.15;
	font-weight: 500;
	color: #031119;
}

.catalog-item .teplohod-widget-nearest .nearest-widget-items {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	width: 100%;
}

/* Дата на всю строку, слоты времени — следующей строкой (разметка виджета без .nearest-widget-items) */
.catalog-item
	.teplohod-widget-nearest
	.widget-loaded:not(:has(.nearest-widget-items)) {
	flex-direction: row;
	flex-wrap: wrap;
}

.catalog-item
	.teplohod-widget-nearest
	.widget-loaded:not(:has(.nearest-widget-items))
	.nearest-widget-date-label {
	flex: 0 0 100%;
	width: 100%;
}

.catalog-item .teplohod-widget-nearest .nearest-widget-link,
.catalog-item
	.teplohod-widget-nearest
	.widget-loaded
	a:not(.nearest-widget-date-label) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.8rem;
	padding: 0.6rem 0.8rem;
	border-radius: 10rem;
	border: 0;
	background: #009ec7;
	color: #fff !important;
	font-size: 1.4rem !important;
	line-height: normal;
	font-weight: 400 !important;
	text-decoration: none;
	cursor: pointer;
}

.catalog-item .teplohod-widget-nearest .nearest-widget-link__disabled,
.catalog-item
	.teplohod-widget-nearest
	.widget-loaded
	a.nearest-widget-link__disabled {
	background: rgba(3, 17, 25, 0.1);
	color: rgba(3, 17, 25, 0.2) !important;
	cursor: not-allowed;
}

/* Footer: price + buttons */
.catalog-item__bottom-wrapper {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	align-items: flex-start;
	padding: 2rem 2rem 2rem;
	margin: 0;
	border-top: 0.1rem solid rgba(3, 17, 25, 0.1);
}


.catalog-item__bottom-wrapper .buttons {
	width: 100%;
}

.catalog-item__bottom-wrapper .base-button {
	width: 100%;
}

.catalog-item__bottom-wrapper.mk2 {
	gap: 1.2rem;
	flex-direction: column;
	width: 100%;
}

.catalog-item__price-wrapper {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1.2rem;
	margin: 0;
}

.catalog-item__price-wrapper {
	width: 100%;
}

.catalog-item .price {
	width: 100%;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: start;
	gap: 0.4rem;
	margin: 0;
}

.catalog-item .mk2 .price {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.catalog-item__price-main {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
}

.catalog-item__savings {
	flex-shrink: 0;
	font-size: 1.2rem;
	line-height: normal;
	font-weight: 400;
	color: rgba(3, 17, 25, 0.4);
	white-space: nowrap;
}

.catalog-item .price .base {
	margin: 0;
	font-size: 1.8rem;
	line-height: 114%;
	font-weight: 600;
	color: #031119;
}

.catalog-item .price .base.mk2 {
	font-size: 2.4rem;
}

.catalog-item .price .base .price-prefix {
	font-weight: 600;
	font-size: 1.8rem;
}

.catalog-item .price .base .ruble {
	font-size: inherit;
	font-weight: 600;
}

.catalog-item .price .discount {
	margin: 0;
	padding: 0.3rem 0.6rem 0.2rem;
	border-radius: 10rem;
	background: rgba(27, 153, 217, 0.1);
	font-size: 1.2rem;
	line-height: normal;
	font-weight: 500;
	color: rgba(0, 158, 199, 0.6);
	text-decoration: line-through;
}

.catalog-item .price .discount .ruble {
	font-size: inherit;
	font-weight: 500;
}

.catalog-item .price .discount:empty {
	display: none;
}

.catalog-item__bottom-wrapper .button-list-mk2 {
	display: flex;
	gap: 0.8rem;
}

/* Buttons — Figma: 158×40 each, gap 8px, padding 12/24 */
.catalog-item .buttons {
	display: flex;
	align-items: stretch;
	gap: 0.8rem;
	margin: 0;
	box-sizing: border-box;
}

.catalog-item .buttons > * {
	/* flex: 0 0 calc((100% - 0.8rem) / 2);
  width: calc((100% - 0.8rem) / 2);
  max-width: calc((100% - 0.8rem) / 2);
  min-width: calc((100% - 0.8rem) / 2); */
	margin: 0;
	box-sizing: border-box;
}

.catalog-item .buttons .base-button,
.catalog-item .buttons .buy-button-wrapper a,
.catalog-item vendor[base-button] a {
	width: 100%;
	height: 4rem;
	min-height: 4rem;
	margin: 0 !important;
	padding: 1.2rem 2.4rem !important;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 9rem;
	font-size: 1.4rem !important;
	line-height: 1.15 !important;
	font-weight: 600 !important;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	filter: none;
}

.catalog-item .buttons .base-button.transparent {
	border: var(--border-width) solid rgba(3, 17, 25, 0.1);
	background: transparent;
	color: #031119;
	text-decoration: none;
}

.catalog-item .buttons > a.base-button.filled,
.catalog-item .buttons > .base-button.filled,
.catalog-item .buttons .buy-button-wrapper a,
.catalog-item vendor[base-button] a {
	border: 0 !important;
	background: #009ec7 !important;
	color: #fff !important;
}

.catalog-item .buy-button-wrapper {
	display: block;
	padding: 0;
}

.catalog-item .buy-button-wrapper a {
	display: inline-flex;
}

.catalog-item .buttons .nz-moskva-widget {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	height: 4rem;
	min-height: 4rem;
	overflow: hidden;
}

.catalog-item .buttons .nz-moskva-widget a,
.catalog-item .buttons .nz-moskva-widget .base-button {
	width: 100% !important;
	height: 4rem !important;
	min-height: 4rem !important;
	font-size: 1.4rem !important;
	padding: 1.2rem 1.2rem !important;
	border-radius: 9rem !important;
	white-space: nowrap;
}

@media (max-width: 1172px) {
	.catalog-section .wrapper {
		gap: 2rem;
	}

	.catalog-item.swiper-slide .buttons .nz-moskva-widget a,
	.catalog-item.swiper-slide .buttons .nz-moskva-widget .base-button {
		width: 13rem !important;
		padding: 1.2rem 1.8rem !important;
	}
}

@media (max-width: 1172px) {
	.catalog-section .wrapper {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* 768 — Figma «Карточка S» 350×653: как 1440, сетка 2 колонки */
@media (max-width: 1172px) {
	.catalog-section .wrapper {
		gap: 1.2rem;
	}

	.catalog-item .image {
		aspect-ratio: 328 / 173;
	}

	.catalog-item .teplohod-widget-nearest .widget-loaded {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.8rem;
		margin: 0;
		min-height: 5.2rem;
		font-size: 1.4rem;
		font-weight: 400;
	}

	/* заголовок 18px, цена 24px, кнопки в ряд — без уменьшения */
	.catalog-item .price {
		flex-wrap: nowrap;
	}

	.catalog-item__savings {
		width: auto;
	}
}

@media only screen and (max-width: 650px) {
	.catalog-section .wrapper {
		grid-template-columns: 1fr;
		gap: 1.8rem;
	}

	.catalog-item .advantages {
		margin: 0 1.6rem 1.2rem;
	}
	.catalog-item .teplohod-widget-nearest {
		margin: 0 1.6rem 1.2rem;
		padding: 0;
	}

	.catalog-item__bottom-wrapper {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 1.3rem 1.6rem 1.6rem;
		margin: 0;
		border-top: 0.1rem solid rgba(3, 17, 25, 0.1);
	}
}

/* 390 — Figma «Карточка S» 328×601 */
@media only screen and (max-width: 650px) {
	.catalog-section {
		margin-top: 2rem;
	}

	.catalog-section .wrapper {
		gap: 1.6rem;
	}

	.catalog-item {
		border-radius: 2rem;
	}

	.catalog-item .image {
		aspect-ratio: 328 / 207;
		border-radius: 2rem 2rem 0 0;
	}

	.catalog-item__badges {
		top: 1.6rem;
		left: 1.6rem;
		max-width: calc(100% - 6.4rem);
	}

	.catalog-item__rating-badge {
		top: 1.6rem;
		right: 1.6rem;
	}

	.catalog-item .title {
		margin: 0 1.6rem 1.2rem;
		font-size: 1.6rem;
	}

	.catalog-item .info {
		margin: 0 1.6rem 0.8rem;
	}

	.catalog-item .advantages {
		margin: 0;
		margin-bottom: 0.8rem;
		padding: 1.2rem 1.6rem;
		min-height: auto;
	}

	.catalog-item .teplohod-widget-nearest {
		margin: 0 1.6rem 0.8rem;
	}

	.catalog-item .price {
		flex-wrap: nowrap;
	}

	.catalog-item__price-main {
		gap: 0.4rem;
	}

	.catalog-item .price .base {
		font-size: 1.8rem;
	}

	.catalog-item .price .discount {
		font-size: 1.2rem;
	}

	.catalog-item__savings {
		width: auto;
		font-size: 1.2rem;
	}

	.catalog-item .buttons {
		flex-direction: row;
	}

	.catalog-item .buttons .buy-button {
		background-color: #009ec7;
		color: #fff;
	}
}
