/**
 * ویجت المنتور — پیشنهاد شگفت‌انگیز
 */

.ns-el-amazing {
	--ns-amazing-cols: 4;
	--ns-amazing-gap: 0.75rem;
	display: flex;
	align-items: stretch;
	gap: 1.25rem;
	padding: 1.15rem;
	background: #ef394e;
	border-radius: 16px;
	overflow: hidden;
}

.ns-el-amazing__sidebar {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	gap: 0.85rem;
}

.ns-el-amazing__title {
	margin: 0;
	font-size: 1.65rem;
	font-weight: 900;
	line-height: 1.35;
	color: #fff;
}

.ns-el-amazing__countdown {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
	max-width: 220px;
}

.ns-el-amazing__countdown-seg[hidden] {
	display: none !important;
}

.ns-el-amazing__countdown-seg {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.2rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.15);
	min-height: 52px;
}

.ns-el-amazing__countdown-value {
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	color: #fff;
}

.ns-el-amazing__countdown-label {
	font-size: 0.62rem;
	font-weight: 600;
	margin-top: 0.15rem;
	opacity: 0.9;
}

.ns-el-amazing__view-all {
	color: #fff;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 700;
	font-size: 0.9rem;
	transition: opacity 0.2s ease;
}

.ns-el-amazing__view-all:hover {
	opacity: 0.85;
}

.ns-el-amazing__main {
	flex: 1;
	min-width: 0;
	background: #fff;
	border-radius: 12px;
	padding: 0.85rem 0.65rem 0.65rem;
	position: relative;
}

.ns-el-amazing__slider {
	position: relative;
}

.ns-el-amazing__viewport {
	overflow: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ns-el-amazing__viewport::-webkit-scrollbar {
	display: none;
}

.ns-el-amazing__track.products {
	display: flex !important;
	flex-wrap: nowrap !important;
	grid-template-columns: none !important;
	gap: var(--ns-amazing-gap) !important;
	margin: 0 !important;
	padding: 0 0.15rem !important;
	list-style: none;
	width: max-content;
	min-width: 100%;
}

.ns-el-amazing__track.products > li.product {
	flex: 0 0 auto;
	min-width: 118px;
	scroll-snap-align: start;
	margin: 0 !important;
	float: none !important;
}

/* جلوگیری از برعکس شدن آیکون فلش در RTL (تم/Font Awesome) */
.ns-el-amazing__arrow .fa,
.ns-el-amazing__arrow i {
	display: inline-block;
	transform: none !important;
}

.ns-el-amazing__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ef394e;
	background: #fff;
	color: #ef394e;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.ns-el-amazing__arrow:hover {
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 6px 18px rgba(239, 57, 78, 0.2);
}

/* RTL: قبلی راست (نزدیک سایدبار) ، بعدی چپ */
.ns-el-amazing__arrow--prev {
	inset-inline-end: calc(100% + 0.35rem);
	inset-inline-start: auto;
}

.ns-el-amazing__arrow--next {
	inset-inline-start: calc(100% + 0.35rem);
	inset-inline-end: auto;
}

.ns-el-amazing__dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.65rem;
}

.ns-el-amazing__dot {
	width: 7px;
	height: 7px;
	border: 0;
	border-radius: 50%;
	padding: 0;
	background: #d1d5db;
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.ns-el-amazing__dot.is-active {
	transform: scale(1.25);
	background: #ef394e;
}

.ns-el-amazing__countdown.is-expired {
	display: none;
}

@media (max-width: 991px) {
	.ns-el-amazing {
		flex-direction: column;
		padding: 0;
		gap: 0;
	}

	.ns-el-amazing__sidebar {
		width: 100%;
		flex: none;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		text-align: right;
		padding: 0.75rem 0.9rem;
	}

	.ns-el-amazing__title {
		font-size: 1.05rem;
		margin-left: auto;
	}

	.ns-el-amazing__countdown {
		order: 3;
		width: 100%;
		max-width: none;
		margin-top: 0.35rem;
	}

	.ns-el-amazing__view-all {
		font-size: 0.8rem;
		white-space: nowrap;
	}

	.ns-el-amazing__main {
		border-radius: 0;
		padding: 0.55rem 0.45rem 0.65rem;
	}

	.ns-el-amazing__arrow {
		width: 32px;
		height: 32px;
	}

	.ns-el-amazing__arrow--prev,
	.ns-el-amazing__arrow--next {
		top: auto;
		bottom: calc(100% + 0.4rem);
		transform: none;
		inset-inline-start: 0.25rem;
		inset-inline-end: auto;
	}

	.ns-el-amazing__arrow--prev {
		inset-inline-start: auto;
		inset-inline-end: 0.25rem;
	}

	.ns-el-amazing__track.products > li.product {
		min-width: 108px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ns-el-amazing__viewport {
		scroll-behavior: auto;
	}

	.ns-el-amazing__arrow,
	.ns-el-amazing__dot {
		transition: none;
	}
}
