/*!
 * Vale-Presente Pro — cartão visual (carrossel, grade, pré-visualização, detalhes e impressão).
 *
 * Arte de presente: fita vertical e laço na cor de destaque do modelo, brilho suave e textura
 * diagonal discreta. Todo o conteúdo escala com a largura do próprio cartão (container queries),
 * então o mesmo desenho funciona do celular à vitrine larga.
 */
.vgp-card {
	--vgp-bg: #101828;
	--vgp-fg: #ffffff;
	--vgp-accent: #377DFF;
	position: relative;
	display: flex;
	box-sizing: border-box;
	width: 100%;
	max-width: 520px;
	aspect-ratio: 1.6 / 1;
	min-height: 200px;
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--nxc-radius-lg, 16px);
	color: var(--vgp-fg);
	background:
		radial-gradient(120% 95% at 0% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%),
		linear-gradient(140deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .24)),
		var(--vgp-bg);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 18px 36px -18px rgba(16, 24, 40, .45);
	font-family: var(--nxc-font, inherit);
	line-height: 1.25;
	text-align: left;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.vgp-card *,
.vgp-card *::before,
.vgp-card *::after {
	box-sizing: border-box;
}

/* Textura diagonal discreta */
.vgp-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 12px);
	pointer-events: none;
}

/* Brilho que atravessa o cartão no hover (carrossel/grade) */
.vgp-card::after {
	content: "";
	position: absolute;
	top: -20%;
	bottom: -20%;
	left: -60%;
	z-index: 3;
	width: 45%;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0));
	transform: skewX(-18deg) translateX(0);
	opacity: 0;
	pointer-events: none;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}

a:hover > .vgp-card::after,
a:focus-visible > .vgp-card::after {
	opacity: 1;
	transform: skewX(-18deg) translateX(420%);
}

.vgp-card.vgp-has-image {
	background:
		linear-gradient(120deg, rgba(16, 24, 40, .55), rgba(16, 24, 40, .1)),
		var(--vgp-image) center / cover no-repeat,
		var(--vgp-bg);
}

/* Faixa lateral antiga (substituída pela fita) */
.vgp-card__band {
	display: none;
}

/* Fita e laço */
.vgp-card__decor {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.vgp-card__ribbon {
	position: absolute;
	top: 0;
	right: 17%;
	bottom: 0;
	width: 9%;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .22) 42%, rgba(255, 255, 255, .05) 60%, rgba(0, 0, 0, .18)),
		var(--vgp-accent);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 0 24px rgba(0, 0, 0, .15);
}

.vgp-card__bow {
	position: absolute;
	top: 3%;
	left: calc(100% - 21.5% - 17%);
	width: 34%;
	height: auto;
	overflow: visible;
	filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .28));
}

.vgp-card__bow-loop,
.vgp-card__bow-tail {
	fill: var(--vgp-accent);
	stroke: rgba(0, 0, 0, .14);
	stroke-width: 1;
}

.vgp-card__bow-tail {
	filter: brightness(.88);
}

.vgp-card__bow-knot {
	fill: var(--vgp-accent);
	stroke: rgba(0, 0, 0, .18);
	stroke-width: 1;
	filter: brightness(.8);
}

/* Conteúdo */
.vgp-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 22px 36% 20px 24px;
}

.vgp-card__top {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}

.vgp-card__logo {
	max-width: 100%;
	max-height: 30px;
	object-fit: contain;
}

