/* =============================================================================
   MFX Festival — Popup جشنواره
   تمام کلاس‌ها با پیشوند mfx-festival-popup (بدون دستکاری گلوبال)
   Mobile-first · RTL · فونت از سایت ارث‌بری.
   ========================================================================== */

.mfx-festival-popup * { box-sizing: border-box; }

.mfx-festival-popup {
	position: fixed; inset: 0; z-index: 99990;
	display: flex; align-items: center; justify-content: center;
	padding: 18px;
	opacity: 0; visibility: hidden;
	transition: opacity .35s ease, visibility .35s;
}
.mfx-festival-popup.is-open { opacity: 1; visibility: visible; }
.mfx-festival-popup[hidden] { display: none; }

.mfx-festival-popup__backdrop {
	position: absolute; inset: 0;
	background: rgba(4, 4, 6, 0.78);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.mfx-festival-popup__box {
	position: relative;
	width: 100%; max-width: 420px;
	border-radius: 24px;
	overflow: hidden;
	background: linear-gradient(165deg, #161014 0%, #0b0b0e 55%, #08080a 100%);
	border: 1px solid rgba(229, 9, 9, 0.28);
	box-shadow:
		0 40px 90px -30px rgba(0, 0, 0, 0.9),
		0 0 70px -18px rgba(229, 9, 9, 0.55);
	transform: translateY(28px) scale(0.95);
	opacity: 0;
	transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .4s ease;
}
.mfx-festival-popup.is-open .mfx-festival-popup__box { transform: translateY(0) scale(1); opacity: 1; }

/* ذرات پس‌زمینه */
.mfx-festival-popup__particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mfx-festival-popup__particles span {
	position: absolute; width: 6px; height: 6px; border-radius: 50%;
	background: rgba(255, 40, 40, 0.6);
	box-shadow: 0 0 12px rgba(255, 40, 40, 0.8);
	opacity: 0;
}
.mfx-festival-popup__particles span:nth-child(1) { top: 18%; left: 12%; animation: mfxFloat 7s ease-in infinite; }
.mfx-festival-popup__particles span:nth-child(2) { top: 30%; left: 85%; animation: mfxFloat 9s ease-in 1s infinite; background: rgba(212,175,55,.5); box-shadow: 0 0 12px rgba(212,175,55,.7); }
.mfx-festival-popup__particles span:nth-child(3) { top: 68%; left: 18%; animation: mfxFloat 8s ease-in .5s infinite; }
.mfx-festival-popup__particles span:nth-child(4) { top: 78%; left: 78%; animation: mfxFloat 10s ease-in 2s infinite; background: rgba(212,175,55,.45); }
.mfx-festival-popup__particles span:nth-child(5) { top: 12%; left: 55%; animation: mfxFloat 11s ease-in 1.5s infinite; }
.mfx-festival-popup__particles span:nth-child(6) { top: 55%; left: 45%; animation: mfxFloat 8.5s ease-in .8s infinite; }
@keyframes mfxFloat {
	0% { transform: translateY(20px); opacity: 0; }
	20% { opacity: .9; }
	80% { opacity: .6; }
	100% { transform: translateY(-60px); opacity: 0; }
}

.mfx-festival-popup__content {
	position: relative; z-index: 1;
	padding: 34px 26px 28px;
	text-align: center;
	color: #f5f5f5;
	font-family: inherit;
}

.mfx-festival-popup__close {
	position: absolute; top: 12px; left: 12px; z-index: 3;
	width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center;
	color: #b4b4ba; background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.1);
	cursor: pointer; transition: all .2s;
}
.mfx-festival-popup__close:hover { color: #fff; background: rgba(229,9,9,.2); border-color: rgba(229,9,9,.5); transform: rotate(90deg); }

/* بَج تخفیف متحرک */
.mfx-festival-popup__badge {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 18px; border-radius: 999px;
	background: rgba(229, 9, 9, 0.14);
	border: 1px solid rgba(229, 9, 9, 0.4);
	font-size: 13px; font-weight: 700; color: #ffd9d9;
	animation: mfxBadge 2.6s ease-in-out infinite;
}
.mfx-festival-popup__badge-num { color: #fff; font-size: 15px; font-weight: 900; }
@keyframes mfxBadge {
	0%, 100% { box-shadow: 0 0 0 0 rgba(229,9,9,.35); }
	50% { box-shadow: 0 0 0 10px rgba(229,9,9,0); }
}

.mfx-festival-popup__title {
	margin: 20px 0 8px;
	font-size: clamp(20px, 5.4vw, 26px);
	font-weight: 900; line-height: 1.45;
}
.mfx-festival-popup__sub {
	margin: 0 0 18px; color: #b4b4ba; font-size: 14px; line-height: 1.9;
}

.mfx-festival-popup__discount {
	display: flex; align-items: baseline; justify-content: center; gap: 8px;
	margin: 6px 0 22px;
}
.mfx-festival-popup__discount span { color: #b4b4ba; font-weight: 700; font-size: 15px; }
.mfx-festival-popup__discount strong {
	font-size: clamp(54px, 18vw, 78px); font-weight: 900; line-height: 1;
	color: #FF1A1A;
	text-shadow: 0 0 30px rgba(229, 9, 9, 0.6);
}

.mfx-festival-popup__actions { display: flex; flex-direction: column; gap: 10px; }
.mfx-festival-popup__cta { width: 100%; }
.mfx-festival-popup__later {
	background: none; border: 0; cursor: pointer;
	color: #8b8b92; font: inherit; font-size: 13px; font-weight: 600;
	padding: 8px; transition: color .2s;
}
.mfx-festival-popup__later:hover { color: #fff; }

/* دکمه (اگر استایل جشنواره لود نشده باشد، مستقل هم زیبا باشد) */
.mfx-festival-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 26px; border-radius: 999px;
	font: inherit; font-weight: 800; font-size: 15px; text-decoration: none;
	border: 1px solid transparent; cursor: pointer; min-height: 50px;
	transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
}
.mfx-festival-btn--primary {
	background: linear-gradient(135deg, #FF2B2B, #E50909 55%, #B00606);
	color: #fff;
	box-shadow: 0 12px 32px -8px rgba(229, 9, 9, .6);
}
.mfx-festival-btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -8px rgba(229,9,9,.8); }
.mfx-festival-btn--lg { padding: 15px 34px; font-size: 16px; min-height: 54px; }

@media (max-width: 480px) {
	.mfx-festival-popup { padding: 14px; }
	.mfx-festival-popup__content { padding: 30px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.mfx-festival-popup *,
	.mfx-festival-popup *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
