.clw-courses-wrap {
	--clw-primary: #4f46e5;
	--clw-green: #16a34a;
	--clw-green-dark: #15803d;
	--clw-border: #e6e8f0;
	--clw-bg: #f8f9fc;
	--clw-text: #1f2430;
	--clw-muted: #8a8f98;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Vazirmatn", sans-serif;
	color: var(--clw-text);
	position: relative;
}
.clw-courses-empty { color: #6b7280; }

/* فیلتر دسته‌بندی از attribute hidden استفاده می‌کند؛ چون کارت display:flex
   دارد، باید صریحاً خنثی شود وگرنه مخفی نمی‌شود. */
.clw-course-item[hidden] { display: none !important; }

/* ===== کارت مشترک هر دوره (پایه برای هر سه حالت) ===== */
.clw-course-item {
	background: #fff; border: 1px solid #eceef3; border-radius: 22px;
	overflow: hidden; display: flex; flex-direction: column;
	box-shadow: 0 2px 6px rgba(16,24,40,.05);
	transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
	text-decoration: none;
}
.clw-course-item:hover {
	box-shadow: 0 18px 36px rgba(16,24,40,.12);
	transform: translateY(-4px);
	border-color: #dfe3ee;
}

.clw-ci-thumb-link { position: relative; display: block; aspect-ratio: 4/3; background: var(--clw-bg); overflow: hidden; }
.clw-ci-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.clw-course-item:hover .clw-ci-thumb { transform: scale(1.05); }
.clw-ci-thumb-placeholder { display: flex; align-items: center; justify-content: center; font-size: 40px; }

.clw-ci-urgent-badge {
	position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1;
	background: #dc2626; color: #fff; font-size: 11.5px; font-weight: 700;
	padding: 5px 11px; border-radius: 999px;
	box-shadow: 0 2px 8px rgba(220,38,38,.35);
	animation: clwPulse 1.8s ease-in-out infinite;
}
@keyframes clwPulse { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }

.clw-ci-promo-badge {
	position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1;
	background: linear-gradient(135deg, #f59e0b, #ea580c);
	color: #fff; font-size: 11.5px; font-weight: 700;
	padding: 5px 13px; border-radius: 999px;
	box-shadow: 0 2px 8px rgba(234,88,12,.35);
}

.clw-ci-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; background: #f7f9fa; }

/* ردیف بالا: عنوان دوره (راست) + تعداد خریداران (چپ) */
.clw-ci-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.clw-ci-title {
	font-weight: 800; font-size: 15px; line-height: 1.6; color: var(--clw-text); text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	transition: color 150ms ease;
	flex: 1;
}
.clw-ci-title:hover { color: var(--clw-primary); }
.clw-ci-category { font-size: 12px; color: #b0b6bc; margin-top: -4px; }
.clw-ci-excerpt { font-size: 12.5px; color: var(--clw-muted); margin: 0; line-height: 1.6; }

.clw-ci-stat-row { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-inline-start: auto; }
.clw-ci-stat-num { font-size: 12.5px; font-weight: 700; color: #9aa0ab; }
.clw-ci-stat-icon { font-size: 14px; opacity: .6; }
.clw-custom-icon-img { display: inline-block; vertical-align: middle; object-fit: contain; }

.clw-ci-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.clw-ci-price .amount { font-size: 18px; font-weight: 800; color: #000b2a; }
.clw-ci-price ins { text-decoration: none; }
.clw-ci-price .woocommerce-Price-currencySymbol { color: #16a34a; font-weight: 700; font-size: 11px; }
.clw-ci-price del { color: #ef4444; font-weight: 600; font-size: 11.5px; opacity: .85; }
.clw-ci-price del .amount { font-size: 11.5px; font-weight: 600; color: #ef4444; }
.clw-ci-price del .woocommerce-Price-currencySymbol { color: #ef4444; font-size: 10px; }

.clw-ci-ended { color: #d63638; font-weight: 700; font-size: 12.5px; }

/* نوار نازک شانس قرعه‌کشی - فقط یک خط، بدون تصویر/آیکون هدیه */
.clw-ci-ticket-strip {
	font-size: 11.5px; font-weight: 700; color: #92400e;
	background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px;
	padding: 5px 10px; line-height: 1.7;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.clw-ci-progress-bar { width: 100%; height: 6px; border-radius: 999px; background: #fff; overflow: hidden; border: 1px solid var(--clw-border); }
.clw-ci-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #7c3aed); transition: width .3s ease; }
.clw-ci-progress-bar.is-urgent .clw-ci-progress-fill { background: linear-gradient(90deg, #dc2626, #f97316); }

/* ردیف پایین: آیکون نوع دوره + دکمه سبز CTA (نازک‌تر از قبل) */
.clw-ci-cta-row { display: flex; align-items: stretch; gap: 8px; margin-top: 2px; height: 38px; }

/* ------------------------------------------------------------------
   محافظت از قابلِ کلیک بودن دکمه خرید
   المنتور (و بعضی قالب‌ها) روی کانتینرها یک لایه شفاف تمام‌صفحه می‌گذارند
   — مثل .elementor-element-overlay یا لینکِ کل کانتینر — که دقیقاً روی کارت
   می‌نشیند و کلیک را می‌بلعد. نتیجه: دکمه «غیرفعال» به‌نظر می‌رسد بدون هیچ
   خطایی. این قوانین دکمه را بالای آن لایه‌ها می‌آورند.
   ------------------------------------------------------------------ */
.clw-course-item { position: relative; z-index: 1; }
.clw-ci-body { position: relative; z-index: 2; }
.clw-ci-cta-row { position: relative; z-index: 5; }
.clw-ci-cta,
.clw-ci-type-icon,
.clw-courses-wrap a[data-clw-go] {
	position: relative;
	z-index: 6;
	pointer-events: auto !important;
	cursor: pointer;
}

/* اگر المنتور لایه پوششی تزریق کرده باشد، داخل کارت ما بی‌اثر می‌شود */
.clw-course-item .elementor-element-overlay,
.clw-course-item .elementor-widget-container > a.elementor-element-overlay {
	pointer-events: none !important;
}

.clw-ci-type-icon {
	flex-shrink: 0; width: 38px; border-radius: 10px;
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	display: flex; align-items: center; justify-content: center;
	font-size: 16px; box-shadow: 0 3px 8px rgba(245,158,11,.3);
	text-decoration: none; cursor: pointer;
	transition: transform 150ms ease;
}
.clw-ci-type-icon:hover { transform: translateY(-1px); }

.clw-ci-cta {
	flex: 1;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: #fff; text-decoration: none;
	font-size: 13.5px; font-weight: 700; padding: 0 16px; border-radius: 10px;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	box-shadow: 0 4px 12px rgba(22,163,74,.28);
	transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.clw-ci-cta:hover { opacity: .93; color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.38); }
.clw-ci-cta-arrow { transition: transform 150ms ease; }
.clw-ci-cta:hover .clw-ci-cta-arrow { transform: translateX(-4px); }

/* ===== حالت شبکه‌ای (grid) ===== */
.clw-courses-grid {
	display: grid;
	grid-template-columns: repeat(var(--clw-cols, 3), 1fr);
	gap: 24px;
}
@media (max-width: 900px) { .clw-courses-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .clw-courses-grid { grid-template-columns: 1fr !important; } }

/* ===== حالت لیستی (list) ===== */
.clw-layout-list .clw-courses-grid { grid-template-columns: 1fr !important; gap: 16px; }
.clw-layout-list .clw-course-item { flex-direction: row; }
.clw-layout-list .clw-ci-thumb-link { width: 260px; flex-shrink: 0; aspect-ratio: auto; }
.clw-layout-list .clw-ci-body { flex-direction: column; }
@media (max-width: 640px) {
	.clw-layout-list .clw-course-item { flex-direction: column; }
	.clw-layout-list .clw-ci-thumb-link { width: 100%; aspect-ratio: 4/3; }
}

/* ===== نوار ابزار: جستجو + مرتب‌سازی ===== */
.clw-courses-toolbar {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin-bottom: 14px;
}

.clw-search-box {
	position: relative; flex: 1 1 260px; min-width: 200px;
	display: flex; align-items: center;
}
.clw-search-icon {
	position: absolute; inset-inline-start: 14px; width: 17px; height: 17px;
	color: var(--clw-muted); pointer-events: none; display: flex;
}
.clw-search-icon svg { width: 100%; height: 100%; }
.clw-search-input {
	width: 100%; box-sizing: border-box;
	padding: 12px 42px 12px 42px;
	border: 1px solid var(--clw-border); border-radius: 14px;
	background: #fff; color: var(--clw-text);
	font-family: inherit; font-size: 13.5px; line-height: 1.6;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	-webkit-appearance: none; appearance: none;
}
.clw-search-input::placeholder { color: #a7aebb; }
.clw-search-input:focus {
	outline: none; border-color: var(--clw-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
/* حذف ضربدر پیش‌فرض مرورگر تا با دکمه خودمان تداخل نکند */
.clw-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.clw-search-clear {
	all: unset; cursor: pointer; position: absolute; inset-inline-end: 14px;
	width: 22px; height: 22px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 17px; line-height: 1; color: #8a8f98; background: #f0f2f7;
	transition: background 150ms ease, color 150ms ease;
}
.clw-search-clear:hover { background: #e2e6f0; color: #4b5563; }

.clw-search-spinner {
	position: absolute; inset-inline-end: 42px;
	width: 15px; height: 15px; border-radius: 50%;
	border: 2px solid rgba(79,70,229,.2); border-top-color: var(--clw-primary);
	animation: clwSpin .7s linear infinite;
}
@keyframes clwSpin { to { transform: rotate(360deg); } }

.clw-sort-box { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.clw-sort-label { font-size: 12.5px; font-weight: 700; color: var(--clw-muted); white-space: nowrap; }
.clw-sort-select {
	box-sizing: border-box; padding: 11px 14px;
	border: 1px solid var(--clw-border); border-radius: 14px;
	background: #fff; color: var(--clw-text);
	font-family: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.clw-sort-select:focus {
	outline: none; border-color: var(--clw-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* حالت در حال بارگذاری نتایج */
.clw-courses-wrap.is-loading .clw-courses-results {
	opacity: .45; pointer-events: none;
	transition: opacity 180ms ease;
}
.clw-courses-results { transition: opacity 180ms ease; }

/* ===== نوار فیلتر دسته‌بندی ===== */

/* مهم: ظرف اصلی نباید هیچ‌وقت پهن‌تر از صفحه شود. بدون این، نوارِ دسته‌بندی
   با تعداد زیاد چیپ، کل صفحه را افقی می‌کشید و هدر و محتوا جابه‌جا می‌شد. */
.clw-courses-wrap {
	max-width: 100%;
	overflow-x: hidden;      /* پشتیبان برای مرورگرهای قدیمی */
	overflow-x: clip;        /* بدون ساختن ظرف اسکرول — مرورگرهای جدید */
}

.clw-filter-bar {
	position: relative;
	margin-bottom: 16px;
	max-width: 100%;
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.clw-filter-scroll {
	display: flex; gap: 8px;
	flex: 1 1 auto;
	min-width: 0;                 /* اجازه کوچک‌شدن داخل فلکس — کلید نبودن سرریز */
	max-width: 100%;
	overflow-x: auto;
	padding: 2px 2px 6px;
	scrollbar-width: none; -ms-overflow-style: none;
	-webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scroll-padding-inline: 8px;
}
.clw-filter-scroll::-webkit-scrollbar { display: none; }

/* محوشدگی لبه‌ها: نشانه بصری اینکه دسته‌های بیشتری هست */
.clw-filter-bar::before,
.clw-filter-bar::after {
	content: "";
	position: absolute; top: 0; bottom: 6px;
	width: 52px; pointer-events: none; z-index: 2;
	opacity: 0; transition: opacity 200ms ease;
}
/* چون ظرف همیشه راست‌به‌چپ است، inset-inline-start یعنی لبه راست */
.clw-filter-bar::before {
	inset-inline-start: 0;
	background: linear-gradient(to left, rgba(255,255,255,1) 18%, rgba(255,255,255,.82) 42%, rgba(255,255,255,0));
	filter: drop-shadow(-9px 0 8px rgba(15,23,42,.10));
}
.clw-filter-bar::after {
	inset-inline-end: 0;
	background: linear-gradient(to right, rgba(255,255,255,1) 18%, rgba(255,255,255,.82) 42%, rgba(255,255,255,0));
	filter: drop-shadow(9px 0 8px rgba(15,23,42,.10));
}
.clw-filter-bar.has-overflow:not(.at-start)::before { opacity: 1; }
.clw-filter-bar.has-overflow:not(.at-end)::after { opacity: 1; }

/* دکمه‌های پیمایش — فقط دسکتاپ و فقط وقتی سرریز هست.
   جهت فلش‌ها با آیکن SVG کنترل می‌شود نه کاراکتر متنی، چون کاراکترهای ‹ و ›
   در محیط راست‌به‌چپ بسته به مرورگر جابه‌جا رندر می‌شدند. */
.clw-filter-nav {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: none; flex: 0 0 auto;
	width: 34px; height: 34px; border-radius: 50%;
	align-items: center; justify-content: center;
	background: #fff; border: 1px solid var(--clw-border);
	color: var(--clw-primary);
	box-shadow: 0 2px 8px rgba(16,24,40,.08);
	transition: background 150ms ease, color 150ms ease, opacity 150ms ease;
	z-index: 3;
}
.clw-filter-nav svg { width: 17px; height: 17px; display: block; }
.clw-filter-nav:hover { background: #f2af08; color: #17130a; border-color: #f2af08; }
.clw-filter-bar.has-overflow .clw-filter-nav { display: flex; }
.clw-filter-bar.at-start .clw-filter-prev,
.clw-filter-bar.at-end .clw-filter-next { opacity: .3; pointer-events: none; }

/* ===== دکمه دسته‌بندی موبایل ===== */
.clw-cat-trigger { display: none; }

@media (max-width: 700px) {
	/* روی موبایل نوار افقی و دکمه‌های پیمایش کنار می‌روند و جایشان را
	   یک دکمه‌ی واضح می‌گیرد که همه دسته‌ها را در یک برگه نشان می‌دهد. */
	.clw-filter-bar .clw-filter-nav,
	.clw-filter-bar .clw-filter-scroll { display: none !important; }
	.clw-filter-bar::before, .clw-filter-bar::after { display: none; }

	.clw-filter-bar { padding-inline: 14px; }

	.clw-cat-trigger {
		all: unset; box-sizing: border-box; cursor: pointer;
		display: flex; align-items: center; gap: 11px;
		width: 100%; min-height: 56px; padding: 10px 14px;
		border: 1px solid var(--clw-border); border-radius: 15px;
		background: #fff; font-family: inherit;
		box-shadow: 0 8px 24px rgba(242,175,8,.10);
		transition: border-color 160ms ease, transform 140ms ease;
		-webkit-tap-highlight-color: transparent;
	}
	.clw-cat-trigger:active { transform: scale(.985); border-color: #c9cfe6; }

	.clw-cat-trigger-ico {
		width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px;
		display: flex; align-items: center; justify-content: center;
		background: rgba(242,175,8,.14); color: #f2af08;
	}
	.clw-cat-trigger-ico svg { width: 19px; height: 19px; }

	.clw-cat-trigger-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; text-align: start; }
	.clw-cat-trigger-label { font-size: 11px; color: var(--clw-muted); }
	.clw-cat-trigger-value {
		font-size: 14px; font-weight: 800; color: var(--clw-text);
		white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	}
	.clw-cat-trigger-badge {
		flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
		min-width: 76px; text-align: center; padding: 7px 11px; border-radius: 999px;
		background: #f2af08; color: #17130a; border: 1px solid rgba(0,0,0,.04);
		box-shadow: 0 6px 16px rgba(242,175,8,.28);
		font-size: 11.5px; font-weight: 900;
		animation: clwViewPulse 2.2s ease-in-out infinite;
	}
	.clw-cat-trigger-badge svg { width: 14px; height: 14px; transition: transform 180ms ease; }
	.clw-cat-trigger:hover .clw-cat-trigger-badge svg { transform: translateX(-2px); }
	@keyframes clwViewPulse {
		0%,100% { transform: translateY(0); box-shadow: 0 6px 16px rgba(242,175,8,.24); }
		50% { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(242,175,8,.38); }
	}
}

/* ===== برگه انتخاب دسته‌بندی (Bottom Sheet) ===== */
.clw-cat-sheet { position: fixed; inset: 0; z-index: 99997; }
.clw-cat-sheet[hidden] { display: none; }

.clw-cat-sheet-backdrop {
	position: absolute; inset: 0;
	background: rgba(15, 23, 42, .5);
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	opacity: 0; transition: opacity 260ms ease;
}
.clw-cat-sheet.is-open .clw-cat-sheet-backdrop { opacity: 1; }

.clw-cat-sheet-panel {
	position: absolute; inset-inline: 0; bottom: 0;
	max-height: 78vh; display: flex; flex-direction: column;
	background: #fff;
	border-radius: 22px 22px 0 0;
	box-shadow: 0 -14px 40px rgba(15, 23, 42, .22);
	transform: translateY(100%);
	transition: transform 320ms cubic-bezier(.32, .72, 0, 1);
	padding-bottom: env(safe-area-inset-bottom);
	direction: rtl;
}
.clw-cat-sheet.is-open .clw-cat-sheet-panel { transform: none; }

.clw-cat-sheet-grip {
	width: 42px; height: 4px; border-radius: 999px;
	background: #dfe3ec; margin: 9px auto 4px; flex-shrink: 0;
}

.clw-cat-sheet-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 10px; padding: 8px 16px 12px;
	border-bottom: 1px solid #eef0f6; flex-shrink: 0;
}
.clw-cat-sheet-head h3 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--clw-text); }
.clw-cat-sheet-close {
	all: unset; cursor: pointer;
	width: 34px; height: 34px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-size: 21px; line-height: 1; color: var(--clw-muted); background: #f4f5fa;
}
.clw-cat-sheet-close:active { background: #e8eaf3; }

.clw-cat-sheet-list {
	flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 8px 10px 14px;
	display: flex; flex-direction: column; gap: 2px;
}

.clw-cat-option {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; min-height: 52px; padding: 11px 13px;
	border-radius: 13px; font-family: inherit;
	transition: background 150ms ease;
	-webkit-tap-highlight-color: transparent;
}
.clw-cat-option:active { background: #f1f2f8; }
.clw-cat-option-name { font-size: 14px; font-weight: 700; color: var(--clw-text); }
.clw-cat-option-count {
	flex-shrink: 0; min-width: 26px; text-align: center;
	padding: 3px 9px; border-radius: 999px;
	background: #f1f3f7; color: var(--clw-muted);
	font-size: 11.5px; font-weight: 700;
}
.clw-cat-option.is-active { background: rgba(242,175,8,.14); }
.clw-cat-option.is-active .clw-cat-option-name { color: #9a6b00; }
.clw-cat-option.is-active .clw-cat-option-count { background: #f2af08; color: #17130a; }

@media (min-width: 701px) {
	/* روی دسکتاپ نوار چیپ کافی است */
	.clw-cat-sheet { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.clw-cat-sheet-panel, .clw-cat-sheet-backdrop { transition: none !important; }
}
.clw-filter-chip {
	all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap;
	flex: 0 0 auto; scroll-snap-align: center;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 9px 15px; border-radius: 999px;
	background: #fff; border: 1px solid var(--clw-border);
	font-size: 13px; font-weight: 700; color: #55606f;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
	-webkit-tap-highlight-color: transparent;
}
.clw-filter-chip:hover { border-color: #c9cfe6; color: var(--clw-primary); }
.clw-filter-chip:active { transform: scale(.97); }
.clw-filter-chip.is-active {
	background: linear-gradient(135deg, #f2af08, #ffc83d);
	border-color: transparent; color: #17130a;
	box-shadow: 0 6px 16px rgba(242,175,8,.28);
}
.clw-filter-count {
	font-size: 11px; font-weight: 700; line-height: 1;
	padding: 3px 7px; border-radius: 999px;
	background: rgba(15,23,42,.06); color: inherit; opacity: .8;
}
.clw-filter-chip.is-active .clw-filter-count { background: rgba(255,255,255,.22); opacity: 1; }

/* حالت خالی: پیام واضح به‌جای فضای سفید بی‌معنی */
.clw-filter-empty {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	text-align: center; padding: 34px 20px; color: #6b7280;
	background: #fafbfd; border: 1px dashed var(--clw-border);
	border-radius: 16px; font-size: 13.5px;
}
.clw-filter-empty[hidden] { display: none; }

/* شبکه نباید هنگام خالی بودن ارتفاع اشغال کند */
.clw-courses-grid:empty { display: none; }

/* دکمه «نمایش بیشتر» وقتی چیزی برای نمایش نیست پنهان می‌شود */
.clw-loadmore-wrap[hidden] { display: none !important; }

/* ===== حالت اسلایدر (carousel) ===== */
.clw-carousel-viewport { position: relative; }
.clw-carousel-track {
	display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; scroll-behavior: smooth;
	overscroll-behavior-x: contain; /* اسکرول افقی، اسکرول عمودی صفحه را نمی‌دزدد */
	-webkit-overflow-scrolling: touch;
	padding: 4px 46px 12px;
	scrollbar-width: none; -ms-overflow-style: none;
	outline: none;
}
.clw-carousel-track::-webkit-scrollbar { display: none; }
.clw-carousel-track.is-dragging { scroll-behavior: auto; scroll-snap-type: none; cursor: grabbing; }
.clw-carousel-track.is-dragging .clw-course-item { pointer-events: none; }
.clw-carousel-track .clw-course-item {
	flex: 0 0 280px; scroll-snap-align: center; scroll-snap-stop: always;
}
.clw-carousel-nav {
	all: unset; box-sizing: border-box; cursor: pointer;
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 38px; height: 38px; border-radius: 50%;
	background: #fff; border: 1px solid var(--clw-border);
	box-shadow: 0 6px 16px rgba(16,24,40,.1);
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: var(--clw-primary); z-index: 2;
	transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}
.clw-carousel-nav:hover:not(:disabled) { background: var(--clw-primary); color: #fff; transform: translateY(-50%) scale(1.06); }
.clw-carousel-nav:disabled { opacity: .3; cursor: default; }
.clw-carousel-prev { inset-inline-start: 0; }
.clw-carousel-next { inset-inline-end: 0; }

/* نوار پیشرفت به‌جای اسکرول‌بار خام مرورگر */
.clw-carousel-progress {
	position: relative; height: 4px; border-radius: 999px;
	background: #e9ecf4; margin: 4px auto 0; max-width: 220px; overflow: hidden;
	opacity: 0; transition: opacity 200ms ease;
}
.is-scrollable > .clw-carousel-progress { opacity: 1; }
.clw-carousel-progress-bar {
	position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 30%;
	border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #7c3aed);
	transition: inset-inline-start 120ms linear, width 120ms linear;
}

/* ===== «نمایش بیشتر» (جایگزین اسکرول افقی در حالت شبکه‌ای/لیستی) ===== */
.clw-course-item.is-overflow { display: none !important; }

.clw-course-item.is-revealed {
	animation: clwReveal .32s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes clwReveal {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

.clw-loadmore-wrap { display: flex; justify-content: center; margin-top: 22px; }

.clw-loadmore {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
	padding: 13px 34px; border-radius: 14px;
	background: #fff; border: 1px solid var(--clw-border);
	color: var(--clw-primary);
	font-family: inherit; text-align: center;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .05);
	transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms ease, box-shadow 180ms ease;
	-webkit-tap-highlight-color: transparent;
}
.clw-loadmore:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	border-color: transparent; color: #fff;
	box-shadow: 0 10px 22px rgba(79, 70, 229, .26);
	transform: translateY(-2px);
}
.clw-loadmore:active { transform: translateY(0); }

.clw-loadmore-txt { font-size: 14px; font-weight: 800; }
.clw-loadmore-count { font-size: 11.5px; font-weight: 600; opacity: .7; }

@media (max-width: 700px) {
	.clw-loadmore-wrap { margin-top: 16px; padding-inline: 14px; }
	.clw-loadmore { width: 100%; padding: 15px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.clw-course-item.is-revealed { animation: none; }
}

/* ===== حالت بخش‌بندی بر اساس دسته‌بندی (sections) ===== */
.clw-cat-section { margin-bottom: 34px; max-width: 100%; min-width: 0; }
.clw-cat-section[hidden] { display: none !important; }
.clw-cat-section:last-child { margin-bottom: 0; }

.clw-cat-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 12px; margin: 0 0 14px; padding-inline: 4px;
}
.clw-cat-title {
	margin: 0; font-size: 19px; font-weight: 800; color: var(--clw-text);
	display: flex; align-items: baseline; gap: 9px; line-height: 1.5;
}
/* خط تزیینی کوتاه کنار عنوان هر دسته */
.clw-cat-title:before {
	content: ""; width: 4px; height: 18px; border-radius: 999px; flex-shrink: 0;
	background: linear-gradient(180deg, #4f46e5, #7c3aed);
	align-self: center;
}
.clw-cat-count { font-size: 12px; font-weight: 600; color: var(--clw-muted); }
.clw-cat-more {
	font-size: 13px; font-weight: 700; color: var(--clw-primary);
	text-decoration: none; white-space: nowrap; flex-shrink: 0;
	display: inline-flex; align-items: center; gap: 4px;
	transition: gap 150ms ease, opacity 150ms ease;
}
.clw-cat-more:hover { gap: 8px; opacity: .85; color: var(--clw-primary); }

/* در حالت بخش‌بندی، هر ردیف اسلایدر خودش را دارد */
.clw-layout-sections .clw-carousel-viewport { position: relative; }
.clw-layout-sections .clw-carousel-progress { margin-top: 2px; }

/* ===== موبایل: اسکرول افقی روان و تمام‌عرض ===== */
@media (max-width: 700px) {
	/* دکمه‌های فِلِش روی موبایل جای انگشت را می‌گیرند و لازم نیستند */
	.clw-carousel-nav { display: none; }

	.clw-layout-carousel { padding: 0; }

	/* کارت‌ها تا لبه صفحه کشیده می‌شوند تا معلوم باشد ادامه دارد */
	.clw-carousel-track {
		gap: 12px;
		padding: 4px 14px 12px;
		scroll-padding-inline: 14px;
		scroll-snap-type: x mandatory;
	}
	.clw-carousel-track .clw-course-item {
		flex: 0 0 82%;          /* لبه کارت بعدی دیده می‌شود = راهنمای بصری اسکرول */
		max-width: 300px;
		scroll-snap-align: start;
	}
	/* روی موبایل انیمیشن hover/بالا پریدن کارت بی‌معنی است و باعث لرزش می‌شود */
	.clw-course-item { transition: none; }
	.clw-course-item:hover { transform: none; box-shadow: 0 2px 6px rgba(16,24,40,.05); }
	.clw-course-item:hover .clw-ci-thumb { transform: none; }
	.clw-course-item:active { transform: scale(.985); transition: transform 120ms ease; }

	.clw-carousel-progress { max-width: 140px; }

	/* لمس راحت‌تر روی دکمه خرید */
	.clw-ci-cta-row { height: 44px; }
	.clw-ci-type-icon { width: 44px; }
	.clw-ci-body { padding: 14px 15px 15px; }
	.clw-ci-title { font-size: 14.5px; }

	/* نوار فیلتر تا لبه صفحه */
	.clw-filter-scroll { padding-inline: 14px; }
	.clw-filter-chip { padding: 10px 14px; font-size: 12.5px; }

	/* نوار ابزار روی موبایل: جستجو تمام‌عرض، مرتب‌سازی زیر آن */
	.clw-courses-toolbar { gap: 10px; padding-inline: 14px; }
	.clw-search-box { flex: 1 1 100%; }
	.clw-sort-box { flex: 1 1 100%; }
	.clw-sort-select { flex: 1; }
	.clw-search-input { font-size: 16px; } /* جلوگیری از زوم خودکار سافاری iOS */

	/* حالت شبکه‌ای روی موبایل هم اسکرول افقی نمی‌شود؛ تک‌ستونی و راحت می‌ماند */
	.clw-layout-grid .clw-courses-grid,
	.clw-layout-list .clw-courses-grid { gap: 14px; }

	/* بخش‌بندی روی موبایل: عنوان‌ها کوچک‌تر و فاصله‌ها فشرده‌تر */
	.clw-layout-sections { padding: 0; }
	.clw-cat-section { margin-bottom: 26px; }
	.clw-cat-head { padding-inline: 14px; margin-bottom: 10px; }
	.clw-cat-title { font-size: 16.5px; }
	.clw-cat-title:before { height: 16px; }
	.clw-cat-more { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.clw-carousel-track { scroll-behavior: auto; }
	.clw-ci-urgent-badge { animation: none; }
}

/* ===== پاپ‌آپ تیزر دوره ===== */
html.clw-teaser-open,
body.clw-teaser-open { overflow: hidden !important; }

.clw-teaser-modal[hidden] { display: none !important; }
.clw-teaser-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	font-family: inherit;
	direction: rtl;
}
.clw-teaser-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 7, 13, .74);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity .2s ease;
}
.clw-teaser-dialog {
	position: relative;
	z-index: 1;
	width: min(920px, 92vw);
	max-height: 90vh;
	background: #0b0d12;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 28px 90px rgba(0,0,0,.45);
	transform: translateY(12px) scale(.985);
	opacity: 0;
	transition: opacity .22s ease, transform .22s ease;
}
.clw-teaser-modal.is-open .clw-teaser-backdrop { opacity: 1; }
.clw-teaser-modal.is-open .clw-teaser-dialog { opacity: 1; transform: none; }

.clw-teaser-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 18px;
	background: rgba(255,255,255,.035);
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.clw-teaser-heading { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.clw-teaser-heading strong { color: #fff; font-size: 17px; line-height: 1.5; }
.clw-teaser-course-title {
	color: rgba(255,255,255,.62);
	font-size: 12.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 70vw;
}
.clw-teaser-close {
	all: unset;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: rgba(255,255,255,.08);
	color: #fff;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.clw-teaser-close:hover { background: rgba(255,255,255,.15); transform: scale(1.04); }
.clw-teaser-close:focus-visible { outline: 2px solid #f8ba18; outline-offset: 2px; }

.clw-teaser-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}
.clw-teaser-media,
.clw-teaser-media > iframe,
.clw-teaser-media > video,
.clw-teaser-aparat-host,
.clw-teaser-aparat-host iframe {
	width: 100% !important;
	height: 100% !important;
	border: 0;
	display: block;
}
.clw-teaser-media { position: absolute; inset: 0; }
.clw-teaser-video { object-fit: contain; background: #000; }
.clw-teaser-iframe { background: #000; }
.clw-teaser-trigger { cursor: pointer; }

@media (max-width: 700px) {
	.clw-teaser-modal { padding: 10px; }
	.clw-teaser-dialog { width: 100%; border-radius: 16px; }
	.clw-teaser-head { padding: 12px 13px; }
	.clw-teaser-heading strong { font-size: 15px; }
	.clw-teaser-course-title { font-size: 11.5px; max-width: 68vw; }
	.clw-teaser-close { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
}

/* ===== Desktop category edge fade — Riano adjustment =====
   Fade the clipped category itself instead of ending it with a hard edge.
   Mobile category UI remains untouched. */
@media (min-width: 701px) {
	.clw-filter-scroll {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 58px, #000 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 58px, #000 100%);
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
		-webkit-mask-size: 100% 100%;
		mask-size: 100% 100%;
	}

	/* The mask now handles the soft edge; disable the old white overlay
	   on the clipped (left/end) side so chips don't look abruptly cut. */
	.clw-filter-bar::after {
		display: none !important;
	}
}
/* =========================================================
   COURSE SIDE ICON — FINAL
   teaser     => play.png
   no teaser  => open.png
========================================================= */

.clw-courses-wrap .clw-ci-type-icon {
    position: relative !important;
    overflow: hidden !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* این دو خط آیکن/ایموجی قدیمی را واقعاً نامرئی می‌کنند */
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;

    background: linear-gradient(
        135deg,
        #fbc12c 0%,
        #f2af08 100%
    ) !important;

    transition:
        transform .25s cubic-bezier(.2,.8,.2,1),
        box-shadow .25s ease,
        filter .25s ease !important;
}

/* اگر آیکن قدیمی SVG یا span باشد */
.clw-courses-wrap .clw-ci-type-icon > * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* پاک کردن pseudo-elementهای قبلی */
.clw-courses-wrap .clw-ci-type-icon::before,
.clw-courses-wrap .clw-ci-type-icon::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;

    width: 28px !important;
    height: 28px !important;

    top: 50% !important;
    left: 50% !important;

    transform: translate(-50%, -50%) !important;

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    pointer-events: none !important;
}

/* فقط ::before را برای آیکن استفاده می‌کنیم */
.clw-courses-wrap .clw-ci-type-icon::after {
    display: none !important;
}

/* دوره بدون تیزر */
.clw-courses-wrap .clw-ci-type-icon::before {
    background-image: url("https://wsho.ir/img/open.png") !important;
}

/* دوره دارای تیزر */
.clw-courses-wrap .clw-ci-type-icon.clw-teaser-trigger::before {
    background-image: url("https://wsho.ir/img/play.png") !important;
}

/* Hover */
@media (hover: hover) {

    .clw-courses-wrap .clw-ci-type-icon:hover {
        transform: translateY(-3px) scale(1.06) !important;

        box-shadow:
            0 10px 22px rgba(242,175,8,.30),
            0 3px 8px rgba(0,0,0,.10) !important;

        filter: brightness(1.04) !important;
    }

    .clw-courses-wrap .clw-ci-type-icon:hover::before {
        transform:
            translate(-50%, -50%)
            scale(1.12)
            rotate(-3deg) !important;
    }

    .clw-courses-wrap .clw-ci-type-icon.clw-teaser-trigger:hover::before {
        animation: clwPlayPulse .7s ease-in-out infinite alternate !important;
    }
}

@keyframes clwPlayPulse {
    from {
        transform:
            translate(-50%, -50%)
            scale(1.06)
            rotate(-2deg);
    }

    to {
        transform:
            translate(-50%, -50%)
            scale(1.16)
            rotate(2deg);
    }
}

.clw-courses-wrap .clw-ci-type-icon:active {
    transform: scale(.94) !important;
}

/* Mobile */
@media (max-width: 768px) {
    .clw-courses-wrap .clw-ci-type-icon::before {
        width: 25px !important;
        height: 25px !important;
    }
}