.vgp-card__store {
	max-width: 100%;
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -.01em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vgp-card__title {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .18em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	opacity: .78;
}

.vgp-card__subtitle {
	margin-top: 6px;
	font-size: 12px;
	opacity: .85;
}

.vgp-card__amount {
	margin-top: auto;
	padding-top: 8px;
	font-family: var(--nxc-font-heading, inherit);
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1;
	white-space: nowrap;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.vgp-card__people {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 12px;
	margin-top: 6px;
	font-size: 12px;
}

.vgp-card__people [hidden],
.vgp-card__message[hidden] {
	display: none;
}

.vgp-card__message {
	display: -webkit-box;
	margin: 4px 0 0;
	overflow: hidden;
	font-size: 12px;
	font-style: italic;
	opacity: .92;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.vgp-card__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 4px 12px;
	margin-top: 10px;
}

.vgp-card__bottom:empty {
	display: none;
}

.vgp-card__label {
	display: block;
	font-size: 9px;
	letter-spacing: .16em;
	text-transform: uppercase;
	opacity: .75;
}

.vgp-card__code code {
	padding: 0;
	background: none;
	color: inherit;
	font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .1em;
	word-break: break-all;
}

.vgp-card__expiry {
	font-size: 11px;
	opacity: .85;
}

.vgp-card__footer {
	margin-top: 6px;
	font-size: 10px;
	opacity: .75;
}

/* ------------------------------------------------------------------ *
 * Layouts
 * ------------------------------------------------------------------ */

/* Moderno: degradê do fundo para o destaque; fita clara. */
.vgp-layout-modern {
	background:
		radial-gradient(120% 95% at 0% 0%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%),
		linear-gradient(135deg, var(--vgp-bg) 10%, var(--vgp-accent) 140%);
}

.vgp-layout-modern .vgp-card__bow-loop,
.vgp-layout-modern .vgp-card__bow-tail,
.vgp-layout-modern .vgp-card__bow-knot {
	fill: #ffffff;
}

.vgp-layout-modern .vgp-card__ribbon {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .12), rgba(255, 255, 255, .5) 42%, rgba(0, 0, 0, .08)),
		rgba(255, 255, 255, .78);
}

/* Minimalista: fundo claro, fita no destaque — ideal para impressão. */
.vgp-layout-minimal {
	background:
		radial-gradient(120% 95% at 0% 0%, rgba(55, 125, 255, .08), rgba(255, 255, 255, 0) 60%),
		var(--vgp-bg);
	box-shadow: 0 0 0 1px rgba(16, 24, 40, .08), 0 18px 36px -22px rgba(16, 24, 40, .35);
}

.vgp-layout-minimal::before {
	background: repeating-linear-gradient(135deg, rgba(16, 24, 40, .035) 0 1px, transparent 1px 12px);
}

.vgp-layout-minimal .vgp-card__amount {
	color: var(--vgp-accent);
	text-shadow: none;
}

/* Foto: imagem em tela cheia, sem fita (o conteúdo ocupa a largura). */
.vgp-layout-photo .vgp-card__decor {
	display: none;
}

.vgp-layout-photo .vgp-card__body {
	padding-right: 24px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

/* ------------------------------------------------------------------ *
 * Escala proporcional: o conteúdo acompanha a largura do cartão.
 * ------------------------------------------------------------------ */
@supports (container-type: inline-size) {
	.vgp-card {
		container-type: inline-size;
		min-height: 0;
	}

	.vgp-card__body {
		padding: 6.5cqw 36cqw 5.5cqw 6.5cqw;
	}

	.vgp-layout-photo .vgp-card__body {
		padding-right: 6.5cqw;
	}

	.vgp-card__logo {
		max-height: 7.5cqw;
	}

	.vgp-card__store {
		font-size: max(11px, 4cqw);
	}

	.vgp-card__title {
		font-size: max(8px, 2.4cqw);
	}

	.vgp-card__subtitle {
		font-size: max(10px, 2.9cqw);
	}

	.vgp-card__amount {
		padding-top: 1.5cqw;
		font-size: max(22px, 10.5cqw);
	}

	.vgp-card__people,
	.vgp-card__message {
		font-size: max(10px, 2.9cqw);
	}

	.vgp-card__label {
		font-size: max(8px, 2cqw);
	}

	.vgp-card__code code {
		font-size: max(11px, 3.7cqw);
	}

	.vgp-card__expiry {
		font-size: max(9px, 2.6cqw);
	}

	.vgp-card__footer {
		font-size: max(8px, 2.3cqw);
	}

	.vgp-card__bottom {
		margin-top: 2.4cqw;
	}
}

@supports not (container-type: inline-size) {
	@media (max-width: 420px) {
		.vgp-card {
			aspect-ratio: auto;
			min-height: 200px;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.vgp-card::after {
		display: none;
	}
}
