:root {
  --green-dark: #1a5c2e;
  --green-mid: #22753b;
  --green-light: #e8f5ec;
  --green-badge: #15803d;
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --orange-cta: #ea7e1b;
  --orange-hover: #d4700f;
  --red-savings: #dc2626;
  --text-dark: #1a1a1a;
  --text-mid: #444;
  --text-light: #666;
  --bg-overlay: rgba(0,0,0,0.6);
  --white: #ffffff;
  --border-light: #e5e7eb;
  --shadow-heavy: 0 25px 60px rgba(0,0,0,0.3);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.popup {
  background: var(--white);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
  animation: slideUp 0.4s ease 0.1s both;
  position: relative;
  max-height: none;
  overflow-y: hidden;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  color: var(--text-light);
  transition: all 0.2s;
}
.popup-close:hover {
  background: var(--white);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* BANNER */
.popup-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 16px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.popup-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 10px,
    rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px
  );
}
.banner-label {
  font-size: 12px;
  font-weight: 600;
  color: #fde68a;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  position: relative;
}
.banner-headline {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  color: var(--white);
  line-height: 1.2;
  position: relative;
  letter-spacing: -1px;
}

/* BODY */
.popup-body {
  padding: 24px 28px 20px;
}

/* OFFER CARD */
.offer-card {
  background: var(--green-light);
  border: 2px solid var(--green-mid);
  border-radius: 14px;
  padding: 20px 20px 24px;
  text-align: center;
  position: relative;
  margin-bottom: 16px;
}
.offer-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-badge);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.offer-sublabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}

/* PRODUCT IMAGE PLACEHOLDER */
.offer-image {
  width: 100%;
  max-width: 400px;
  height: 190px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #f0f7f2 0%, #dceee1 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-mid);
  font-size: 13px;
  font-weight: 500;
  border: 1px dashed #b5d4be;
}

.offer-title {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  color: var(--green-dark);
  line-height: 1.15;
  margin-bottom: 5px;
  letter-spacing: -1px;
}

.offer-regular-price {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.offer-regular-price s {
  color: var(--red-savings);
  font-weight: 600;
}

.offer-price {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
}
.offer-price-shipping {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 4px;
}

/* YELLOW UPGRADE STRIP */
.upgrade-strip {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: var(--text-dark);
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  text-decoration: none;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}
.upgrade-strip:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(245,158,11,0.4);
}

/* PERKS ROW */
.perks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.perk {
  text-align: center;
  padding: 10px 6px;
  background: #fafafa;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68px;
}
.perk-icon { font-size: 20px; margin-bottom: 4px; }
.perk-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mid);
  line-height: 1.3;
}

/* CC ICONS */
.cc-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}
.cc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid #d1d5db;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  min-width: 34px;
  height: 20px;
}
.cc-visa { color: #1a1f71; }
.cc-mc { color: #eb001b; }
.cc-amex { color: #006fcf; }
.cc-disc { color: #ff6600; }

/* PRIMARY CTA */
.cta-primary {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(180deg, var(--orange-cta) 0%, var(--orange-hover) 100%);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(234,126,27,0.35);
  text-decoration: none;
  margin-bottom: 6px;
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234,126,27,0.45);
}
.cta-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* TRUST */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  margin-bottom: 14px;
}
.trust-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
}
.trust-icon { font-size: 14px; }

/* DECLINE */
.decline-wrapper {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
.decline-link {
  display: inline-block;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
  line-height: 1.5;
}
.decline-link:hover { color: var(--text-mid); }
.decline-link strong {
  font-weight: 600;
  color: #888;
}
#b2g6-modal .modal-dialog {
  max-width: 520px !important;
}
#b2g6-modal .modal-content{
  background: none !important;
  padding: 0 !important; 
}
.offer-image img {
  width: 100%;
}
.modal-open .modal {
  padding-left: 5px !important;
  padding-right: 5px !important;
}
.cta-primary:hover {
  color: #fff;
}


/* =========== MOBILE =========== */
@media (max-width: 600px) {
  .popup { border-radius: 12px; }
  .popup-banner { padding: 14px 16px; }
  .banner-label { font-size: 11px; }
  .banner-headline { font-size: 21px; }
  .popup-body {
    padding: 18px 16px 16px;
    padding-top: 25px;
  }
  .offer-card { padding: 16px 14px 20px; }
  .offer-image { height: 120px; max-width: 240px; }
  .offer-title { font-size: 26px; }
  .offer-price { font-size: 32px; }
  .offer-regular-price { font-size: 13px; }
  .upgrade-strip { font-size: 14px; padding: 12px 16px; }
  .perks { gap: 6px; }
  .perk { padding: 8px 4px; min-height: 60px; }
  .perk-icon { font-size: 17px; }
  .perk-text { font-size: 10px; }
  .cc-icon { font-size: 7px; min-width: 30px; height: 18px; }
  .cta-primary { font-size: 15px; padding: 14px 16px; }
  .trust-row { gap: 10px; flex-wrap: wrap; }
  .trust-item { font-size: 10px; }
  .decline-link { font-size: 12px; }
  .offer-badge {
    top: -18px;
    font-size: 16px;
    padding: 5px 40px;
  }
  .offer-sublabel {
    font-size: 24px;
    line-height: 27px;
    margin-top: 10px;
  }
  .offer-price-shipping {
    font-size: 22px;
  }
  .perks {
    display: grid;
    grid-template-columns: auto;
    gap: 8px;
    margin-bottom: 18px;
  }
  .perk-text {
    font-size: 14px;
  }
  .perk-text br {
    display: none;
  }
  .perk-icon {
    font-size: 35px;
  }
  .cc-icon {
    font-size: 15px;
    min-width: 30px;
    height: 18px;
  }
  .decline-link {
    font-size: 16px;
  }
  .trust-item {
    font-size: 14px;
  }
  .offer-image {
    height: 157px;
    max-width: 350px;
  }
  .offer-regular-price s {
    display: block;
  }
    .cta-primary {
        font-size: 22px;
        padding: 14px 16px;
        line-height: 27px;
        text-transform: uppercase;
    }
}

@media (max-width: 380px) {
  .banner-headline { font-size: 19px; }
  .offer-title { font-size: 22px; }
  .offer-price { font-size: 28px; }
    .cta-primary {
        font-size: 19px;
    }
}