/* Persistent local-preview offer. The original keepsake banner stays intact. */
.bfcm-offer {
  --offer-neon: #e6ff58;
  position: fixed;
  z-index: 150;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: 1.1fr 1.2fr .9fr;
  align-items: center;
  gap: 24px;
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
  padding: 28px 30px 24px;
  border: 1px solid #e6ff5859;
  border-radius: 22px;
  background: radial-gradient(ellipse at top left, #59206a 0%, transparent 65%), #300639;
  color: #fff;
  box-shadow: 0 16px 56px #17051f5c, 0 0 24px #e6ff5814;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.4;
}

.bfcm-offer p { margin: 0; }
.bfcm-offer-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.bfcm-offer-close svg { width: 20px; height: 20px; }
.bfcm-offer-close:hover { background: #ffffff1a; }
.bfcm-offer-close:focus-visible { outline: 2px solid var(--offer-neon); outline-offset: -5px; }
.bfcm-offer .bfcm-offer-eyebrow {
  margin-bottom: 6px;
  color: var(--offer-neon);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .025em;
}
.bfcm-offer h2 {
  margin: 0 0 5px;
  color: var(--offer-neon);
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
}
.bfcm-offer-products { font-size: 1rem; }
.bfcm-offer-timer { text-align: center; }
.bfcm-offer .bfcm-offer-label {
  margin-bottom: 8px;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}
.bfcm-countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 7px;
}
.bfcm-countdown-unit { flex: 1; max-width: 68px; min-width: 0; }
.bfcm-countdown-unit > span:first-child {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 4px 6px;
  border-radius: 10px;
  background: var(--offer-neon);
  color: #300639;
  font-size: 1.875rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1;
}
.bfcm-countdown-label {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: .875rem;
  line-height: 1.25;
}
.bfcm-countdown-separator {
  padding-top: 5px;
  color: var(--offer-neon);
  font-size: 1.5rem;
  font-weight: 800;
}
.bfcm-offer .bfcm-offer-deadline {
  margin-top: 8px;
  color: #e3cee8;
  font-size: .8125rem;
}
.bfcm-offer-action { text-align: center; }
.bfcm-offer-action p { margin-bottom: 12px; font-size: 1rem; }
.bfcm-offer-action strong { white-space: nowrap; }
.bfcm-offer-cta {
  display: flex;
  min-height: 50px;
  justify-content: center;
  align-items: center;
  padding: 12px 18px;
  border: 2px solid var(--offer-neon);
  border-radius: 10px;
  background: var(--offer-neon);
  color: #300639;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.bfcm-offer-cta:hover { background: #f2ffa6; box-shadow: 0 0 20px #e6ff5838; }
.bfcm-offer-cta:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.bfcm-offer.is-expired h2 { font-size: 2.5rem; letter-spacing: -.04em; }

/* Keep the footer and focused links reachable above the offer. */
body.has-bfcm-offer { padding-bottom: calc(var(--bfcm-offer-height, 180px) + 40px + env(safe-area-inset-bottom, 0px)); }
html:has(.has-bfcm-offer) { scroll-padding-bottom: calc(var(--bfcm-offer-height, 180px) + 40px + env(safe-area-inset-bottom, 0px)); }

/* A lime consent notice, separate from the dark purple sale offer. */
body:has([data-bfcm-offer]) .cookie-consent {
  right: auto;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  width: min(320px, calc(100% - 40px));
  padding: 18px;
  border-color: #d6ef44;
  border-radius: 22px;
  background: rgb(230 255 88 / 86%);
  color: #300639;
  box-shadow: 0 16px 56px #17051f40;
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
body:has([data-bfcm-offer]) .cookie-consent h2 { color: #300639; font-size: 1rem; }
body:has([data-bfcm-offer]) .cookie-consent p { color: #300639; font-size: .875rem; }
body:has([data-bfcm-offer]) .cookie-consent p a { color: #300639; }
body:has([data-bfcm-offer]) .cookie-consent button { min-height: 44px; border-color: #30063980; color: #300639; font-size: .875rem; }
body:has([data-bfcm-offer]) .cookie-consent button:hover { background: #3006390d; }
body:has([data-bfcm-offer]) .cookie-consent button.cookie-consent-accept { border-color: #300639; background: #300639; color: #e6ff58; }
body:has([data-bfcm-offer]) .cookie-consent button.cookie-consent-accept:hover { background: #52105c; }
body:has([data-bfcm-offer]) .cookie-consent button:focus-visible,
body:has([data-bfcm-offer]) .cookie-consent a:focus-visible { outline: 2px solid #300639; outline-offset: 2px; }

/* Wide desktops have enough room for a centered offer and bottom-left consent.
   Only narrower desktop widths need the offer to shift right. */
@media (min-width: 1200px) and (max-width: 1799px) {
  body:has(.cookie-consent:not([hidden])) .bfcm-offer {
    left: auto;
    width: min(1080px, calc(100% - 380px));
    gap: 20px;
    padding-inline: 24px;
  }
}

/* On tablets, consent sits immediately above the offer until decided. */
@media (max-width: 1199px) {
  body.has-bfcm-offer .cookie-consent { bottom: calc(var(--bfcm-offer-height, 180px) + 40px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 760px) {
  .bfcm-offer {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    grid-template-columns: 1.1fr .9fr;
    gap: 14px 18px;
    width: calc(100% - 24px);
    padding: 24px 18px 16px;
    border-radius: 18px;
  }
  .bfcm-offer .bfcm-offer-eyebrow { max-width: 190px; line-height: 1.3; }
  .bfcm-offer h2 { font-size: 2.5rem; }
  .bfcm-offer-products { font-size: .875rem; }
  .bfcm-offer-timer {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #ffffff26;
  }
  .bfcm-offer .bfcm-offer-label { margin: 0; text-align: left; }
  .bfcm-countdown { grid-column: 1 / -1; grid-row: 2; gap: 5px; }
  .bfcm-countdown-unit { max-width: 62px; }
  .bfcm-countdown-unit > span:first-child { min-height: 42px; border-radius: 7px; font-size: 1.5rem; }
  .bfcm-countdown-separator { padding-top: 4px; font-size: 1.25rem; }
  .bfcm-offer .bfcm-offer-deadline { grid-column: 2; grid-row: 1; margin: 0; text-align: right; font-size: .75rem; }
  .bfcm-offer-action {
    grid-column: 2;
    grid-row: 1;
    padding-top: 10px;
  }
  .bfcm-offer-action p { margin: 0 0 10px; font-size: .875rem; }
  .bfcm-offer-cta { padding-inline: 10px; }
  body:has([data-bfcm-offer]) .cookie-consent {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    top: calc(8px + env(safe-area-inset-top, 0px));
    bottom: auto;
    width: auto;
    max-width: 460px;
    margin-inline: auto;
    padding: 12px;
    border-radius: 14px;
  }
  body:has([data-bfcm-offer]) .cookie-consent h2 { margin-bottom: 3px; font-size: .875rem; }
  body:has([data-bfcm-offer]) .cookie-consent p { font-size: .875rem; line-height: 1.35; }
  body:has([data-bfcm-offer]) .cookie-consent-actions { margin-top: 8px; }
  body:has([data-bfcm-offer]) .cookie-consent button { min-height: 40px; padding: 9px 10px; }
}

@media (max-width: 360px) {
  .bfcm-offer { gap: 12px; padding: 24px 14px 14px; }
  .bfcm-offer h2 { font-size: 2.15rem; }
  .bfcm-countdown { gap: 2px; }
  .bfcm-countdown-unit > span:first-child { padding-inline: 3px; }
  .bfcm-offer-cta { font-size: .875rem; }
}

@media (max-width: 300px) {
  .bfcm-offer { grid-template-columns: 1fr; }
  .bfcm-offer-copy { text-align: center; }
  .bfcm-offer .bfcm-offer-eyebrow { max-width: none; }
  .bfcm-offer-action { grid-column: 1; grid-row: 3; padding: 0; }
  .bfcm-offer-action p { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .bfcm-offer-cta { transition: none; }
}
