/**
 * Products carousel — VishaPet Elementor widget.
 * Slide widths are measured/set in pixels by products-carousel.js (avoids any
 * CSS percentage-vs-JS mismatch); this file only provides layout defaults
 * before JS runs, plus nav/dots styling.
 */

.vp-carousel-widget {
	margin-bottom: 2.5rem;
}

.vp-carousel {
	position: relative;
	--vp-carousel-items: 4;
	--vp-carousel-gap: 20px;
}

.vp-carousel__viewport {
	overflow: hidden;
	/* Keep transform math LTR even on RTL pages — otherwise the strip
	   starts empty and cards slide in one-by-one. */
	direction: ltr;
}

.vp-carousel__track {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	direction: ltr;
	margin-inline: calc(var(--vp-carousel-gap, 20px) / -2);
	transition: transform var(--vp-carousel-transition, 500ms) ease;
	will-change: transform;
	transform: translate3d(0, 0, 0);
}

.vp-carousel__slide {
	flex: 0 0 calc(100% / var(--vp-carousel-items, 4));
	min-width: 0;
	box-sizing: border-box;
	padding-inline: calc(var(--vp-carousel-gap, 20px) / 2);
	display: flex;
	/* Card content stays RTL for Persian. */
	direction: rtl;
}

.vp-carousel__slide .vp-product-card {
	width: 100%;
	margin: 0;
}

.vp-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(74, 59, 50, 0.1);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
	font-size: 1.6rem;
	line-height: 1;
	color: var(--vp-dark);
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.vp-carousel__nav:hover:not(:disabled) {
	background: var(--vp-orange);
	color: #fff;
	box-shadow: 0 14px 28px rgba(242, 140, 40, 0.3);
}

.vp-carousel__nav:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.vp-carousel__nav--prev {
	inset-inline-start: -0.9rem;
}

.vp-carousel__nav--next {
	inset-inline-end: -0.9rem;
}

@media (max-width: 767px) {
	.vp-carousel__nav {
		width: 2.25rem;
		height: 2.25rem;
		font-size: 1.3rem;
	}

	.vp-carousel__nav--prev {
		inset-inline-start: -0.35rem;
	}

	.vp-carousel__nav--next {
		inset-inline-end: -0.35rem;
	}
}

.vp-carousel__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.35rem;
}

.vp-carousel__dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 999px;
	background: rgba(74, 59, 50, 0.18);
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, width 0.2s ease;
}

.vp-carousel__dot:hover {
	background: rgba(242, 140, 40, 0.55);
}

.vp-carousel__dot.is-active {
	width: 1.6rem;
	background: var(--vp-orange);
}
