/**
 * PPB Core — shared Gift cards section (Shared promotions).
 * Header + responsive grid; cards use image, scrim, title, and CTA on the image.
 *
 * Vertical spacing from the previous main region: `.ppb-site-main > * + *` in site-shell.css
 * — do not add section block padding here (avoids doubling `--ppb-space-main-gap`).
 */

.ppb-gift-cards {
	width: 100%;
	box-sizing: border-box;
	background: var(--ppb-color-surface-page, #f7f6f2);
}

.ppb-gift-cards__inner {
	box-sizing: border-box;
}

.ppb-gift-cards__header {
	box-sizing: border-box;
	text-align: center;
	max-width: 42rem;
	margin-inline: auto;
	margin-bottom: var(--ppb-space-stack-lg, 2rem);
}

.ppb-gift-cards__eyebrow {
	color: var(--color-primary, #917145);
	margin: 0 0 var(--ppb-space-stack-xs, 0.5rem);
}

.ppb-gift-cards__title {
	margin: 0 0 var(--ppb-space-stack-sm, 1rem);
	font-family: var(--font-display, inherit);
	font-size: var(--ppb-text-4xl, 2.5rem);
	font-weight: var(--ppb-font-weight-display-strong, 700);
	line-height: var(--ppb-leading-tight, 1.3);
	color: var(--ppb-color-text, #1a1a1a);
}

.ppb-gift-cards__intro {
	margin: 0;
	margin-inline: auto;
	max-width: min(25rem, 100%);
	color: var(--ppb-color-text-muted, #333);
	font-size: var(--ppb-text-lg, 1.125rem);
	line-height: var(--ppb-leading-normal, 1.5);
}

.ppb-gift-cards__intro p {
	margin: 0;
}

.ppb-gift-cards__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ppb-space-stack-md, 1.5rem);
	box-sizing: border-box;
}

@media (min-width: 40rem) {
	.ppb-gift-cards__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 60rem) {
	.ppb-gift-cards__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem 1.25rem;
	}
}

.ppb-gift-cards__item {
	box-sizing: border-box;
}

.ppb-gift-cards__card {
	position: relative;
	margin: 0;
	border-radius: var(--ppb-radius-card, 0.75rem);
	overflow: hidden;
	min-height: 17.5rem;
	box-sizing: border-box;
	box-shadow: var(--ppb-shadow-lift);
	/* Aligned with `.ppb-event-card` link-hover cards: lift + soft shadow. */
	transition: transform var(--ppb-transition-base), box-shadow var(--ppb-transition-base);
}

.ppb-gift-cards__card:hover,
.ppb-gift-cards__card:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--ppb-shadow-lift);
}

/*
 * Stretched link behind image/title: mouse target for "click the card" (not keyboard; CTA is the real link).
 * Content + CTA sit above; `pointer-events` on the block so the CTA can receive button hover.
 */
.ppb-gift-cards__card-stretch {
	display: block;
	color: transparent;
	font-size: 0;
	text-decoration: none;
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	min-height: 0;
}

.ppb-gift-cards__card--linked .ppb-gift-cards__card-content {
	pointer-events: none;
}

.ppb-gift-cards__card--linked .ppb-gift-cards__card-content a.ppb-button,
.ppb-gift-cards__card--linked .ppb-gift-cards__card-content .ppb-gift-cards__card-btn {
	pointer-events: auto;
	position: relative;
	z-index: 1;
}

.ppb-gift-cards__media {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 17.5rem;
}

.ppb-gift-cards__card:not(.ppb-gift-cards__card--no-image) .ppb-gift-cards__media {
	position: absolute;
	inset: 0;
}

.ppb-gift-cards__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ppb-gift-cards__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.78) 0%,
		rgba(0, 0, 0, 0.35) 45%,
		rgba(0, 0, 0, 0.12) 100%
	);
	pointer-events: none;
}

.ppb-gift-cards__card-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 1.25rem 1rem 1.5rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
}

.ppb-gift-cards__card-title {
	margin: 0;
	font-family: var(--font-display, inherit);
	font-size: clamp(var(--ppb-text-2xl, 1.5rem), 2.5vw, var(--ppb-text-3xl, 1.875rem));
	font-weight: var(--ppb-font-weight-bold, 700);
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ppb-gift-cards__card-btn {
	white-space: nowrap;
}

/* Text-only / no photo — still support title + CTA */
.ppb-gift-cards__card--no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 14rem;
	padding: 1.5rem;
}

.ppb-gift-cards__card--no-image .ppb-gift-cards__card-content {
	position: relative;
	z-index: 2;
	padding: 0;
	color: var(--ppb-color-text, #1a1a1a);
}

.ppb-gift-cards__card--no-image .ppb-gift-cards__card-title {
	color: var(--ppb-color-text, #1a1a1a);
	text-shadow: none;
}

.ppb-gift-cards__card--no-image .ppb-gift-cards__card-btn {
	margin-top: 0.25rem;
}
