/**
 * Flavors Coverflow Gallery - base styles.
 *
 * Only structural / non-author-controlled rules live here. Everything an author
 * can tune (slide radius, border, shadow, caption, arrows, dots, height) is
 * emitted by Elementor from control `selectors`. The widget renders standard
 * Swiper markup (.swiper / .swiper-wrapper / .swiper-slide) plus custom arrow
 * buttons and a pagination container.
 */

.flavor-coverflow {
	--flavor-cf-dots-gap: 16px;
	position: relative;
	width: 100%;
	padding-bottom: calc( var( --flavor-cf-dots-gap ) + 14px );
	overflow: hidden;
}

.flavor-coverflow .swiper-wrapper {
	align-items: center;
}

.flavor-coverflow .swiper-slide {
	display: flex;
	height: 360px;
	box-sizing: border-box;
	background: #f3f4f6;
}

.flavor-coverflow .flavor-cf-slide-inner,
.flavor-coverflow .flavor-cf-link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.flavor-coverflow .flavor-cf-media {
	width: 100%;
	height: 100%;
}

.flavor-coverflow .flavor-cf-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

.flavor-coverflow .flavor-cf-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: block;
	color: #fff;
	background: rgba( 0, 0, 0, 0.55 );
	font-size: 15px;
	line-height: 1.35;
	padding: 10px 14px;
	text-align: center;
}

/* ------------------------------------------------------------- Arrows */
.flavor-coverflow .flavor-cf-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	color: #fff;
	background: #111827;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transform: translateY( -50% );
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.18 );
	-webkit-appearance: none;
	appearance: none;
}

.flavor-coverflow .flavor-cf-arrow:hover,
.flavor-coverflow .flavor-cf-arrow:focus-visible {
	outline: none;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.28 );
}

.flavor-coverflow .flavor-cf-arrow:focus-visible {
	box-shadow: 0 0 0 3px rgba( 99, 102, 241, 0.55 );
}

.flavor-coverflow .flavor-cf-prev {
	left: 8px;
}

.flavor-coverflow .flavor-cf-next {
	right: 8px;
}

.flavor-coverflow .flavor-cf-arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}

.flavor-coverflow .flavor-cf-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* --------------------------------------------------------- Pagination */
.flavor-coverflow .swiper-pagination.flavor-cf-pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.flavor-coverflow .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 !important;
	background: rgba( 17, 24, 39, 0.3 );
	opacity: 1;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.flavor-coverflow .swiper-pagination-bullet-active {
	background: #111827;
}

/* ---------------------------------------------- Graceful no-Swiper fallback */
.flavor-cf-no-swiper .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 16px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.flavor-cf-no-swiper .swiper-slide {
	flex: 0 0 auto;
	width: 320px;
	max-width: 80%;
	scroll-snap-align: center;
	transform: none !important;
}

.flavor-cf-no-swiper .flavor-cf-arrow,
.flavor-cf-no-swiper .flavor-cf-pagination {
	display: none;
}

/* ----------------------------------------------------- Reduced motion */
@media ( prefers-reduced-motion: reduce ) {
	.flavor-coverflow .swiper-slide,
	.flavor-coverflow .swiper-wrapper {
		transition-duration: 0.001ms !important;
	}
}
