/* Product Category Carousel */

.pcc-carousel {
	--pcc-container-w: 1096px;
	--pcc-container-h: 336px;
	--pcc-gap: 24px;
	--pcc-slot-w: 200px;
	--pcc-img-w: 200px;
	--pcc-img-h: 250px;
	--pcc-img-w-edge: 172px;
	--pcc-img-h-edge: 215px;
	--pcc-title-color: #333333;
	--pcc-count-color: #9a9a9a;
	--pcc-bg: #ffffff;
	--pcc-title-size: 14px;
	--pcc-count-size: 12px;
	--pcc-title-gap: 10px;

	position: relative;
	width: min(100%, var(--pcc-container-w));
	height: var(--pcc-container-h);
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	direction: ltr;
}

.pcc-carousel *,
.pcc-carousel *::before,
.pcc-carousel *::after {
	box-sizing: border-box;
}

/* Arrows — isolated from Elementor/theme button styles */
.pcc-carousel .pcc-arrow {
	position: absolute;
	top: calc(var(--pcc-img-h) / 2);
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	outline: 0;
	cursor: pointer;
	transform: translateY(-50%);
	line-height: 0;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.pcc-carousel .pcc-arrow--prev {
	left: 0;
}

.pcc-carousel .pcc-arrow--next {
	right: 0;
}

.pcc-carousel .pcc-arrow__icon {
	display: block;
	width: 9px;
	height: 16px;
	pointer-events: none;
}

.pcc-carousel .pcc-arrow__icon path {
	stroke: #b5b5b5;
}

/* Viewport */
.pcc-carousel__viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	touch-action: pan-y;
}

.pcc-carousel__track {
	display: flex;
	align-items: flex-start;
	gap: var(--pcc-gap);
	height: 100%;
	will-change: transform;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}

.pcc-carousel--dragging .pcc-carousel__track {
	cursor: grabbing;
}

.pcc-carousel--dragging .pcc-carousel__link {
	pointer-events: none;
}

.pcc-carousel__viewport::before,
.pcc-carousel__viewport::after {
	content: "";
	position: absolute;
	top: 0;
	z-index: 4;
	width: 72px;
	height: var(--pcc-img-h);
	pointer-events: none;
}

.pcc-carousel__viewport::before {
	left: 0;
	background: linear-gradient(
		to right,
		var(--pcc-bg) 0%,
		rgba(255, 255, 255, 0.92) 30%,
		rgba(255, 255, 255, 0.45) 65%,
		transparent 100%
	);
}

.pcc-carousel__viewport::after {
	right: 0;
	background: linear-gradient(
		to left,
		var(--pcc-bg) 0%,
		rgba(255, 255, 255, 0.92) 30%,
		rgba(255, 255, 255, 0.45) 65%,
		transparent 100%
	);
}

.pcc-carousel__track.is-animating {
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Every slide uses the same slot width; only the image scales on edges */
.pcc-carousel__item {
	flex: 0 0 var(--pcc-slot-w);
	width: var(--pcc-slot-w);
	min-width: var(--pcc-slot-w);
}

.pcc-carousel__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.pcc-carousel__link:hover .pcc-carousel__title {
	color: #111;
}

.pcc-carousel__image-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--pcc-img-h);
}

.pcc-carousel__image-wrap {
	position: relative;
	width: var(--pcc-img-w);
	height: var(--pcc-img-h);
	border-radius: 100px;
	overflow: hidden;
	flex-shrink: 0;
	transition:
		width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pcc-carousel__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.pcc-carousel__image--preset {
	object-fit: contain;
	object-position: center;
}

.pcc-carousel__image-wrap--preset {
	background: #fff;
	border-radius: 0;
	overflow: visible;
}

.pcc-carousel__item.is-edge .pcc-carousel__image-wrap--preset {
	border-radius: 0;
}

.pcc-carousel__gold-gradient--hidden {
	display: none;
}

.pcc-carousel__gold-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		transparent 52%,
		rgba(210, 175, 80, 0.12) 72%,
		rgba(205, 168, 70, 0.38) 88%,
		rgba(195, 158, 60, 0.52) 100%
	);
	pointer-events: none;
}

.pcc-carousel__edge-fade {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.45s ease;
}

