/* MG Carousel — разметка под Swiper v8 (как в Elementor) */

.mg-carousel {
	position: relative;
	max-width: 100%;
}

/* Обрезаем только слайды; стрелки и точки — снаружи viewport, не обрезаются */
.mg-carousel__viewport {
	overflow: hidden;
	position: relative;
}

.mg-carousel__swiper {
	position: relative;
	overflow: hidden;
}

.mg-carousel .swiper-slide-inner {
	margin: 0;
	height: 100%;
	overflow: hidden;
	border-radius: var(--mg-carousel-radius, 0);
}

.mg-carousel .swiper-slide-inner img,
.mg-carousel__img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
	border-radius: inherit;
}

/* Стрелки — только свои классы (без elementor-swiper-button), чтобы не перебивались стили Elementor */
.mg-carousel__prev,
.mg-carousel__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.mg-carousel__prev:hover,
.mg-carousel__next:hover {
	background: rgba(0, 0, 0, 0.75);
}

.mg-carousel__prev {
	left: 10px;
}

.mg-carousel__next {
	right: 10px;
}

/* Стрелки снаружи контента: отступ у карусели, стрелки в этой зоне — не обрезаются родителем с overflow:hidden */
.mg-carousel--arrows-outside {
	padding-left: 54px;
	padding-right: 54px;
}

.mg-carousel--arrows-outside .mg-carousel__prev {
	left: 0;
}

.mg-carousel--arrows-outside .mg-carousel__next {
	right: 0;
}

.mg-carousel__prev svg,
.mg-carousel__next svg {
	width: 24px;
	height: 24px;
}

/* Пагинация: по умолчанию внутри (внизу слайдера) */
.mg-carousel .swiper-pagination {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
}

/* Точки снаружи контейнера */
.mg-carousel--dots-outside .swiper-pagination {
	position: relative;
	bottom: auto;
	margin-top: 16px;
}

/* Цвет пагинации под стиль сайта */
.mg-carousel .swiper-pagination-bullet {
	--swiper-pagination-bullet-size: 8px;
}
.mg-carousel .swiper-pagination-bullet-active {
	background: #FF9458;
}
.mg-carousel .swiper-pagination-bullet:not(.swiper-pagination-bullet-active) {
	background: #B9B9B9;
	opacity: 1;
}
