/* Faixa de Black Friday abaixo do menu, offsets do header e gaveta lateral.
   O restante do site volta ao azul padrão. */
:root {
  --bf: #FFD400;
  --bf-ink: #111111;
  --as-nav-h: 5rem;
  --as-bf-tape-h: 2.15rem;
  --as-chrome-h: calc(var(--as-nav-h) + var(--as-bf-tape-h));
}

html {
  scroll-padding-top: calc(var(--as-chrome-h) + 0.75rem);
}

/* Compensa o header fixo + a faixa, sem mudar a estrutura das seções */
main.pt-24,
#conteudo.pt-24,
main#conteudo {
  padding-top: calc(var(--as-chrome-h) + 1rem) !important;
}

/* Só o scroll-padding do html; scroll-margin extra somaria e empurraria demais a âncora. */
.scroll-anchor,
section[id] {
  scroll-margin-top: 0;
}

#mobile-menu {
  padding-top: calc(var(--as-chrome-h) + 1.5rem) !important;
}

@media (min-width: 1024px) {
  .as-sidebar {
    top: calc(var(--as-chrome-h) + 1.25rem) !important;
  }
}

/* Faixa do menu: mesma peça visual da faixa do card */
.site-bf-tape {
  background: #FFD400;
  color: #111;
  font-weight: 800;
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  pointer-events: none;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  height: var(--as-bf-tape-h);
  width: 100%;
}

.site-bf-track {
  display: flex;
  width: max-content;
  animation: siteBfMarquee 22s linear infinite;
  will-change: transform;
}

.site-bf-track span {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 .15em;
}

@keyframes siteBfMarquee {
  to { transform: translate3d(-50%, 0, 0); }
}

/* Barra de progresso: grafite, visível sobre a faixa amarela */
#scroll-progress {
  background-color: #111 !important;
}

/* ---------- Gaveta Black Friday ---------- */
.bf-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 90;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.25rem 0.5rem;
  min-height: 11.5rem;
  background: #111;
  color: #FFD400;
  border: 2px solid #FFD400;
  border-right: 0;
  border-radius: 0.55rem 0 0 0.55rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: -2px 0 14px rgba(255, 212, 0, 0.28);
  animation: bfTabPulse 2.4s ease-in-out infinite;
}

.bf-tab:focus-visible {
  outline: 3px solid #FFD400;
  outline-offset: 3px;
}

.bf-tab-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}

.bf-tab-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(255, 212, 0, 0);
}

@keyframes bfTabPulse {
  0%, 100% {
    box-shadow: -2px 0 10px rgba(255, 212, 0, 0.22);
  }
  50% {
    box-shadow: -2px 0 22px rgba(255, 212, 0, 0.7), 0 0 0 5px rgba(255, 212, 0, 0.16);
  }
}

/* Cupom recortado, compacto, ao lado da aba */
.bf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease, visibility .32s ease;
}

#bf-rail.is-open .bf-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#bf-rail.is-open .bf-tab {
  z-index: 122;
}

.bf-drawer {
  position: fixed;
  top: 50%;
  right: 2.5rem;
  z-index: 121;
  width: min(25.3rem, calc(100vw - 4.5rem));
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.32));
}

#bf-rail.is-open .bf-drawer {
  visibility: visible;
  pointer-events: auto;
  animation: bfCouponIn .48s cubic-bezier(0.22, 1.15, 0.32, 1) both;
}

@keyframes bfCouponIn {
  from {
    opacity: 0;
    transform: translateY(calc(-50% - 22px)) rotate(9deg);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) rotate(-1.4deg);
  }
}

