body.jd-promotion-open {
  overflow: hidden;
}

.jd-promotion-popup[hidden] {
  display: none !important;
}

.jd-promotion-popup,
.jd-promotion-popup * {
  box-sizing: border-box;
}

.jd-promotion-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow-y: auto;
  background: rgba(24, 20, 19, 0.68);
  backdrop-filter: blur(7px);
  opacity: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: opacity 220ms ease;
}

.jd-promotion-popup.is-visible {
  opacity: 1;
}

.jd-promotion-popup__dialog {
  position: relative;
  display: grid;
  grid-template-columns: 660px minmax(0, 1fr);
  width: min(1120px, 100%);
  max-height: min(680px, calc(100vh - 56px));
  overflow: hidden;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 30px 90px rgba(30, 20, 18, 0.32);
  transform: translateY(20px) scale(0.98);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.jd-promotion-popup.is-visible .jd-promotion-popup__dialog {
  transform: translateY(0) scale(1);
}

.jd-promotion-popup__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(37, 30, 28, 0.12);
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.94);
  color: #251e1c;
  box-shadow: 0 8px 24px rgba(37, 30, 28, 0.12);
  cursor: pointer;
}

.jd-promotion-popup__close:hover,
.jd-promotion-popup__close:focus-visible {
  border-color: #c9373b;
  outline: 2px solid #fff;
  outline-offset: 2px;
  background: #c9373b;
  color: #fff;
}

.jd-promotion-popup__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.jd-promotion-popup__media {
  position: relative;
  display: flex;
  width: 660px;
  height: auto;
  flex-direction: column;
  overflow: hidden;
  background: #9f272a;
}

.jd-promotion-popup__media picture {
  display: block;
  order: 1;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
}

.jd-promotion-popup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.jd-promotion-popup__media-label {
  position: static;
  z-index: 1;
  display: flex;
  min-height: 44px;
  align-items: center;
  order: 2;
  padding: 10px 48px 9px 20px;
  background: rgba(159, 39, 42, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.jd-promotion-popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 36px 30px;
}

.jd-promotion-popup__content h2 {
  margin: 0;
  color: #201a18;
  font-size: clamp(42px, 3.4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.jd-promotion-popup__content > p:not(.jd-promotion-popup__terms) {
  margin: 14px 0 0;
  color: #5f5652;
  font-size: 15px;
  line-height: 1.55;
}

.jd-promotion-popup__terms {
  display: grid;
  gap: 2px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #776e6a;
  font-size: 13px;
  line-height: 1.5;
}

.jd-promotion-popup__terms li::marker {
  color: #e4002b;
}

.jd-promotion-popup__terms a {
  color: #e4002b;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.jd-promotion-popup__terms a:hover,
.jd-promotion-popup__terms a:focus-visible {
  color: #b4001f;
}

.jd-promotion-popup__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.jd-promotion-popup__actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.jd-promotion-popup__primary {
  background: #c9373b;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(201, 55, 59, 0.24);
}

.jd-promotion-popup__primary:hover,
.jd-promotion-popup__primary:focus-visible {
  background: #a9262c;
  color: #fff !important;
}

.jd-promotion-popup__secondary {
  border: 1px solid #d9d0cb;
  color: #332b28 !important;
}

.jd-promotion-popup__secondary:hover,
.jd-promotion-popup__secondary:focus-visible {
  border-color: #c9373b;
  color: #c9373b !important;
}

@media (min-width: 721px) and (max-width: 1024px) {
  .jd-promotion-popup__dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    width: min(712px, 100%);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .jd-promotion-popup__media {
    width: 100%;
    height: auto;
  }

  .jd-promotion-popup__media picture {
    height: auto;
    flex: 0 0 auto;
    aspect-ratio: 16 / 10;
  }

  .jd-promotion-popup__content {
    padding: 28px 34px 30px;
  }

  .jd-promotion-popup__content h2 {
    font-size: 40px;
  }
}

@media (max-width: 720px) {
  .jd-promotion-popup {
    align-items: start;
    padding: 16px;
  }

  .jd-promotion-popup__dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    max-height: none;
  }

  .jd-promotion-popup__media {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    height: auto;
    flex-direction: column;
  }

  .jd-promotion-popup__media picture {
    height: auto;
    flex: 0 0 auto;
    order: 1;
    aspect-ratio: 16 / 10;
  }

  .jd-promotion-popup__media-label {
    position: static;
    display: flex;
    min-height: 44px;
    align-items: center;
    order: 2;
    padding: 10px 54px 9px 20px;
  }

  .jd-promotion-popup__close {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    align-self: start;
    justify-self: end;
    margin: 8px 8px 0 0;
  }

  .jd-promotion-popup__content {
    grid-column: 1;
    grid-row: 2;
    padding: 30px 24px 26px;
  }

  .jd-promotion-popup__content h2 {
    font-size: 34px;
  }

  .jd-promotion-popup__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .jd-promotion-popup__actions a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jd-promotion-popup,
  .jd-promotion-popup__dialog {
    transition: none;
  }
}
