/* =========================================================================
 * NextGen Flooring — custom homepage (front-page.php)
 * ====================================================================== */

.ngs-home {
	--ngs-blue: #1f6fe0;
	--ngs-blue-dark: #1657bd;
	--ngs-navy: #0d2440;
	--ngs-ink: #15263f;
	--ngs-muted: #5d6b80;
	--ngs-line: #e3e8f0;
	--ngs-soft: #f4f7fc;
	font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--ngs-ink);
	overflow: hidden;
}

.ngs-home * {
	box-sizing: border-box;
}

.ngs-home img {
	max-width: 100%;
	height: auto;
}

/* ----- Buttons ----------------------------------------------------------- */
.ngs-btn {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 11px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
}

.ngs-btn--primary {
	background: var(--ngs-blue);
	color: #fff !important;
	box-shadow: 0 12px 26px rgba(31, 111, 224, 0.3);
}
.ngs-btn--primary:hover {
	background: var(--ngs-blue-dark);
	transform: translateY(-2px);
	color: #fff !important;
}

.ngs-btn--ghost {
	background: transparent;
	color: #fff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.ngs-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #fff;
}

.ngs-btn--light {
	background: #fff;
	color: var(--ngs-navy) !important;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}
.ngs-btn--light:hover {
	transform: translateY(-2px);
}

/* ----- Top banner carousel ----------------------------------------------- */
.ngs-slider {
	position: relative;
	overflow: hidden;
	background: var(--ngs-navy);
}

.ngs-slider__viewport {
	overflow: hidden;
}

.ngs-slider__track {
	display: flex;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.ngs-slide {
	flex: 0 0 100%;
	position: relative;
	min-height: 460px;
	background-color: #143a6b; /* fallback so a slide is never blank */
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
}

/* Distinct fallback tints per slide when no photo is set yet. */
.ngs-slide:nth-child(2) { background-color: #0d2440; }
.ngs-slide:nth-child(3) { background-color: #1657bd; }

.ngs-slide__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(13, 36, 64, 0.82) 0%, rgba(13, 36, 64, 0.45) 55%, rgba(13, 36, 64, 0.2) 100%);
}

.ngs-slide__content {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	padding: 0 64px;
	color: #fff;
}

.ngs-slide__content > * {
	max-width: 560px;
}

.ngs-slide__eyebrow {
	display: inline-block;
	margin-bottom: 14px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ngs-slide__title {
	margin: 0 0 14px;
	font-size: 2.6rem;
	line-height: 1.1;
	font-weight: 800;
	color: #fff;
}

.ngs-slide__text {
	margin: 0 0 24px;
	font-size: 1.1rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
}

.ngs-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--ngs-navy);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	transition: background 0.15s ease, transform 0.15s ease;
	z-index: 2;
}

.ngs-slider__arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.06);
}

.ngs-slider__arrow--prev { left: 18px; }
.ngs-slider__arrow--next { right: 18px; }

.ngs-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	display: flex;
	gap: 9px;
	justify-content: center;
	z-index: 2;
}

.ngs-slider__dot {
	width: 11px;
	height: 11px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.ngs-slider__dot.is-active {
	background: #fff;
	transform: scale(1.2);
}

/* ----- Hero -------------------------------------------------------------- */
.ngs-hero {
	position: relative;
	background:
		radial-gradient(circle at 20% 0%, rgba(90, 176, 255, 0.35) 0%, rgba(13, 36, 64, 0) 55%),
		linear-gradient(135deg, #143a6b 0%, var(--ngs-navy) 100%);
	color: #fff;
	text-align: center;
	padding: 84px 20px 92px;
	overflow: hidden;
}

.ngs-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 22px 22px;
	pointer-events: none;
}

.ngs-hero__inner {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
	z-index: 1;
}

.ngs-hero__eyebrow {
	display: inline-block;
	margin-bottom: 18px;
	padding: 7px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ngs-hero__title {
	margin: 0 0 16px;
	font-size: 3rem;
	line-height: 1.08;
	font-weight: 800;
	color: #fff;
}

.ngs-hero__sub {
	margin: 0 auto 28px;
	max-width: 620px;
	font-size: 1.12rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
}

.ngs-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
}

.ngs-hero__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 26px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

.ngs-hero__trust li {
	position: relative;
	padding-left: 24px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
}

.ngs-hero__trust li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #5ab0ff;
	font-weight: 700;
}

/* ----- Section scaffolding ----------------------------------------------- */
.ngs-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 76px 24px;
}

.ngs-section--alt {
	max-width: none;
	background: var(--ngs-soft);
}
.ngs-section--alt > * {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.ngs-section__head {
	text-align: center;
	max-width: 620px;
	margin: 0 auto 44px;
}

.ngs-eyebrow {
	display: block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ngs-blue);
}

.ngs-h2 {
	margin: 0 0 12px;
	font-size: 2.1rem;
	font-weight: 800;
	line-height: 1.15;
	color: var(--ngs-ink);
}

.ngs-lead {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--ngs-muted);
}

.ngs-section__foot {
	text-align: center;
	margin-top: 44px;
}

