/* =========================================================
   PROMO TICKET HERO — bigger, image-first, more prominent
   Used for `promotions` table entries (campaign banners)
   ========================================================= */

.promo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
@media (max-width: 480px) {
  .promo-grid { grid-template-columns: 1fr; gap: 14px; }
}

.promo-ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 22px 44px -18px rgba(239, 83, 80, 0.28),
    0 6px 14px -4px rgba(255, 167, 38, 0.16);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
  isolation: isolate;
}
html.dark .promo-ticket {
  background: #1e293b;
  box-shadow:
    0 30px 60px -20px rgba(239, 83, 80, 0.45),
    0 8px 20px -6px rgba(0, 0, 0, 0.5);
}

/* Animated gradient border via ::before */
.promo-ticket::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ef5350, #ffa726, #ec4899, #ef5350);
  background-size: 300% 300%;
  z-index: -1;
  animation: promo-glow 6s ease infinite;
}
@keyframes promo-glow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.promo-ticket:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    0 30px 54px -18px rgba(239, 83, 80, 0.40),
    0 10px 22px -6px rgba(255, 167, 38, 0.26);
}

/* Top — image hero */
.promo-ticket-media {
  position: relative;
  aspect-ratio: 21 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #ef5350, #ffa726);
}
.promo-ticket-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.promo-ticket:hover .promo-ticket-media img { transform: scale(1.06); }

.promo-ticket-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

/* No-image fallback hero — bold gradient with mascot */
.promo-ticket-media.is-fallback {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15) 0, transparent 50%),
    linear-gradient(135deg, #ef5350, #ffa726, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
}
.promo-ticket-media.is-fallback i {
  font-size: 52px;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

/* Top-corner badges over the image */
.promo-flash-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ef5350, #f59e0b);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 4px 10px -3px rgba(239, 83, 80, 0.45);
  z-index: 2;
  animation: promo-pulse 2.5s ease-in-out infinite;
}
@keyframes promo-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.promo-flash-badge i { font-size: 10px; animation: promo-bolt 1.5s ease-in-out infinite; }
@keyframes promo-bolt {
  0%, 100% { transform: rotate(0); opacity: 1; }
  50%      { transform: rotate(15deg); opacity: 0.7; }
}

.promo-countdown-badge {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  z-index: 2;
}
.promo-countdown-badge.is-urgent {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  animation: promo-pulse 1.2s ease-in-out infinite;
}

/* Bottom content */
.promo-ticket-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.promo-ticket-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.01em;
}
html.dark .promo-ticket-title { color: #f8fafc; }
.promo-ticket-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.dark .promo-ticket-desc { color: #cbd5e1; }

.promo-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
  color: #475569;
  border-top: 1px dashed rgba(15, 23, 42, 0.10);
  margin-top: auto;
  padding-top: 10px;
}
html.dark .promo-ticket-meta { color: #94a3b8; border-color: rgba(255,255,255,0.10); }
.promo-ticket-meta i { color: #ef5350; }

.promo-ticket-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ef5350, #f59e0b);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 18px -6px rgba(239, 83, 80, 0.50);
}
.promo-ticket-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -6px rgba(239, 83, 80, 0.65);
}
.promo-ticket-cta i { transition: transform .2s ease; }
.promo-ticket-cta:hover i { transform: translateX(4px); }

/* Section dividers/headings — shared between promo + coupon sections */
.deal-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 36px 0 18px;
}
.deal-section-head h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
html.dark .deal-section-head h2 { color: #f1f5f9; }
.deal-section-head .deal-section-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ef5350, #f59e0b);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(239, 83, 80, 0.45);
}
.deal-section-head .deal-section-icon.is-coupon {
  background: linear-gradient(135deg, #3c8cf3, #745af2);
  box-shadow: 0 8px 18px -6px rgba(60, 140, 243, 0.45);
}
.deal-section-head .deal-section-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}
html.dark .deal-section-head .deal-section-sub { color: #94a3b8; }

/* =========================================================
   Coupon ticket card — perforated/notched two-half design
   ========================================================= */

.coupon-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
@media (max-width: 480px) {
  .coupon-grid { grid-template-columns: 1fr; }
}

.coupon-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 38px -16px rgba(15, 23, 42, 0.18), 0 4px 14px -4px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
  isolation: isolate;
  min-height: 168px;
}
html.dark .coupon-ticket {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px -10px rgba(0, 0, 0, 0.55), 0 4px 14px -4px rgba(0, 0, 0, 0.4);
}
.coupon-ticket:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -16px rgba(60, 140, 243, 0.35), 0 8px 18px -6px rgba(116, 90, 242, 0.25);
}

/* ===== Left half: discount value ===== */
.coupon-left {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 12px;
  background: linear-gradient(135deg, var(--coupon-grad-1, #3c8cf3), var(--coupon-grad-2, #745af2));
  color: #fff;
  overflow: hidden;
}
.coupon-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0, transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.10) 0, transparent 25%);
  pointer-events: none;
}
.coupon-discount-value {
  position: relative;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.coupon-discount-unit {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
  opacity: 0.9;
}
.coupon-discount-applies {
  position: relative;
  margin-top: 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.35);
}

