/* ===================== Sale (launch sale banner, hero, price badges) =====================
   Banner/hero visibility is driven by app.js (data-sale + data-sale-end); the price badges and
   ribbon only render while PayNow reports product.pricing.active_sale. */
@keyframes sale-shift { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes sale-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sale-shimmer { 0% { background-position: 200% 50%; } 100% { background-position: -200% 50%; } }
@keyframes sale-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes sale-glow { 0%, 100% { box-shadow: 0 0 8px rgba(255, 90, 0, 0.55); } 50% { box-shadow: 0 0 18px rgba(255, 140, 0, 0.95); } }
@keyframes sale-rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-340px) scale(0.3); opacity: 0; }
}

.sale-strip {
  position: relative;
  z-index: 40;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #8a0000, #ff0000, #ff7a00, #ff0000, #8a0000, #ff0000);
  background-size: 300% 100%;
  animation: sale-shift 8s linear infinite;
  box-shadow: 0 4px 24px rgba(255, 60, 0, 0.45);
  border-bottom: 2px solid rgba(255, 210, 63, 0.6);
}
.sale-strip-track {
  display: inline-flex;
  gap: 3rem;
  padding: 0.55rem 0;
  animation: sale-marquee 40s linear infinite;
}
.sale-strip:hover .sale-strip-track { animation-play-state: paused; }
.sale-strip-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.sale-strip-item i { color: #ffd23f; filter: drop-shadow(0 0 4px rgba(255, 210, 63, 0.9)); }
.sale-strip-tag {
  background: #fff;
  color: #e00000;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-weight: 900;
}
.sale-strip-dot { opacity: 0.6; }
.sale-strip [data-cd-text] { color: #ffd23f; font-variant-numeric: tabular-nums; }

.sale-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.75rem 1.5rem 2.25rem;
  background:
    radial-gradient(circle at 50% 130%, rgba(255, 90, 0, 0.55), transparent 60%),
    linear-gradient(135deg, #2c0a0e 0%, #20212f 55%, #2c1407 100%);
  border: 1px solid rgba(255, 90, 0, 0.35);
  box-shadow: inset 0 0 70px rgba(255, 40, 0, 0.18), 0 0 40px rgba(255, 40, 0, 0.22);
}
.sale-hero > *:not(.sale-embers) { position: relative; z-index: 1; }
.sale-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #ffd23f;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(255, 210, 63, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}
.sale-hero-title {
  margin-top: 0.9rem;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ffffff 0%, #ffd23f 25%, #ffffff 50%, #ffd23f 75%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sale-shimmer 4s linear infinite;
}
.sale-hero-pct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  line-height: 0.9;
  margin: 0.4rem 0 0.8rem;
}
.sale-hero-num {
  font-weight: 900;
  font-size: clamp(4.5rem, 13vw, 8.5rem);
  background: linear-gradient(180deg, #ffffff 0%, #ffd23f 35%, #ff7a00 65%, #ff0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 90, 0, 0.75));
  animation: sale-pulse 2.4s ease-in-out infinite;
}
.sale-hero-off {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 60, 0, 0.8);
}
.sale-hero-off small { font-size: 0.32em; letter-spacing: 0.25em; color: #ffd23f; text-shadow: none; }
.sale-hero-sub { max-width: 34rem; margin: 0 auto 1.4rem; opacity: 0.85; }
.sale-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 5.5rem));
  justify-content: center;
  gap: 0.7rem;
}
.sale-countdown > div {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 90, 0, 0.45);
  border-bottom-width: 4px;
  border-radius: 10px;
  padding: 0.6rem 0.2rem 0.45rem;
}
.sale-countdown b {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 90, 0, 0.7);
}
.sale-countdown span { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.18em; opacity: 0.7; }
.sale-embers { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sale-embers span {
  position: absolute;
  bottom: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd23f 0%, #ff7a00 55%, rgba(255, 0, 0, 0) 75%);
  animation: sale-rise 6s linear infinite;
}
.sale-embers span:nth-child(1)  { left: 4%;  animation-delay: 0s;   animation-duration: 6.5s; }
.sale-embers span:nth-child(2)  { left: 11%; animation-delay: 1.8s; animation-duration: 5.2s; width: 4px; height: 4px; }
.sale-embers span:nth-child(3)  { left: 19%; animation-delay: 3.1s; animation-duration: 7.1s; }
.sale-embers span:nth-child(4)  { left: 26%; animation-delay: 0.7s; animation-duration: 5.8s; width: 8px; height: 8px; }
.sale-embers span:nth-child(5)  { left: 34%; animation-delay: 4.2s; animation-duration: 6.2s; width: 4px; height: 4px; }
.sale-embers span:nth-child(6)  { left: 42%; animation-delay: 2.4s; animation-duration: 7.4s; }
.sale-embers span:nth-child(7)  { left: 50%; animation-delay: 5.1s; animation-duration: 5.5s; width: 5px; height: 5px; }
.sale-embers span:nth-child(8)  { left: 58%; animation-delay: 1.2s; animation-duration: 6.8s; }
.sale-embers span:nth-child(9)  { left: 65%; animation-delay: 3.6s; animation-duration: 5.9s; width: 8px; height: 8px; }
.sale-embers span:nth-child(10) { left: 72%; animation-delay: 0.3s; animation-duration: 7.2s; width: 4px; height: 4px; }
.sale-embers span:nth-child(11) { left: 79%; animation-delay: 2.9s; animation-duration: 6.1s; }
.sale-embers span:nth-child(12) { left: 86%; animation-delay: 4.6s; animation-duration: 5.4s; width: 5px; height: 5px; }
.sale-embers span:nth-child(13) { left: 92%; animation-delay: 1.5s; animation-duration: 6.9s; }
.sale-embers span:nth-child(14) { left: 97%; animation-delay: 3.9s; animation-duration: 5.7s; width: 4px; height: 4px; }

/* price tags */
.product-actions .price-old {
  text-decoration: line-through;
  opacity: 0.5;
  font-weight: 600;
  margin-right: 0.3rem;
}
.product-actions .price-new { font-size: 1.15rem; font-weight: 900; }
.sale-card .product-actions .price-new,
.store-product .sale-pill ~ .price-new { color: #ffd23f; text-shadow: 0 0 10px rgba(255, 140, 0, 0.55); }
.sale-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #ff0000, #ff7a00);
  animation: sale-glow 1.8s ease-in-out infinite;
}
.product-actions .sale-save {
  margin: -0.35rem 0 0.4rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #91ff00;
}

/* corner ribbon on product cards */
.sale-card { position: relative; overflow: hidden; }
.sale-ribbon {
  position: absolute;
  top: 16px;
  left: -40px;
  width: 140px;
  z-index: 5;
  transform: rotate(-45deg);
  text-align: center;
  padding: 0.3rem 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #fff;
  background: linear-gradient(90deg, #ff0000, #ff7a00);
  box-shadow: 0 2px 10px rgba(255, 60, 0, 0.6);
}

@media (max-width: 640px) {
  .sale-countdown { grid-template-columns: repeat(4, minmax(0, 4.2rem)); gap: 0.45rem; }
  .sale-countdown b { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sale-strip, .sale-strip-track, .sale-hero-title, .sale-hero-num, .sale-pill, .sale-embers span { animation: none !important; }
}