.pcc-carousel__edge-fade--left {
	background: linear-gradient(
		to right,
		rgba(255, 255, 255, 0.95) 0%,
		rgba(255, 255, 255, 0.7) 28%,
		rgba(255, 255, 255, 0.2) 55%,
		transparent 78%
	);
}

.pcc-carousel__edge-fade--right {
	background: linear-gradient(
		to left,
		rgba(255, 255, 255, 0.95) 0%,
		rgba(255, 255, 255, 0.7) 28%,
		rgba(255, 255, 255, 0.2) 55%,
		transparent 78%
	);
}

/* Edge slides: smaller image inside same slot */
.pcc-carousel__item.is-edge .pcc-carousel__image-wrap {
	width: var(--pcc-img-w-edge);
	height: var(--pcc-img-h-edge);
	border-radius: 86px;
}

.pcc-carousel__item.is-edge-left .pcc-carousel__edge-fade--left,
.pcc-carousel__item.is-edge-right .pcc-carousel__edge-fade--right {
	opacity: 1;
}

.pcc-carousel__title {
	margin: var(--pcc-title-gap) 0 0;
	padding: 0;
	width: 100%;
	font-size: var(--pcc-title-size);
	font-weight: 600;
	line-height: 1.4;
	color: var(--pcc-title-color);
	text-align: center;
	direction: rtl;
	letter-spacing: 0;
	transition: color 0.2s ease;
}

.pcc-carousel__count {
	margin: 0;
	padding: 0;
	width: 100%;
	font-size: var(--pcc-count-size);
	font-weight: 400;
	line-height: 1.4;
	color: var(--pcc-count-color);
	text-align: center;
	direction: rtl;
}

.pcc-carousel--hide-nav .pcc-arrow {
	display: none !important;
}

@media (max-width: 480px) {
	.pcc-carousel .pcc-arrow {
		display: none;
	}

	.pcc-carousel--show-nav-mobile .pcc-arrow {
		display: flex;
	}
}

.pcc-carousel--no-gold .pcc-carousel__gold-gradient {
	display: none !important;
}

.pcc-carousel--no-edge-fade .pcc-carousel__edge-fade {
	display: none !important;
}

.pcc-carousel--no-edge-fade .pcc-carousel__item.is-edge-left .pcc-carousel__edge-fade--left,
.pcc-carousel--no-edge-fade .pcc-carousel__item.is-edge-right .pcc-carousel__edge-fade--right {
	opacity: 0 !important;
}

.pcc-carousel--no-viewport-fade .pcc-carousel__viewport::before,
.pcc-carousel--no-viewport-fade .pcc-carousel__viewport::after {
	display: none !important;
}

