/* Smart Product Carousel — طراحی الهام‌گرفته از دیجی‌کالا / تکنولایف */
.spc {
	--spc-n: 6;
	--spc-gap: 72px;
	--spc-red: #e5192d;
	--spc-navy: #0f3b8f;
	--spc-ink: #262932;
	--spc-muted: #a9adb8;
	--spc-line: #e3e5ed;
	--spc-arrow: 38px;
	--spc-lines: 2;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	background: #fff;
	border: 1px solid #cdd1e4;
	border-radius: 24px;
	padding: 22px 26px 26px;
	color: var(--spc-ink);
	font-family: inherit;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.spc *, .spc *::before, .spc *::after { box-sizing: border-box; }

/* ---- Header ---- */
.spc .spc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 18px;
}
.spc .spc__title {
	margin: 0;
	padding: 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--spc-ink);
}
.spc .spc__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--spc-navy);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity .2s;
}
.spc .spc__more:hover { opacity: .75; }

/* ---- Track ---- */
.spc .spc__track {
	display: flex;
	gap: var(--spc-gap);
	overflow-x: auto;
	overflow-y: hidden;
	padding: 6px 2px 4px;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 2px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	outline: none;
	cursor: grab;
}
.spc .spc__track::-webkit-scrollbar { display: none; }
.spc .spc__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
}
.spc .spc__track.is-dragging a { pointer-events: none; }

/* ---- Card ---- */
.spc .spc__card {
	position: relative;
	flex: 0 0 calc((100% - (var(--spc-n) - 1) * var(--spc-gap)) / var(--spc-n));
	min-width: 0;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	background: transparent;
	transition: transform .25s ease, background-color .25s ease;
}
.spc.spc--lift .spc__card:hover { transform: translateY(-3px); }

.spc.spc--div .spc__card + .spc__card::before {
	content: "";
	position: absolute;
	inset-block: 12% 0;
	inset-inline-start: calc(var(--spc-gap) / -2);
	width: 1px;
	background: var(--spc-line);
	pointer-events: none;
}

/* ---- Countdown ---- */
.spc .spc__cd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0 0 7px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--spc-red);
	border-bottom: 3px solid var(--spc-red);
}
.spc .spc__cd--ph { visibility: hidden; }
.spc .spc__cd.is-expired { opacity: 0; }
.spc .spc__cd-time {
	direction: ltr;
	unicode-bidi: isolate;
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
}

/* ---- Image ---- */
.spc .spc__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f6f6f8;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
}
.spc .spc__img img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	padding: 14px;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
	transition: transform .35s ease;
	-webkit-user-drag: none;
	user-select: none;
}
.spc.spc--blend .spc__img img { mix-blend-mode: multiply; }
.spc.spc--zoom .spc__card:hover .spc__img img { transform: scale(1.06); }

/* ---- Title ---- */
.spc .spc__name {
	margin: 14px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	line-height: 2;
	color: var(--spc-ink);
	min-height: calc(var(--spc-lines) * 2em);
	display: -webkit-box;
	-webkit-line-clamp: var(--spc-lines);
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.spc .spc__name a {
	color: inherit;
	text-decoration: none;
	transition: color .2s;
}
.spc .spc__name a:hover { color: var(--spc-navy); }

/* ---- Price ---- */
.spc .spc__price {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: auto;
	padding-top: 20px;
}
.spc .spc__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 24px;
}
.spc .spc__now {
	margin-inline-start: auto;
	white-space: nowrap;
	color: var(--spc-ink);
}
.spc .spc__now b { font-size: 15px; font-weight: 700; }
.spc .spc__now small { font-size: 11.5px; font-weight: 600; margin-inline-start: 2px; }
.spc .spc__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 22px;
	padding: 0 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: var(--spc-red);
	border-radius: 6px;
}
.spc .spc__old {
	align-self: flex-end;
	min-height: 18px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--spc-muted);
	text-decoration: line-through;
}
.spc .spc__old--ph { visibility: hidden; text-decoration: none; }

/* ---- Arrows ---- */
.spc .spc__arrow {
	position: absolute;
	top: calc(50% + 14px);
	transform: translateY(-50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--spc-arrow);
	height: var(--spc-arrow);
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--spc-navy);
	box-shadow: 0 2px 10px rgba(15, 23, 42, .2);
	cursor: pointer;
	transition: opacity .2s, transform .2s, box-shadow .2s, background-color .2s;
}
.spc .spc__arrow:hover { transform: translateY(-50%) scale(1.07); box-shadow: 0 4px 14px rgba(15, 23, 42, .26); }
.spc .spc__arrow:focus-visible,
.spc .spc__track:focus-visible { outline: 2px solid var(--spc-navy); outline-offset: 2px; }
.spc .spc__arrow--prev { inset-inline-start: 12px; }
.spc .spc__arrow--next { inset-inline-end: 12px; }
.spc .spc__arrow.is-hidden { opacity: 0; pointer-events: none; }
.spc.is-static .spc__arrow { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1280px) {
	.spc { --spc-n: 5; --spc-gap: 48px; }
}
@media (max-width: 1024px) {
	.spc { --spc-n: 3.5; --spc-gap: 32px; padding: 18px 18px 22px; border-radius: 20px; }
}
@media (max-width: 767px) {
	.spc { --spc-n: 2.2; --spc-gap: 20px; --spc-arrow: 34px; padding: 14px 12px 18px; border-radius: 16px; }
	.spc .spc__title { font-size: 16px; }
	.spc .spc__more { font-size: 13px; }
	.spc .spc__img { border-radius: 10px; }
	.spc .spc__img img { padding: 8px; }
	.spc .spc__name { font-size: 12px; margin-top: 10px; }
	.spc .spc__now b { font-size: 14px; }
	.spc .spc__cd { font-size: 12px; }
	.spc .spc__arrow { display: none; }
	.spc.spc--m-arrows .spc__arrow { display: flex; }
	.spc.spc--m-arrows.is-static .spc__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.spc .spc__card, .spc .spc__img img, .spc .spc__arrow { transition: none; }
}
