/* بنر مناسبتی ابرک — سبک، راست‌به‌چپ، بی جابه‌جایی چیدمان (ارتفاع‌ها ثابت‌اند) */
.apb {
    --apb-accent: #f5b301;
    --apb-ink: #fff;
    --apb-bg: #0a0a0f;
    box-sizing: border-box;
    direction: rtl;
    font-family: "AnjomanMax", "IRANSansX", "IRANSans", Vazirmatn, Tahoma, sans-serif;
    font-feature-settings: "ss01";
    position: relative;
    isolation: isolate;
}
.apb *, .apb *::before, .apb *::after { box-sizing: border-box; }
.apb[data-apb-phase="ended"],
.apb[data-apb-phase="scheduled"],
.apb[data-apb-phase="off"],
.apb.apb-gone { display: none !important; }
.apb[data-apb-phase="teaser"] .apb-live-only,
.apb[data-apb-phase="live"] .apb-teaser-only { display: none !important; }

/* ── شمارش معکوس ── */
.apb-cd { display: inline-flex; gap: .4em; direction: rtl; font-variant-numeric: tabular-nums; }
.apb-cd-u { display: inline-flex; flex-direction: column; align-items: center; min-width: 2.6em; }
.apb-cd-u b { font-weight: 800; line-height: 1.1; min-width: 2ch; text-align: center; }
.apb-cd-u i { font-style: normal; font-size: .62em; opacity: .75; }

