/*
 * BM Real Estate — Cards
 * ==================================================================
 * The property card and the grid it sits in. Used by the listing and
 * the favorites listing. Colors come from global.css (tokens).
 * The heart button's styles live in favorites.css (it also appears
 * outside cards: the single property page).
 *
 * ELEMENTOR NOTE: Elementor's global ".elementor img { height: auto;
 * max-width: 100% }" has the same strength as our image rule and can
 * win depending on load order (images rendered zoomed or with gaps).
 * That's why .bm-rlst-card__img uses !important on its sizing. Test
 * image changes on an ELEMENTOR page — a plain page won't show the bug.
 * ================================================================== */

.bm-rlst-listing-wrap{ width: 100%; }
.bm-rlst-listing-grid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin: 0 0 32px;
}
.bm-rlst-card{
	position: relative;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.08);
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.bm-rlst-card:hover{
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.bm-rlst-card__media{
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2ece5;
}
.bm-rlst-card__media-link{ display: block; width: 100%; height: 100%; }
.bm-rlst-card__img{
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block;
	position: relative;
	z-index: 1;
	opacity: 0;
	transition: opacity .35s ease;
}
.bm-rlst-card__img.is-loaded{ opacity: 1; }
.bm-rlst-card__img--placeholder{
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--bm-rlst-main), #f2ece5);
}
.bm-rlst-img-skeleton{
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	background: linear-gradient(100deg, #f2ece5 30%, #ece4da 50%, #f2ece5 70%);
	background-size: 200% 100%;
	animation: bm-rlst-shimmer 1.3s ease-in-out infinite;
}
.bm-rlst-img-skeleton--error{
	animation: none;
	background: linear-gradient(135deg, var(--bm-rlst-main), #f2ece5);
}
/* Status pill, top-left of the photo ("Μη διαθέσιμο").
   26px tall at top:18px = centred on the same line as the 38px heart
   (top:12px), so the two sit level. max-width leaves room for the heart. */
.bm-rlst-wrap .bm-rlst-badge{
	position: absolute;
	top: 18px; left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	height: 26px;
	max-width: calc(100% - 74px);
	margin: 0;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: 0 1px 4px rgba(0,0,0,.18);
	pointer-events: none;
}
.bm-rlst-wrap .bm-rlst-badge--unavailable{
	background: var(--bm-rlst-unavailable);
	color: #fff;
}
.bm-rlst-card__body{
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.bm-rlst-card__title{ margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; }
.bm-rlst-card__title,
.bm-rlst-card__title a{
	color: var(--bm-rlst-title);
	text-decoration: none !important;
}
.bm-rlst-card__meta{ display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.bm-rlst-card__meta-item{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 13px;
	line-height: 1;
	color: #7a7070;
}
.bm-rlst-icon{
	display: block;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bm-rlst-card__footer{
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 8px;
	border-top: 1px solid #f0eae3;
}
.bm-rlst-card__price{ font-size: 16px; font-weight: 700; color: var(--bm-rlst-title); }
.bm-rlst-card__price-unit{ font-size: 12px; font-weight: 500; color: #7a7070; }
.bm-rlst-card__btn{
	display: inline-block;
	background: var(--bm-rlst-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 8px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: opacity .15s ease;
}
.bm-rlst-card__btn:hover,
.bm-rlst-card__btn:focus,
.bm-rlst-card__btn:visited{
	text-decoration: none !important;
	opacity: .88;
	color: #fff;
}
.bm-rlst-card--skeleton{
	aspect-ratio: 4 / 3;
	background: linear-gradient(100deg, #f2ece5 30%, #ece4da 50%, #f2ece5 70%);
	background-size: 200% 100%;
	animation: bm-rlst-shimmer 1.3s ease-in-out infinite;
}
@keyframes bm-rlst-shimmer{
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
.bm-rlst-empty{ text-align: center; padding: 40px 0; color: #7a7070; grid-column: 1 / -1; }
