/* =====================================================================
   Latest Releases — Moving Card Carousel
   (inc/hooks.php — gzfc_trending_strip())

   Every rule in this file is scoped under .gzfc-trending-strip, so it can
   never affect the Feature Slider, any other homepage section, or any
   other card listing on the site (archives, related games, widgets…).

   All sizing/speed/count values come in as inline CSS custom properties
   on the <section> itself (see gzfc_trending_strip()):
     --gzfc-trend-card-w      card width, px
     --gzfc-trend-visible     number of cards visible at once
     --gzfc-trend-speed       seconds per full loop / autoplay tick
     --gzfc-trend-marquee-speed  Running Name animation speed, seconds
     --gzfc-trend-marquee-scale  Running Name Bar Size, a plain percentage
                                  (default 100). Used as calc(base * scale
                                  / 100) everywhere the bar/text/accent are
                                  sized — see .gzfc-trending-marquee-* below.

   Carousel/Card Size overrides (Customizer: "Carousel Area & Card Size",
   all optional — added in the version that introduced this block). Each
   one is ONLY present on the <section> when the site owner actually set
   it (0/"Auto" in the Customizer means the property is left out of the
   inline style entirely), so every rule below that reads one of these
   uses plain `var(--name)` with no hard-coded fallback: an absent
   property naturally resolves to the *previous* declaration for that
   same CSS property earlier in the cascade (the automatic sizing further
   up in this file), never breaking or overriding anything when unset.
     --gzfc-trend-carousel-w(-tablet|-mobile)  fixed width for the whole
                                                carousel box, px
     --gzfc-trend-carousel-h(-tablet|-mobile)  fixed height for the whole
                                                carousel box, px
     --gzfc-trend-card-w-tablet / -mobile      per-breakpoint override of
                                                --gzfc-trend-card-w above
     --gzfc-trend-card-h(-tablet|-mobile)      forces every card to this
                                                exact height, px
     --gzfc-trend-gap(-tablet|-mobile)         gap between cards in this
                                                strip only, px
   ===================================================================== */

.gzfc-trending-strip {
	padding: 40px 0 8px;
	/* Same 4-color default palette as the Feature Slider / Hero Section's
	   own Animated Multi-Color Border (assets/css/child.css), reused here
	   for the heading line + Site Name animated-text effects so they read
	   as the same visual family across the theme. */
	--gzfc-trend-c1: #22c55e;
	--gzfc-trend-c2: #eab308;
	--gzfc-trend-c3: #3b82f6;
	--gzfc-trend-c4: #ef4444;
}

/* ---------------------------------------------------------------------
   Shared "viewport" frame used by both the Moving Animation (marquee)
   mode and the Horizontal Scroll Carousel mode.

   Width fix (v1.12.0): this used to CAP itself to exactly
   card-width * visible-count, which made the strip noticeably narrower
   than the full content area the normal Post Cards grid below it uses.
   Now it always fills the full .gzf-container width (same as every
   other homepage section) and only falls back to the old "just enough
   room for N cards" calculation on the rare occasion someone sets
   Number of Visible Cards low enough that it would be narrower than
   the container — min() picks whichever is smaller, so the strip is
   never wider than the page, but is never artificially narrow either.
   At the default Card Size (200px) + Number of Visible Cards (6) this
   comfortably shows 5-6 cards on a normal desktop container, more on
   very wide screens, and fewer on tablet/mobile as space shrinks —
   the visible count adjusts itself with the available width with no
   extra breakpoints needed.
   --------------------------------------------------------------------- */
.gzfc-trending-viewport {
	position: relative;
	width: 100%;
	max-width: min(
		100%,
		calc(
			(var(--gzfc-trend-card-w, 200px) * var(--gzfc-trend-visible, 6))
			+ (var(--gzfc-trend-gap, var(--gzf-card-gap, 18px)) * (var(--gzfc-trend-visible, 6) - 1))
			+ 44px /* the viewport's own left+right padding, below */
		)
	);
	margin: 0 auto;
	overflow: hidden;
	background: var(--gzf-color-surface);
	border: 1px solid var(--gzf-color-border);
	border-radius: 14px;
	padding: 18px 22px;
}

