@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&display=swap");

body.july4-promo-open {
  overflow: hidden;
}

/* ── Backdrop ── */
.july4-promo-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 50, 0.78);
  backdrop-filter: blur(4px);
  z-index: 9999999998;
  animation: july4FadeIn 0.35s ease-out;
}

/* ── Popup shell ── */
.july4-promo-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999999999;
  width: calc(100% - 24px);
  max-width: 700px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #b22234,
    0 0 0 5px #ffffff,
    0 24px 70px rgba(0, 0, 0, 0.45);
  animation: july4PopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
}

.july4-promo__inner {
  display: flex;
  align-items: stretch;
  min-height: 400px;
}

/* Portrait flag image: 941×1672 (9:16) */
.july4-promo__flag-panel {
  position: relative;
  flex: 0 0 38%;
  min-width: 200px;
  max-width: 280px;
  align-self: stretch;
  overflow: hidden;
}

.july4-promo__flag-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.july4-promo__flag-photo--mobile {
  display: none;
}

.july4-promo__flag-photo--desktop .july4-promo__flag-photo-img {
  object-fit: cover;
  object-position: center center;
}

.july4-promo__flag-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px 18px;
  text-align: center;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 62%,
    rgba(15, 30, 50, 0.55) 100%
  );
}

.july4-promo__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d4cfc4;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1a2b3c;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.july4-promo__close:hover {
  background: #b22234;
  border-color: #b22234;
  color: #ffffff;
}

.july4-promo__badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.94);
  color: #b22234;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.july4-promo__amount {
  display: flex;
  align-items: flex-start;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45));
}

.july4-promo__amount-currency {
  font-family: "Cinzel", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 8px;
}

.july4-promo__amount-value {
  font-family: "Cinzel", Georgia, serif;
  font-size: 5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.july4-promo__amount-label {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Content panel ── */
.july4-promo__content {
  flex: 1;
  background: linear-gradient(180deg, #fffdf8 0%, #f8f5ef 100%);
  padding: 30px 50px 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.july4-promo__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.july4-promo__eyebrow-line {
  flex: 1;
  max-width: 52px;
  height: 1px;
  background: #b22234;
}

.july4-promo__eyebrow-text {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a2b3c;
  white-space: nowrap;
}

.july4-promo__star {
  color: #b22234;
  font-size: 0.55rem;
  line-height: 1;
}

.july4-promo__headline {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 800;
  color: #1a2b3c;
  margin: 0 0 8px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.july4-promo__stars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
  color: #1a2b3c;
  font-size: 0.55rem;
}

.july4-promo__stars-row-center {
  font-size: 0.75rem;
}

.july4-promo__subheadline {
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: #3d4f63;
  margin: 0 0 16px;
  line-height: 1.45;
  text-align: center;
}

.july4-promo__subheadline strong {
  font-weight: 700;
  color: #b22234;
}

.july4-promo__offer-box {
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid #d9d2c5;
  border-bottom: 1px solid #d9d2c5;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.july4-promo__details {
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.82rem;
  color: #3d4f63;
  margin: 0;
  line-height: 1.45;
  text-align: center;
}

.july4-promo__details strong {
  color: #1a2b3c;
  font-weight: 600;
}

/* ── Promo code ── */
.july4-promo__code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #c9bfb0;
  border-radius: 4px;
  padding: 10px 18px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.65);
}

.july4-promo__code-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 2px;
}

.july4-promo__code-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #b22234;
  line-height: 1.2;
}

.july4-promo__code-hint {
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 2px;
}

/* ── CTA ── */
.july4-promo__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #006a4e 0%, #0f4643 100%);
  color: #ffffff;
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(0, 106, 78, 0.35);
  margin-bottom: 12px;
  animation: july4CtaPulse 2.5s ease-in-out infinite;
}

.july4-promo__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 106, 78, 0.45);
  background: linear-gradient(135deg, #008060 0%, #006a4e 100%);
  animation: none;
}

.july4-promo__cta-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.july4-promo__cta:hover .july4-promo__cta-arrow {
  transform: translateX(4px);
}

