/* Kerry Carousel Block */
.kerry-carousel {
	--carousel-gap: 16px;
	--carousel-slides: 3;
	--carousel-height: 300px;
	--carousel-width: 400px;
	position: relative;
	overflow: hidden;
	width: 100%;
}

.kerry-carousel__viewport {
	overflow: hidden;
	width: 100%;
}

.kerry-carousel__track {
	display: flex;
	gap: var(--carousel-gap);
	transition: transform 0.4s ease;
}

.kerry-carousel__slide {
	flex: 0 0 calc((100% - (var(--carousel-gap) * (var(--carousel-slides) - 1))) / var(--carousel-slides));
	min-width: 0;
}

.kerry-carousel__slide img {
	width: 100%;
	height: var(--carousel-height);
	object-fit: cover;
	display: block;
	border-radius: 8px;
}

/* Arrows */
.kerry-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease, transform 0.2s ease;
	z-index: 2;
}

.kerry-carousel__arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.05);
}

.kerry-carousel__arrow--prev { left: 12px; }
.kerry-carousel__arrow--next { right: 12px; }

.kerry-carousel__arrow svg {
	width: 20px;
	height: 20px;
}

/* Dots */
.kerry-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.kerry-carousel__dot {
	width: 10px;
	height: 10px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	padding: 0;
}

.kerry-carousel__dot:hover {
	background: rgba(0, 0, 0, 0.4);
}

.kerry-carousel__dot--active {
	background: var(--kerry-accent, #ED00C1);
	transform: scale(1.2);
}

/* Editor preview */
.kerry-carousel--editor {
	border: 1px dashed #ccc;
	padding: 16px;
}

.kerry-carousel__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.kerry-carousel__count {
	color: #666;
	font-size: 0.85rem;
}

.kerry-carousel__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	background: #f5f5f5;
	color: #888;
	border-radius: 8px;
}

.kerry-carousel--editor .kerry-carousel__slide {
	position: relative;
}

.kerry-carousel__remove {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 0.75rem;
	cursor: pointer;
	z-index: 2;
}

.kerry-carousel__remove:hover {
	background: rgba(0, 0, 0, 0.8);
}

/* Full & Wide alignment */
.kerry-carousel.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.kerry-carousel.alignwide {
	width: 90vw;
	max-width: 90vw;
	margin-left: calc(50% - 45vw);
	margin-right: calc(50% - 45vw);
}

/* Tablet */
@media (max-width: 768px) {
	.kerry-carousel__slide {
		flex: 0 0 calc((100% - var(--carousel-gap)) / 2);
	}
}

/* Mobile */
@media (max-width: 480px) {
	.kerry-carousel__slide {
		flex: 0 0 100%;
	}

	.kerry-carousel__arrow {
		width: 36px;
		height: 36px;
	}

	.kerry-carousel__arrow--prev { left: 6px; }
	.kerry-carousel__arrow--next { right: 6px; }
}