.bf-coupon {
  --bf-yellow: #FFD400;
  --bf-ink: #111;
  --scallop: 8.05px;
  --pitch: 18.4px;
  --notch: 13.8px;
  position: relative;
  color: var(--bf-ink);
  -webkit-mask-image:
    radial-gradient(circle var(--scallop) at 0 calc(var(--pitch) / 2), #0000 98%, #000),
    radial-gradient(circle var(--scallop) at 100% calc(var(--pitch) / 2), #0000 98%, #000);
  -webkit-mask-size: 100% var(--pitch), 100% var(--pitch);
  -webkit-mask-repeat: repeat-y, repeat-y;
  -webkit-mask-position: 0 0, 100% 0;
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle var(--scallop) at 0 calc(var(--pitch) / 2), #0000 98%, #000),
    radial-gradient(circle var(--scallop) at 100% calc(var(--pitch) / 2), #0000 98%, #000);
  mask-size: 100% var(--pitch), 100% var(--pitch);
  mask-repeat: repeat-y, repeat-y;
  mask-position: 0 0, 100% 0;
  mask-composite: intersect;
}

.bf-coupon-top,
.bf-coupon-bottom,
.bf-coupon-perf {
  background: var(--bf-yellow);
}

.bf-coupon-top {
  padding: 1.38rem 1.6675rem 0.805rem 1.6675rem;
  text-align: center;
}

.bf-coupon-seal {
  display: inline-block;
  margin: 0 0 0.805rem;
  padding: 0.253rem 0.6325rem;
  background: #111;
  color: #FFD400;
  font-size: 0.713rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: 999px;
}

#bf-drawer-title,
.bf-coupon-top h2 {
  margin: 0 1.61rem 0.6325rem;
  padding: 0;
  color: #111;
  font-size: clamp(1.955rem, 5.29vw, 2.4725rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-transform: uppercase;
}

.bf-coupon-deal {
  margin: 0 0 0.46rem;
  font-size: 1.2075rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.bf-coupon-deal s {
  text-decoration: line-through;
  text-decoration-thickness: 2.3px;
  text-decoration-color: #111;
  font-weight: 700;
  opacity: 0.72;
}

.bf-coupon-deal strong {
  font-weight: 800;
  font-size: 1.15em;
}

.bf-coupon-copy {
  margin: 0;
  font-size: 1.035rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111;
}

.bf-coupon-copy .bf-data {
  white-space: nowrap;
  font-weight: 800;
}

.bf-coupon-perf {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.61rem;
  -webkit-mask-image:
    radial-gradient(circle 13.8px at 0 50%, #0000 13.11px, #000 13.685px),
    radial-gradient(circle 13.8px at 100% 50%, #0000 13.11px, #000 13.685px);
  -webkit-mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 13.8px at 0 50%, #0000 13.11px, #000 13.685px),
    radial-gradient(circle 13.8px at 100% 50%, #0000 13.11px, #000 13.685px);
  mask-repeat: no-repeat, no-repeat;
  mask-composite: intersect;
}

.bf-coupon-dash {
  display: block;
  width: 100%;
  height: 0;
  margin: 0 1.3225rem;
  border-top: 2.3px dashed #111;
}

.bf-coupon-bottom {
  padding: 0.8625rem 1.6675rem 1.3225rem;
  text-align: center;
}

.bf-coupon-plan {
  margin: 0 0 0.805rem;
  font-size: 1.127rem;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}

.bf-drawer-close {
  position: absolute;
  top: 0.5175rem;
  right: 0.5175rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  height: 2.875rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.bf-drawer-close svg {
  width: 1.29375rem;
  height: 1.29375rem;
}

.bf-drawer-close:hover,
.bf-drawer-close:focus-visible {
  background: #111;
  color: #FFD400;
  outline: none;
}

.bf-drawer-close:focus-visible {
  box-shadow: 0 0 0 3px #111;
}

.bf-drawer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 1.035rem 1.15rem;
  background: #111;
  color: #FFD400;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0.5175rem;
  transition: background-color .2s ease, color .2s ease;
}

.bf-drawer-cta:hover,
.bf-drawer-cta:focus-visible {
  background: #000;
  color: #fff;
  outline: 3px solid #111;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .bf-tab {
    top: auto;
    bottom: 6.75rem;
    right: 0;
    transform: none;
    min-height: 0;
    padding: 0.7rem 0.38rem;
  }

  .bf-tab-label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .bf-drawer {
    top: auto;
    bottom: 1rem;
    left: 0.85rem;
    right: 0.85rem;
    width: auto;
    transform: none;
  }

  #bf-rail.is-open .bf-tab {
    z-index: 90;
    visibility: hidden;
  }

  #bf-rail.is-open .bf-drawer {
    animation: bfCouponInMobile .42s cubic-bezier(0.22, 1.15, 0.32, 1) both;
  }

  @keyframes bfCouponInMobile {
    from {
      opacity: 0;
      transform: translateY(36%) rotate(7deg);
    }
    to {
      opacity: 1;
      transform: translateY(0) rotate(0deg);
    }
  }

  #bf-drawer-title,
  .bf-coupon-top h2 {
    font-size: 1.955rem;
    margin-left: 1.3225rem;
    margin-right: 1.3225rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bf-track {
    animation: none;
    transform: none;
  }
  .bf-tab {
    animation: none;
  }
  .bf-backdrop,
  .bf-drawer {
    transition: none;
    animation: none;
  }
  #bf-rail.is-open .bf-drawer {
    animation: none;
    opacity: 1;
    transform: translateY(-50%) rotate(-1.4deg);
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  #bf-rail.is-open .bf-drawer {
    transform: none;
  }
}
