/* ============================================================
   IFAD Home (front page). Uses header :root tokens.
   ============================================================ */

/* Shapes + featured are excluded from the default vertical padding and set
   their own, so their custom top/bottom win regardless of the base rule's
   (higher) :not()-chain specificity. */
.ifad-home > section:not(.ifad-hero):not(.ifad-home-banner):not(.ifad-shapes):not(.ifad-home-featured) { padding: 60px 0; }
.ifad-home > section.ifad-shapes { padding: 60px 0 8px; }
.ifad-home > section.ifad-home-featured { padding: 50px 0 60px; }
.ifad-home__h2 { margin: 0 0 50px; font-size: 30px; line-height: 1.3; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; color: var(--ifad-navy); text-align: center; }

.ifad-home__btn {
	display: inline-block;
	padding: 13px 30px;
	background: var(--ifad-navy);
	border: 1px solid var(--ifad-navy);
	border-radius: 5px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.ifad-home__btn:hover { background: #fff; color: var(--ifad-navy); }
.ifad-home__btn--outline { background: transparent; color: var(--ifad-navy); }
.ifad-home__btn--outline:hover { background: var(--ifad-navy); color: #fff; }
.ifad-home__btn--light { background: #fff; color: var(--ifad-navy); border-color: #fff; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; padding: 15px 30px; }
.ifad-home__btn--light:hover { background: transparent; color: #fff; border-color: #fff; }

/* ---------------- Hero (flush to header, swipeable) ---------------- */
.ifad-hero { position: relative; padding: 0; }
.ifad-hero__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	cursor: grab;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.ifad-hero__track::-webkit-scrollbar { display: none; }
.ifad-hero__track.is-grabbing { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.ifad-hero__track.is-grabbing .ifad-hero__inner * { pointer-events: none; }
.ifad-hero__slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
	min-height: 400px;
	display: flex;
	align-items: center;
	background: linear-gradient(120deg, #0e0e31 0%, #26264f 100%);
	background-size: cover;
	background-position: center;
	color: #fff;
}
.ifad-hero__slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(8, 8, 26, .82) 0%, rgba(8, 8, 26, .45) 40%, rgba(8, 8, 26, 0) 70%);
}
.ifad-hero__slide .ifad-container { position: relative; z-index: 1; }
.ifad-hero__inner { max-width: 560px; padding-top: 40px; padding-bottom: 40px; }
.ifad-hero__sub { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; font-size: 17px; font-weight: 300; line-height: 1.4; opacity: .95; }
.ifad-hero__title { margin: 0 0 8px; font-size: 50px; line-height: 1.12; font-weight: 600; }
.ifad-hero__text { margin: 0 0 22px; font-size: 14px; line-height: 1.42; font-weight: 300; max-width: 430px; opacity: .95; }
.ifad-hero__btn {
	display: inline-block;
	padding: 16px 48px;
	background: #fff;
	border: 1px solid #fff;
	border-radius: 5px;
	color: var(--ifad-navy);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 15px;
	line-height: 1.1;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.ifad-hero__btn:hover { background: transparent; color: #fff; }
.ifad-hero__dots { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 9px; z-index: 2; }
.ifad-hero__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .45); cursor: pointer; }
.ifad-hero__dot.is-active { background: #fff; }

/* ---------------- Shapes strip ---------------- */
.ifad-shapes__nav { display: none; } /* desktop: plain wrapping grid, no arrows */
.ifad-shapes__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 22px 10px; }
.ifad-shapes__item { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 80px; color: var(--ifad-navy); text-decoration: none; transition: opacity .15s ease; }
.ifad-shapes__item:hover { opacity: .6; }
.ifad-shapes__icon { display: flex; align-items: center; justify-content: center; height: 56px; }
.ifad-shapes__icon img { width: 52px; height: 52px; object-fit: contain; }
.ifad-shapes__name { font-size: 15px; }

/* Mobile: the shapes become a one-row horizontal carousel with prev/next arrows
   (same long-arrow icons as the featured slider). Desktop keeps the wrap grid. */
@media ( max-width: 767px ) {
	/* Arrows on TOP (centered), like the featured slider — so the row spans the
	   full width and the shape icons never get clipped by side arrows. */
	.ifad-shapes__nav { display: flex; justify-content: center; gap: 26px; margin-bottom: 14px; }
	.ifad-shapes__arrow {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 26px;
		height: 26px;
		padding: 0;
		background: none;
		border: 0;
		color: var(--ifad-navy);
		cursor: pointer;
		transition: opacity .15s ease;
	}
	.ifad-shapes__arrow:hover { opacity: .6; }
	.ifad-shapes__row {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 18px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scroll-behavior: smooth;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-bottom: 2px;
	}
	.ifad-shapes__row::-webkit-scrollbar { display: none; }
	.ifad-shapes__item { flex: 0 0 auto; min-width: 76px; scroll-snap-align: start; }
}

/* ---------------- Featured slider (6 per view) ---------------- */
.ifad-home-featured .ifad-container { position: relative; }
.ifad-home__head { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 30px; }
.ifad-home__head .ifad-home__h2 { margin: 0; }
.ifad-fslider__nav { position: absolute; right: 24px; top: 2px; display: flex; gap: 16px; }
.ifad-fslider__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--ifad-navy);
	cursor: pointer;
	transition: opacity .15s ease;
}
.ifad-fslider__arrow:hover { opacity: .6; }
.ifad-fslider__arrow:disabled,
.ifad-fslider__arrow.is-disabled { opacity: .3; cursor: default; }
.ifad-fslider__track {
	display: flex;
	align-items: stretch;   /* equal-height cards so the price line levels across the row */
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.ifad-fslider__track::-webkit-scrollbar { display: none; }
.ifad-fslider__track > .ifad-card { flex: 0 0 calc(16.666% - 14px); scroll-snap-align: start; }
/* Featured cards only: NO clamp (full combined title must show) + a min-height
   floor so the price line stays aligned across the row for the common 2–3 line
   titles. The catalog grid keeps its natural title height (no min-height/clamp). */
.ifad-home-featured .ifad-card__title { min-height: 3.6em; }
/* Horizontal line before the price (prod: home cards only). */
.ifad-home-featured .ifad-card__price { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--ifad-navy); }
.ifad-home-featured__more { margin-top: 40px; text-align: center; }

/* ---------------- Banner (static promo, prod-parity) ----------------
   Fixed 400px full-bleed band. The container is pinned to the lower area
   (prod: absolute, bottom:100px, centered) and the text block sits at the
   container's left edge, left-aligned. Type + button mirror prod exactly. */
.ifad-home-banner { position: relative; height: 400px; padding: 0; overflow: hidden; display: flex; align-items: center; background: var(--ifad-navy); background-size: cover; background-position: center; color: #fff; }
.ifad-home-banner.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 8, 26, .72) 0%, rgba(8, 8, 26, .35) 40%, rgba(8, 8, 26, 0) 66%); }
.ifad-home-banner .ifad-container { position: relative; width: 100%; }
.ifad-home-banner__inner { max-width: 430px; }
.ifad-home-banner__eyebrow { margin: 0 0 5px; font-size: 17px; line-height: 1.36; font-weight: 300; letter-spacing: .02em; }
.ifad-home-banner__title { margin: 0 0 10px; font-size: 50px; line-height: 55px; font-weight: 600; }
.ifad-home-banner__text { margin: 0 0 20px; font-size: 14px; line-height: 1.36; font-weight: 300; max-width: 250px; }
.ifad-home-banner .ifad-home__btn--light { padding: 16px 48px; font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.ifad-home-banner .ifad-home__btn--light:hover { background: var(--ifad-navy); color: #fff; border-color: var(--ifad-navy); }

/* ---------------- Info block (prod-parity) ---------------- */
.ifad-home-info__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 29px; align-items: center; }
.ifad-home-info__col .ifad-home__h2 { text-align: left; font-size: 29px; line-height: 1.3; font-weight: 600; margin: 0 0 20px; }
.ifad-home-info__lead { margin: 0 0 34px; font-size: 17px; line-height: 1.2; font-weight: 300; color: var(--ifad-navy); }
.ifad-home-info__list { margin: 0; padding: 0; list-style: none; }
.ifad-home-info__list li { display: flex; gap: 10px; padding: 0 0 20px; }
.ifad-home-info__list li:last-child { padding-bottom: 0; }
.ifad-home-info__ico { flex-shrink: 0; width: 24px; height: 20px; margin-top: 2px; line-height: 0; }
.ifad-home-info__item-title { display: block; margin-bottom: 8px; font-size: 20px; line-height: 1.2; font-weight: 600; color: var(--ifad-navy); }
.ifad-home-info__list p { margin: 0; font-size: 17px; line-height: 1.2; font-weight: 300; color: var(--ifad-navy); }
.ifad-home-info__gallery { display: grid; grid-template-columns: 75% 25%; grid-template-rows: 225px 225px; gap: 10px; }
.ifad-home-info__gitem { overflow: hidden; border-radius: 6px; }
.ifad-home-info__gitem.is-big { grid-column: 1 / 2; grid-row: 1 / 3; }
.ifad-home-info__gitem img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Responsive ---------------- */
@media ( max-width: 1200px ) {
	.ifad-fslider__track > .ifad-card { flex-basis: calc(25% - 12px); }
}
@media ( max-width: 991px ) {
	.ifad-hero__title { font-size: 42px; }
	.ifad-fslider__track > .ifad-card { flex-basis: calc(33.333% - 11px); }
	.ifad-shapes__row { justify-content: flex-start; gap: 24px; }
	.ifad-home-banner { height: auto; min-height: 320px; }
	.ifad-home-banner .ifad-container { padding-top: 56px; padding-bottom: 56px; }
	.ifad-home-banner__title { font-size: 40px; }
}
@media ( max-width: 900px ) {
	.ifad-home-info__grid { grid-template-columns: 1fr; gap: 30px; }
	.ifad-home-info__col .ifad-home__h2 { text-align: center; }
	.ifad-home-info__gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 160px; }
	.ifad-home-info__gitem.is-big { grid-column: 1 / -1; grid-row: 1 / 2; }
}
@media ( max-width: 780px ) {
	.ifad-fslider__track > .ifad-card { flex-basis: calc(50% - 8px); }
	.ifad-fslider__nav { position: static; justify-content: center; margin-top: 6px; }
	.ifad-home__head { flex-direction: column; gap: 12px; }
	/* Level the price line across the (equal-height, stretched) featured cards. */
	.ifad-fslider__track { align-items: stretch; }
	.ifad-home-featured .ifad-card__title { min-height: 0; }
	.ifad-home-featured .ifad-card__price { margin-top: auto; }
}
@media ( max-width: 680px ) {
	.ifad-home > section:not(.ifad-hero) { padding: 44px 0; }
	.ifad-hero__slide { min-height: 340px; }
	.ifad-hero__title { font-size: 34px; }
	.ifad-home__h2 { font-size: 23px; }
	.ifad-home-banner__title { font-size: 32px; }
	.ifad-home-banner .ifad-container { padding-top: 44px; padding-bottom: 44px; }
}
