/**
 * Category Cards — Swiper slider matching food/ingredients category design
 */

/* ─── Swiper container ─── */
.ew-category-cards.swiper {
	width: 100%;
	box-sizing: border-box;
	padding-bottom: 8px;
	overflow: hidden;
	position: relative;
}

.ew-category-cards .swiper-wrapper {
	align-items: stretch;
}

.ew-category-cards .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

/* ─── Card ─── */
.ew-category-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #1A6B74;
	border-radius: 20px;
	padding: 28px 24px;
	min-height: 420px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	box-sizing: border-box;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
	            box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ew-category-card:hover,
.ew-category-card:focus {
	text-decoration: none;
	color: inherit;
	outline: none;
}

.ew-category-cards--hover-lift .ew-category-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 40px rgba(15, 74, 82, 0.35);
}

/* ─── Media area (image + circle + icon) ─── */
.ew-category-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 200px;
	margin-bottom: 20px;
	flex-shrink: 0;
}

.ew-category-card__circle {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 85%;
	padding-bottom: 85%;
	height: 0;
	border-radius: 50%;
	background-color: #248088;
	z-index: 1;
	pointer-events: none;
}

.ew-category-card__image {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ew-category-card__image img {
	display: block;
	width: 90%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ew-category-cards--hover-scale .ew-category-card:hover .ew-category-card__image img {
	transform: scale(1.06);
}

.ew-category-card__icon {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #0F4A52;
	font-size: 36px;
	line-height: 1;
	opacity: 0.85;
	pointer-events: none;
}

.ew-category-card__icon i,
.ew-category-card__icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

.ew-category-card__icon svg {
	fill: currentColor;
}

/* ─── Body (title + tags) ─── */
.ew-category-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	position: relative;
	z-index: 2;
}

.ew-category-card__title {
	margin: 0 0 14px;
	padding: 0;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.15;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.ew-category-card__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 6px;
	margin-top: auto;
}

.ew-category-card__tag {
	display: inline-flex;
	align-items: center;
	background-color: #0F4A52;
	color: #ffffff;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 50px;
	white-space: nowrap;
}

/* ─── Navigation arrows ─── */
.ew-category-cards__prev,
.ew-category-cards__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	margin-top: 0;
	border-radius: 50%;
	background-color: #ffffff;
	color: #1A6B74;
	box-shadow: 0 4px 16px rgba(15, 74, 82, 0.2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.ew-category-cards__prev::after,
.ew-category-cards__next::after {
	font-family: swiper-icons;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.ew-category-cards__prev::after {
	content: 'prev';
}

.ew-category-cards__next::after {
	content: 'next';
}

.ew-category-cards__prev {
	left: 8px;
}

.ew-category-cards__next {
	right: 8px;
}

.ew-category-cards__prev:hover,
.ew-category-cards__next:hover {
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 6px 20px rgba(15, 74, 82, 0.3);
}

.ew-category-cards__prev.swiper-button-disabled,
.ew-category-cards__next.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* ─── Pagination ─── */
.ew-category-cards__pagination {
	position: relative;
	margin-top: 18px;
	text-align: center;
}

.ew-category-cards__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #1A6B74;
	opacity: 0.3;
}

.ew-category-cards__pagination .swiper-pagination-bullet-active {
	opacity: 1;
	background: #1A6B74;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
	.ew-category-card__title {
		font-size: 28px;
	}
}

@media (max-width: 767px) {
	.ew-category-card {
		min-height: 340px;
		padding: 20px 16px;
	}

	.ew-category-card__media {
		height: 150px;
		margin-bottom: 14px;
	}

	.ew-category-card__title {
		font-size: 22px;
		margin-bottom: 10px;
	}

	.ew-category-card__tag {
		font-size: 9px;
		padding: 5px 10px;
	}

	.ew-category-card__icon {
		font-size: 28px;
	}

	.ew-category-cards__prev,
	.ew-category-cards__next {
		width: 36px;
		height: 36px;
	}

	.ew-category-cards__prev::after,
	.ew-category-cards__next::after {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.ew-category-card {
		min-height: 380px;
	}

	.ew-category-card__media {
		height: 180px;
	}

	.ew-category-card__title {
		font-size: 28px;
	}
}
