/* =========================================================
   BIG+ Ingredients Animation Widget
   All layout, size and animation values are driven by CSS
   custom properties that Elementor generates from the widget
   controls. Nothing here is hard-coded per-instance.
   ========================================================= */

.elementor-widget-bigplus-ingredients-animation .elementor-widget-container {
	display: flex;
	width: 100%;
}

/* -------------------- Outer widget box -------------------- */

.bigplus-ingredients-widget {
	position: relative;
	width: var( --bigplus-width, 100% );
	max-width: var( --bigplus-max-width, 900px );
	min-width: var( --bigplus-min-width, 280px );
	height: var( --bigplus-height, 620px );
	min-height: var( --bigplus-min-height, auto );
	max-height: var( --bigplus-max-height, none );
	overflow: hidden;
	box-sizing: border-box;
}

/* -------------------- Scaled inner stage -------------------- */

.bigplus-stage {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: scale( var( --bigplus-scale, 1 ) );
	transform-origin: center center;
	will-change: transform;
}

/* -------------------- Product / bottle -------------------- */

.bigplus-product {
	position: absolute;
	top: var( --bigplus-product-y, 50% );
	left: var( --bigplus-product-x, 50% );
	width: var( --bigplus-product-width, 46% );
	max-width: var( --bigplus-product-max-width, 340px );
	transform: translate( -50%, -50% ) rotate( var( --bigplus-product-rotate, 0deg ) );
	opacity: var( --bigplus-product-opacity, 1 );
	z-index: 5;
	pointer-events: none;
}

.bigplus-product-inner {
	width: 100%;
	line-height: 0;
	animation-name: bigplus-product-move;
	animation-duration: var( --bigplus-product-duration, 3s );
	animation-delay: var( --bigplus-product-delay, 0s );
	animation-timing-function: var( --bigplus-product-easing, ease-in-out );
	animation-direction: var( --bigplus-product-direction, normal );
	animation-iteration-count: infinite;
	animation-fill-mode: both;
}

.bigplus-product-image {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: auto;
}

@keyframes bigplus-product-move {
	0% {
		transform: translate3d( 0, 0, 0 );
	}
	25% {
		transform: translate3d( calc( -1 * var( --bigplus-product-distance, 20px ) ), 0, 0 );
	}
	50% {
		transform: translate3d( 0, 0, 0 );
	}
	75% {
		transform: translate3d( var( --bigplus-product-distance, 20px ), 0, 0 );
	}
	100% {
		transform: translate3d( 0, 0, 0 );
	}
}

/* -------------------- Ingredients -------------------- */

.bigplus-ingredients {
	position: absolute;
	inset: 0;
	--bigplus-ing-play: running;
}

.bigplus-ingredient {
	position: absolute;
	top: var( --ing-y, 50% );
	left: var( --ing-x, 50% );
	transform: translate( -50%, -50% );
	width: var( --ing-size, 90px );
	text-align: center;
	z-index: 4;
}

.bigplus-ingredient-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	animation-name: bigplus-float-up;
	animation-duration: var( --ing-duration, var( --bigplus-ing-duration, 3s ) );
	animation-delay: var( --ing-delay-computed, var( --bigplus-ing-delay, 0s ) );
	animation-timing-function: var( --ing-easing, var( --bigplus-ing-easing, ease-in-out ) );
	animation-iteration-count: infinite;
	animation-direction: alternate;
	animation-play-state: var( --bigplus-ing-play, running );
}

.bigplus-ingredient.bigplus-float-down .bigplus-ingredient-inner {
	animation-name: bigplus-float-down;
}

.bigplus-ingredient.bigplus-float-marquee-left .bigplus-ingredient-inner {
	animation-name: bigplus-marquee-left;
	animation-direction: normal;
	animation-timing-function: linear;
}

.bigplus-ingredient.bigplus-float-marquee-right .bigplus-ingredient-inner {
	animation-name: bigplus-marquee-right;
	animation-direction: normal;
	animation-timing-function: linear;
}

.bigplus-ingredient.bigplus-anim-disabled .bigplus-ingredient-inner {
	animation: none;
}

.bigplus-ingredient.bigplus-pause-on-hover:hover .bigplus-ingredient-inner {
	animation-play-state: paused;
}

@keyframes bigplus-float-up {
	from {
		transform: translate3d( 0, 0, 0 );
	}
	to {
		transform: translate3d( 0, calc( -1 * var( --ing-distance, var( --bigplus-ing-distance, 8px ) ) ), 0 );
	}
}

@keyframes bigplus-float-down {
	from {
		transform: translate3d( 0, 0, 0 );
	}
	to {
		transform: translate3d( 0, var( --ing-distance, var( --bigplus-ing-distance, 8px ) ), 0 );
	}
}

/* Continuous one-direction "ticker" style loop: moves across the distance
   then snaps back to start and repeats — unlike the float up/down bounce,
   this does NOT alternate direction. */
@keyframes bigplus-marquee-left {
	0% {
		transform: translate3d( 0, 0, 0 );
	}
	100% {
		transform: translate3d( calc( -1 * var( --ing-distance, var( --bigplus-ing-distance, 8px ) ) ), 0, 0 );
	}
}

@keyframes bigplus-marquee-right {
	0% {
		transform: translate3d( 0, 0, 0 );
	}
	100% {
		transform: translate3d( var( --ing-distance, var( --bigplus-ing-distance, 8px ) ), 0, 0 );
	}
}

.bigplus-ingredient-image {
	display: block;
	width: var( --ing-size, 90px );
	height: var( --ing-size, 90px );
	object-fit: cover;
	border-radius: 50%;
}

.bigplus-ingredient-link {
	display: block;
	line-height: 0;
}

.bigplus-ingredient-title {
	font-size: 14px;
	line-height: 1.3;
	white-space: nowrap;
}

/* -------------------- Bottom counter -------------------- */

.bigplus-counter-wrap {
	position: absolute;
	top: var( --bigplus-counter-y, 96% );
	left: var( --bigplus-counter-x, 50% );
	transform: translate( -50%, -50% );
	z-index: 6;
	width: max-content;
	max-width: 90%;
}

.bigplus-counter {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
}

.bigplus-counter-number {
	font-size: 22px;
	font-weight: 700;
	color: #29b6e8;
}

.bigplus-counter-label {
	font-size: 16px;
	font-weight: 400;
	color: #1b1b1b;
}

/* -------------------- Responsive safety net -------------------- */

@media ( max-width: 1024px ) {
	.bigplus-ingredient-title {
		white-space: normal;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.bigplus-product-inner,
	.bigplus-ingredient-inner {
		animation: none !important;
	}
}
