﻿/* ============================================================
   COUPON SYSTEM + PROGRESS BAR
   ============================================================ */

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #c9a961, #e8d5a0, #c9a961);
  z-index: 99999;
  transition: width .1s linear;
  box-shadow: 0 0 10px rgba(201,169,97,.6);
  pointer-events: none;
}
.scroll-progress::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9a961;
  box-shadow: 0 0 12px rgba(201,169,97,.8);
}

/* ===== COUPON MODAL ===== */
.cp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,17,23,.8);
  backdrop-filter: blur(10px);
  z-index: 99997;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cp-overlay.open { opacity: 1; visibility: visible; }

.cp-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.6);
  transform: scale(.94);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(201,169,97,.25);
  position: relative;
}
.cp-overlay.open .cp-modal { transform: scale(1); }

.cp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all .25s ease;
  z-index: 5;
}
.cp-close:hover { background: rgba(255,255,255,.3); transform: rotate(90deg); }

.cp-head {
  padding: 34px 32px 26px;
  background: linear-gradient(135deg, #0d1117 0%, #1a2230 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cp-head::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(201,169,97,.22), transparent 65%);
  pointer-events: none;
}
.cp-head > * { position: relative; z-index: 2; }
.cp-head-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #c9a961, #b08f42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 10px 26px rgba(201,169,97,.5);
}
.cp-head h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.cp-head p {
  font-size: 13.5px;
  color: rgba(255,255,255,.7);
  margin: 0;
  line-height: 1.5;
}

.cp-body { padding: 24px 32px 30px; }
.cp-field { margin-bottom: 14px; }
.cp-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 7px;
  letter-spacing: .2px;
}
.cp-input-wrap { position: relative; }
.cp-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #c9a961;
  font-size: 14px;
  pointer-events: none;
}
.cp-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14.5px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1f2937;
  background: #fff;
  transition: all .2s ease;
  box-sizing: border-box;
}
.cp-input:focus {
  outline: none;
  border-color: #c9a961;
  box-shadow: 0 0 0 4px rgba(201,169,97,.14);
}
.cp-input::placeholder { color: #9ca3af; font-weight: 400; letter-spacing: 1px; }

.cp-result {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.cp-result.show { display: flex; }
.cp-result.success {
  background: rgba(16,185,129,.1);
  color: #059669;
  border: 1px solid rgba(16,185,129,.3);
}
.cp-result.error {
  background: rgba(220,38,38,.08);
  color: #dc2626;
  border: 1px solid rgba(220,38,38,.2);
}
.cp-result i { font-size: 15px; flex-shrink: 0; }

.cp-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #f0f1f3;
}
.cp-btn {
  flex: 1;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all .25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cp-btn-ghost {
  background: transparent;
  border-color: #e5e7eb;
  color: #1f2937;
}
.cp-btn-ghost:hover { border-color: #1f2937; background: #f6f7f9; }
.cp-btn-gold {
  background: linear-gradient(135deg, #c9a961, #b08f42);
  color: #fff;
  box-shadow: 0 6px 18px rgba(201,169,97,.35);
}
.cp-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201,169,97,.5); }

.cp-available {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}
.cp-available h5 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #6b7280;
  margin: 0 0 10px;
  font-weight: 700;
}
.cp-code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cp-chip {
  padding: 7px 12px;
  border-radius: 8px;
  background: #fdfbf6;
  border: 1.5px dashed rgba(201,169,97,.5);
  color: #b08f42;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all .22s ease;
}
.cp-chip:hover {
  background: #c9a961;
  border-color: #c9a961;
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .cp-head { padding: 26px 22px 20px; }
  .cp-head h3 { font-size: 19px; }
  .cp-body { padding: 20px 22px 24px; }
  .cp-actions { flex-direction: column-reverse; }
}