/**
 * Styles for the [fitrx_home_gym_collections] shortcode's OWN chrome — hero,
 * intent nav, collection headers, packaged sets and promo banners. Product
 * cards are NOT styled here: each row is wrapped in the Shop Page block's
 * `.wp-block-fitrx-blocks-shop-page` class and uses its `.shop-page__*`
 * markup, so it's styled by that block's compiled stylesheet (enqueued as a
 * dependency of this file — see home-gym-collections-helpers.php). The only
 * card-related rules below re-lay out the Shop grid (4-up instead of 3-up,
 * swipeable row on mobile) and undo the Shop wrapper's page-level
 * background/padding.
 *
 * 'Anton' and 'Manrope' are loaded site-wide (fitrx_blocks_enqueue_fonts()
 * in fitrx-blocks.php, plus the theme) — not repeated here.
 */

.fitrx-hgc,
.fitrx-hgc *,
.fitrx-hgc *::before,
.fitrx-hgc *::after {
	box-sizing: border-box;
}

.fitrx-hgc {
	--ink: #181818;
	--red: #ce0e2d;
	--white: #ffffff;
	--light-gray: #f5f5f5;
	--muted-gray: #8c8c8c;
	--line: #ece8e2;

	display: block;
	width: 100%;
	background: var(--light-gray);
	color: var(--ink);
	font-family: 'Manrope', -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
	padding-bottom: 40px;
}

.fitrx-hgc h1,
.fitrx-hgc h2,
.fitrx-hgc h3 {
	font-family: 'Anton', sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.fitrx-hgc p { margin: 0; }
.fitrx-hgc a { text-decoration: none; }
.fitrx-hgc .fitrx-hgc-accent { color: var(--red); }

/* ---- buttons ---- */
.fitrx-hgc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 13px 28px;
	border-radius: 999px;
	background: transparent;
	border: 1px solid;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fitrx-hgc-btn svg { display: block; transition: transform 0.2s ease; }
.fitrx-hgc-btn:hover svg { transform: translateX(3px); }

.fitrx-hgc .fitrx-hgc-btn--outline { color: var(--white); border-color: var(--white); }
.fitrx-hgc .fitrx-hgc-btn--outline:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.fitrx-hgc .fitrx-hgc-btn--light {
	width: 100%;
	padding: 13px 0;
	margin-top: auto;
	color: var(--white);
	border-color: var(--white);
}
.fitrx-hgc .fitrx-hgc-btn--light:hover { background: var(--white); color: var(--ink); }

/* ---- hero ---- */
.fitrx-hgc-hero {
	position: relative;
	width: 100%;
	min-height: 480px;
	background: var(--ink);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 40px 60px 60px;
	margin-bottom: 30px;
	overflow: hidden;
}
/*
 * Every <img> rule on this page is prefixed with .fitrx-hgc: themes (and
 * Elementor) ship `img { height: auto; max-width: 100% }` at equal or
 * higher specificity than a single class, which otherwise silently wins
 * and collapses these absolutely-positioned, object-fit images.
 */
.fitrx-hgc .fitrx-hgc-hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.fitrx-hgc-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(24, 24, 24, 0.2) 0%, rgba(24, 24, 24, 0.9) 100%);
}
.fitrx-hgc-hero-content {
	position: relative;
	z-index: 2;
}
.fitrx-hgc .fitrx-hgc-hero-title {
	color: var(--white);
	font-size: clamp(50px, 20vw, 70px);
	letter-spacing: -0.5px;
	line-height: 1.05;
}
.fitrx-hgc .fitrx-hgc-hero-sub {
	color: var(--muted-gray);
	font-size: 16px;
	margin-top: 14px;
	max-width: 520px;
}