/* Tablet: 481px – 1024px – 5 slides */
@media (min-width: 481px) and (max-width: 1024px) {
	.pcc-carousel {
		--pcc-max-w: 724px;
		--pcc-view-w: min(100vw, var(--pcc-max-w));
		--pcc-gap: clamp(8px, 1.6vw, 16px);
		--pcc-slots-sum: 368;
		--pcc-slot-w: calc((var(--pcc-view-w) - (4 * var(--pcc-gap))) * 78 / var(--pcc-slots-sum));
		--pcc-slot-w-edge: calc((var(--pcc-view-w) - (4 * var(--pcc-gap))) * 67 / var(--pcc-slots-sum));
		--pcc-title-size: clamp(10px, 2.4vw, 12px);
		--pcc-count-size: clamp(8px, 2vw, 10px);
		--pcc-title-gap: clamp(3px, 0.8vw, 8px);

		width: var(--pcc-view-w);
		max-width: var(--pcc-max-w);
		height: auto;
		min-height: 0;
		margin-left: auto;
		margin-right: auto;
	}

	.pcc-carousel__viewport::before,
	.pcc-carousel__viewport::after {
		display: none;
	}

	.pcc-carousel__track {
		align-items: flex-start;
	}

	.pcc-carousel__item {
		flex: 0 0 var(--pcc-slot-w);
		width: var(--pcc-slot-w);
		min-width: var(--pcc-slot-w);
	}

	.pcc-carousel__item.is-edge {
		flex: 0 0 var(--pcc-slot-w-edge);
		width: var(--pcc-slot-w-edge);
		min-width: var(--pcc-slot-w-edge);
	}

	.pcc-carousel__image-slot {
		height: auto;
	}

	.pcc-carousel__image-wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 78 / 98;
		border-radius: 999px;
	}

	.pcc-carousel__item.is-edge .pcc-carousel__image-wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 67 / 84;
		border-radius: 999px;
	}

	.pcc-carousel__item.is-edge-left .pcc-carousel__edge-fade--left {
		background: linear-gradient(
			to right,
			#fff 0%,
			rgba(255, 255, 255, 0.88) 32%,
			rgba(255, 255, 255, 0.35) 62%,
			transparent 100%
		);
	}

	.pcc-carousel__item.is-edge-right .pcc-carousel__edge-fade--right {
		background: linear-gradient(
			to left,
			#fff 0%,
			rgba(255, 255, 255, 0.88) 32%,
			rgba(255, 255, 255, 0.35) 62%,
			transparent 100%
		);
	}

	.pcc-carousel__title {
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		white-space: normal;
		padding: 0 1px;
		max-height: 2.6em;
	}

	.pcc-carousel__count {
		line-height: 1.2;
		white-space: nowrap;
	}

	.pcc-carousel .pcc-arrow {
		top: calc((var(--pcc-slot-w) * 98 / 78) / 2);
		width: 18px;
		height: 18px;
	}

	.pcc-carousel .pcc-arrow__icon {
		width: 7px;
		height: 12px;
	}
}

/* Mobile: 3 slides – center large, sides small */
@media (max-width: 480px) {
	.pcc-carousel {
		--pcc-max-w: 234px;
		--pcc-gap: 11px;
		--pcc-slots-sum: 212;
		--pcc-slot-w: calc((var(--pcc-view-w) - (2 * var(--pcc-gap))) * 78 / var(--pcc-slots-sum));
		--pcc-slot-w-edge: calc((var(--pcc-view-w) - (2 * var(--pcc-gap))) * 67 / var(--pcc-slots-sum));
		--pcc-title-size: 10px;
		--pcc-count-size: 8px;
		--pcc-title-gap: 3px;

		width: var(--pcc-view-w);
		max-width: var(--pcc-max-w);
		height: auto;
		min-height: 0;
		margin-left: auto;
		margin-right: auto;
	}

	.pcc-carousel__viewport::before,
	.pcc-carousel__viewport::after {
		display: none;
	}

	.pcc-carousel__track {
		align-items: flex-start;
	}

	.pcc-carousel__item {
		flex: 0 0 var(--pcc-slot-w);
		width: var(--pcc-slot-w);
		min-width: var(--pcc-slot-w);
	}

	.pcc-carousel__item.is-edge {
		flex: 0 0 var(--pcc-slot-w-edge);
		width: var(--pcc-slot-w-edge);
		min-width: var(--pcc-slot-w-edge);
	}

	.pcc-carousel__image-slot {
		height: auto;
	}

	.pcc-carousel__image-wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 78 / 98;
		border-radius: 999px;
	}

	.pcc-carousel__item.is-edge .pcc-carousel__image-wrap {
		width: 100%;
		height: auto;
		aspect-ratio: 67 / 84;
		border-radius: 999px;
	}

	.pcc-carousel__item.is-edge-left .pcc-carousel__edge-fade--left {
		background: linear-gradient(
			to right,
			#fff 0%,
			rgba(255, 255, 255, 0.88) 32%,
			rgba(255, 255, 255, 0.35) 62%,
			transparent 100%
		);
	}

	.pcc-carousel__item.is-edge-right .pcc-carousel__edge-fade--right {
		background: linear-gradient(
			to left,
			#fff 0%,
			rgba(255, 255, 255, 0.88) 32%,
			rgba(255, 255, 255, 0.35) 62%,
			transparent 100%
		);
	}

	.pcc-carousel__title {
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		white-space: normal;
		padding: 0 1px;
		max-height: 2.6em;
	}

	.pcc-carousel__count {
		line-height: 1.2;
		white-space: nowrap;
	}

	.pcc-carousel .pcc-arrow {
		display: none;
	}
}
