/* Swip Slide Category - frontend */
.ssc-slider {
	--ssc-per-desktop: 9;
	--ssc-per-mobile: 3.5;
	--ssc-gap: 16px;
	--ssc-circle: 96px;
	--ssc-bg: #f3f4f6;
	--ssc-text: #1f2937;
	--ssc-accent: #2563eb;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	margin: 24px 0;
	font-family: inherit;
}

.ssc-slider *,
.ssc-slider *::before,
.ssc-slider *::after {
	box-sizing: border-box;
}

/* مسیر اسکرول‌شونده */
.ssc-track {
	display: flex;
	gap: var(--ssc-gap);
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	padding: 4px 2px 12px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;          /* Firefox */
}
.ssc-track::-webkit-scrollbar {     /* WebKit */
	display: none;
}

/* هر آیتم: روی دسکتاپ ۹ تا در دید، روی موبایل ۳.۵ تا */
.ssc-item {
	flex: 0 0 calc((100% - (var(--ssc-per-desktop) - 1) * var(--ssc-gap)) / var(--ssc-per-desktop));
	max-width: calc((100% - (var(--ssc-per-desktop) - 1) * var(--ssc-gap)) / var(--ssc-per-desktop));
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
	text-decoration: none;
	color: var(--ssc-text);
	transition: transform .2s ease;
}
.ssc-item:hover {
	color: var(--ssc-accent);
	text-decoration: none;
}

/* دایره تصویر */
.ssc-circle {
	width: 100%;
	max-width: var(--ssc-circle);
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var(--ssc-bg);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, box-shadow .2s ease;
}
.ssc-item:hover .ssc-circle {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.ssc-circle img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* پلیس‌هولدر رنگی برای آیتم بدون تصویر: کل دایره رنگ می‌گیرد */
.ssc-circle-placeholder {
	background: var(--ssc-bg);
}

.ssc-title {
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	word-break: break-word;
}

/* دکمه‌های ناوبری (فقط دسکتاپ) */
.ssc-nav {
	position: absolute;
	top: calc(var(--ssc-circle) / 2 - 18px);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: var(--ssc-text);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
	z-index: 3;
	transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.ssc-nav:hover {
	background: var(--ssc-accent);
	color: #fff;
}
.ssc-nav[disabled] {
	opacity: .35;
	cursor: default;
	pointer-events: none;
}
/* در RTL: prev سمت راست، next سمت چپ */
.ssc-nav-prev { right: -8px; }
.ssc-nav-next { left: -8px; }

/* دکمه‌ها فقط وقتی نیاز به اسکرول هست و در دسکتاپ نشان داده می‌شوند */
.ssc-slider.is-scrollable .ssc-nav {
	display: flex;
}

@media (max-width: 768px) {
	.ssc-slider {
		--ssc-circle: 74px;
		--ssc-gap: 12px;
	}
	.ssc-item {
		flex: 0 0 calc((100% - (var(--ssc-per-mobile) - 1) * var(--ssc-gap)) / var(--ssc-per-mobile));
		max-width: calc((100% - (var(--ssc-per-mobile) - 1) * var(--ssc-gap)) / var(--ssc-per-mobile));
	}
	.ssc-title {
		font-size: 12px;
	}
	/* روی موبایل ناوبری مخفی، فقط اسکرول لمسی */
	.ssc-slider.is-scrollable .ssc-nav {
		display: none;
	}
}
