/**
 * Ecommoda Slideshow Elementor widget — structural/layout CSS only.
 * Typography, colors, spacing, radius and dot colors are controlled from
 * Elementor's own controls (see class-ecommoda-slideshow-widget.php); this
 * file supplies the geometry, art-direction, sweep-hover mechanics and
 * entrance-animation classes those controls build on top of.
 */

.ecommoda-slideshow {
	width: 100%;
	overflow: hidden;
	border-radius: 0;
	margin-bottom: 50px;
}

@media (max-width: 767px) {
	.ecommoda-slideshow {
		margin-bottom: 35px;
	}
}

.ecommoda-slideshow__swiper {
	position: relative;
	width: 100%;
	aspect-ratio: 2.88;
	overflow: hidden;
}

@media (max-width: 767px) {
	.ecommoda-slideshow__swiper {
		aspect-ratio: 1.6923076923076923;
	}
}

.ecommoda-slideshow__swiper .swiper-wrapper,
.ecommoda-slideshow__slide {
	height: 100%;
}

.ecommoda-slideshow__picture {
	position: absolute;
	inset: 0;
	display: block;
	line-height: 0;
}

.ecommoda-slideshow__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Content positioning */
.ecommoda-slideshow__content {
	position: absolute;
	z-index: 2;
	max-width: 90%;
	padding: 15px;
}

@media (max-width: 767px) {
	.ecommoda-slideshow__content {
		padding: 10px;
	}
}

.ecommoda-slideshow__content--h-left {
	left: 5%;
	--ecs-tx: -5%;
}

.ecommoda-slideshow__content--h-center {
	left: 50%;
	--ecs-tx: -50%;
}

.ecommoda-slideshow__content--h-right {
	right: 5%;
	left: auto;
	--ecs-tx: 5%;
}

.ecommoda-slideshow__content--v-top {
	top: 5%;
	--ecs-ty: 0%;
}

.ecommoda-slideshow__content--v-center {
	top: 50%;
	--ecs-ty: -50%;
}

.ecommoda-slideshow__content--v-bottom {
	bottom: 5%;
	top: auto;
	--ecs-ty: 0%;
}

.ecommoda-slideshow__content {
	transform: translate( var( --ecs-tx, 0 ), var( --ecs-ty, 0 ) );
}

.ecommoda-slideshow__content--align-left {
	text-align: left;
}

.ecommoda-slideshow__content--align-center {
	text-align: center;
}

.ecommoda-slideshow__content--align-right {
	text-align: right;
}

.ecommoda-slideshow__heading,
.ecommoda-slideshow__description {
	margin-top: 0;
}

/* Button */
.ecommoda-slideshow__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	height: 40px;
	text-decoration: none;
	line-height: 1;
	transition: color 0.3s ease-in-out;
}

@media (max-width: 767px) {
	.ecommoda-slideshow__button {
		height: 36px;
	}
}

.ecommoda-slideshow__button-sweep {
	position: absolute;
	inset: 0;
	z-index: 0;
	transform: scaleX( 1 ) scaleY( 0 );
	transform-origin: 100% 100%;
	transition: transform 0.5s ease-out;
}

.ecommoda-slideshow__button:hover .ecommoda-slideshow__button-sweep {
	transform: scale( 1 );
}

.ecommoda-slideshow__button-label {
	position: relative;
	z-index: 1;
}

/* Dots */
.ecommoda-slideshow__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

@media (max-width: 767px) {
	.ecommoda-slideshow__dots {
		bottom: 10px;
	}
}

.ecommoda-slideshow__dots .swiper-pagination-bullet {
	margin: 0;
	width: 8px;
	height: 8px;
	border-radius: 5px;
	opacity: 1;
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.ecommoda-slideshow__dots .swiper-pagination-bullet-active {
	width: 30px;
}

/* Arrows (off by default; kept minimal if an editor enables them) */
.ecommoda-slideshow__arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 3;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.8 );
	cursor: pointer;
}

.ecommoda-slideshow__arrow--prev {
	left: 15px;
}

.ecommoda-slideshow__arrow--next {
	right: 15px;
}

/* Entrance animation — keyed off Swiper's own .swiper-slide-active class so
   it fires per-slide, on activation, rather than once globally. */
@keyframes ecommodaSlideFadeInUp {
	from {
		opacity: 0;
		transform: translate3d( 0, 20px, 0 );
	}
	to {
		opacity: 1;
		transform: translateZ( 0 );
	}
}

.ecommoda-slideshow__description,
.ecommoda-slideshow__button {
	opacity: 0;
}

.swiper-slide-active .ecommoda-slideshow__description {
	animation: ecommodaSlideFadeInUp 1s ease forwards;
	animation-delay: 0s;
}

.swiper-slide-active .ecommoda-slideshow__button {
	animation: ecommodaSlideFadeInUp 1s ease forwards;
	animation-delay: 0.3s;
}

@media ( prefers-reduced-motion: reduce ) {
	.ecommoda-slideshow__description,
	.ecommoda-slideshow__button {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.ecommoda-slideshow__button-sweep {
		transition: none;
	}
}
