/* Chalet mega menu cards ([chalet_apartments] shortcode): a compact version
   of the catalog loop card (image, last minute badge, label, max guests,
   "from" price; the whole card is the link). Always a 4-column grid, so a card is the same size
   whether the chalet has 2 or 4 apartments (unused columns stay empty).
   Colors and typography come from the Elementor kit globals. */

.chalet-apartments {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	font-family: var(--e-global-typography-text-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-text-font-weight, 400);
	color: var(--e-global-color-text, #2C2C2C);
}

.chalet-apartment {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--e-global-color-e2ebdd4, #D3D3D3);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
	color: inherit;
	text-decoration: none;
	transition: box-shadow .25s ease;
}

.chalet-apartment:hover,
.chalet-apartment:focus {
	color: inherit;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.chalet-apartment__image {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--e-global-color-secondary, #F5F1E4);
}

.chalet-apartment__image img,
.chalet-apartment__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.chalet-apartment:hover .chalet-apartment__image img {
	transform: scale(1.05);
}

/* Same red tag as the loop card, hooked to the left edge of the image. */
.chalet-apartment__badge {
	position: absolute;
	top: 16px;
	left: 0;
	padding: 5px 10px;
	border-radius: 0 5px 5px 0;
	background: var(--e-global-color-primary, #D9000D);
	color: #fff;
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: .8em;
	line-height: 1.2;
}

.chalet-apartment__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 14px 14px 16px;
}

.chalet-apartment__name {
	display: block;
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: 1em;
	line-height: 1.3;
}

.chalet-apartment__persons {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .85em;
}

.chalet-apartment__icon {
	flex-shrink: 0;
}

/* Price markup comes from the catalog filter: "a partire da" + amount +
   "a persona", sized for the narrow card (the loop card uses 22px). */
.chalet-apartment__price {
	display: block;
	margin-top: 4px;
	font-size: .85em;
	line-height: 1.4;
}

.chalet-apartment__price .woocommerce-Price-amount {
	font-size: 1.4em;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
}

.chalet-apartment__price small {
	font-size: 1em;
	white-space: nowrap;
}

.chalet-apartment:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #D9000D);
	outline-offset: 3px;
}

/* Mobile menu: two per row, then one under the other. */
@media (max-width: 767px) {
	.chalet-apartments {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.chalet-apartments {
		grid-template-columns: minmax(0, 1fr);
	}
}
