/* ==========================================================
   Sale layer. Only loaded while a sale is live, by the sale
   partials. Event colours live here, not in the base styles.
   ========================================================== */
@font-face {
  font-family: 'Vinila';
  src: url('/static/fonts/Vinila-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sale-orange: #ff8f45;
  --sale-red: #e8321f;
  --sale-fire: linear-gradient(115deg, #ff8f45 0%, #f85a26 55%, #ea3420 100%);
  --sale-glow: rgba(234, 52, 32, .4);
  --sale-ink: #0a0a0a;
  --sale-display: 'Vinila', 'Poppins', sans-serif;
}

/* ── Sticker ────────────────────────────────────────────────── */
.sale-sticker {
  position: absolute;
  z-index: 2;
  padding: .3rem .6rem;
  border: 2px solid #fff;
  border-radius: 7px;
  background: var(--sale-ink);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-8deg);
  box-shadow: 0 6px 14px -4px rgba(10, 10, 10, .4);
  pointer-events: none;
}

/* ── Countdown boxes ────────────────────────────────────────── */
.sale-count {
  display: flex;
  gap: .4rem;
}

.sale-count__seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.15rem;
  height: 3.3rem;
  border-radius: 10px;
  background: var(--sale-ink);
  color: #fff;
}

.sale-count__seg b {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sale-count__seg small {
  margin-top: .3rem;
  font-size: .5rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sale-orange);
}

/* ── Floating pill (public pages) ───────────────────────────── */
.sale-pill {
  --pill-x: -50%;
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .55rem .55rem .55rem 1.75rem;
  border-radius: 9999px;
  background: var(--sale-fire);
  color: #fff;
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
  transform: translateX(var(--pill-x));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 18px 40px -16px var(--sale-glow),
    0 6px 18px rgba(10, 10, 10, .16);
  animation: salePillIn .6s cubic-bezier(.22, 1.2, .36, 1) backwards;
}

.sale-pill[hidden],
.sale-chip[hidden] {
  display: none;
}

.sale-pill .sale-sticker {
  top: -13px;
  left: -8px;
  animation: saleStickerIn .5s cubic-bezier(.2, 1.4, .4, 1) .35s backwards;
}

.sale-pill__headline {
  font-family: var(--sale-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.sale-pill__timer {
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, .35);
  font-size: .78rem;
  color: rgba(255, 255, 255, .75);
}

.sale-pill__timer b {
  display: inline-block;
  min-width: 1.3em;
  text-align: right;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.sale-pill__cta,
.sale-pill__cta:visited {
  padding: .75rem 1.5rem;
  border-radius: 9999px;
  background: var(--sale-ink);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease;
}

.sale-pill__cta:hover {
  background: #1d1d1f;
  color: #fff;
}

.sale-pill__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: -.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.sale-pill__close:hover {
  background: rgba(10, 10, 10, .15);
  color: #fff;
}

/* ── Minimised chip ─────────────────────────────────────────── */
.sale-chip {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sale-fire);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 14px 30px -12px var(--sale-glow),
    0 4px 12px rgba(10, 10, 10, .18);
  animation: saleChipIn .45s cubic-bezier(.22, 1.2, .36, 1) backwards;
  transition: transform .2s ease;
}

.sale-chip:hover {
  transform: scale(1.05);
}

.sale-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--sale-orange);
  border-radius: 50%;
  animation: salePulse 3.2s ease-out infinite;
  pointer-events: none;
}

.sale-chip__pct {
  font-family: var(--sale-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.sale-chip__off {
  font-family: "Poppins", sans-serif;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ── Pricing page ticket ────────────────────────────────────── */
.sale-ticket {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  max-width: 800px;
  margin: .75rem auto 2rem;
  padding: 1.35rem 1.35rem 1.3rem 1.75rem;
  border-radius: 18px;
  background: var(--sale-fire);
  color: #fff;
  text-align: left;
  box-shadow: 0 20px 40px -26px var(--sale-glow);
}

.sale-ticket::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(90% 140% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%);
}

.sale-ticket .sale-sticker {
  top: -12px;
  left: 20px;
}

.sale-ticket__title {
  margin: .2rem 0 .3rem;
  font-family: var(--sale-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}

.sale-ticket__text {
  margin: 0;
  font-size: .8rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .88);
}

.sale-ticket__text span {
  display: block;
  text-wrap: balance;
}

.sale-ticket .sale-count {
  flex-shrink: 0;
}

/* ── Card prices ────────────────────────────────────────────── */
.card-price--sale {
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}

.sale-price__was {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.price-was {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sale-red);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.pricing-card--featured .price-was {
  color: #ff6b45;
}

.sale-price__save {
  padding: .28rem .6rem;
  border-radius: 9999px;
  background: var(--sale-fire);
  color: #fff;
  font-size: .66rem;
  font-weight: 600;
}

.sale-price__now {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .45rem;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes salePillIn {
  from { opacity: 0; transform: translate(var(--pill-x), 150%); }
  to   { opacity: 1; transform: translate(var(--pill-x), 0); }
}

@keyframes saleStickerIn {
  from { opacity: 0; transform: rotate(-24deg) scale(1.5); }
  to   { opacity: 1; transform: rotate(-8deg) scale(1); }
}

@keyframes saleChipIn {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes salePulse {
  from { transform: scale(1); opacity: .7; }
  to   { transform: scale(1.45); opacity: 0; }
}



/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  .sale-pill {
    --pill-x: 0;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head close"
      "timer cta";
    align-items: center;
    gap: .55rem .75rem;
    padding: 1rem .7rem .7rem 1.1rem;
    border-radius: 22px;
  }

  .sale-pill .sale-sticker { left: 12px; }

  .sale-pill__headline {
    grid-area: head;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.05rem;
  }

  .sale-pill__close {
    grid-area: close;
    justify-self: end;
    margin: -.3rem 0 0;
  }

  .sale-pill__timer {
    grid-area: timer;
    padding-left: 0;
    border-left: 0;
  }

  .sale-pill__cta {
    grid-area: cta;
    padding: .7rem 1.25rem;
    font-size: .8rem;
  }

  .sale-chip {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 700px) {
  .sale-ticket {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    padding: 1.6rem 1.2rem 1.25rem;
    text-align: center;
  }

  .sale-ticket .sale-sticker {
    left: 50%;
    transform: translateX(-50%) rotate(-6deg);
  }

  .sale-ticket__title { font-size: 1.65rem; }
  .sale-ticket .sale-count { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sale-pill,
  .sale-pill .sale-sticker,
  .sale-chip {
    animation: none;
  }

  .sale-chip::before {
    display: none;
  }
}