/* ============================================================
   ABF Apparel Discount Popup
   ============================================================ */

.ad-overlay {
  position: fixed; inset: 0;
  background: rgba(15,15,14,0.7);
  backdrop-filter: blur(12px);
  z-index: 9500;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: adBd 0.35s;
}
@keyframes adBd { from { opacity: 0; } to { opacity: 1; } }
.ad-overlay.visible { display: flex; }

.ad-card {
  background: white;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 28px 80px -20px rgba(0,0,0,0.55);
  animation: adPop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes adPop { from { opacity: 0; transform: translateY(28px) scale(0.94); } to { opacity: 1; transform: translateY(0) scale(1); } }

.ad-hero {
  background: linear-gradient(135deg, #1B1B1A 0%, #2D2D2A 100%);
  color: white;
  padding: 36px 32px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ad-hero::before {
  content: '';
  position: absolute;
  top: -60%; right: -20%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(164,34,23,0.45), transparent 70%);
  pointer-events: none;
}
.ad-hero::after {
  content: '';
  position: absolute;
  bottom: -50%; left: -10%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(244,182,175,0.25), transparent 70%);
  pointer-events: none;
}

.ad-badge {
  position: relative; z-index: 1;
  display: inline-block;
  padding: 6px 14px;
  background: var(--brand-red, #A42217);
  color: white;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ad-hero h2 {
  position: relative; z-index: 1;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4.5vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.ad-hero h2 em { font-style: italic; color: #F4B6AF; }

.ad-hero p {
  position: relative; z-index: 1;
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 0.96rem;
  line-height: 1.55;
}

.ad-discount-num {
  position: relative; z-index: 1;
  font-family: 'Fraunces', serif;
  font-size: clamp(3.4rem, 8vw, 4.4rem);
  font-weight: 600;
  color: white;
  line-height: 1;
  margin: 16px 0 6px;
  letter-spacing: -0.04em;
}
.ad-discount-num em { color: #F4B6AF; font-style: normal; }
.ad-discount-sub {
  position: relative; z-index: 1;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

.ad-body { padding: 24px 32px 28px; }

.ad-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}
.ad-perks li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--ink, #1B1B1A);
  line-height: 1.45;
}
.ad-perks li::before {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-red, #A42217);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

.ad-field { margin-bottom: 12px; }
.ad-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(27,27,26,0.14);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: var(--warm-cream, #FAF6F0);
  color: var(--ink, #1B1B1A);
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s;
}
.ad-field input:focus {
  outline: none;
  border-color: var(--brand-red, #A42217);
  background: white;
  box-shadow: 0 0 0 3px rgba(164,34,23,0.08);
}

.ad-submit {
  width: 100%;
  padding: 16px 24px;
  background: var(--brand-red, #A42217);
  color: white;
  border: none;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  margin-top: 6px;
}
.ad-submit:hover:not(:disabled) {
  background: #8C1B12;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(164,34,23,0.5);
}
.ad-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ad-submit svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.ad-skip {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: #8A8A86;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  margin-top: 12px;
  padding: 8px;
  transition: color 0.2s;
}
.ad-skip:hover { color: var(--brand-red, #A42217); }

.ad-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.16);
  border: none;
  color: white;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ad-close:hover { background: rgba(255,255,255,0.28); transform: rotate(90deg); }
.ad-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; }

.ad-error {
  background: #FEF2F2;
  border-left: 3px solid #DC2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  color: #991B1B;
  margin-bottom: 12px;
  display: none;
}
.ad-error.visible { display: block; }

.ad-tiny { font-size: 0.72rem; color: #8A8A86; text-align: center; margin: 14px 0 0; line-height: 1.5; }

/* Success state */
.ad-success { text-align: center; padding: 40px 32px; }
.ad-success .ad-check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #047857);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 12px 28px -6px rgba(22,163,74,0.4);
}
.ad-success .ad-check svg { width: 34px; height: 34px; stroke: white; fill: none; stroke-width: 2.5; }
.ad-success h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.ad-success h2 em { font-style: italic; color: var(--brand-red, #A42217); }
.ad-success p { color: #4A4A47; line-height: 1.6; margin: 0 0 22px; font-size: 0.94rem; }
.ad-code-box {
  display: inline-block;
  padding: 16px 28px;
  background: var(--warm-cream, #FAF6F0);
  border: 2px dashed var(--brand-red, #A42217);
  border-radius: 12px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--brand-red, #A42217);
  margin: 0 0 22px;
  user-select: all;
  cursor: copy;
}
.ad-success .ad-done {
  padding: 13px 24px;
  border-radius: 100px;
  background: var(--ink, #1B1B1A);
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.ad-success .ad-done:hover { background: var(--brand-red, #A42217); }