.gzfc-trending-track {
	display: flex;
	align-items: stretch;
	/* Falls back to the site-wide card gap when no strip-specific Gap /
	   Spacing override is set (Customizer > Latest Releases Strip). */
	gap: var(--gzfc-trend-gap, var(--gzf-card-gap, 18px));
	/* Used only by Card Skin Auto-Rotate (assets/js/latest-releases-
	   carousel.js): a brief opacity dip while the section's cardstyle-*
	   class is swapped, for a smooth crossfade instead of an instant
	   jump. No-op otherwise — opacity simply never changes. */
	transition: opacity .35s ease;
}
.gzfc-trending-track > .gzf-card,
.gzfc-trending-track-dup > .gzf-card {
	flex: 0 0 var(--gzfc-trend-card-w, 220px);
	width: var(--gzfc-trend-card-w, 220px);
}
/* Keeps the duplicated (aria-hidden) card set from adding its own flex
   box — its cards become direct flex items of the track above, exactly
   like the real set, so the two halves line up pixel-for-pixel. */
.gzfc-trending-track-dup { display: contents; }

/* ---------------------------------------------------------------------
   Mode: Moving Animation (continuous ticker/marquee).
   The track is rendered twice as wide as one card set (real + duplicate),
   then animated exactly -50% so it loops with no visible seam.
   --------------------------------------------------------------------- */
.gzfc-trending--mode-marquee .gzfc-trending-track {
	width: max-content;
	animation: gzfc-trend-marquee var(--gzfc-trend-speed, 30s) linear infinite;
}
.gzfc-trending--mode-marquee.gzfc-trending--dir-left .gzfc-trending-track {
	animation-direction: normal;
}
.gzfc-trending--mode-marquee.gzfc-trending--dir-right .gzfc-trending-track {
	animation-direction: reverse;
}
@keyframes gzfc-trend-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* Pause on hover/keyboard focus so people can actually read a card and
   click it, and while the tab is hidden (saves a background reflow). */
.gzfc-trending--mode-marquee .gzfc-trending-viewport:hover .gzfc-trending-track,
.gzfc-trending--mode-marquee .gzfc-trending-viewport:focus-within .gzfc-trending-track,
.gzfc-trending-strip.gzfc-trending--paused .gzfc-trending-track {
	animation-play-state: paused;
}

/* Respect the user's OS-level reduced-motion preference: keep the strip,
   just don't move it — falls back to a simple horizontal scroll. */
@media (prefers-reduced-motion: reduce) {
	.gzfc-trending--mode-marquee .gzfc-trending-track {
		animation: none;
		overflow-x: auto;
	}
}

/* ---------------------------------------------------------------------
   Header block: small animated line + section title + Site Name line.
   Customizer: Hero > Latest Releases Strip.

   Bound to the exact same max-width/centering formula as
   .gzfc-trending-viewport below, so the title/line/site-name always sit
   directly above the cards — same position, same width — instead of
   spanning the full section width. Reuses the CSS custom properties
   already declared inline on the parent <section> (--gzfc-trend-card-w /
   --gzfc-trend-visible / --gzfc-trend-gap), so it automatically follows
   whatever Card Width / Visible Count / Gap is configured, with no extra
   markup or JS needed to keep it aligned.
   --------------------------------------------------------------------- */
.gzfc-trending-header {
	width: 100%;
	max-width: min(
		100%,
		calc(
			(var(--gzfc-trend-card-w, 200px) * var(--gzfc-trend-visible, 6))
			+ (var(--gzfc-trend-gap, var(--gzf-card-gap, 18px)) * (var(--gzfc-trend-visible, 6) - 1))
			+ 44px
		)
	);
	margin: 0 auto 14px;
}
.gzfc-trending-header .gzf-section-title { margin-bottom: 6px; }