/* ── نوار بالا ── */
.apb-topbar {
    background: var(--apb-bg);
    color: var(--apb-ink);
    height: 44px;
    overflow: hidden;
    font-size: 14px;
    z-index: 5;
}
.apb-tb-inner {
    height: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 16px 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    white-space: nowrap;
}
.apb-tb-text { color: inherit; text-decoration: none; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.apb-tb-text:hover { color: var(--apb-accent); }
.apb-tb-cd .apb-cd { gap: .15em; }
.apb-tb-cd .apb-cd-u { flex-direction: row; gap: .2em; min-width: 0; padding-inline: .35em; align-items: baseline; }
.apb-tb-cd .apb-cd-u b { color: var(--apb-accent); }
.apb-tb-cta {
    background: var(--apb-accent);
    color: #111;
    border-radius: 999px;
    padding: 4px 14px;
    font-weight: 800;
    text-decoration: none;
    flex: none;
}
.apb-tb-cta:hover { filter: brightness(1.1); color: #111; }
.apb-tb-close {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    border: 0; border-radius: 50%;
    background: transparent; color: inherit;
    font-size: 20px; line-height: 1; cursor: pointer; opacity: .7;
}
.apb-tb-close:hover, .apb-tb-close:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }
.apb-tb-spark {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--apb-accent) 35%, transparent) 50%, transparent 65%);
    background-size: 250% 100%;
    animation: apb-shimmer 5s linear infinite;
}
@keyframes apb-shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ── بنر بزرگ ── */
.apb-hero {
    background: var(--apb-bg);
    color: var(--apb-ink);
    min-height: 380px;
    overflow: hidden;
    padding: 36px 20px;
    display: flex;
    align-items: center;
}
.apb-hero-inner {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
}
.apb-eyebrow {
    margin: 0 0 10px;
    font-size: 15px;
    letter-spacing: 0;
    color: var(--apb-accent);
    font-weight: 700;
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.apb-pill {
    border: 1px solid var(--apb-accent);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 13px;
}
.apb-headline {
    margin: 0;
    font-size: clamp(30px, 5.2vw, 60px);
    line-height: 1.25;
    font-weight: 900;
    color: var(--apb-ink);
    text-wrap: balance;
}
.apb-subline { margin: 12px 0 0; font-size: clamp(15px, 1.6vw, 19px); opacity: .86; line-height: 1.9; max-width: 34em; }
.apb-cd-wrap { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 66px; }
.apb-cd-label { font-size: 14px; opacity: .8; }
.apb-hero .apb-cd { gap: 8px; }
.apb-hero .apb-cd-u {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    padding: 8px 6px 6px;
    min-width: 62px;
    backdrop-filter: blur(4px);
}
.apb-hero .apb-cd-u b { font-size: 26px; color: var(--apb-accent); }
.apb-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.apb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 10px 26px;
    border-radius: 14px; font-weight: 800; font-size: 16px;
    text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.apb-btn:hover { transform: translateY(-2px); }
.apb-btn:focus-visible, .apb-coupon:focus-visible, .apb-tb-cta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.apb-btn-primary {
    background: linear-gradient(135deg, #fff3c4, var(--apb-accent) 45%, #c47a00);
    color: #141006;
    box-shadow: 0 8px 28px color-mix(in srgb, var(--apb-accent) 45%, transparent);
}
.apb-btn-primary:hover { color: #141006; }
.apb-btn-ghost { border: 1.5px solid rgba(255, 255, 255, .35); color: var(--apb-ink); }
.apb-btn-ghost:hover { border-color: var(--apb-accent); color: var(--apb-accent); }
.apb-coupon {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 48px; padding: 8px 16px;
    border: 1.5px dashed var(--apb-accent); border-radius: 14px;
    background: transparent; color: var(--apb-ink);
    font: inherit; font-size: 14px; cursor: pointer;
}
.apb-coupon code { color: var(--apb-accent); font-size: 17px; font-weight: 800; letter-spacing: .08em; background: none; direction: ltr; }
.apb-coupon-ok { font-size: 12px; opacity: .7; min-width: 5.2em; text-align: start; }

/* ── هنر: خورشیدگرفتگی جمعهٔ سیاه ── */
.apb-art { position: relative; aspect-ratio: 1; width: min(100%, 360px); margin-inline: auto; }
.apb-eclipse { width: 100%; height: 100%; display: block; overflow: visible; }
.apb-corona { transform-origin: 160px 160px; animation: apb-breathe 4.5s ease-in-out infinite; }
.apb-rays { transform-origin: 160px 160px; animation: apb-spin 40s linear infinite; }
.apb-rim { filter: drop-shadow(0 0 14px #ffb300); }
.apb-moon { transform-origin: 160px 160px; animation: apb-slide 9s ease-in-out infinite alternate; }
.apb-badge {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(54px, 9vw, 92px); font-weight: 900; line-height: 1;
    background: linear-gradient(160deg, #fff6d0, #ffc83d 45%, #b86e00);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 10px rgba(255, 170, 0, .45));
    pointer-events: none;
}
.apb-coin {
    position: absolute; top: -6%;
    color: var(--apb-accent); font-weight: 900; opacity: 0;
    animation: apb-fall 6s linear infinite;
}
.apb-coin-1 { inset-inline-start: 8%; font-size: 15px; animation-delay: 0s; }
.apb-coin-2 { inset-inline-start: 28%; font-size: 11px; animation-delay: 1.4s; }
.apb-coin-3 { inset-inline-start: 62%; font-size: 17px; animation-delay: 2.6s; }
.apb-coin-4 { inset-inline-start: 84%; font-size: 12px; animation-delay: 3.9s; }
.apb-coin-5 { inset-inline-start: 46%; font-size: 10px; animation-delay: 4.8s; }
@keyframes apb-spin { to { transform: rotate(360deg); } }
@keyframes apb-breathe { 0%, 100% { transform: scale(.96); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes apb-slide { from { transform: translate(-5px, 2px); } to { transform: translate(5px, -2px); } }
@keyframes apb-fall {
    0% { transform: translateY(0) rotate(0); opacity: 0; }
    12% { opacity: .9; }
    100% { transform: translateY(420px) rotate(220deg); opacity: 0; }
}
.apb-theme-blackfriday.apb-hero {
    background:
        radial-gradient(60% 80% at 22% 50%, rgba(255, 160, 0, .16), transparent 70%),
        radial-gradient(40% 60% at 85% 10%, rgba(255, 90, 0, .10), transparent 70%),
        #07070b;
}
.apb-theme-blackfriday.apb-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1.4px);
    background-size: 46px 46px; opacity: .13;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

/* ── طرح شفق ── */
.apb-theme-aurora { --apb-bg: #0d1030; }
.apb-theme-aurora.apb-hero { background: linear-gradient(135deg, #0d1030, #1c1250 55%, #08243a); }
.apb-art-aurora { filter: blur(0); }
.apb-blob { position: absolute; border-radius: 50%; filter: blur(34px); opacity: .75; animation: apb-drift 11s ease-in-out infinite alternate; }
.apb-blob-1 { inset: 8% 30% 30% 6%; background: var(--apb-accent); }
.apb-blob-2 { inset: 32% 4% 8% 34%; background: #6d5efc; animation-delay: -4s; }
.apb-blob-3 { inset: 2% 6% 52% 46%; background: #18c8b0; animation-delay: -7s; }
.apb-art-aurora .apb-badge { background: none; -webkit-background-clip: initial; background-clip: initial; color: #fff; filter: none; }
@keyframes apb-drift { from { transform: translate(-10px, 8px) scale(.95); } to { transform: translate(12px, -10px) scale(1.06); } }

/* ── طرح ساده ── */
.apb-theme-minimal { --apb-bg: #f6f7fb; --apb-ink: #12131a; }
.apb-theme-minimal.apb-hero { min-height: 260px; border-block: 1px solid #e3e5ee; }
.apb-theme-minimal .apb-hero-inner { grid-template-columns: 1fr; text-align: center; }
.apb-theme-minimal .apb-eyebrow, .apb-theme-minimal .apb-actions, .apb-theme-minimal .apb-cd-wrap { justify-content: center; }
.apb-theme-minimal .apb-subline { margin-inline: auto; }
.apb-theme-minimal .apb-cd-u { background: #fff !important; border-color: #dfe2ec !important; }
.apb-theme-minimal .apb-btn-ghost { border-color: #c5c9d8; }
.apb-theme-minimal .apb-tb-close:hover { background: rgba(0, 0, 0, .08); }
.apb-theme-minimal .apb-btn:focus-visible { outline-color: #12131a; }

/* ── صفحهٔ فرود ── */
.apb-landing-article { max-width: 820px; margin-inline: auto; padding: 40px 20px 64px; line-height: 2.1; font-size: 17px; }
.apb-landing-article h2 { font-size: 26px; font-weight: 800; margin: 36px 0 14px; }
.apb-faq-item { border: 1px solid rgba(128, 128, 128, .28); border-radius: 12px; padding: 12px 18px; margin-bottom: 10px; }
.apb-faq-item summary { cursor: pointer; font-weight: 700; }
.apb-faq-item p { margin: 10px 0 2px; }
.apb-ended { margin-top: 28px; padding: 14px 18px; border-radius: 12px; background: rgba(128, 128, 128, .12); }

/* ── موبایل ── */
@media (max-width: 767.98px) {
    .apb-topbar { font-size: 12.5px; }
    .apb-tb-inner { gap: 8px; padding-inline: 10px 38px; justify-content: flex-start; }
    .apb-tb-cd .apb-cd-u[data-s], .apb-tb-cd .apb-cd-u:last-child { display: none; }
    .apb-tb-cta { padding: 3px 10px; }
    .apb-hero { min-height: 560px; padding: 28px 16px; }
    .apb-theme-minimal.apb-hero { min-height: 340px; }
    .apb-hero-inner { grid-template-columns: 1fr; gap: 12px; text-align: center; }
    .apb-art { order: -1; width: 190px; }
    .apb-eyebrow, .apb-actions, .apb-cd-wrap { justify-content: center; }
    .apb-subline { margin-inline: auto; }
    .apb-hero .apb-cd-u { min-width: 54px; }
    .apb-hero .apb-cd-u b { font-size: 22px; }
    .apb-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .apb *, .apb *::before { animation: none !important; transition: none !important; }
    .apb-coin { display: none; }
}
