/*
 * Khối Ưu đãi – photo-card: thẻ ảnh 3:2 có tem "ƯU ĐÃI" hoặc nhãn nhóm, tiêu đề chữ heading, hạn dùng, điều kiện, nút đặt.
 * Ưu đãi không ảnh: ô chữ con số lớn thay ảnh. Một ưu đãi: băng rộng 21:9. Mobile trước, mốc 640px / 1024px.
 */

.vh-ofp-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--vh-card-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vh-ofp {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border-radius: var(--vh-radius-card);
	background: var(--vh-color-card);
	color: var(--vh-color-text);
	box-shadow: var(--vh-shadow-card);
}

.vh-ofp__media {
	position: relative;
	flex: none;
	overflow: hidden;
	background: var(--vh-color-surface);
}

.vh-ofp__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	filter: var(--vh-media-filter, none);
}

/* Không ảnh: ô chữ có con số lớn, cùng tỉ lệ để lưới thẳng hàng. */
.vh-ofp__media--type {
	display: grid;
	place-items: center;
	aspect-ratio: 3 / 2;
	padding: 1rem;
	background: var(--vh-color-accent);
	color: var(--vh-color-accent-ink);
}

.vh-ofp__figure {
	font-family: var(--vh-font-heading);
	font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
	font-weight: var(--vh-fw-heading);
	font-variation-settings: var(--vh-heading-variation, normal);
	font-variant-numeric: lining-nums;
	line-height: 1;
	text-align: center;
	overflow-wrap: anywhere;
}

/* Tem tròn xoay nhẹ; nhãn nhóm là chip góc trên. Chữ đặt trên nền đặc nên không phụ thuộc ảnh. */
.vh-ofp__stamp {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	padding: 6px;
	border: 2px dashed currentColor;
	border-radius: 50%;
	background: var(--vh-color-primary);
	box-shadow: 0 0 0 4px var(--vh-color-primary);
	color: var(--vh-color-on-primary);
	font-family: var(--vh-font-ui, var(--vh-font-body));
	font-size: 0.75rem;
	font-weight: var(--vh-fw-bold);
	letter-spacing: 0.08em;
	line-height: 1.15;
	text-align: center;
	transform: rotate(-8deg);
}

.vh-ofp__cat {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0.25rem 0.75rem;
	border-radius: var(--vh-radius-chip);
	background: var(--vh-color-card);
	color: var(--vh-color-text);
	font-family: var(--vh-font-ui, var(--vh-font-body));
	font-size: 0.8125rem;
	font-weight: var(--vh-fw-bold);
	text-transform: var(--vh-label-transform, none);
	letter-spacing: var(--vh-ls-label, 0);
	line-height: 1.3;
	box-shadow: var(--vh-shadow-card);
}

.vh-ofp__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--vh-card-pad);
}

.vh-ofp__discount {
	margin: 0;
	color: var(--vh-color-accent-ink);
	font-weight: var(--vh-fw-bold);
}

.vh-ofp__title {
	margin: 0;
	font-family: var(--vh-font-heading);
	font-size: var(--vh-fs-h3);
	font-weight: var(--vh-fw-heading);
	font-variation-settings: var(--vh-heading-variation, normal);
	line-height: max(1.25, var(--vh-lh-heading));
	overflow-wrap: anywhere;
}

.vh-ofp__valid,
.vh-ofp__rooms {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0;
	color: var(--vh-color-muted);
	font-size: var(--vh-fs-small);
	line-height: 1.45;
}

.vh-ofp__valid .vh-i,
.vh-ofp__rooms .vh-i {
	flex: none;
	width: 18px;
	height: 18px;
}

.vh-ofp__text {
	margin: 0;
	line-height: var(--vh-lh-body);
}

.vh-ofp__incl {
	display: grid;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--vh-fs-small);
}

.vh-ofp__incl li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.vh-ofp__incl .vh-i {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--vh-color-success);
}

.vh-ofp__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

@media (min-width: 640px) {
	.vh-ofp-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vh-ofp-list--n1 {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Một ưu đãi: ảnh 21:9 trên cùng, chữ hai cột bên dưới. */
	.vh-ofp-list--n1 .vh-ofp__media--type {
		aspect-ratio: 21 / 9;
	}

	.vh-ofp-list--n1 .vh-ofp__body {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		column-gap: 2rem;
		align-items: start;
	}

	.vh-ofp-list--n1 .vh-ofp__body > :not(.vh-ofp__actions) {
		grid-column: 1;
	}

	.vh-ofp-list--n1 .vh-ofp__actions {
		grid-column: 2;
		grid-row: 1 / span 6;
		align-self: center;
		margin: 0;
	}
}

@media (min-width: 1024px) {
	.vh-ofp-list--n3,
	.vh-ofp-list--n4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.vh-ofp__stamp {
		transform: none;
	}
}