/* ---- find your fit: cards (below the hero) ---- */
.fitrx-hgc-intent {
	max-width: 1320px;
	margin: 0 auto 40px;
	padding: 0 50px;
}
.fitrx-hgc .fitrx-hgc-intent-heading {
	font-weight: 800;
	font-size: 15px;
	text-transform: uppercase;
	text-align: center;
	margin-bottom: 16px;
}
.fitrx-hgc-fit-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
}
.fitrx-hgc .fitrx-hgc-fit-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 16px 40px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 14px;
	color: var(--ink);
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.fitrx-hgc .fitrx-hgc-fit-card:hover,
.fitrx-hgc .fitrx-hgc-fit-card:focus-visible {
	border-color: var(--ink);
	transform: translateY(-2px);
	box-shadow: 0 14px 28px -18px rgba(24, 24, 24, 0.35);
}
.fitrx-hgc-fit-num {
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 1.5px;
	color: var(--red);
}
.fitrx-hgc-fit-label {
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.4px;
	line-height: 1.3;
	text-transform: uppercase;
}
.fitrx-hgc-fit-hint {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--muted-gray);
}
.fitrx-hgc-fit-arrow {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: flex;
	color: var(--ink);
	transition: transform 0.2s ease, color 0.2s ease;
}
.fitrx-hgc-fit-arrow svg { display: block; transform: rotate(90deg); }
.fitrx-hgc-fit-card:hover .fitrx-hgc-fit-arrow {
	color: var(--red);
	transform: translateY(3px);
}

@media (max-width: 1100px) {
	.fitrx-hgc-fit-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	.fitrx-hgc-fit-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.fitrx-hgc .fitrx-hgc-fit-card { padding: 14px 14px 36px; }
	.fitrx-hgc-fit-label { font-size: 12px; }
	.fitrx-hgc-fit-hint { font-size: 12px; }
}

/*
 * ---- find your fit: sticky bar ----
 * position: fixed rather than sticky — sticky only sticks within its
 * parent, and Elementor wraps the shortcode in containers that end long
 * before the page does. `top` is the live bottom edge of the site's own
 * sticky header (which also shrinks on scroll), kept in --fitrx-hgc-bar-top
 * by assets/home-gym-collections.js. Hidden until the cards above have
 * scrolled out of view (.is-visible).
 */
.fitrx-hgc-bar {
	position: fixed;
	top: var(--fitrx-hgc-bar-top, 0px);
	left: 0;
	right: 0;
	z-index: 90;
	background: rgba(245, 245, 245, 0.94);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--line);
	visibility: hidden;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.fitrx-hgc-bar.is-visible {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.fitrx-hgc-bar-inner {
	display: flex;
	justify-content: safe center;
	gap: 8px;
	max-width: 1320px;
	margin: 0 auto;
	padding: 10px 50px;
	overflow-x: auto;
	scrollbar-width: none;
}
.fitrx-hgc-bar-inner::-webkit-scrollbar { display: none; }
/* fade whichever edge still has pills hidden past it */
.fitrx-hgc-bar-inner.can-scroll-right { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.fitrx-hgc-bar-inner.can-scroll-left { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); }
.fitrx-hgc-bar-inner.can-scroll-left.can-scroll-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

.fitrx-hgc .fitrx-hgc-bar-link {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 11.5px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--ink);
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 8px 16px;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fitrx-hgc .fitrx-hgc-bar-link:hover { border-color: var(--ink); }
.fitrx-hgc .fitrx-hgc-bar-link.is-active {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--white);
}

@media (max-width: 600px) {
	.fitrx-hgc-bar-inner { padding: 8px 24px; justify-content: flex-start; }
}

/* anchors land below the site header + the bar, even without JS */
.fitrx-hgc [id] { scroll-margin-top: 80px; }

/* ---- collections ---- */
.fitrx-hgc-collections {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 50px;
}
.fitrx-hgc-collection { padding: 35px 0 50px; }
.fitrx-hgc-collection + .fitrx-hgc-collection { border-top: 1px solid var(--line); }
.fitrx-hgc-collection-header { margin-bottom: 36px; }

.fitrx-hgc .fitrx-hgc-group-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 36px;
}
.fitrx-hgc-group-eyebrow::before {
	content: '';
	flex: 0 0 40px;
	height: 2px;
	background: var(--red);
}

.fitrx-hgc .fitrx-hgc-collection-title {
	font-size: clamp(30px, 4vw, 48px);
	color: var(--ink);
	line-height: 1.15;
}
.fitrx-hgc .fitrx-hgc-collection-tagline {
	font-weight: 700;
	font-size: 18px;
	margin-top: 10px;
}
.fitrx-hgc .fitrx-hgc-collection-desc {
	font-size: 14px;
	line-height: 1.6;
	color: var(--muted-gray);
	margin-top: 8px;
}
.fitrx-hgc .fitrx-hgc-collection-tags {
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--red);
	margin-top: 14px;
}

