.ccb-popup {
  --ccb-forest: var(--navy-900, #0b2e1f);
  --ccb-forest-dark: var(--navy-950, #041a10);
  --ccb-forest-mid: var(--navy-700, #1a5c44);
  --ccb-lime: var(--amber-500, #a8e82c);
  --ccb-lime-hover: var(--amber-400, #b8f044);
  --ccb-lime-soft: var(--amber-100, #f2fcd8);
  --ccb-cream: var(--cream, #faf8f0);
  --ccb-card: var(--card-bg, #ffffff);
  --ccb-border: var(--border, #d5ddd8);
  --ccb-text: var(--text, #1a2a20);
  --ccb-muted: var(--text-muted, #3d5a48);
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: var(--font-ui, "DM Sans", system-ui, sans-serif);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

html.ccb-popup-open body {
  overflow: hidden;
}

.ccb-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ccb-popup a,
.ccb-popup a:hover,
.ccb-popup a:focus {
  text-decoration: none !important;
}

.ccb-popup__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(168, 232, 44, 0.18), transparent 28%),
    rgba(4, 26, 16, 0.78);
  backdrop-filter: blur(5px);
}

.ccb-popup__dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(26, 92, 68, 0.18);
  border-radius: 18px;
  background: var(--ccb-card);
  color: var(--ccb-text);
  box-shadow: 0 28px 86px rgba(4, 26, 16, 0.34);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.ccb-popup.is-open .ccb-popup__dialog {
  transform: translateY(0) scale(1);
  animation: ccb-popup-pop 360ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.ccb-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ccb-forest);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(4, 26, 16, 0.18);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ccb-popup__close:hover,
.ccb-popup__close:focus {
  background: var(--ccb-lime);
  color: var(--ccb-forest-dark);
  box-shadow: 0 0 0 4px rgba(168, 232, 44, 0.2), 0 12px 26px rgba(4, 26, 16, 0.2);
  transform: rotate(90deg) scale(1.06);
  outline: 0;
}

.ccb-popup__header {
  position: relative;
  overflow: hidden;
  padding: 30px clamp(20px, 4vw, 34px) 26px;
  background:
    radial-gradient(circle at 84% 22%, rgba(168, 232, 44, 0.18), transparent 28%),
    linear-gradient(135deg, var(--ccb-forest-dark) 0%, var(--ccb-forest) 58%, var(--ccb-forest-mid) 100%);
  color: #ffffff;
}

.ccb-popup__header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 10%, transparent 10% 100%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 13px);
  pointer-events: none;
}

.ccb-popup__eyebrow {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--ccb-lime-hover);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ccb-popup__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ccb-lime);
  box-shadow: 0 0 0 5px rgba(168, 232, 44, 0.16);
}

.ccb-popup__title {
  position: relative;
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
}

.ccb-popup__header p {
  position: relative;
  max-width: 560px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.ccb-popup__brands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(168, 232, 44, 0.16), transparent 24%),
    var(--ccb-cream);
}

.ccb-popup__brand-card {
  position: relative;
  display: grid;
  grid-template-rows: 86px auto auto;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(26, 92, 68, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: var(--sh-card, 0 8px 24px rgba(11, 46, 31, 0.08));
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ccb-popup__brand-card::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -32%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(168, 232, 44, 0.24), transparent);
  transform: rotate(16deg) translateX(-220%);
  pointer-events: none;
}

.ccb-popup__brand-card:hover,
.ccb-popup__brand-card:focus-within {
  border-color: rgba(26, 92, 68, 0.28);
  box-shadow: var(--sh-hover, 0 8px 28px rgba(11, 46, 31, 0.14));
  transform: translateY(-3px);
}

.ccb-popup__brand-card:hover::before,
.ccb-popup__brand-card:focus-within::before {
  animation: ccb-popup-card-shine 820ms ease;
}

.ccb-popup__brand-card .ccb-brand-image {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 150px;
  height: 86px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  padding: 0;
  background: transparent;
  transition: transform 200ms ease, filter 200ms ease;
}

.ccb-popup__brand-card:hover .ccb-brand-image,
.ccb-popup__brand-card:focus-within .ccb-brand-image {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.04);
}

.ccb-popup__brand-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.ccb-popup__brand-copy strong {
  display: block;
  color: var(--ccb-forest);
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.08;
}

.ccb-popup__brand-copy p {
  margin: 0;
  color: var(--ccb-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.42;
}

.ccb-popup__brand-card a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 2px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ccb-lime) 0%, #7dd63e 100%);
  color: var(--ccb-forest-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(168, 232, 44, 0.26);
  transition: box-shadow 160ms ease, transform 160ms ease, filter 160ms ease;
}

.ccb-popup__brand-card a:hover,
.ccb-popup__brand-card a:focus {
  color: var(--ccb-forest-dark);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(168, 232, 44, 0.36);
  transform: translateY(-2px);
  outline: 0;
}

@keyframes ccb-popup-pop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ccb-popup-card-shine {
  from {
    transform: rotate(16deg) translateX(-220%);
  }

  to {
    transform: rotate(16deg) translateX(680%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccb-popup.is-open .ccb-popup__dialog,
  .ccb-popup__brand-card:hover::before,
  .ccb-popup__brand-card:focus-within::before {
    animation: none;
  }

  .ccb-popup__dialog,
  .ccb-popup__close,
  .ccb-popup__brand-card,
  .ccb-popup__brand-card .ccb-brand-image,
  .ccb-popup__brand-card a {
    transition: none;
  }
}

@media (max-width: 820px) {
  .ccb-popup__dialog {
    width: min(620px, 100%);
  }

  .ccb-popup__brands {
    grid-template-columns: 1fr;
  }

  .ccb-popup__brand-card {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
  }

  .ccb-popup__brand-card .ccb-brand-image {
    grid-row: 1 / 3;
    width: 112px;
    height: 86px;
  }
}

@media (max-width: 560px) {
  .ccb-popup {
    padding: 12px;
  }

  .ccb-popup__header {
    padding: 56px 18px 22px;
  }

  .ccb-popup__title {
    font-size: 32px;
  }

  .ccb-popup__brands {
    gap: 10px;
    padding: 12px;
  }

  .ccb-popup__brand-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .ccb-popup__brand-card .ccb-brand-image {
    width: 88px;
    height: 72px;
  }

  .ccb-popup__brand-copy strong {
    font-size: 20px;
  }

  .ccb-popup__brand-copy p {
    font-size: 13px;
  }

  .ccb-popup__brand-card a {
    grid-column: 1 / -1;
  }
}
