/* Foretec festive homepage layer (season 2026/27).
   Only applies when <body> carries .ft-festive-a or .ft-festive-b (added by foretec-festive.php on the front page).
   Switch the design Off and the homepage is exactly as before. */

:root {
	--ftp-navy: #1C2557;
	--ftp-ink: #141B44;
	--ftp-gold: #F5A623;
	--ftp-gold-2: #FFC85A;
	--ftp-red: #D7262F;
	--ftp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--ftp-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- background stage behind the top of the homepage ---------- */
body.ft-festive #content { position: relative; isolation: isolate; }
body.ft-festive #content > .container { position: relative; z-index: 1; }
body.ft-festive #content::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: var(--ftf-stage-h, 720px);
	z-index: 0;
	pointer-events: none;
	background-color: #F7F8FB;
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 68%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0, #000 68%, transparent 100%);
}
/* the slider keeps its original spacing; only its flat backing colour is cleared so the stage shows around it */
body.ft-festive .foretec-native-banner-carousel-section { background: transparent !important; }

/* the categories card that follows gets soft top corners where it meets the stage */
body.ft-festive .foretec-all-categories-section {
	border-radius: 24px 24px 0 0;
	overflow: hidden;
}

/* Design A: gold & silver gifting */
body.ft-festive-a { --ftf-stage-h: 760px; }
body.ft-festive-a #content::before {
	background-image: url("a-stage.webp");
	background-size: cover;
	background-position: center 38%;
	background-repeat: no-repeat;
	background-blend-mode: multiply;
}

/* Design B: red ribbon corners */
body.ft-festive-b { --ftf-stage-h: 720px; }
body.ft-festive-b #content::before {
	background-image: url("b-corner.webp"), url("b-corner-r.webp");
	background-size: auto 100%, auto 100%;
	background-position: left top, right bottom;
	background-repeat: no-repeat, no-repeat;
	background-blend-mode: multiply, multiply;
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 88%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0, #000 88%, transparent 100%);
}

/* Design C: Santa's sleigh watercolour (painted with Codex from Jack's illustration) */
body.ft-festive-c { --ftf-stage-h: 820px; }
body.ft-festive-c #content::before {
	background-image: url("c-santa.webp");
	background-size: max(100%, 1500px) auto;
	background-position: center top;
	background-repeat: no-repeat;
	background-blend-mode: multiply;
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 84%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0, #000 84%, transparent 100%);
}

@media (min-width: 768px) and (max-width: 1199px) {
	body.ft-festive-c { --ftf-stage-h: 560px; }
	body.ft-festive-c #content::before { background-size: 130% auto; }
	body.ft-festive-a { --ftf-stage-h: 600px; }
	body.ft-festive-b { --ftf-stage-h: 560px; }
}
@media (max-width: 767px) {
	body.ft-festive-a { --ftf-stage-h: 360px; }
	body.ft-festive-a #content::before { background-image: url("a-stage-m.webp"); background-position: center 30%; }
	body.ft-festive-c { --ftf-stage-h: 340px; }
	body.ft-festive-c #content::before {
		background-image: url("c-santa-m.webp");
		background-size: 100% auto;
		background-position: center 150px;
	}
	body.ft-festive-b { --ftf-stage-h: 330px; }
	body.ft-festive-b #content::before {
		background-image: url("b-corner-m.webp"), url("b-corner-r-m.webp");
		background-size: auto 62%, auto 62%;
	}
}

/* ---------- promo strip (top of the page, Jumia-style) ---------- */
.ftp-band { background: #F7F8FB; padding: 0; }
.ftp-strip {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 230px 220px;
	align-items: stretch;
	width: calc(100% - 30px);
	max-width: 1210px;
	height: 58px;
	margin: 0 auto;
	overflow: hidden;
	background: var(--ftp-navy);
	font-family: "Poppins", system-ui, sans-serif;
	color: #fff;
	border-radius: 0 0 14px 14px;
	box-shadow: 0 1px 2px rgba(23, 35, 66, .10), 0 8px 22px rgba(23, 35, 66, .10);
}

/* headline + LIVE NOW, one centred group on the navy panel */
.ftp-main {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	padding: 0 28px;
	min-width: 0;
	background:
		radial-gradient(120% 140% at 0% 0%, rgba(245, 166, 35, .16) 0%, transparent 46%),
		radial-gradient(90% 120% at 100% 100%, rgba(215, 38, 47, .18) 0%, transparent 50%);
}
.ftp-spark { width: 30px; height: 30px; flex: none; margin-right: -10px; overflow: visible; }
.ftp-title {
	margin: 0;
	min-width: 0;
	font-weight: 800;
	font-size: 24px;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #fff;
}
.ftp-title em { font-style: normal; color: var(--ftp-gold-2); }

/* LIVE NOW */
.ftp-live {
	flex: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	padding: 0 18px 0 14px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--ftp-red);
	color: #fff;
	font-weight: 800;
	font-size: 20px;
	letter-spacing: .04em;
	line-height: 1;
	white-space: nowrap;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.ftp-dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: #fff; }
.ftp-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #fff;
	animation: ftp-ping 1.6s var(--ftp-ease-out) infinite;
}
.ftp-live::after { /* light sheen that crosses the badge every few seconds */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 40%;
	background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .38) 50%, transparent 100%);
	transform: translateX(-140%) skewX(-18deg);
	animation: ftp-sheen 4.2s var(--ftp-ease-in-out) 1.2s infinite;
}