/* Shop Page cards, re-laid-out for this page (see file header). */
.fitrx-hgc .fitrx-hgc-carousel {
	background: transparent;
	padding: 0;
}
/* 5-up: every collection carries exactly 5 products, so one full row */
.fitrx-hgc .fitrx-hgc-carousel .shop-page__grid {
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
}
/* safety net for a long price (sale price + regular): wrap, never overflow */
.fitrx-hgc .fitrx-hgc-carousel .shop-page__foot { flex-wrap: wrap; }

.fitrx-hgc-carousel-nav {
	display: none;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}
.fitrx-hgc-carousel-btn {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	background: var(--white);
	border: 1px solid var(--line);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;
}
.fitrx-hgc-carousel-btn:hover { background: var(--light-gray); }
.fitrx-hgc-carousel-btn svg { display: block; }
.fitrx-hgc-carousel-btn.is-prev svg { transform: rotate(180deg); }

/*
 * Below 1300px five cards (< ~225px each) no longer fit price + "View\n * Product" side by side, and any smaller
 * grid (2-up, 3-up) would strand the fifth card alone on its own row —
 * so from here down the row becomes a swipeable carousel with arrows
 * instead: ~3.3 cards visible on tablet (the peek signals there's more),
 * one-and-a-bit on phones.
 */
@media (max-width: 1299px) {
	.fitrx-hgc .fitrx-hgc-carousel .shop-page__grid {
		display: flex;
		overflow-x: auto;
		gap: 20px;
		/* room for the card's hover lift, which overflow-x would otherwise clip */
		padding: 6px 0 4px;
		cursor: grab;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.fitrx-hgc .fitrx-hgc-carousel .shop-page__grid::-webkit-scrollbar { display: none; }
	.fitrx-hgc .fitrx-hgc-carousel .shop-page__grid.is-dragging {
		cursor: grabbing;
		scroll-snap-type: none;
	}
	.fitrx-hgc .fitrx-hgc-carousel .shop-page__card {
		flex: 0 0 clamp(220px, 29%, 300px);
		scroll-snap-align: start;
	}
	.fitrx-hgc-carousel-nav { display: flex; }
}

@media (max-width: 600px) {
	.fitrx-hgc .fitrx-hgc-carousel .shop-page__card { flex-basis: 82%; }
}

/* ---- packaged sets ---- */
.fitrx-hgc-sets {
	background: var(--ink);
	padding: 80px 0 90px;
}
.fitrx-hgc-sets-inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 50px;
}
.fitrx-hgc-sets-header {
	max-width: 720px;
	margin-bottom: 40px;
}
.fitrx-hgc .fitrx-hgc-sets-eyebrow {
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 14px;
}
.fitrx-hgc .fitrx-hgc-sets-heading {
	font-size: clamp(36px, 5.5vw, 64px);
	color: var(--white);
	line-height: 1.05;
}
.fitrx-hgc .fitrx-hgc-sets-sub {
	font-size: 15px;
	line-height: 1.6;
	color: var(--muted-gray);
	margin-top: 16px;
}

.fitrx-hgc-set-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.fitrx-hgc-set-card {
	background: #1e1e1e;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.fitrx-hgc-set-image {
	display: block;
	position: relative;
	background: var(--light-gray);
	aspect-ratio: 1 / 1;
	width: 100%;
}
.fitrx-hgc .fitrx-hgc-set-image img {
	position: absolute;
	top: 6%;
	left: 6%;
	width: 88%;
	height: 88%;
	max-width: none;
	object-fit: contain;
}
.fitrx-hgc-set-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.fitrx-hgc-set-tag {
	display: inline-block;
	width: fit-content;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--white);
	background: var(--red);
	border-radius: 999px;
	padding: 8px 16px;
	margin-bottom: 16px;
}
.fitrx-hgc-set-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
}
.fitrx-hgc .fitrx-hgc-set-name {
	font-size: 22px;
	color: var(--white);
	line-height: 1.2;
}
.fitrx-hgc-set-subtitle {
	font-weight: 500;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--muted-gray);
}
.fitrx-hgc-set-packaged {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 13.5px;
	color: var(--white);
}
.fitrx-hgc-set-packaged svg { flex: 0 0 auto; display: block; }
.fitrx-hgc .fitrx-hgc-set-link {
	font-weight: 500;
	font-size: 13px;
	color: var(--muted-gray);
	text-decoration: underline;
	margin-top: 10px;
	margin-bottom: 22px;
	width: fit-content;
}
.fitrx-hgc .fitrx-hgc-set-link:hover { color: var(--white); }