/* Small clean line directly above the heading. Reuses the same 4-color
   palette as the Feature Slider / Hero Section Animated Border, just
   painted as a thin gradient bar instead of a ring. */
.gzfc-trending-heading-line {
	width: 46px;
	height: 3px;
	margin: 0 0 10px;
	border-radius: 3px;
	background-image: linear-gradient(
		90deg,
		var(--gzfc-trend-c1, #22c55e),
		var(--gzfc-trend-c2, #eab308),
		var(--gzfc-trend-c3, #3b82f6),
		var(--gzfc-trend-c4, #ef4444),
		var(--gzfc-trend-c1, #22c55e)
	);
	background-size: 300% 100%;
	animation: gzfc-trend-color-sweep 6s linear infinite;
}

/* Site Name line — shown ONCE (no repeated/duplicated text), directly
   above the cards, animated via one of 5 selectable effects (on the text
   itself) plus its own small animated accent bar right underneath it —
   the actual "line" — so the feature reads as a line, not just colored
   text, and always sits in the last position before the cards start. */
.gzfc-trending-marquee-line {
	display: flex;
	flex-direction: column;
	/* stretch (not flex-start): the bar + accent line fill the WHOLE
	   header width, which is bound to the cards container's width above. */
	align-items: stretch;
	width: 100%;
	margin: 0 0 14px; /* space between the line and the cards below it */
	/* Running Name Bar Size control (Customizer > Hero > Latest Releases
	   Strip). --gzfc-trend-marquee-scale is a plain percentage number
	   (default 100); every sized property below is expressed as
	   calc(base * scale / 100) so the whole bar — padding, text and
	   accent line — grows or shrinks together as one unit. */
	gap: calc(6px * var(--gzfc-trend-marquee-scale, 100) / 100);
	line-height: 1.4;
}
/* Hidden state used only while a site owner is actively typing into an
   empty Site Name field inside the Customizer preview (see
   assets/js/site-name-live-preview.js) — kept in the DOM, just not
   painted, so it can appear instantly with no reload the moment text is
   typed. On the normal front end this class is never added: the whole
   block is left out of the markup entirely when the field is empty. */
.gzfc-trending-marquee-line--hidden,
.gzfc-trending-header--hidden {
	display: none;
}
.gzfc-trending-marquee-text {
	display: inline-block;
	font-size: calc(13px * var(--gzfc-trend-marquee-scale, 100) / 100);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1;
}
/* The mini container / bar that visually holds the Site Name. Every
   Animation Style renders INSIDE this bar — it never shows as loose
   plain text sitting directly on the section background. Sized to the
   text itself (compact, modern pill) for the static effects; the
   Running Text effect below gives it a fixed compact width instead, so
   the name has room to actually scroll. Reuses the exact same card
   surface/border tokens as the rest of the theme (see child.css /
   content-surface.css) so it always matches the current Card Design and
   the Dark/Light skin toggle automatically — no separate color choice
   needed, and no light theme run over dark or vice versa. */
.gzfc-trending-marquee-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: calc(7px * var(--gzfc-trend-marquee-scale, 100) / 100) calc(16px * var(--gzfc-trend-marquee-scale, 100) / 100);
	border-radius: 999px;
	background: var(--gzf-color-card-bg, var(--gzf-color-surface, #1c1c20));
	border: 1px solid var(--gzf-color-border, rgba(255, 255, 255, .12));
}
/* The animated line itself — always the same lightweight gradient sweep
   regardless of which text effect is selected above, so there is always
   a visible moving line directly above the cards, in sync with the same
   4-color palette used everywhere else in this strip. Pure background-
   position animation: paints only, never triggers layout/reflow. */
.gzfc-trending-marquee-accent {
	display: block;
	width: 100%;
	max-width: 100%;
	height: calc(2px * var(--gzfc-trend-marquee-scale, 100) / 100);
	border-radius: 2px;
	background-image: linear-gradient(
		90deg,
		var(--gzfc-trend-c1, #22c55e),
		var(--gzfc-trend-c2, #eab308),
		var(--gzfc-trend-c3, #3b82f6),
		var(--gzfc-trend-c4, #ef4444),
		var(--gzfc-trend-c1, #22c55e)
	);
	background-size: 300% 100%;
	animation: gzfc-trend-color-sweep var(--gzfc-trend-marquee-speed, 18s) linear infinite;
}

@keyframes gzfc-trend-color-sweep {
	to { background-position: -300% 0; }
}

/* Effect 1: Color Flow — multi-color gradient text, continuously flowing. */
.gzfc-trending-marquee-effect--color-flow .gzfc-trending-marquee-text {
	background-image: linear-gradient(
		90deg,
		var(--gzfc-trend-c1, #22c55e),
		var(--gzfc-trend-c2, #eab308),
		var(--gzfc-trend-c3, #3b82f6),
		var(--gzfc-trend-c4, #ef4444),
		var(--gzfc-trend-c1, #22c55e)
	);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: gzfc-trend-color-sweep var(--gzfc-trend-marquee-speed, 18s) linear infinite;
}

/* Effect 2: Glow — soft pulsing neon glow in a single accent color. */
.gzfc-trending-marquee-effect--glow .gzfc-trending-marquee-text {
	color: var(--gzfc-trend-c3, var(--gzf-color-primary, #ff4d1c));
	animation: gzfc-trend-glow calc(var(--gzfc-trend-marquee-speed, 18s) / 3) ease-in-out infinite alternate;
}
@keyframes gzfc-trend-glow {
	from { text-shadow: 0 0 3px currentColor, 0 0 1px currentColor; }
	to   { text-shadow: 0 0 12px currentColor, 0 0 5px currentColor; }
}

/* Effect 3: Pulse — gentle breathing scale/opacity, no color change. */
.gzfc-trending-marquee-effect--pulse .gzfc-trending-marquee-text {
	color: var(--gzf-color-text);
	animation: gzfc-trend-pulse calc(var(--gzfc-trend-marquee-speed, 18s) / 4) ease-in-out infinite;
}
@keyframes gzfc-trend-pulse {
	0%, 100% { opacity: .6; transform: scale(1); }
	50%      { opacity: 1;  transform: scale(1.04); }
}

/* Effect 4: Gradient Shift — diagonal multi-color gradient, slowly panning. */
.gzfc-trending-marquee-effect--gradient-shift .gzfc-trending-marquee-text {
	background-image: linear-gradient(
		120deg,
		var(--gzfc-trend-c3, #3b82f6),
		var(--gzfc-trend-c1, #22c55e),
		var(--gzfc-trend-c2, #eab308),
		var(--gzfc-trend-c4, #ef4444)
	);
	background-size: 260% 260%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: gzfc-trend-gradient-shift var(--gzfc-trend-marquee-speed, 18s) ease infinite;
}
@keyframes gzfc-trend-gradient-shift {
	0%, 100% { background-position: 0% 50%; }
	50%      { background-position: 100% 50%; }
}

/* Effect 5: Shimmer — a soft bright highlight periodically sweeping across
   an otherwise flat-colored line. */
.gzfc-trending-marquee-effect--shimmer .gzfc-trending-marquee-text {
	background-image: linear-gradient(
		100deg,
		var(--gzf-color-text-muted, var(--gzf-color-text)) 35%,
		var(--gzfc-trend-c2, #eab308) 48%,
		#fff 50%,
		var(--gzfc-trend-c2, #eab308) 52%,
		var(--gzf-color-text-muted, var(--gzf-color-text)) 65%
	);
	background-size: 260% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: gzfc-trend-shimmer var(--gzfc-trend-marquee-speed, 18s) linear infinite;
}
@keyframes gzfc-trend-shimmer {
	to { background-position: -260% 0; }
}

/* Effect 6: Running Text — the name itself stays plain (readable, no
   color/opacity change) and instead scrolls smoothly and continuously
   across the compact bar, like a small ticker. Classic transform-only
   marquee technique: `padding-left: 100%` starts the text just off the
   right edge of the bar, then the animation moves it left by exactly its
   OWN width, so the full trip (bar width + text width) is always a
   smooth, complete pass with no jump/reset — GPU-composited
   (transform only), never triggers layout/reflow. The bar gets a fixed,
   compact width + overflow:hidden ONLY for this effect (every other
   effect keeps the bar sized to fit the text, with normal overflow, so a
   Pulse/Glow effect's slight scale/glow is never clipped). */
.gzfc-trending-marquee-effect--marquee-scroll .gzfc-trending-marquee-bar {
	width: 100%;
	justify-content: flex-start; /* text starts off-bar and scrolls through */
	overflow: hidden;
}
.gzfc-trending-marquee-effect--marquee-scroll .gzfc-trending-marquee-text {
	display: inline-block;
	/* pre: the repeated name + separator string (printed by PHP, see
	   gzfc_trending_strip()) keeps its spacing. The string is two identical
	   halves, so moving it left by exactly 50% loops with no gap or jump. */
	white-space: pre;
	will-change: transform;
	/* --gzfc-mq-half = number of name copies in one half, so the on-screen
	   speed stays the same however wide the container or long the name.
	   Speed setting (default 18s) = seconds per name pass — slow & smooth. */
	animation: gzfc-trend-marquee-run calc(var(--gzfc-trend-marquee-speed, 18s) * var(--gzfc-mq-half, 1)) linear infinite;
}
/* Pause while the pointer is over the line (same behaviour as the cards). */
.gzfc-trending-marquee-effect--marquee-scroll:hover .gzfc-trending-marquee-text {
	animation-play-state: paused;
}
@keyframes gzfc-trend-marquee-run {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* Brief "sync" pulse fired by JS on both the heading line and the site
   name line at the exact moment Card Skin Auto-Rotate swaps styles (see
   assets/js/latest-releases-carousel.js), so the two visibly update
   together with the cards rather than sitting static while the cards
   change underneath them. */
.gzfc-trending--skin-pulse {
	animation-duration: .6s !important;
	filter: brightness(1.35);
	transition: filter .6s ease;
}

@media (prefers-reduced-motion: reduce) {
	.gzfc-trending-heading-line,
	.gzfc-trending-marquee-accent,
	.gzfc-trending-marquee-effect--color-flow .gzfc-trending-marquee-text,
	.gzfc-trending-marquee-effect--glow .gzfc-trending-marquee-text,
	.gzfc-trending-marquee-effect--pulse .gzfc-trending-marquee-text,
	.gzfc-trending-marquee-effect--gradient-shift .gzfc-trending-marquee-text,
	.gzfc-trending-marquee-effect--shimmer .gzfc-trending-marquee-text {
		animation: none;
	}
	/* Running Text: freeze in place rather than leaving it scrolled
	   off-screen — show it flush against the bar's left edge, trimmed
	   with an ellipsis if it doesn't fit, same as any other static label. */
	.gzfc-trending-marquee-effect--marquee-scroll .gzfc-trending-marquee-text {
		animation: none;
		transform: none;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* ---------------------------------------------------------------------
   Mode: Horizontal Scroll Carousel (Moving Animation OFF).
   Manual/auto scroll with snap points + prev/next arrow buttons.
   --------------------------------------------------------------------- */
.gzfc-trending--mode-scroll .gzfc-trending-viewport {
	overflow: visible; /* the track itself scrolls, not the frame */
}
/* prev arrow + track + next arrow (moved into this row so the Site Name
   line can sit above them inside the same container). */
.gzfc-trending-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.gzfc-trending--mode-scroll .gzfc-trending-track {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
}
.gzfc-trending--mode-scroll .gzfc-trending-track::-webkit-scrollbar { display: none; }
.gzfc-trending--mode-scroll .gzfc-trending-track > .gzf-card { scroll-snap-align: start; }

.gzfc-trending-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--gzf-color-border);
	background: var(--gzf-color-card-bg);
	color: var(--gzf-color-text);
	cursor: pointer;
	transition: background-color var(--gzf-transition, .2s), border-color var(--gzf-transition, .2s), color var(--gzf-transition, .2s);
}
.gzfc-trending-nav:hover,
.gzfc-trending-nav:focus-visible {
	background: var(--gzf-color-primary);
	border-color: var(--gzf-color-primary);
	color: #fff;
}
.gzfc-trending-nav .gzf-icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------------
   Mode: Static Grid — Moving Animation OFF + "Static Grid" chosen.
   Reuses the theme's original (pre-1.9.0) grid layout untouched.
   --------------------------------------------------------------------- */
.gzfc-trending-strip .gzf-post-grid--compact {
	grid-template-columns: repeat(4, 1fr);
	background: var(--gzf-color-surface);
	border: 1px solid var(--gzf-color-border);
	border-radius: 14px;
	padding: 18px 22px;
}

/* ---------------------------------------------------------------------
   Responsive.
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.gzfc-trending-strip .gzf-post-grid--compact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.gzfc-trending-strip .gzf-post-grid--compact { grid-template-columns: 1fr; }
}

/* "Disable Moving Animation on Mobile" — on small screens this stops the
   continuous marquee loop and turns the SAME cards into a plain manual
   horizontal swipe strip instead (no JS needed: native scroll-snap).
   The duplicated (aria-hidden) card set from marquee mode is dropped at
   this width since there is nothing left to loop. Scroll-carousel and
   static-grid modes are already motion-free, so they are unaffected —
   gzfc-carousel.js also stops any JS Auto Play at this width. */
@media (max-width: 782px) {
	.gzfc-trending--mode-marquee.gzfc-trending--mobile-static .gzfc-trending-track {
		width: auto;
		animation: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.gzfc-trending--mode-marquee.gzfc-trending--mobile-static .gzfc-trending-track::-webkit-scrollbar { display: none; }
	.gzfc-trending--mode-marquee.gzfc-trending--mobile-static .gzfc-trending-track > .gzf-card { scroll-snap-align: start; }
	.gzfc-trending--mode-marquee.gzfc-trending--mobile-static .gzfc-trending-track-dup { display: none; }
}

/* =====================================================================
   Carousel Area & Card Size — full manual overrides
   (Customizer: Hero > Latest Releases Strip > "Carousel Area & Card Size")

   Every rule in this block is gated behind an attribute-presence
   selector — e.g. .gzfc-trending-strip[style*="--gzfc-trend-carousel-w:"]
   — rather than a var() fallback value. gzfc_trending_strip() only ever
   writes a custom property onto the <section> when the matching
   Customizer field is NOT left on "Auto" (0), so a selector like that
   simply never matches while every field is Auto, and the automatic
   sizing rules earlier in this file are the only ones that apply — this
   feature is 100% opt-in and cannot change how an existing site looks
   until someone deliberately sets a size.

   None of this touches .gzfc-trending-track's flex/animation/scroll
   behavior, the marquee @keyframes, the scroll-snap/Auto Play JS, or the
   "load latest posts" query — it only ever adds a width/height/gap
   declaration on top of what is already there, so auto-scroll,
   animation, speed, direction and post loading all keep working exactly
   as before no matter what is set here.
   ===================================================================== */

/* --- Carousel Area Width / Height — Desktop. -------------------------
   max-width uses min(100%, …) rather than a plain assignment so a value
   larger than the available container width can never force horizontal
   page scroll — it just gets capped to the container, same safety net
   the original automatic sizing above already relies on. */
.gzfc-trending-strip[style*="--gzfc-trend-carousel-w:"] .gzfc-trending-header,
.gzfc-trending-strip[style*="--gzfc-trend-carousel-w:"] .gzfc-trending-viewport {
	width: 100%;
	max-width: min( 100%, var(--gzfc-trend-carousel-w) );
}
.gzfc-trending-strip[style*="--gzfc-trend-carousel-h:"] .gzfc-trending-viewport {
	height: var(--gzfc-trend-carousel-h);
	overflow-y: hidden;
}

/* --- Card Width — Desktop is already handled by --gzfc-trend-card-w
   further up (always present); Card Height — Desktop override. Applies
   to every Card Style uniformly: the image box gets the exact height
   (image keeps covering it via the framework's own object-fit: cover),
   and for the two styles whose card-level aspect-ratio lives on the
   outer .gzf-card itself (Style 2, Style 3) that outer box is matched
   to the same height so the artwork still fills it edge-to-edge. --- */
.gzfc-trending-strip[style*="--gzfc-trend-card-h:"] .gzf-card-media {
	height: var(--gzfc-trend-card-h) !important;
}
.gzfc-trending-strip[style*="--gzfc-trend-card-h:"].gzfc-trending--cardstyle-style2 .gzf-card,
.gzfc-trending-strip[style*="--gzfc-trend-card-h:"].gzfc-trending--cardstyle-style3 .gzf-card {
	height: var(--gzfc-trend-card-h) !important;
}

/* --- Gap / Spacing — Tablet / Mobile (Desktop already applied above
   via --gzfc-trend-gap in .gzfc-trending-track and the viewport's width
   calc). ---------------------------------------------------------------
   --- Carousel Area Width / Height — Tablet. --------------------------
   --- Card Width — Tablet. --------------------------------------------
   --- Card Height — Tablet. -------------------------------------------- */
@media (max-width: 1024px) {
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-w-tablet:"] .gzfc-trending-header,
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-w-tablet:"] .gzfc-trending-viewport {
		width: 100%;
		max-width: min( 100%, var(--gzfc-trend-carousel-w-tablet) );
	}
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-h-tablet:"] .gzfc-trending-viewport {
		height: var(--gzfc-trend-carousel-h-tablet);
		overflow-y: hidden;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-w-tablet:"] .gzfc-trending-track > .gzf-card,
	.gzfc-trending-strip[style*="--gzfc-trend-card-w-tablet:"] .gzfc-trending-track-dup > .gzf-card {
		flex: 0 0 var(--gzfc-trend-card-w-tablet);
		width: var(--gzfc-trend-card-w-tablet);
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-tablet:"] .gzf-card-media {
		height: var(--gzfc-trend-card-h-tablet) !important;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-tablet:"].gzfc-trending--cardstyle-style2 .gzf-card,
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-tablet:"].gzfc-trending--cardstyle-style3 .gzf-card {
		height: var(--gzfc-trend-card-h-tablet) !important;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-gap-tablet:"] .gzfc-trending-track {
		gap: var(--gzfc-trend-gap-tablet);
	}
}

/* --- Same four groups — Mobile. --------------------------------------- */
@media (max-width: 782px) {
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-w-mobile:"] .gzfc-trending-header,
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-w-mobile:"] .gzfc-trending-viewport {
		width: 100%;
		max-width: min( 100%, var(--gzfc-trend-carousel-w-mobile) );
	}
	.gzfc-trending-strip[style*="--gzfc-trend-carousel-h-mobile:"] .gzfc-trending-viewport {
		height: var(--gzfc-trend-carousel-h-mobile);
		overflow-y: hidden;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-w-mobile:"] .gzfc-trending-track > .gzf-card,
	.gzfc-trending-strip[style*="--gzfc-trend-card-w-mobile:"] .gzfc-trending-track-dup > .gzf-card {
		flex: 0 0 var(--gzfc-trend-card-w-mobile);
		width: var(--gzfc-trend-card-w-mobile);
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-mobile:"] .gzf-card-media {
		height: var(--gzfc-trend-card-h-mobile) !important;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-mobile:"].gzfc-trending--cardstyle-style2 .gzf-card,
	.gzfc-trending-strip[style*="--gzfc-trend-card-h-mobile:"].gzfc-trending--cardstyle-style3 .gzf-card {
		height: var(--gzfc-trend-card-h-mobile) !important;
	}
	.gzfc-trending-strip[style*="--gzfc-trend-gap-mobile:"] .gzfc-trending-track {
		gap: var(--gzfc-trend-gap-mobile);
	}
}