/* festive panel */
.ftp-deco {
	position: relative;
	background: linear-gradient(115deg, var(--ftp-gold) 0%, var(--ftp-gold-2) 100%);
	clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
}
.ftp-deco svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ftp-swing { transform-box: fill-box; transform-origin: 50% 0; animation: ftp-swing 3.4s var(--ftp-ease-in-out) infinite alternate; }
.ftp-swing.s2 { animation-duration: 4.1s; animation-delay: -1.3s; }
.ftp-swing.s3 { animation-duration: 3.8s; animation-delay: -2.2s; }
.ftp-twinkle { transform-box: fill-box; transform-origin: center; animation: ftp-twinkle 2.6s ease-in-out infinite; }
.ftp-twinkle.t2 { animation-delay: -.9s; }
.ftp-twinkle.t3 { animation-delay: -1.7s; }
.ftp-bob { animation: ftp-bob 3s var(--ftp-ease-in-out) infinite alternate; }

/* call to order */
.ftp-call {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	background: #fff;
	color: var(--ftp-ink) !important;
	text-decoration: none !important;
	line-height: 1.1;
	transition: background-color .2s ease;
}
.ftp-call span { font-size: 15px; font-weight: 500; }
.ftp-call strong { font-size: 22px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ftp-call:focus-visible { outline: 2px solid var(--ftp-gold); outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) {
	.ftp-call:hover { background: #FFF7E6; }
}

/* one entrance on page load: blocks settle in, 60ms apart */
.ftp-strip > * { animation: ftp-in .5s var(--ftp-ease-out) both; }
.ftp-strip > :nth-child(2) { animation-delay: .08s; }
.ftp-strip > :nth-child(3) { animation-delay: .16s; }

/* pause the looping motion once the strip is scrolled out of view */
.ftp-strip.is-off *, .ftp-strip.is-off *::after { animation-play-state: paused !important; }

@keyframes ftp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ftp-ping { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes ftp-sheen { 0% { transform: translateX(-140%) skewX(-18deg); } 30%, 100% { transform: translateX(360%) skewX(-18deg); } }
@keyframes ftp-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes ftp-twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes ftp-bob { from { transform: translateY(1px); } to { transform: translateY(-2px); } }

/* tablets */
@media (max-width: 1199px) {
	.ftp-strip { grid-template-columns: minmax(0, 1fr) 120px 190px; }
	.ftp-main { gap: 16px; padding: 0 18px; }
	.ftp-title { font-size: 19px; }
	.ftp-call strong { font-size: 19px; }
	.ftp-call span { font-size: 13px; }
}

/* phones */
@media (max-width: 767px) {
	.ftp-strip {
		grid-template-columns: minmax(0, 1fr) 118px;
		width: 100%;
		height: 52px;
		border-radius: 0;
	}
	.ftp-deco, .ftp-spark { display: none; }
	.ftp-main { justify-content: space-between; gap: 8px; padding: 0 8px 0 14px; }
	.ftp-title { font-size: 13.5px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
	.ftp-live { height: 28px; gap: 7px; padding: 0 10px 0 9px; font-size: 12px; border-radius: 5px; }
	.ftp-dot { width: 7px; height: 7px; }
	.ftp-call span { font-size: 10.5px; }
	.ftp-call strong { font-size: 13.5px; }
}

/* small phones: "LIVE" only, so the headline keeps two full lines */
@media (max-width: 420px) {
	.ftp-strip { grid-template-columns: minmax(0, 1fr) 112px; }
	.ftp-now { display: none; }
	.ftp-live { padding: 0 9px 0 8px; }
	.ftp-title { font-size: 13px; }
	.ftp-call strong { font-size: 13px; }
}

/* reduced motion: keep the strip, drop the movement */
@media (prefers-reduced-motion: reduce) {
	.ftp-strip > * { animation: ftp-fade .2s ease both; }
	.ftp-dot::after, .ftp-live::after, .ftp-swing, .ftp-twinkle, .ftp-bob { animation: none; }
	.ftp-live::after { display: none; }
}
@keyframes ftp-fade { from { opacity: 0; } to { opacity: 1; } }

@media print {
	body.ft-festive #content::before, .ftp-band { display: none; }
}