/* ----- Category grid ----------------------------------------------------- */
.ngs-cat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

.ngs-cat {
	position: relative;
	display: block;
	height: 280px;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 14px 30px rgba(13, 36, 64, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ngs-cat:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 44px rgba(13, 36, 64, 0.22);
}

.ngs-cat__img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 0.45s ease;
}
.ngs-cat:hover .ngs-cat__img {
	transform: scale(1.07);
}

.ngs-cat__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(13, 36, 64, 0) 30%, rgba(13, 36, 64, 0.85) 100%);
}

.ngs-cat__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px;
	color: #fff;
}

.ngs-cat__count {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: 4px;
}

.ngs-cat__name {
	display: block;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.2;
}

.ngs-cat__link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #8fc4ff;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ngs-cat:hover .ngs-cat__link {
	opacity: 1;
	transform: translateY(0);
}

.ngs-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--ngs-muted);
}

/* ----- Featured products (WooCommerce loop) ------------------------------ */
.ngs-products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 26px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.ngs-products ul.products::before,
.ngs-products ul.products::after {
	display: none !important;
}

.ngs-products ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: #fff !important;
	border: 1px solid var(--ngs-line) !important;
	border-radius: 14px !important;
	padding: 12px !important;
	box-shadow: 0 8px 20px rgba(13, 36, 64, 0.06) !important;
}

.ngs-products ul.products li.product img {
	border-radius: 10px;
	margin-bottom: 4px;
}

/* Center the title, price and View Product button inside featured cards. */
.ngs-products ul.products li.product {
	text-align: center !important;
}

.ngs-products ul.products li.product .woocommerce-loop-product__title {
	padding: 8px 4px 4px !important;
	text-align: center !important;
}

.ngs-products ul.products li.product .fc-loop-foot {
	padding: 0 4px 6px;
	align-items: center !important;
}

.ngs-products ul.products li.product .fc-loop-price {
	text-align: center;
}

/* ----- Benefits ---------------------------------------------------------- */
.ngs-benefits {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

.ngs-benefit {
	text-align: center;
	padding: 30px 22px;
	border: 1px solid var(--ngs-line);
	border-radius: 16px;
	background: #fff;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ngs-benefit:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 32px rgba(13, 36, 64, 0.1);
}

.ngs-benefit__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin-bottom: 16px;
	border-radius: 14px;
	background: var(--ngs-soft);
	color: var(--ngs-blue);
}

.ngs-benefit__title {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--ngs-ink);
	margin-bottom: 6px;
}

.ngs-benefit__text {
	display: block;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ngs-muted);
}

/* ----- CTA banner -------------------------------------------------------- */
.ngs-cta {
	background:
		radial-gradient(circle at 80% 20%, rgba(90, 176, 255, 0.4) 0%, rgba(13, 36, 64, 0) 50%),
		linear-gradient(135deg, var(--ngs-blue) 0%, var(--ngs-navy) 100%);
	color: #fff;
	text-align: center;
	padding: 70px 24px;
}

.ngs-cta__inner {
	max-width: 640px;
	margin: 0 auto;
}

.ngs-cta__title {
	margin: 0 0 12px;
	font-size: 2rem;
	font-weight: 800;
	color: #fff;
}

.ngs-cta__text {
	margin: 0 0 26px;
	font-size: 1.08rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
	.ngs-cat-grid,
	.ngs-products ul.products,
	.ngs-benefits {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.ngs-slide {
		min-height: 360px;
	}
	.ngs-slide__content {
		padding: 0 44px;
	}
	.ngs-slide__title {
		font-size: 1.8rem;
	}
	.ngs-slide__text {
		font-size: 1rem;
	}
	.ngs-slider__arrow {
		width: 42px;
		height: 42px;
		font-size: 22px;
	}
	.ngs-slider__arrow--prev { left: 8px; }
	.ngs-slider__arrow--next { right: 8px; }

	.ngs-hero {
		padding: 60px 18px 64px;
	}
	.ngs-hero__title {
		font-size: 2.1rem;
	}
	.ngs-hero__sub {
		font-size: 1rem;
	}
	.ngs-section {
		padding: 54px 18px;
	}
	.ngs-h2 {
		font-size: 1.7rem;
	}
}

@media (max-width: 520px) {
	.ngs-cat-grid,
	.ngs-products ul.products,
	.ngs-benefits {
		grid-template-columns: 1fr;
	}
	.ngs-cat {
		height: 230px;
	}
	.ngs-slide {
		min-height: 320px;
		text-align: center;
	}
	.ngs-slide__content {
		padding: 0 24px;
	}
	.ngs-slide__content > * {
		max-width: none;
	}
	.ngs-slide__overlay {
		background: linear-gradient(180deg, rgba(13, 36, 64, 0.5), rgba(13, 36, 64, 0.78));
	}
	.ngs-hero__cta .ngs-btn {
		width: 100%;
	}
	/* Show category link on tap targets for touch devices. */
	.ngs-cat__link {
		opacity: 1;
		transform: none;
	}
}
