/* =========================================================
   Sina Custom Design v4.0 - PageSpeed 100 & Full-Bleed Architecture
   ========================================================= */

.sina-carousel-wrapper,
.sina-carousel-wrapper * {
	font-family: inherit !important;
	box-sizing: border-box;
}

.sina-carousel-wrapper {
	--sina-cols-desktop: 4;
	--sina-cols-tablet: 2.2;
	--sina-cols-mobile: 1.25;
	--sina-active-cols: var(--sina-cols-desktop);
	--sina-gap: 18px;
	width: 100%;
	position: relative;
	margin: 22px 0;
	border-radius: 22px;
	content-visibility: auto; /* افزایش سرعت رندر اولیه صفحه در Google PageSpeed */
	contain-intrinsic-size: 420px;
}

/* حالت تمام‌عرض واقعی از لبه تا لبه صفحه (Full Bleed) */
.sina-carousel-wrapper.sina-full-bleed {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	border-radius: 0 !important;
	border-left: none !important;
	border-right: none !important;
}

.sina-inner-container {
	width: 100%;
	max-width: 1380px;
	margin: 0 auto;
}

/* =========================================================
   استایل‌ها و گرادینت‌های کل باکس مادر
   ========================================================= */
.sina-carousel-wrapper.sec-style-navy,
.sina-carousel-wrapper.sec-style-grad-cosmic,
.sina-carousel-wrapper.sec-style-grad-ocean,
.sina-carousel-wrapper.sec-style-grad-royal,
.sina-carousel-wrapper.sec-style-grad-aurora {
	padding: 30px 24px;
	color: #f8fafc;
}

