/*
 * Product page sections under the hero: Tech & Features (cards + icons) and
 * the lifestyle Gallery (3-column grid, swipe row with a peek on phones).
 */

.njf-tech,
.njf-life {
	--njf-x-fg: var(--njf-fg, #111);

	padding: 64px 0;
	color: var(--njf-x-fg);
}

.njf-tech {
	background: var(--njf-surface, color-mix(in srgb, var(--njf-x-fg) 6%, var(--njf-bg, #fff)));
}

.njf-tech .njf-x__inner,
.njf-life .njf-x__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

.njf-tech .njf-x__heading,
.njf-life .njf-x__heading {
	margin: 0 0 32px;
	color: var(--njf-x-fg);
}

.njf-life .njf-x__heading {
	margin-bottom: 24px;
}

.njf-tech .njf-tech__cards,
.njf-tech .njf-tech__icons,
.njf-life .njf-life__grid {
	margin: 0;
	padding: 0;
	list-style: none;
}

.njf-tech .njf-tech__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin-bottom: 48px;
}

.njf-tech .njf-tech__cards:last-child {
	margin-bottom: 0;
}

.njf-tech .njf-tech__card {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	aspect-ratio: 3 / 4;
	background: #222;
}

.njf-tech .njf-tech__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 75%) 0%, rgb(0 0 0 / 0%) 55%);
	pointer-events: none;
}

.njf-tech .njf-tech__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.njf-tech .njf-tech__overlay {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	padding: 20px;
}

.njf-tech .njf-tech__label {
	margin: 0 0 8px;
	font-size: 1.33rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
}

.njf-tech .njf-tech__text {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
	color: rgb(255 255 255 / 85%);
}

.njf-tech .njf-tech__icons {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 56px 24px;
	max-width: 75%;
	margin-inline: auto;
}

.njf-tech .njf-tech__icon-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	color: color-mix(in srgb, var(--njf-x-fg) 66%, transparent);
}

.njf-tech .njf-tech__icon {
	display: flex;
	color: var(--njf-x-fg);
}

.njf-life .njf-life__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.njf-life .njf-life__cell {
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1 / 1;
}

.njf-life .njf-life__cell img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 749px) {
	.njf-tech,
	.njf-life {
		padding: 40px 0;
	}

	.njf-tech .njf-x__inner,
	.njf-life .njf-x__inner {
		padding: 0 16px;
	}

	.njf-tech .njf-tech__cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.njf-tech .njf-tech__icons {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 16px;
		max-width: 100%;
	}

	.njf-life .njf-life__grid {
		display: flex;
		gap: 12px;
		margin-inline: -16px;
		padding: 0 60px 0 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-left: 16px;
		scrollbar-width: none;
	}

	.njf-life .njf-life__grid::-webkit-scrollbar {
		display: none;
	}

	.njf-life .njf-life__cell {
		flex: 0 0 78%;
		border-radius: 8px;
		scroll-snap-align: start;
	}
}

/* Product reviews section (Klaviyo Reviews or WooCommerce reviews). */
.njf-reviews {
	scroll-margin-top: calc(var(--njf-announcement-height, 0px) + 96px);
	padding: 48px 28px;
}

@media (max-width: 749px) {
	.njf-reviews {
		padding: 40px 16px;
	}
}

.njf-reviews .njf-reviews__heading {
	margin: 0 0 24px;
	color: inherit;
	font-size: clamp(20px, 1.5vw, 24px);
	font-weight: 700;
}

.njf-reviews .njf-reviews__note {
	opacity: 0.7;
	font-size: 13px;
}

/* Klaviyo star snippets under the product title and on cards. */
.njf-ph .njf-ph__rating--klaviyo:empty,
.njf-card .njf-card__rating--klaviyo:empty {
	display: none;
}

.njf-card .njf-card__rating--klaviyo {
	margin-top: 6px;
	font-size: 11px;
}

/*
 * Klaviyo Reviews on a dark page (adapted from NJF Golf's pdp-hero): Klaviyo's widget sets its own dark text
 * inline, so light text, light buttons and dark inputs are forced here. Stars (SVG) keep Klaviyo's colour.
 */
.njf-reviews #klaviyo-reviews-all,
.njf-reviews #klaviyo-reviews-all *:not(svg, svg *) {
	color: var(--njf-fg, #fff) !important;
}

.njf-reviews #klaviyo-reviews-all button,
.njf-reviews #klaviyo-reviews-all [class*="btn"],
.njf-reviews #klaviyo-reviews-all [class*="cta"],
.njf-reviews #klaviyo-reviews-all [class*="write"] {
	border-color: #ccc !important;
	background-color: var(--njf-fg, #fff) !important;
	color: var(--njf-bg, #000) !important;
}

.njf-reviews #klaviyo-reviews-all button *:not(svg, svg *) {
	color: inherit !important;
}

.njf-reviews #klaviyo-reviews-all select,
.njf-reviews #klaviyo-reviews-all select option {
	border: 1px solid #ccc !important;
	border-radius: 4px !important;
	background-color: var(--njf-fg, #fff) !important;
	color: var(--njf-bg, #000) !important;
}

.njf-reviews #klaviyo-reviews-all input {
	border: 1px solid #555 !important;
	border-radius: 4px !important;
	background-color: #1c1c1c !important;
	color: var(--njf-fg, #fff) !important;
}

.njf-reviews #klaviyo-reviews-all input::placeholder {
	opacity: 1 !important;
	color: #aaa !important;
}
