/* ============================================================
   offers.css — Gupshup Offers
   Homepage offer tiles + popup shell (box-opening intro, then
   a code/info card, spin wheel, scratch card, or mystery reveal)
============================================================ */

.offers-section { padding: 10px 0 6px; }

/* ══ SLIDER — one offer visible at a time, auto-rotates like the hero ══ */
.offers-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(150,40,20,.14);
}

.offers-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.offer-tile {
  flex: 0 0 100%;
  width: 100%;
  cursor: pointer;
  position: relative;
  background: linear-gradient(160deg, #f5c8d4, #9b365a);
  aspect-ratio: 21 / 7;
  border: none;
  padding: 0;
  text-align: left;
}
@media (max-width: 767px) { .offer-tile { aspect-ratio: 4 / 3; } }

.offer-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offer-tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.72) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 26px;
  color: #fff;
}
.offer-tile-badge {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,.92);
  color: #9b365a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 5px 12px;
  border-radius: 20px;
}
.offer-tile-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.offer-tile-sub { font-size: 13.5px; opacity: .92; margin: 0; }

.offers-dots {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.offers-dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.3);
  cursor: pointer;
  padding: 0;
}
.offers-dots .dot.active { background: #fff; border-color: #fff; }

/* ══ OVERLAY ══ */
.offer-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20,10,10,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.offer-overlay.open { opacity: 1; pointer-events: auto; }

.offer-modal {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px 26px 26px;
  text-align: center;
  transform: scale(.92);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.offer-overlay.open .offer-modal { transform: scale(1); }

.offer-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: #f3eeee;
  color: #6b5555;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.offer-modal-close:hover { background: #e8dede; }

/* ══ BOX-OPENING ANIMATION ══ */
.offer-box-stage {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.offer-box {
  position: relative;
  width: 120px; height: 100px;
}
.offer-box-base {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(160deg, #e1442a, #a8301a);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(150,40,20,.3);
}
.offer-box-ribbon-v {
  position: absolute; bottom: 0; left: 50%; top: 0;
  width: 16px; margin-left: -8px;
  background: #ffd166;
}
.offer-box-lid {
  position: absolute; top: 20px; left: -6px; right: -6px;
  height: 34px;
  background: linear-gradient(160deg, #ff5a3c, #c23d1f);
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(150,40,20,.25);
  transform-origin: 50% 100%;
  transition: transform .55s cubic-bezier(.5,-0.4,.5,1.4), opacity .4s ease .2s;
}
.offer-box-ribbon-h {
  position: absolute; top: 20px; left: 0; right: 0;
  height: 10px; margin-top: 12px;
  background: #ffd166;
}
.offer-box-bow {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  font-size: 26px;
  transition: opacity .3s ease;
}
.offer-box.opening .offer-box-lid {
  transform: translateY(-70px) rotate(-100deg);
  opacity: 0;
}
.offer-box.opening .offer-box-bow { opacity: 0; }

.offer-box-glow {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff3c4;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(255,243,196,.7);
}
.offer-box.opening .offer-box-glow {
  animation: offerGlowPop .6s ease .2s forwards;
}
@keyframes offerGlowPop {
  0%   { opacity: 0; transform: translateX(-50%) scale(.3); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(9); }
}

.offer-sparkle {
  position: absolute;
  font-size: 16px;
  opacity: 0;
}
.offer-box.opening .offer-sparkle {
  animation: offerSparkle .8s ease forwards;
}
.offer-sparkle:nth-child(1) { top: 10px;  left: 6px;  animation-delay: .25s !important; }
.offer-sparkle:nth-child(2) { top: 0;     right: 10px;animation-delay: .32s !important; }
.offer-sparkle:nth-child(3) { bottom: 30px; left: -10px; animation-delay: .4s !important; }
.offer-sparkle:nth-child(4) { bottom: 20px; right: -10px; animation-delay: .3s !important; }
@keyframes offerSparkle {
  0%   { opacity: 0; transform: scale(0) translateY(0); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.4) translateY(-24px); }
}

/* ══ REVEAL CARD (generic: code / info offers) ══ */
.offer-reveal { display: none; animation: offerFadeUp .3s ease; }
.offer-reveal.show { display: block; }
@keyframes offerFadeUp { from { opacity:0; transform:translateY(8px);} to {opacity:1; transform:translateY(0);} }

.offer-reveal-icon { font-size: 42px; margin-bottom: 6px; }
.offer-reveal-title { font-size: 20px; font-weight: 800; color: #2a1a1a; margin: 0 0 6px; }
.offer-reveal-sub { font-size: 13.5px; color: #7a6a6a; margin: 0 0 16px; line-height: 1.5; }

.offer-code-box {
  display: flex; align-items: center; gap: 8px;
  border: 2px dashed #e1442a;
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff6f2;
  margin-bottom: 16px;
}
.offer-code-text {
  flex: 1;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #e1442a;
  font-family: monospace;
}
.offer-code-copy {
  border: none; background: #e1442a; color: #fff;
  padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 12.5px;
  cursor: pointer;
}
.offer-code-copy:hover { background: #a8301a; }

.offer-tiers-list, .offer-bogo-line {
  text-align: left;
  background: #fdf5f2;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: #4a3a3a;
}
.offer-tiers-list div { padding: 4px 0; display: flex; justify-content: space-between; }

.offer-countdown {
  font-size: 13px;
  color: #a8301a;
  font-weight: 700;
  margin-bottom: 14px;
  background: #fff0ec;
  border-radius: 20px;
  padding: 6px 14px;
  display: inline-block;
}

.offer-cta {
  display: inline-block;
  background: #e1442a; color: #fff;
  padding: 11px 28px; border-radius: 30px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  border: none; cursor: pointer;
}
.offer-cta:hover { background: #a8301a; }

/* ══ WHEEL ══ */
.offer-wheel-wrap { display: none; }
.offer-wheel-wrap.show { display: block; }
.offer-wheel-outer {
  position: relative;
  width: 240px; height: 240px;
  margin: 0 auto 18px;
}
.offer-wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid #e1442a;
  z-index: 3;
}
.offer-wheel {
  width: 100%; height: 100%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 6px #fff, 0 0 0 9px #e1442a, 0 14px 30px rgba(0,0,0,.2);
  transition: transform 4s cubic-bezier(.15,.85,.25,1);
}
.offer-wheel-seg {
  position: absolute; top: 0; left: 50%; width: 50%; height: 50%;
  transform-origin: 0% 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.offer-wheel-seg span {
  display: block;
  margin-top: 14px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  width: 60px;
  text-align: center;
  transform: rotate(90deg);
}
.offer-wheel-spin-btn {
  border: none; background: #e1442a; color: #fff;
  padding: 12px 30px; border-radius: 30px; font-weight: 800; font-size: 14px;
  cursor: pointer;
}
.offer-wheel-spin-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ══ SCRATCH CARD ══ */
.offer-scratch-wrap { display: none; }
.offer-scratch-wrap.show { display: block; }
.offer-scratch-outer {
  position: relative;
  width: 100%; height: 150px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #fff6f2;
  border: 2px solid #f3d8ce;
}
.offer-scratch-prize {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; color: #a8301a; font-size: 16px; padding: 10px; text-align: center;
}
.offer-scratch-canvas { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.offer-scratch-hint {
  font-size: 12px; color: #a89090; margin-bottom: 14px;
}
