/* Gifts In Action — vertical video showcase below Gifts by Relationship. */

.gifts-in-action {
	background-color: #e8f6fc;
	box-sizing: border-box;
	margin: 0; /* Vertical spacing handled by homepage-spacing.css */
	padding: clamp(40px, 6vw, 72px) var(--layout-padding-horizontal, 16px);
	width: 100%;
}

.gifts-in-action__title {
	color: #000000;
	font-family: var(--font-family-nunito, 'Nunito', sans-serif);
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.1;
	margin: 0 auto clamp(28px, 4vw, 48px);
	max-width: 1200px;
	text-align: center;
	text-transform: uppercase;
}

.gifts-in-action__grid {
	box-sizing: border-box;
	display: grid;
	gap: clamp(20px, 3vw, 32px);
	grid-template-columns: minmax(0, 340px);
	justify-content: center;
	justify-items: center;
	margin: 0 auto;
	max-width: 1108px;
	/* Horizontal inset so cards do not sit flush against the section edges. */
	padding-left: var(--layout-padding-horizontal, 20px);
	padding-right: var(--layout-padding-horizontal, 20px);
	width: 100%;
}

.gifts-in-action__card {
	border-radius: 24px;
	box-shadow: 0 12px 32px rgba(3, 8, 29, 0.12);
	color: inherit;
	display: block;
	margin: 0 auto;
	max-width: 340px;
	overflow: hidden;
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	width: 100%;
}

.gifts-in-action__media {
	aspect-ratio: 340 / 540;
	background-color: #000000;
	isolation: isolate;
	max-height: 540px;
	max-width: 340px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.gifts-in-action__video {
	display: block;
	height: 100%;
	left: 0;
	object-fit: cover;
	object-position: center center;
	pointer-events: auto;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 1;
}

/* Decorative gradient only — must not capture clicks above the product link. */
.gifts-in-action__overlay-shade {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.82) 100%);
	bottom: 0;
	height: 42%;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	z-index: 2;
}

/* Override Anima `.screen a { display: contents; }` so the overlay link keeps its box. */
.gifts-in-action .gifts-in-action__overlay {
	background: transparent;
	bottom: 0;
	box-sizing: border-box;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 8px;
	left: 0;
	padding: clamp(16px, 3vw, 24px);
	pointer-events: auto;
	position: absolute;
	right: 0;
	text-decoration: none;
	z-index: 3;
}

.gifts-in-action .gifts-in-action__overlay:hover,
.gifts-in-action .gifts-in-action__overlay:focus {
	color: #ffffff;
	text-decoration: none;
}

.gifts-in-action__card:has(.gifts-in-action__overlay:hover) {
	box-shadow: 0 16px 40px rgba(3, 8, 29, 0.16);
	transform: translateY(-4px);
}

.gifts-in-action .gifts-in-action__overlay:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.gifts-in-action__product-name {
	color: #ffffff;
	font-family: var(--font-family-nunito_sans, 'Nunito Sans', sans-serif);
	font-size: clamp(18px, 2.4vw, 24px);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.gifts-in-action__rating {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gifts-in-action__stars {
	align-items: center;
	display: inline-flex;
	gap: 2px;
}

.gifts-in-action__stars .review-star {
	display: block;
	flex-shrink: 0;
	height: 14px;
	width: 14px;
}

.gifts-in-action__rating-text,
.gifts-in-action__review-count {
	color: #ffffff;
	font-family: var(--font-family-nunito_sans, 'Nunito Sans', sans-serif);
	font-size: clamp(12px, 1.6vw, 14px);
	font-weight: 500;
	line-height: 1.2;
}

.gifts-in-action__pricing {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gifts-in-action__price {
	color: #ffffff;
	font-family: var(--font-family-nunito_sans, 'Nunito Sans', sans-serif);
	font-size: clamp(14px, 1.8vw, 18px);
	font-weight: 700;
	line-height: 1.2;
}

.gifts-in-action__price--regular {
	color: rgba(255, 255, 255, 0.78);
	font-weight: 500;
	text-decoration: line-through;
}

.gifts-in-action__price--sale,
.gifts-in-action__price--current {
	color: #ffffff;
	font-weight: 700;
}

/* Mobile only — full-bleed horizontal scroll; left inset only at scroll start (refresh). */
.gifts-in-action--mobile {
	overflow: hidden;
	padding-left: 0;
	padding-right: 0;
}

.gifts-in-action--mobile .gifts-in-action__title {
	padding-left: var(--layout-padding-horizontal, 20px);
	padding-right: var(--layout-padding-horizontal, 20px);
}

.gifts-in-action--mobile .gifts-in-action__grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 0; /* Use card margin for spacing so the leading spacer lines up with scroll-padding on refresh. */
	justify-content: flex-start;
	margin: 0 0 0 calc(50% - 50vw);
	max-width: 100vw;
	overflow-x: auto;
	overflow-y: hidden;
	/* Match spacer width so mandatory snap keeps the first card inset instead of flush left. */
	scroll-padding-left: var(--layout-padding-horizontal, 20px);
	scroll-padding-right: var(--layout-padding-horizontal, 20px);
	-webkit-overflow-scrolling: touch;
	padding: 0 0 8px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	width: 100vw;
}

/* Leading/trailing spacers — inset at scroll start/end on mobile; scroll with the track while swiping. */
.gifts-in-action--mobile .gifts-in-action__grid-spacer {
	display: block;
	flex: 0 0 var(--layout-padding-horizontal, 20px);
	min-width: var(--layout-padding-horizontal, 20px);
	scroll-snap-align: none;
	width: var(--layout-padding-horizontal, 20px);
}

.gifts-in-action--mobile .gifts-in-action__grid::-webkit-scrollbar {
	display: none;
}

.gifts-in-action--mobile .gifts-in-action__card {
	flex: 0 0 auto;
	margin: 0 16px 0 0; /* Gap between cards without offsetting the leading spacer on refresh. */
	max-width: min(76vw, 300px);
	scroll-snap-align: start;
	width: min(76vw, 300px);
}

.gifts-in-action--mobile .gifts-in-action__card:last-of-type {
	margin-right: 0; /* Trailing spacer handles end inset. */
}

.gifts-in-action--mobile .gifts-in-action__media {
	height: auto;
	max-height: none;
	max-width: 100%;
	width: 100%;
}

/* Tablet: 2 columns (desktop section only) */
@media (min-width: 768px) {
	.gifts-in-action--desktop .gifts-in-action__grid {
		grid-template-columns: repeat(2, minmax(0, 340px));
	}
}

/* Desktop: 3 columns — each card capped at 340×540 */
@media (min-width: 1024px) {
	.gifts-in-action--desktop .gifts-in-action__grid {
		grid-template-columns: repeat(3, minmax(0, 340px));
	}
}

@media (min-width: 1440px) {
	.gifts-in-action--desktop .gifts-in-action__card {
		max-width: 340px;
		width: 340px;
	}

	.gifts-in-action--desktop .gifts-in-action__media {
		height: 540px;
		max-height: 540px;
		max-width: 340px;
		width: 340px;
	}
}