.sina-carousel-wrapper.sec-style-navy {
	background: linear-gradient(160deg, #0b132b 0%, #111c44 100%);
}
.sina-carousel-wrapper.sec-style-grad-cosmic {
	background: linear-gradient(135deg, #130b2e 0%, #1e1b4b 50%, #090d16 100%);
}
.sina-carousel-wrapper.sec-style-grad-ocean {
	background: linear-gradient(135deg, #06182c 0%, #0c3559 55%, #071324 100%);
}
.sina-carousel-wrapper.sec-style-grad-royal {
	background: linear-gradient(135deg, #141210 0%, #271f14 55%, #0d0c0b 100%);
}
.sina-carousel-wrapper.sec-style-grad-aurora {
	background: linear-gradient(135deg, #031f1e 0%, #063b33 55%, #08121e 100%);
}

/* رنگ عنوان و تب‌های غیرفعال در پس‌زمینه‌های تیره */
.sina-carousel-wrapper[class*="sec-style-grad-"] .sina-section-title,
.sina-carousel-wrapper.sec-style-navy .sina-section-title {
	color: #ffffff;
}
.sina-carousel-wrapper[class*="sec-style-grad-"] .sina-tab-btn:not(.active),
.sina-carousel-wrapper.sec-style-navy .sina-tab-btn:not(.active) {
	background: rgba(255, 255, 255, 0.08);
	color: #cbd5e1;
	border: 1px solid rgba(255, 255, 255, 0.12);
}

/* استایل روشن و پاستیلی */
.sina-carousel-wrapper.sec-style-light {
	background: #f8fafc;
	padding: 30px 24px;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
	color: #0f172a;
}
.sina-carousel-wrapper.sec-style-light .sina-section-title { color: #0f172a; }
.sina-carousel-wrapper.sec-style-light .sina-tab-btn:not(.active) {
	background: #e2e8f0;
	color: #334155;
}

.sina-carousel-wrapper.sec-style-pastel {
	background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
	padding: 30px 24px;
	color: #1e1b4b;
}
.sina-carousel-wrapper.sec-style-pastel .sina-section-title { color: #1e1b4b; }
.sina-carousel-wrapper.sec-style-pastel .sina-tab-btn:not(.active) {
	background: rgba(255, 255, 255, 0.75);
	color: #4c1d95;
	border: 1px solid rgba(109, 40, 217, 0.15);
}

.sina-carousel-wrapper.sec-style-none { padding: 10px 16px; }
.sina-carousel-wrapper.sec-style-none .sina-tab-btn:not(.active) {
	background: rgba(148, 163, 184, 0.16);
	color: inherit;
}

/* =========================================================
   سربرگ و دکمه‌های کپسولی تب‌ها با گرادینت‌های شیک
   ========================================================= */
.sina-carousel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 22px;
}

.sina-header-right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	min-width: 0;
}

.sina-section-title {
	margin: 0 !important;
	font-size: 20px;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 10px;
	line-height: 1.4;
}

.sina-section-title::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 22px;
	background: linear-gradient(180deg, #38bdf8, #a855f7);
	border-radius: 6px;
	flex-shrink: 0;
}

.sina-tabs-nav {
	display: flex;
	align-items: center;
	gap: 9px;
	overflow-x: auto;
	scrollbar-width: none;
	max-width: 100%;
	padding: 3px 1px;
}
.sina-tabs-nav::-webkit-scrollbar { display: none; }

.sina-tab-btn {
	border: 1px solid transparent;
	padding: 8px 18px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sina-tab-btn:hover {
	transform: translateY(-1px);
}

/* گرادینت‌های تب فعال */
.sina-tab-btn.active {
	color: #ffffff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
.tab-grad-cosmic .sina-tab-btn.active {
	background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
	box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
.tab-grad-gold .sina-tab-btn.active {
	background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
	color: #0f172a !important;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.tab-grad-ocean .sina-tab-btn.active {
	background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
	box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}
.tab-grad-sunset .sina-tab-btn.active {
	background: linear-gradient(135deg, #e11d48 0%, #f97316 100%) !important;
	box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}
.tab-grad-emerald .sina-tab-btn.active {
	background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
	box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* فلش‌های پیمایش دسکتاپ */
.sina-carousel-nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.sina-nav-btn {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	border: none !important;
	background-color: #3b82f6;
	color: #ffffff !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	padding: 0 !important;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.sina-nav-btn svg {
	width: 22px !important;
	height: 22px !important;
	fill: #ffffff !important;
	display: block !important;
}
.sina-nav-btn:hover { transform: translateY(-2px); opacity: 0.9; }

/* =========================================================
   ریل کروسل و هم‌ارتفاعی کارت‌ها
   ========================================================= */
.sina-carousel-track {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: var(--sina-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 6px 2px 14px 2px;
	scrollbar-width: none;
	transition: opacity 0.2s ease;
}
.sina-carousel-track.sina-loading { opacity: 0.45; pointer-events: none; }
.sina-carousel-track::-webkit-scrollbar { display: none; }

.sina-carousel-item {
	flex: 0 0 calc((100% - (var(--sina-active-cols) - 1) * var(--sina-gap)) / var(--sina-active-cols)) !important;
	max-width: calc((100% - (var(--sina-active-cols) - 1) * var(--sina-gap)) / var(--sina-active-cols)) !important;
	scroll-snap-align: start;
	display: flex !important;
	align-items: stretch !important;
	min-width: 0;
}

.sina-card-inner {
	--card-text: #f8fafc;
	--card-subtext: rgba(248, 250, 252, 0.72);
	--card-border: rgba(255, 255, 255, 0.12);
	--price-bg: rgba(0, 0, 0, 0.28);
	--cta-bg: rgba(255, 255, 255, 0.14);
	--cta-text: #ffffff;
	--cta-hover-bg: #38bdf8;
	--cta-hover-text: #0f172a;

	width: 100%;
	height: 100%;
	border-radius: 16px;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	border: 1px solid var(--card-border);
	box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.22);
	transition: transform 0.25s ease;
	color: var(--card-text);
	text-decoration: none;
	position: relative;
}
.sina-card-inner:hover { transform: translateY(-4px); }

/* تم‌های رنگی کارت‌ها */
.theme-navy-pro {
	background: linear-gradient(155deg, #16224a 0%, #0f172a 100%);
	--card-border: rgba(56, 189, 248, 0.2);
	--price-bg: rgba(9, 14, 28, 0.55);
	--cta-bg: #2563eb;
	--cta-text: #ffffff;
	--cta-hover-bg: #38bdf8;
	--cta-hover-text: #090d16;
}
.theme-grad-1  { background: linear-gradient(145deg, #1e1b4b 0%, #311042 55%, #0f172a 100%); }
.theme-grad-2  { background: linear-gradient(145deg, #090d16 0%, #0f2942 55%, #1e3a8a 100%); }
.theme-grad-3  { background: linear-gradient(145deg, #042f2e 0%, #064e3b 55%, #0f172a 100%); }
.theme-grad-4  { background: linear-gradient(145deg, #450a0a 0%, #4c0519 55%, #1e1b4b 100%); }
.theme-grad-5  { background: linear-gradient(145deg, #1c1917 0%, #292524 60%, #422006 100%); }
.theme-grad-6  { background: linear-gradient(145deg, #2e1065 0%, #4c1d95 55%, #172554 100%); }
.theme-grad-7  { background: linear-gradient(145deg, #0c4a6e 0%, #1e3a8a 55%, #090d16 100%); }
.theme-grad-8  { background: linear-gradient(145deg, #3b0764 0%, #1e1b4b 60%, #09090b 100%); }
.theme-grad-9  { background: linear-gradient(145deg, #14532d 0%, #111827 65%, #022c22 100%); }
.theme-grad-10 { background: linear-gradient(145deg, #27272a 0%, #18181b 55%, #09090b 100%); }

.theme-pastel-1, .theme-pastel-2, .theme-pastel-3,
.theme-pastel-4, .theme-pastel-5, .theme-pastel-6,
.theme-classic-1, .theme-classic-2 {
	--card-text: #0f172a;
	--card-subtext: #475569;
	--card-border: rgba(15, 23, 42, 0.1);
	--price-bg: rgba(255, 255, 255, 0.78);
	--cta-bg: #1e293b;
	--cta-text: #ffffff;
	--cta-hover-bg: #2563eb;
	--cta-hover-text: #ffffff;
}
.theme-pastel-1  { background: linear-gradient(145deg, #f3e8ff 0%, #e9d5ff 100%); }
.theme-pastel-2  { background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%); }
.theme-pastel-3  { background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%); }
.theme-pastel-4  { background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%); }
.theme-pastel-5  { background: linear-gradient(145deg, #fce7f3 0%, #fbcfe8 100%); }
.theme-pastel-6  { background: linear-gradient(145deg, #fef9c3 0%, #fef08a 100%); }
.theme-classic-1 { background: #ffffff; }
.theme-classic-2 { background: #f1f5f9; }

@keyframes sinaDynamicThemeCycle {
	0%, 100% {
		background-color: #16224a;
		--card-text: #f8fafc;
		--price-bg: rgba(0, 0, 0, 0.28);
		--cta-bg: #2563eb;
	}
	33% {
		background-color: #e0f2fe;
		--card-text: #0f172a;
		--price-bg: rgba(255, 255, 255, 0.82);
		--cta-bg: #0284c7;
	}
	66% {
		background-color: #f3e8ff;
		--card-text: #1e1b4b;
		--price-bg: rgba(255, 255, 255, 0.82);
		--cta-bg: #6d28d9;
	}
}
.theme-auto-cycle { animation: sinaDynamicThemeCycle 14s infinite ease-in-out; }

/* =========================================================
   تصویر و نشانگرهای دسته‌بندی و اشتراک ویژه (VIP)
   ========================================================= */
.sina-prod-thumb {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	overflow: hidden !important;
	background: rgba(0, 0, 0, 0.14);
	position: relative;
	flex-shrink: 0 !important;
}

.sina-orient-landscape { aspect-ratio: 16 / 9; }
.sina-orient-square    { aspect-ratio: 1 / 1; }
.sina-orient-portrait  { aspect-ratio: 3 / 4; }

.sina-prod-thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	display: block !important;
	transition: transform 0.35s ease;
}
.sina-fit-contain img { object-fit: contain !important; padding: 8px; }
.sina-fit-cover img   { object-fit: cover !important; object-position: center center !important; }
.sina-card-inner:hover .sina-prod-thumb img { transform: scale(1.03); }

/* برچسب دسته‌بندی (بالا سمت راست) */
.sina-badge-cat {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(15, 23, 42, 0.82);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	z-index: 2;
}

/* برچسب اشتراک ویژه VIP (بالا سمت چپ با گرادینت طلایی/کهربایی) */
.sina-badge-vip {
	position: absolute;
	top: 10px;
	left: 10px;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #0f172a;
	font-size: 11px;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	z-index: 2;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

/* =========================================================
   بدنه کارت و قیمت
   ========================================================= */
.sina-card-body {
	padding: 14px;
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	justify-content: space-between !important;
	gap: 12px;
	min-width: 0;
}

.sina-prod-title {
	margin: 0 !important;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.55;
	color: var(--card-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.1em;
}
.sina-prod-title a { color: inherit; text-decoration: none !important; }

.sina-card-footer-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
	width: 100%;
}

/* ردیف قیمت */
.sina-prod-price-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--price-bg);
	padding: 8px 10px;
	border-radius: 11px;
	border: 1px solid var(--card-border);
	gap: 6px;
	width: 100%;
	position: relative;
}

.sina-price-box {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.sina-price-discounted { align-items: flex-end; text-align: left; }
.sina-price-label { font-size: 10px; color: var(--card-subtext); white-space: nowrap; }

.sina-price-original del {
	color: #f87171 !important;
	font-size: 11.5px;
	text-decoration: line-through;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
}
.sina-price-discounted ins {
	text-decoration: none !important;
	color: #34d399 !important;
	font-weight: 800;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
}
.sina-p-curr { font-size: 10px; font-weight: 600; opacity: 0.9; }

.sina-discount-pill {
	background-color: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	padding: 3px 7px;
	border-radius: 7px;
	line-height: 1.2;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.sina-price-divider { width: 1px; height: 24px; background: var(--card-border); flex-shrink: 0; }
.sina-price-single {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	color: var(--card-text);
}

/* دکمه پایین کارت */
.sina-prod-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 9px 12px;
	border-radius: 11px;
	background: var(--cta-bg);
	color: var(--cta-text) !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 13px;
	border: 1px solid var(--card-border);
	transition: all 0.2s ease;
}
.sina-prod-cta:hover {
	background: var(--cta-hover-bg);
	color: var(--cta-hover-text) !important;
}

/* استایل ویژه دکمه مقالات VIP */
.sina-prod-cta.sina-cta-vip {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%);
	border-color: rgba(245, 158, 11, 0.45);
	color: #fcd34d !important;
}
.theme-pastel-1 .sina-cta-vip, .theme-pastel-2 .sina-cta-vip,
.theme-pastel-3 .sina-cta-vip, .theme-pastel-4 .sina-cta-vip,
.theme-pastel-5 .sina-cta-vip, .theme-pastel-6 .sina-cta-vip,
.theme-classic-1 .sina-cta-vip, .theme-classic-2 .sina-cta-vip {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #0f172a !important;
}

/* کارت پایانی مشاهده همه */
.sina-view-all-card {
	align-items: center !important;
	justify-content: center !important;
	text-align: center;
	padding: 20px;
	border: 2px dashed var(--card-border);
}
.sina-view-all-content { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sina-view-all-icon {
	width: 54px; height: 54px; border-radius: 50%;
	background: var(--price-bg);
	display: flex; align-items: center; justify-content: center;
	color: var(--card-text);
}
.sina-view-all-title { font-size: 15px; font-weight: 800; color: var(--card-text); line-height: 1.5; }
.sina-view-all-sub {
	font-size: 11.5px; color: var(--card-subtext);
	background: var(--price-bg); padding: 4px 12px; border-radius: 20px;
}

/* =========================================================
   واکنش‌گرایی تبلت و موبایل (مینیمال + درصد تخفیف بالاتر و واضح‌تر)
   ========================================================= */
@media (max-width: 1024px) {
	.sina-carousel-wrapper { --sina-active-cols: var(--sina-cols-tablet); }
}

@media (max-width: 767px) {
	.sina-carousel-wrapper {
		--sina-active-cols: var(--sina-cols-mobile);
		--sina-gap: 12px;
	}

	.sina-carousel-wrapper.sec-style-navy,
	.sina-carousel-wrapper[class*="sec-style-grad-"],
	.sina-carousel-wrapper.sec-style-light,
	.sina-carousel-wrapper.sec-style-pastel {
		padding: 18px 12px;
	}

	.sina-carousel-nav { display: none !important; }
	.sina-section-title { font-size: 16px; }
	.sina-card-body { padding: 12px; gap: 10px; }

	/* در موبایل کپسول درصد تخفیف کمی بالاتر روی لبه کادر قیمت قرار می‌گیرد تا هم واضح‌تر باشد و هم جای قیمت‌ها باز شود */
	.sina-prod-price-row {
		margin-top: 8px;
		padding: 10px 8px 7px 8px;
		gap: 4px;
	}

	.sina-discount-pill {
		position: absolute;
		top: -11px;
		left: 50%;
		transform: translateX(-50%);
		font-size: 10.5px;
		padding: 2px 9px;
		border-radius: 12px;
		z-index: 3;
	}

	.sina-price-original del { font-size: 10.5px; }
	.sina-price-discounted ins { font-size: 11.5px; }
}
