/* Homepage "Discounts and Rewards" band (patterns/discounts-rewards.php).
   Enqueued on the front page only — kept out of the oversized app.css. */
.hif-rewards {
	--rw-gap: 3.5rem;
	--rw-pink: #c83663;
	--rw-progress: 31%;
	background: var(--wp--preset--color--accent) url("../images/patterns/yellow-pattern.png") repeat;
	background-size: 50px;
	color: var(--wp--preset--color--forest);
}
.hif-rewards__body { padding: clamp(2.5rem, 5vw, 4rem) var(--wp--preset--spacing--40); }
.hif-rewards__border { height: 25px; background: url("../images/patterns/border.png") repeat-x center / auto 25px; }
.hif-rewards__inner { max-width: 1300px; margin: 0 auto; }

.hif-rewards__title {
	text-align: center;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	font-weight: 500;
	margin: 0 0 1rem;
	color: var(--wp--preset--color--forest);
}
.hif-rewards__intro {
	text-align: center;
	max-width: 40rem;
	margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
	font-size: 1rem;
	line-height: 1.6;
}

/* Pink panel */
.hif-rewards__panel {
	display: grid;
	gap: 1.1rem;
	padding: 1.1rem;
	border-radius: 16px;
	background: linear-gradient(180deg, var(--rw-pink) 0%, #d2557f 55%, #e0a0b9 100%);
}

/* Progress strip */
.hif-rewards__progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	padding: 1rem 1.5rem 0.9rem;
	border-radius: 12px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
/* Headings inside the panel use the body face, not the theme's display face. */
.hif-rewards__progress-title,
.hif-rewards__card-title { font-family: var(--wp--preset--font-family--body); }
.hif-rewards__progress-title {
	margin: 0 0 0.2rem;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
}
.hif-rewards__progress-note { margin: 0; font-size: 0.95rem; color: var(--rw-pink); }

.hif-rewards__steps {
	position: relative;
	flex: 0 0 min(100%, 33rem);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}
/* Track runs behind the nodes; the pink part is the progress made. */
.hif-rewards__steps::before,
.hif-rewards__steps::after {
	content: "";
	position: absolute;
	top: 1.0625rem;
	left: calc(100% / 6 - 2.4rem);
	height: 3px;
	border-radius: 2px;
	background: #e6e6e6;
	right: calc(100% / 6 - 2.4rem);
}
.hif-rewards__steps::after { right: auto; width: calc((100% - 100% / 3 + 4.8rem) * 0.31); background: var(--rw-pink); }
.hif-rewards__step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 0.35rem; }
.hif-rewards__node {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	border: 2px solid #ececec;
	box-shadow: 0 0 0 5px var(--wp--preset--color--base);
	font-size: 0.8rem;
	color: #7a7a7a;
}
.hif-rewards__node--gift { color: var(--rw-pink); }
.hif-rewards__step.is-current .hif-rewards__node { background: var(--rw-pink); border-color: var(--rw-pink); color: var(--wp--preset--color--base); }
.hif-rewards__step-label { font-size: 0.95rem; }

/* Three cards */
.hif-rewards__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--rw-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.hif-rewards__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.25rem 1.4rem 1rem;
	border-radius: 10px;
	text-align: center;
	color: var(--wp--preset--color--contrast);
	--rw-tint: #fcf1f2;
	--rw-art: #fbdde4;
	--rw-chip-bg: #fbdfe7;
	--rw-chip-fg: #c2185b;
	background: var(--rw-tint);
}
.hif-rewards__card--benefits { --rw-tint: #fffaea; --rw-art: #fdeeb8; --rw-chip-bg: #fcefc6; --rw-chip-fg: #94640a; }
.hif-rewards__card--perks { --rw-tint: #f8eef8; --rw-art: #f0d9f4; --rw-chip-bg: #ecdcf1; --rw-chip-fg: #8b2fa8; }

.hif-rewards__art {
	display: grid;
	place-items: center;
	width: 6.5rem;
	height: 6.5rem;
	margin-bottom: 0.75rem;
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--base);
	background: radial-gradient(circle at 50% 35%, #fff 0%, var(--rw-art) 100%);
	box-shadow: 0 8px 18px rgba(42, 33, 24, 0.14);
}
.hif-rewards__art img { width: 5.25rem; height: 5.25rem; object-fit: contain; }
.hif-rewards__card-title { margin: 0 0 0.3rem; font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.hif-rewards__card-body {
	width: 100%;
	margin: 0;
	padding-bottom: 0.8rem;
	border-bottom: 1px dotted rgba(42, 33, 24, 0.3);
	font-size: 0.9rem;
	line-height: 1.55;
	text-wrap: balance;
}
.hif-rewards__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.8rem;
	padding: 0.3rem 0.75rem 0.3rem 0.4rem;
	border-radius: 999px;
	background: var(--rw-chip-bg);
	color: var(--rw-chip-fg);
	font-size: 0.8rem;
	font-weight: 600;
}
.hif-rewards__chip-dot {
	width: 0.95rem;
	height: 0.95rem;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 20%), var(--rw-chip-fg);
}
/* Arrow between cards: dashed swoops + round button, centred in the gap */
.hif-rewards__next {
	position: absolute;
	z-index: 2;
	top: 47%;
	left: calc(100% + var(--rw-gap) / 2);
	display: grid;
	place-items: center;
	width: 7.5rem;
	height: 3.5rem;
	transform: translate(-50%, -50%);
	color: var(--rw-pink);
	pointer-events: none;
}
.hif-rewards__swoop { position: absolute; inset: 0; width: 100%; height: 100%; }
.hif-rewards__next-btn {
	position: relative;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--rw-pink);
	color: var(--wp--preset--color--base);
}

/* CTA — 6px radius / 600 weight per theme button rule */
.hif-rewards__cta { margin-top: clamp(1.5rem, 3vw, 2.25rem); justify-content: center; }
.hif-rewards__btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.9rem;
	border-radius: 6px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease;
}
.hif-rewards__btn .wp-block-button__link:hover,
.hif-rewards__btn .wp-block-button__link:focus-visible { background: var(--wp--preset--color--primary-dark); color: var(--wp--preset--color--base); }
.hif-rewards__btn .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--forest); outline-offset: 3px; }

/* Tablet: progress strip stacks, cards tighten */
@media (max-width: 1024px) {
	.hif-rewards { --rw-gap: 2.5rem; }
	.hif-rewards__progress { flex-direction: column; align-items: flex-start; }
	.hif-rewards__steps { flex-basis: auto; width: 100%; max-width: 30rem; align-self: center; }
	.hif-rewards__card { padding-inline: 1rem; }
	.hif-rewards__next { width: 5rem; }
	.hif-rewards__swoop { display: none; }
}

/* Mobile: single column, arrows point down between cards */
@media (max-width: 760px) {
	.hif-rewards { --rw-gap: 2.75rem; }
	.hif-rewards__panel { padding: 0.75rem; gap: 0.75rem; }
	.hif-rewards__progress { padding: 1rem; }
	.hif-rewards__cards { grid-template-columns: 1fr; }
	.hif-rewards__next { top: calc(100% + var(--rw-gap) / 2); left: 50%; width: auto; height: auto; }
	.hif-rewards__next-btn svg { transform: rotate(90deg); }
}
