/* «جشنواره‌ی تخفیف» — صفحه‌ی جشنواره، بنر صفحه‌ی اول، نشان صفحه‌ی محصول */
.ehf, .ehf-banner, .ehf-ribbon { --ehf-night: #171b4d; --ehf-navy: #242f9b; --ehf-hot: #f4380f; --ehf-sun: #ffc247; --ehf-ink: #151933; --ehf-muted: #6b7088; --ehf-line: #e7e8f1; }

/* ---------- سربرگ ---------- */
.ehf { padding: 22px 0 56px; background: #f6f6fb; color: var(--ehf-ink); }
.ehf__wrap { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.ehf-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 34px 38px; border-radius: 28px; background: radial-gradient(1100px 380px at 88% -30%, #3a46c4 0%, transparent 60%), var(--ehf-night); color: #fff; }
.ehf-hero::after { content: "٪"; position: absolute; left: -18px; bottom: -92px; font-size: 300px; font-weight: 900; line-height: 1; color: rgba(255, 255, 255, .045); pointer-events: none; }
.ehf-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ehf-sun); color: #4a2c00; font-size: 12.5px; font-weight: 900; }
.ehf-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--ehf-hot); animation: ehfPulse 1.4s ease-in-out infinite; }
@keyframes ehfPulse { 50% { transform: scale(1.7); opacity: .45; } }
.ehf-hero h1 { margin: 14px 0 8px; font-size: clamp(26px, 3.4vw, 42px); font-weight: 900; line-height: 1.5; }
.ehf-hero p { max-width: 620px; margin: 0; color: #c9ccf3; font-size: 14.5px; line-height: 2.1; }
.ehf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ehf-chips li { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: #e4e6ff; font-size: 12px; }
.ehf-clock { position: relative; z-index: 1; text-align: center; }
.ehf-clock small { display: block; margin-bottom: 10px; color: #c9ccf3; font-size: 12.5px; font-weight: 700; }
.ehf-clock__boxes { display: flex; gap: 10px; direction: ltr; justify-content: center; }
.ehf-clock__boxes span { min-width: 74px; padding: 12px 8px 8px; border-radius: 18px; background: #fff; color: var(--ehf-night); box-shadow: 0 14px 34px rgba(0, 0, 0, .28); }
.ehf-clock__boxes b { display: block; font-size: 30px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ehf-clock__boxes em { display: block; color: var(--ehf-muted); font-size: 11px; font-style: normal; font-weight: 700; }

/* ---------- کارت‌ها ---------- */
.ehf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 2px 14px; }
.ehf-head h2 { margin: 0; font-size: 21px; font-weight: 900; }
.ehf-head span { color: var(--ehf-muted); font-size: 12.5px; }
.ehf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.ehf-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ehf-line); border-radius: 22px; background: #fff; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.ehf-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(23, 27, 77, .12); }
.ehf-card__media { position: relative; display: block; aspect-ratio: 1.15; background: #fbfbfe; }
.ehf-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.ehf-off { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; min-width: 58px; padding: 7px 10px; border-radius: 14px; background: var(--ehf-hot); color: #fff; font-size: 17px; font-weight: 900; line-height: 1.3; }
.ehf-off small { font-size: 10px; font-weight: 700; }
.ehf-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.ehf-card h3 { margin: 0; min-height: 3.2em; font-size: 14px; font-weight: 800; line-height: 1.6; }
.ehf-card h3 a { color: inherit; }
.ehf-price del { color: #a0a4b8; font-size: 12.5px; }
.ehf-price strong { display: block; color: var(--ehf-hot); font-size: 25px; font-weight: 900; line-height: 1.5; }
.ehf-price strong small { margin-right: 4px; color: var(--ehf-muted); font-size: 12px; font-weight: 700; }
.ehf-price span { display: block; color: var(--ehf-muted); font-size: 12px; }
.ehf-meter__bar { height: 8px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.ehf-meter__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(270deg, var(--ehf-sun), var(--ehf-hot)); }
.ehf-meter p { display: flex; justify-content: space-between; margin: 6px 0 0; color: var(--ehf-muted); font-size: 11.5px; }
.ehf-meter p b { color: var(--ehf-ink); }
.ehf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.ehf-actions button, .ehf-actions a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 8px; border: 1.5px solid var(--ehf-navy); border-radius: 14px; background: #fff; color: var(--ehf-navy); font-size: 13px; font-weight: 900; cursor: pointer; }
.ehf-actions button small, .ehf-actions a small { font-size: 10.5px; font-weight: 600; opacity: .8; }
.ehf-actions .is-main { background: var(--ehf-navy); color: #fff; }
.ehf-actions button:disabled { border-color: var(--ehf-line); background: #f3f4f8; color: #a0a4b8; cursor: default; }
.ehf-actions .is-wide { grid-column: 1 / -1; }
.ehf-card.is-out { filter: saturate(.35); }
.ehf-card.is-soon .ehf-price strong { color: var(--ehf-navy); }
.ehf-lock { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: auto; border: 1.5px dashed #c6c9e0; border-radius: 14px; color: var(--ehf-muted); font-size: 12.5px; font-weight: 700; }

/* ---------- توضیح و حالت خالی ---------- */
.ehf-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 30px; }
.ehf-how div { padding: 18px; border: 1px solid var(--ehf-line); border-radius: 18px; background: #fff; }
.ehf-how b { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 12px; background: #eef0ff; color: var(--ehf-navy); font-weight: 900; }
.ehf-how strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.ehf-how p { margin: 0; color: var(--ehf-muted); font-size: 12.5px; line-height: 2; }
.ehf-empty { margin-top: 18px; padding: 40px 20px; border: 1.5px dashed #c6c9e0; border-radius: 22px; background: #fff; text-align: center; }
.ehf-empty a { display: inline-block; margin-top: 16px; padding: 12px 26px; border-radius: 14px; background: var(--ehf-navy); color: #fff; font-weight: 800; }

/* ---------- بنر صفحه‌ی اول ---------- */
.ehf-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; width: min(1240px, calc(100% - 32px)); margin: 16px auto 0; padding: 18px 24px; border-radius: 22px; background: radial-gradient(600px 220px at 92% -40%, #3a46c4 0%, transparent 65%), var(--ehf-night); color: #fff; }
.ehf-banner__text strong { display: block; margin: 8px 0 2px; font-size: 19px; font-weight: 900; }
.ehf-banner__text span.ehf-banner__sub { color: #c9ccf3; font-size: 12.5px; }
.ehf-banner__side { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.ehf-banner .ehf-clock small { margin-bottom: 6px; }
.ehf-banner .ehf-clock__boxes span { min-width: 54px; padding: 6px 4px 4px; border-radius: 12px; box-shadow: none; }
.ehf-banner .ehf-clock__boxes b { font-size: 20px; }
.ehf-banner a.ehf-banner__go { padding: 13px 24px; border-radius: 14px; background: var(--ehf-sun); color: #3d2400; font-size: 14px; font-weight: 900; }

/* ---------- صفحه‌ی محصول و منو ---------- */
.ehf-ribbon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: #fff3e0; border: 1px solid #ffd99a; color: #5a3300; }
.ehf-ribbon strong { font-size: 13.5px; font-weight: 900; }
.ehf-ribbon span { display: block; font-size: 12px; }
.ehf-ribbon a { padding: 7px 14px; border-radius: 999px; background: var(--ehf-hot); color: #fff; font-size: 12px; font-weight: 800; }
.eh-bm-fest { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: #fff3e0; color: #5a3300; font-size: 12.5px; line-height: 1.9; }
.eh-bm-fest b { color: #c42a06; }
.eh-bm-v del { display: inline-block; unicode-bidi: isolate; margin-inline-end: 10px; }

@media (max-width: 760px) {
    .ehf-hero { grid-template-columns: 1fr; gap: 20px; padding: 24px 18px; border-radius: 22px; }
    .ehf-clock__boxes span { min-width: 66px; }
    .ehf-clock__boxes b { font-size: 24px; }
    .ehf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ehf-card__body { padding: 10px 10px 12px; gap: 8px; }
    .ehf-card h3 { font-size: 12.5px; }
    .ehf-price strong { font-size: 19px; }
    .ehf-actions { grid-template-columns: 1fr; }
    .ehf-off { top: 8px; right: 8px; min-width: 46px; padding: 5px 7px; font-size: 14px; }
    .ehf-meter p { flex-direction: column; gap: 0; }
    .ehf-banner { padding: 16px; }
    .ehf-banner a.ehf-banner__go { width: 100%; text-align: center; }
}
@media (max-width: 339px) { .ehf-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ehf-badge i { animation: none; } .ehf-card { transition: none; } }