/* ── Terms ── */
.july4-promo__terms {
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.64rem;
  color: #8a8175;
  line-height: 1.5;
}

.july4-promo__terms-title {
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 3px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.july4-promo__terms ul {
  margin: 0;
  padding-left: 14px;
}

.july4-promo__terms li {
  margin-bottom: 1px;
}

/* ── Reopen pill ── */
.july4-promo__reopen {
  position: fixed;
  bottom: 112px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf8;
  color: #1a2b3c;
  border: 2px solid #b22234;
  border-radius: 50px;
  padding: 8px 16px 8px 10px;
  cursor: pointer;
  font-family: "Cinzel", Georgia, serif;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  animation: july4ReopenSlide 0.4s ease-out, july4ReopenPulse 3s ease-in-out 0.4s infinite;
  transition: bottom 0.3s ease, transform 0.2s, box-shadow 0.2s;
}

.july4-promo__reopen--raised {
  bottom: 186px;
}

.july4-promo__reopen:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.july4-promo__reopen-flag {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #d4cfc4;
}

.july4-promo__reopen-flag-svg {
  display: block;
  width: 42px;
  height: 28px;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.july4-promo__reopen-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.july4-promo__reopen-text strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a2b3c;
}

.july4-promo__reopen-text small {
  font-family: Rubik, Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  color: #b22234;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Animations ── */
@keyframes july4FadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes july4PopIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes july4CtaPulse {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 106, 78, 0.35);
  }
  50% {
    box-shadow: 0 6px 28px rgba(0, 106, 78, 0.55);
  }
}

@keyframes july4ReopenSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes july4ReopenPulse {
  0%,
  100% {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  }
  50% {
    box-shadow: 0 8px 32px rgba(178, 34, 52, 0.35);
  }
}

/* ── Tablet / Mobile ── */
@media (max-width: 640px) {
  .july4-promo-popup {
    max-width: 400px;
  }

  .july4-promo__inner {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .july4-promo__flag-panel {
    flex: 0 0 auto;
    width: 100%;
    min-width: unset;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
    margin: 0;
  }

  .july4-promo__flag-photo--desktop {
    display: none;
  }

  .july4-promo__flag-photo--mobile {
    display: block;
    position: absolute;
    inset: 0;
  }

  .july4-promo__flag-photo-img {
    object-fit: cover;
    object-position: center center;
  }

  .july4-promo__flag-overlay {
    display: none;
  }

  .july4-promo__content {
    width: 100%;
    padding: 10px 16px 12px;
    justify-content: flex-start;
  }

  .july4-promo__eyebrow {
    margin-bottom: 6px;
  }

  .july4-promo__eyebrow-text {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
  }

  .july4-promo__headline {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .july4-promo__stars-row {
    margin-bottom: 8px;
  }

  .july4-promo__subheadline {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .july4-promo__offer-box {
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .july4-promo__details {
    font-size: 0.74rem;
  }

  .july4-promo__cta {
    padding: 12px 18px;
    font-size: 0.88rem;
    margin-bottom: 10px;
  }

  .july4-promo__code-box {
    padding: 8px 14px;
    margin-bottom: 8px;
  }

  .july4-promo__code-value {
    font-size: 1.15rem;
  }

  .july4-promo__terms {
    font-size: 0.58rem;
  }

  .july4-promo__close {
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
  }

  .july4-promo__reopen {
    bottom: 104px;
    right: 16px;
    padding: 7px 12px 7px 8px;
  }

  .july4-promo__reopen--raised {
    bottom: 176px;
  }

  .july4-promo__reopen-flag-svg {
    width: 36px;
    height: 24px;
  }

  .july4-promo__reopen-text strong {
    font-size: 0.7rem;
  }
}

@media (max-width: 400px) {
  .july4-promo-popup {
    width: calc(100% - 20px);
  }

  .july4-promo__headline {
    font-size: 1.05rem;
  }

  .july4-promo__content {
    padding: 12px 14px 10px;
  }
}