/* ===== Notch (perforated divider between halves) ===== */
.coupon-ticket::before,
.coupon-ticket::after {
  content: '';
  position: absolute;
  left: 122px;
  width: 16px;
  height: 16px;
  background: var(--page-bg, #f6f8fb);
  border-radius: 50%;
  z-index: 2;
}
.coupon-ticket::before { top: -8px; }
.coupon-ticket::after  { bottom: -8px; }
html.dark .coupon-ticket::before,
html.dark .coupon-ticket::after { background: var(--page-bg-dark, #0f172a); }

/* dashed perforation line */
.coupon-perforation {
  position: absolute;
  left: 130px;
  top: 12px;
  bottom: 12px;
  width: 0;
  border-left: 2px dashed rgba(15, 23, 42, 0.12);
  z-index: 1;
}
html.dark .coupon-perforation { border-color: rgba(255, 255, 255, 0.12); }

/* ===== Right half: details ===== */
.coupon-right {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 6px;
}
.coupon-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.dark .coupon-title { color: #f1f5f9; }
.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: auto;
}
.coupon-meta .dot { color: #cbd5e1; margin: 0 -4px; }
html.dark .coupon-meta { color: #94a3b8; }

.coupon-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.coupon-code {
  flex: 1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(60, 140, 243, 0.08);
  color: #2563eb;
  border: 1px dashed rgba(60, 140, 243, 0.30);
  text-align: center;
  user-select: all;
  cursor: pointer;
}
html.dark .coupon-code {
  background: rgba(60, 140, 243, 0.16);
  color: #93c5fd;
  border-color: rgba(60, 140, 243, 0.40);
}
.coupon-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #3c8cf3, #745af2);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.coupon-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -4px rgba(60, 140, 243, 0.45);
}
.coupon-copy-btn.is-copied {
  background: linear-gradient(135deg, #05be8a, #06b6d4);
}

/* ===== Status states ===== */
.coupon-ticket[data-status="used_up"],
.coupon-ticket[data-status="expired"],
.coupon-ticket[data-status="soldout"] {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.coupon-ticket[data-status="upcoming"] { opacity: 0.85; }
.coupon-ticket[data-status="used_up"] .coupon-copy-btn,
.coupon-ticket[data-status="expired"] .coupon-copy-btn,
.coupon-ticket[data-status="soldout"] .coupon-copy-btn { display: none; }
.coupon-ticket[data-status="upcoming"] .coupon-copy-btn {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  cursor: not-allowed;
}

.coupon-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.coupon-status-badge.is-available { background: rgba(5,190,138,.15); color: #047857; border: 1px solid rgba(5,190,138,.35); }
.coupon-status-badge.is-used      { background: rgba(100,116,139,.15); color: #475569; border: 1px solid rgba(100,116,139,.35); }
.coupon-status-badge.is-expired   { background: rgba(239,83,80,.12);  color: #b91c1c; border: 1px solid rgba(239,83,80,.30); }
.coupon-status-badge.is-soldout   { background: rgba(255,167,38,.12); color: #b45309; border: 1px solid rgba(255,167,38,.30); }

/* corner ribbon for status */
.coupon-ribbon {
  position: absolute;
  top: 0; right: 0;
  background: rgba(239, 83, 80, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-bottom-left-radius: 12px;
  z-index: 3;
}
.coupon-ribbon.is-soldout { background: rgba(255, 167, 38, 0.92); }
.coupon-ribbon.is-used    { background: rgba(100, 116, 139, 0.92); }

/* ===== Discount color presets (rotate by index) ===== */
.coupon-ticket.c-blue   { --coupon-grad-1: #3c8cf3; --coupon-grad-2: #745af2; }
.coupon-ticket.c-green  { --coupon-grad-1: #05be8a; --coupon-grad-2: #06b6d4; }
.coupon-ticket.c-orange { --coupon-grad-1: #ffa726; --coupon-grad-2: #ef5350; }
.coupon-ticket.c-pink   { --coupon-grad-1: #ec4899; --coupon-grad-2: #f59e0b; }
.coupon-ticket.c-purple { --coupon-grad-1: #745af2; --coupon-grad-2: #ec4899; }

/* ===== Filter pills (reuse asrs but standalone here too) ===== */
.coupon-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.coupon-filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px; font-weight: 600;
  background: #fff;
  color: #475569;
  border: 1px solid rgba(15,23,42,0.08);
  cursor: pointer;
  transition: all .18s ease;
}
.coupon-filter-pill:hover { border-color: rgba(60,140,243,0.40); color: #2563eb; }
.coupon-filter-pill.is-active {
  background: linear-gradient(135deg, #3c8cf3, #745af2);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 14px -4px rgba(60,140,243,0.45);
}
html.dark .coupon-filter-pill { background: #1e293b; border-color: rgba(255,255,255,0.08); color: #cbd5e1; }
html.dark .coupon-filter-pill:hover { color: #93c5fd; }
