/**
 * Banner Carrusel Tuyo Tienda
 *
 * Las medidas que se pueden tocar desde el modulo viajan como variables CSS,
 * asi el modulo solo escribe esas variables y el resto del calculo vive aca.
 */

.bctt {
	position: relative;
	width: 100%;
	--bctt-vel: 600ms;
	--bctt-izq: 0px;          /* cuanto asoma el banner anterior */
	--bctt-der: 0px;          /* cuanto asoma el banner siguiente */
	--bctt-gap: 0px;          /* separacion entre banners */
	--bctt-n: 0;              /* banner visible (lo mueve el JS) */
	--bctt-drag: 0px;         /* desplazamiento mientras se arrastra */
	--bctt-flecha: 44px;
	--bctt-flecha-margen: 16px;
	--bctt-punto: 10px;
}

/* Todo el ancho de la pantalla. El JS ajusta la medida exacta, esto es el punto de partida. */
.bctt--ancho-total {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.bctt-visor {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.bctt-arrastrable .bctt-visor {
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}

.bctt-pista {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	will-change: transform;
}

.bctt-pista > * {
	flex: 0 0 calc(100% - var(--bctt-izq) - var(--bctt-der));
	width: calc(100% - var(--bctt-izq) - var(--bctt-der));
	max-width: none;
	margin: 0 var(--bctt-gap) 0 0 !important;
	padding: 0 !important;
}

/* Divi envuelve cada modulo hijo en su propio contenedor. */
.bctt-pista > * > .et_pb_module_inner {
	width: 100%;
}

.bctt-banner {
	position: relative;
	display: block;
	width: 100%;
	line-height: 0;
}

.bctt-enlace,
.bctt-picture {
	display: block;
	width: 100%;
}

.bctt-img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	-webkit-user-drag: none;
}

/* ------------------------------------------------------------------ Deslizar */

.bctt--slide .bctt-pista {
	transition: transform var(--bctt-vel) cubic-bezier( 0.4, 0, 0.2, 1 );
	transform: translate3d( calc( var(--bctt-izq) + var(--bctt-drag) - var(--bctt-n) * ( 100% - var(--bctt-izq) - var(--bctt-der) + var(--bctt-gap) ) ), 0, 0 );
}

.bctt-pista.bctt-sin-anim {
	transition: none !important;
}

/* -------------------------------------------------------------------- Fundido */

.bctt--fade .bctt-pista {
	display: grid;
	transform: none;
}

.bctt--fade .bctt-pista > * {
	grid-area: 1 / 1;
	flex: none;
	width: 100%;
	margin: 0 !important;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--bctt-vel) ease;
}

/* Antes de que arranque el JS se ve el primero. */
.bctt--fade:not(.bctt-listo) .bctt-pista > *:first-child {
	opacity: 1;
}

.bctt--fade .bctt-pista > *.is-activo {
	opacity: 1;
	pointer-events: auto;
}

/* ------------------------------------------------------------------ Alto fijo */

.bctt--fijo .bctt-pista,
.bctt--fijo .bctt-pista > *,
.bctt--fijo .bctt-pista > * > .et_pb_module_inner,
.bctt--fijo .bctt-banner,
.bctt--fijo .bctt-enlace,
.bctt--fijo .bctt-picture {
	height: 100%;
}

.bctt--fijo .bctt-img {
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* -------------------------------------------------------------------- Flechas */

.bctt-flecha {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--bctt-flecha);
	height: var(--bctt-flecha);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba( 0, 0, 0, 0.35 );
	box-shadow: none;
	color: #fff;
	line-height: 0;
	cursor: pointer;
	transform: translateY( -50% );
	transition: opacity 0.25s ease, background-color 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bctt-flecha--ant {
	left: var(--bctt-flecha-margen);
}

.bctt-flecha--sig {
	right: var(--bctt-flecha-margen);
}

.bctt-flecha svg {
	width: 50%;
	height: 50%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bctt-flecha:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media ( hover: hover ) {
	.bctt--flechas-hover .bctt-flecha {
		opacity: 0;
	}

	.bctt--flechas-hover:hover .bctt-flecha,
	.bctt--flechas-hover .bctt-flecha:focus-visible {
		opacity: 1;
	}
}

/* --------------------------------------------------------------------- Puntos */

.bctt-puntos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: calc( var(--bctt-punto) * 0.8 );
	line-height: 0;
}

.bctt--puntos-sobre .bctt-puntos {
	position: absolute;
	right: 0;
	bottom: calc( var(--bctt-punto) * 1.6 );
	left: 0;
	z-index: 3;
}

.bctt--puntos-debajo .bctt-puntos {
	margin-top: calc( var(--bctt-punto) * 1.4 );
}

.bctt-punto {
	width: var(--bctt-punto);
	height: var(--bctt-punto);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba( 255, 255, 255, 0.55 );
	box-shadow: none;
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bctt-punto.is-activo {
	transform: scale( 1.3 );
}

.bctt-punto:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ------------------------------------------------------------------- Avisos */

.bctt-vacio,
.bctt-banner--vacio {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	padding: 24px;
	border: 1px dashed rgba( 0, 0, 0, 0.2 );
	background-color: rgba( 0, 0, 0, 0.03 );
	color: rgba( 0, 0, 0, 0.5 );
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

@media ( prefers-reduced-motion: reduce ) {
	.bctt-pista,
	.bctt-pista > * {
		transition-duration: 1ms !important;
	}
}
