/* =========================================================
   Black Friday top bar — sits above the menu on every page
   ========================================================= */
:root { --bfbar-h: 0px; }
html.has-bfbar { --bfbar-h: 44px; }
html.has-bfbar body { padding-top: var(--bfbar-h); }
html.has-bfbar .header { top: var(--bfbar-h); }

.bfbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--bfbar-h);
  display: flex; align-items: center;
  background:
    radial-gradient(60% 220% at 50% 0%, rgba(245,170,3,.22), transparent 70%),
    linear-gradient(90deg, #070707, #15100a 50%, #070707);
  border-bottom: 1px solid rgba(245,170,3,.35);
  font-family: var(--font, "Rubik", sans-serif);
  color: #e9e9ea;
}
.bfbar__in {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding-inline: 16px 12px;
}

/* countdown */
.bfbar__ends { display: inline-flex; align-items: center; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(245,170,3,.4); flex-shrink: 0; }
.bfbar__label { padding: 4px 9px; font-size: 12px; font-weight: 600; color: #0b0b0b; background: linear-gradient(180deg, #ffd24d, #f5aa03); white-space: nowrap; }
.bfbar__count { padding: 4px 9px; font-family: var(--font-wix, sans-serif); font-size: 13px; white-space: nowrap; background: #0b0b0b; }
.bfbar__count b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.bfbar__count i { font-style: normal; color: #8d8d92; font-size: 11px; margin-inline: 1px 3px; }

/* message */
.bfbar__msg { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.bfbar__tag {
  flex-shrink: 0;
  padding: 3px 10px; border-radius: 6px;
  font-family: var(--font-wix, sans-serif); font-size: 13px; font-weight: 800; letter-spacing: .03em;
  color: #0b0b0b; background: linear-gradient(180deg, #ffd24d, #f5aa03);
  white-space: nowrap;
}
.bfbar__text { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* CTA + close */
.bfbar__cta {
  margin-inline-start: auto;
  flex-shrink: 0;
  height: 30px; padding-inline: 14px;
  display: inline-flex; align-items: center;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: #0b0b0b; background: #fff;
  transition: background .3s, transform .3s;
}
.bfbar__cta:hover { background: #ffe9b0; }
.bfbar__close {
  flex-shrink: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: #a9a9ad; cursor: pointer;
  transition: color .2s, background .2s;
}
.bfbar__close:hover { color: #fff; background: rgba(255,255,255,.06); }
.bfbar__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* wrappers only matter on wide screens; elsewhere their children join the row */
.bfbar__center, .bfbar__actions { display: contents; }

/* wide screens: message group exactly centred, CTA + close pinned to the edge */
@media (min-width: 1000px) {
  .bfbar__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-inline: max(16px, calc((100vw - 1700px) / 2));
  }
  .bfbar__center { grid-column: 2; display: flex; align-items: center; gap: 14px; min-width: 0; }
  .bfbar__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 6px; }
  .bfbar__cta { margin-inline-start: 0; }
}

/* tablet: drop the long text */
@media (max-width: 999px) {
  .bfbar__text { display: none; }
  .bfbar__in { justify-content: space-between; gap: 10px; }
  .bfbar__cta { margin-inline-start: 0; }
}

/* phone: tag + countdown + close */
@media (max-width: 560px) {
  html.has-bfbar { --bfbar-h: 46px; }
  .bfbar__in { padding-inline: 12px 6px; gap: 8px; }
  .bfbar__cta, .bfbar__label { display: none; }
  .bfbar__ends { order: 2; margin-inline-start: auto; }
  .bfbar__msg { order: 1; }
  .bfbar__close { order: 3; }
  .bfbar__tag { font-size: 12px; padding: 4px 8px; }
  .bfbar__count { font-size: 12.5px; padding: 4px 8px; }
}

/* the پرایس اکشن hero is sized to the screen; give back the bar's height */
@media (min-width: 761px) {
  html.has-bfbar .hero--gold { height: calc(100svh - var(--ticker-h, 46px) - var(--bfbar-h)); }
}

/* =========================================================
   First-visit popup
   ========================================================= */
.bfpop {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
}
.bfpop.is-open { opacity: 1; visibility: visible; }

.bfpop__card {
  position: relative;
  width: min(440px, 100%);
  padding: 34px 28px 26px;
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  color: #fff;
  font-family: var(--font, "Rubik", sans-serif);
  background: linear-gradient(180deg, rgba(28,24,18,.92) 0%, rgba(12,11,9,.94) 100%);
  border: 1px solid rgba(255,214,106,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 40px 90px -20px rgba(0,0,0,.9), 0 0 80px -30px rgba(245,170,3,.45);
  transform: translateY(24px) scale(.94);
  transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.bfpop.is-open .bfpop__card { transform: none; }

/* light beams + glow, like the reference but gold */
.bfpop__aurora {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 45% at 50% 108%, rgba(255,200,60,.55), rgba(245,150,3,.18) 45%, transparent 75%),
    linear-gradient(115deg, transparent 52%, rgba(255,214,106,.14) 60%, transparent 66%),
    linear-gradient(115deg, transparent 64%, rgba(255,214,106,.08) 70%, transparent 76%),
    radial-gradient(60% 50% at 85% -10%, rgba(255,214,106,.18), transparent 70%);
}
.bfpop__aurora::after {             /* bright rim on the bottom edge */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ffe08a, transparent);
}
.bfpop__stars {
  position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 30% 8%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 88% 30%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 72% 12%, #fff, transparent),
    radial-gradient(1px 1px at 8% 48%, #fff, transparent),
    radial-gradient(1px 1px at 93% 52%, #fff, transparent);
}

.bfpop__close {
  position: absolute; top: 14px; left: 14px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.06); color: #cfcfd2; cursor: pointer;
  transition: background .2s, color .2s;
}
.bfpop__close:hover { background: rgba(255,255,255,.12); color: #fff; }
.bfpop__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.bfpop__tag {
  display: inline-block;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-wix, sans-serif); font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  color: #0b0b0b; background: linear-gradient(180deg, #ffd24d, #f5aa03);
}
.bfpop__title { margin-top: 14px; font-size: 34px; font-weight: 700; line-height: 1.2; }
.bfpop__sub { margin-top: 4px; font-size: 16px; color: rgba(255,255,255,.72); font-weight: 300; }
.bfpop__big {
  margin-top: 10px;
  font-family: var(--font-wix-display, sans-serif);
  font-size: clamp(76px, 22vw, 104px); font-weight: 800; line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(180deg, #ffffff 25%, #ffd24d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.bfpop__on { margin-top: 4px; font-size: 15px; color: #ffe6ae; }

.bfpop__count { margin: 18px auto 0; display: flex; justify-content: center; gap: 8px; }
.bfpop__count > span {
  min-width: 62px; padding: 9px 6px;
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.bfpop__count b { font-family: var(--font-wix-display, sans-serif); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.bfpop__count i { font-style: normal; font-size: 11px; color: #9d9da1; margin-top: 5px; }

.bfpop__cta {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: center;
  height: 56px; border-radius: 999px;
  font-size: 16.5px; font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,214,106,.22), rgba(245,170,3,.12));
  border: 1px solid rgba(255,214,106,.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  transition: background .3s, transform .4s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}
.bfpop__cta:hover, .bfpop__cta:focus-visible {
  background: linear-gradient(180deg, #ffd24d, #f5aa03); color: #0b0b0b;
  transform: translateY(-2px); box-shadow: 0 14px 34px rgba(245,170,3,.4);
  outline: none;
}
.bfpop__note { margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,.5); }

@media (max-width: 420px) {
  .bfpop__card { padding: 30px 18px 22px; border-radius: 26px; }
  .bfpop__count > span { min-width: 0; flex: 1; }
  .bfpop__title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .bfpop, .bfpop__card { transition: none; }
}
.bfpop__card:focus { outline: none; }

/* ---------- final layout: everything centred as one group, ✕ pinned to the edge ---------- */
.bfbar__in {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  gap: 14px;
  padding-inline: 52px !important;
}
.bfbar__center, .bfbar__actions { display: contents !important; }
.bfbar__ends, .bfbar__msg, .bfbar__cta { margin-inline-start: 0 !important; order: 0 !important; }
.bfbar__close {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  order: 0 !important;
}
@media (max-width: 999px) { .bfbar__in { gap: 10px; } }
@media (max-width: 560px) {
  .bfbar__in { gap: 8px; padding-inline: 40px !important; }
  .bfbar__close { inset-inline-end: 4px; }
}

/* keep the offer bar's ✕ inside the content range on desktop */
@media (min-width: 1101px) {
  .bfbar__close { inset-inline-end: max(var(--gutter, 10px), calc((100% - var(--wrap, 1155px)) / 2)) !important; }
}

/* =========================================================
   Offer bar — more noticeable, same height
   ========================================================= */
.bfbar { overflow: hidden; isolation: isolate; border-bottom: 0; }
/* slow drifting gold light behind everything */
.bfbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(30% 260% at var(--bfx, 20%) 50%, rgba(245,170,3,.32), transparent 70%),
    radial-gradient(22% 220% at calc(100% - var(--bfx, 20%)) 50%, rgba(255,210,77,.18), transparent 70%);
  animation: bf-drift 9s ease-in-out infinite alternate;
}
@property --bfx { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@keyframes bf-drift { to { --bfx: 80%; } }
/* moving gold line along the bottom edge */
.bfbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(245,170,3,.35) 20%, #ffe08a 50%, rgba(245,170,3,.35) 80%, transparent 100%);
  background-size: 200% 100%;
  animation: bf-line 3.5s linear infinite;
}
@keyframes bf-line { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* tag: lightning bolt + light sweep + soft pulse */
.bfbar__tag { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 0 0 0 rgba(245,170,3,.55); animation: bf-pulse 2.2s ease-out infinite; }
.bfbar__tag::before {
  content: ""; width: 10px; height: 13px; flex-shrink: 0;
  background: #0b0b0b;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M6 0 0 8h4l-1 6 7-9H6l1-5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M6 0 0 8h4l-1 6 7-9H6l1-5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bfbar__tag::after, .bfbar__cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  transform: skewX(-20deg);
  animation: bf-shine 3.2s ease-in-out infinite;
}
.bfbar__cta { position: relative; overflow: hidden; }
.bfbar__cta::after { background: linear-gradient(100deg, transparent, rgba(245,170,3,.45), transparent); animation-delay: 1.6s; }
@keyframes bf-shine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
@keyframes bf-pulse { 0% { box-shadow: 0 0 0 0 rgba(245,170,3,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(245,170,3,0); } }

/* countdown: seconds tick in gold */
.bfbar__count b[data-bfb="s"] { color: #ffd24d; display: inline-block; min-width: 2ch; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .bfbar::before, .bfbar::after, .bfbar__tag, .bfbar__tag::after, .bfbar__cta::after { animation: none !important; }
}

/* no close button on the offer bar */
.bfbar__close { display: none !important; }
.bfbar__in { padding-inline: 16px !important; }
@media (max-width: 560px) { .bfbar__in { padding-inline: 10px !important; } }

/* =========================================================
   Countdown — dark pill: "5d 17h 05m 32s"
   ========================================================= */
.bfbar__ends { gap: 8px; border: 0; border-radius: 0; overflow: visible; background: none; }
.bfbar__label { padding: 0; background: none; color: #9a9aa0; font-size: 12.5px; font-weight: 400; }
.bfbar__count {
  display: inline-flex; align-items: baseline;
  padding: 4px 10px; border-radius: 6px;
  background: #0b0b0b; border: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-wix, sans-serif); font-size: 13.5px; white-space: nowrap;
}
.bfbar__count b, .bfbar__count b[data-bfb="s"] { display: inline; min-width: 0; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.bfbar__count i { font-style: normal; font-size: 11px; color: #8d8d92; margin: 0 5px 0 1px; }
.bfbar__count i:last-child { margin-inline-end: 0; }
@media (max-width: 560px) { .bfbar__label { display: none; } .bfbar__count { font-size: 12.5px; padding: 3px 8px; } }