@media (max-width: 1024px) {
	.fitrx-hgc-set-grid { grid-template-columns: 1fr; }
	.fitrx-hgc-set-card { flex-direction: row; align-items: stretch; }
	.fitrx-hgc-set-image { flex: 0 0 50%; aspect-ratio: auto; }
	.fitrx-hgc-set-body { flex: 0 0 50%; }
}

@media (max-width: 640px) {
	.fitrx-hgc-set-card { flex-direction: column; }
	.fitrx-hgc-set-image { flex: 0 0 auto; aspect-ratio: 1 / 1; }
	.fitrx-hgc-set-body { flex: 1; }
}

/* ---- promo banners ---- */
.fitrx-hgc .fitrx-hgc-promo {
	position: relative;
	display: flex;
	align-items: center;
	width: calc(100% - 100px);
	max-width: 1220px;
	min-height: 400px;
	margin: 50px auto;
	background: var(--ink);
	border-radius: 18px;
	overflow: hidden;
	isolation: isolate;
}
.fitrx-hgc .fitrx-hgc-promo-media {
	position: absolute;
	inset: 0;
	z-index: -1;
	min-height: 0;
	background: var(--ink);
}
.fitrx-hgc .fitrx-hgc-promo-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(24, 24, 24, 0.97) 0%, rgba(24, 24, 24, 0.88) 32%, rgba(24, 24, 24, 0.35) 58%, rgba(24, 24, 24, 0) 75%);
}
.fitrx-hgc .fitrx-hgc-promo-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: right center;
}
.fitrx-hgc .fitrx-hgc-promo-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 560px;
	padding: 56px 64px;
	color: var(--white);
}
.fitrx-hgc .fitrx-hgc-promo-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 18px;
}
.fitrx-hgc .fitrx-hgc-promo-eyebrow::before {
	content: '';
	flex: 0 0 40px;
	height: 2px;
	background: var(--red);
}
.fitrx-hgc .fitrx-hgc-promo-heading {
	font-size: clamp(32px, 3.4vw, 48px);
	color: var(--white);
	line-height: 1.08;
	margin-bottom: 14px;
}
.fitrx-hgc .fitrx-hgc-promo-text {
	color: #b3b3b3;
	font-size: 15px;
	line-height: 1.6;
	margin-bottom: 28px;
	max-width: 420px;
}
.fitrx-hgc-promo-content .fitrx-hgc-btn { align-self: flex-start; }

@media (max-width: 640px) {
	.fitrx-hgc .fitrx-hgc-promo {
		flex-direction: column;
		align-items: stretch;
		width: calc(100% - 48px);
		min-height: 0;
	}
	.fitrx-hgc .fitrx-hgc-promo-media {
		position: relative;
		inset: auto;
		z-index: 0;
		order: -1;
		aspect-ratio: 4 / 3;
	}
	.fitrx-hgc .fitrx-hgc-promo-media::after {
		background: linear-gradient(180deg, rgba(24, 24, 24, 0) 55%, rgba(24, 24, 24, 1) 100%);
	}
	.fitrx-hgc .fitrx-hgc-promo-media img { object-position: center; }
	.fitrx-hgc .fitrx-hgc-promo-content {
		max-width: none;
		padding: 8px 24px 32px;
	}
}

/* ---- small screens ---- */
@media (max-width: 600px) {
	.fitrx-hgc-hero { padding: 30px 24px 40px; }
	.fitrx-hgc .fitrx-hgc-hero-title { font-size: 38px; }
	.fitrx-hgc-intent { padding: 0 24px; }
	.fitrx-hgc-collections { padding: 0 24px; }
	.fitrx-hgc-sets { padding: 56px 0 64px; }
	.fitrx-hgc-sets-inner { padding: 0 24px; }
}
