/**
 * Video Marquee — Pure CSS infinite scroll marquee
 *
 * @package FashionXpart
 */

@keyframes fxp-marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* Prevent horizontal scrollbar on page */
html {
	overflow-x: clip;
}

.fxp-video-marquee {
	overflow: hidden;
	width: 100%;
	max-width: none !important;
	padding: 0 !important;
	position: relative;
}

/* Full-width alignment - edge to edge */
/* Wrapper has alignfull/alignwide class (WP standard) */
.wp-block-group.alignfull > .fxp-video-marquee,
.wp-block-group.alignwide > .fxp-video-marquee {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Track — seamless loop via item padding (like ticker) */
.fxp-video-marquee-track {
	display: flex !important;
	flex-wrap: nowrap !important;
	width: max-content !important;
	max-width: none !important;
	gap: 0 !important;
	padding: 0 !important;
	animation: fxp-marquee-scroll var(--marquee-speed, 30s) linear infinite;
	will-change: transform;
}

/* Card — spacing via horizontal padding (like ticker items) */
.fxp-video-marquee-card {
	flex: 0 0 auto;
	width: 200px;
	height: 320px;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	padding: 0 calc(var(--marquee-gap, 12px) / 2);
}

.fxp-video-marquee-media {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: none;
	border-radius: 0;
	display: block;
	/* Ensure media fills card's padding box */
}

.fxp-video-marquee-media::-webkit-media-controls,
.fxp-video-marquee-media::-webkit-media-controls-enclosure,
.fxp-video-marquee-media::-webkit-media-controls-panel {
	display: none;
	-webkit-appearance: none;
}

.fxp-video-marquee-overlay {
	position: absolute;
	inset: 0;
	height: 50%;
	top: auto;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
	pointer-events: none;
	z-index: 1;
}

.fxp-video-marquee-label {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	margin: 0;
	text-align: center;
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	pointer-events: none;
	z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
	.fxp-video-marquee-track {
		animation: none !important;
	}
}

@media (max-width: 599px) {
	.fxp-video-marquee-card {
		width: 140px;
		height: 220px;
	}
}

@media (min-width: 1024px) {
	.fxp-video-marquee-card {
		width: 200px;
		height: 360px;
	}
}