
.promo-banner {
  --pos: 12px;
  position: fixed;
  bottom: var(--pos);
  inset-inline-end: var(--pos);
  z-index: 999999999999;
  width: 295px;
  min-height: 50px;
  background-color: #9CEE69;
  padding: 17px 16px;
  font-size: 14px;
  color: #111111;
  border-radius: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: left;
}


.promo-banner__content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.promo-banner__content p{
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 0;
  color: #111111;
}


.promo-banner-btn {
  border: 1px solid #111111;
  background-color: #111111;
  color: #ffffff;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease-in-out;
}

.promo-banner-btn:hover {
  border-color: #111111;
  background-color: transparent;
  color: #111111;

}


.promo-banner__close {
  position: absolute;
  inset-inline-end: -8px;
  top: -8px;
  background: #fff;
  border: none;
  color: #111111;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.promo-banner__close:hover {
  background-color: #111111;
  color: #ffffff;
}

.promo-banner__close svg {
  width: 14px;
  height: 14px;
  display: block;
}

.promo-banner.is-hidden {
  display: none;
}

/* Popup */
.buynow-popup {
  position: fixed;
  inset: 0;
  z-index: 999999999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(17, 17, 17, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.buynow-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.buynow-popup__box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color: #111111;
  text-align: left;
  transform: translateY(20px);
  transition: transform 0.3s ease-in-out;
}

.buynow-popup.is-open .buynow-popup__box {
  transform: translateY(0);
}

.buynow-popup__box:focus {
  outline: none;
}

/* Copy side */
.buynow-popup__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 40px 30px;
}

.buynow-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 30px;
  background-color: #effbe6;
  color: #111111;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.buynow-popup__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid #111111;
  border-radius: 50%;
  background-color: #9CEE69;
}

.buynow-popup__title {
  margin: 0 0 12px;
  padding: 0;
  font-family: inherit;
  font-size: clamp(25px, 3.6vw, 30px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #111111;
}

.buynow-popup__title span {
  display: block;
  text-wrap: balance;
}

.buynow-popup__desc {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #4a4a4a;
}

.buynow-popup__price {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 20px;
  padding: 14px 0;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.buynow-popup__amount {
  font-size: 52px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111111;
}

.buynow-popup__period {
  padding: 7px 14px;
  border-radius: 30px;
  background-color: #9CEE69;
  color: #111111;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.buynow-popup__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.buynow-popup__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #111111;
}

.buynow-popup__check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #9CEE69;
  color: #111111;
}

.buynow-popup__check svg {
  width: 12px;
  height: 12px;
  display: block;
}

.buynow-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 16px 24px;
  border: 1px solid #111111;
  border-radius: 30px;
  background-color: #111111;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.buynow-popup__cta:hover,
.buynow-popup__cta:focus-visible {
  border-color: #111111;
  background-color: #9CEE69;
  color: #111111;
}

.buynow-popup__later {
  align-self: center;
  margin: 12px 0 0;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  box-shadow: none;
  color: #4a4a4a;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
  cursor: pointer;
}

.buynow-popup__later:hover {
  background: none;
  color: #111111;
}

.buynow-popup__cta:focus-visible,
.buynow-popup__later:focus-visible,
.buynow-popup__close:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 3px;
}

/* Close button */
.buynow-popup__close {
  position: absolute;
  inset-inline-end: 14px;
  top: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #111111;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.buynow-popup__close:hover {
  background-color: #111111;
  color: #ffffff;
}

.buynow-popup__close svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Theme preview side */
.buynow-popup__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background-color: #9CEE69;
  overflow: hidden;
}

.buynow-popup__stack {
  position: relative;
  width: 100%;
  max-width: 310px;
  aspect-ratio: 1 / 1.25;
}

.buynow-popup__shot {
  position: absolute;
  width: 82%;
  overflow: hidden;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.2), 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.buynow-popup__shot--back {
  top: 0;
  left: 0;
  transform: rotate(-5deg);
}

.buynow-popup__shot--mid {
  top: 21%;
  left: 9%;
  transform: rotate(-2deg);
}

.buynow-popup__shot--front {
  right: 0;
  bottom: 0;
  transform: rotate(2deg);
}

.buynow-popup__bar {
  display: flex;
  align-items: center;
  height: 20px;
  padding-inline-start: 9px;
  background-color: #f1f1f1;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.buynow-popup__bar::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #cfcfcf;
  box-shadow: 10px 0 0 #cfcfcf, 20px 0 0 #cfcfcf;
}

.buynow-popup__page {
  aspect-ratio: 4 / 3;
  background-color: #f7f7f4;
  background-repeat: no-repeat;
}

/* abstract light layout (not a real theme screenshot) */
.buynow-popup__page--a {
  background-image:
    linear-gradient(#111111, #111111),
    linear-gradient(#111111, #111111),
    linear-gradient(#111111, #111111),
    linear-gradient(#cfd2cb, #cfd2cb),
    linear-gradient(#cfd2cb, #cfd2cb),
    linear-gradient(#111111, #111111),
    linear-gradient(#9CEE69, #9CEE69);
  background-size: 24% 4%, 38% 8%, 28% 8%, 34% 3%, 26% 3%, 16% 8%, 38% 70%;
  background-position:
    left 6% top 8%,
    left 6% top 24%,
    left 6% top 36%,
    left 6% top 54%,
    left 6% top 61%,
    left 6% top 74%,
    left 56% top 14%;
}

/* abstract dark layout (not a real theme screenshot) */
.buynow-popup__page--b {
  background-color: #111111;
  background-image:
    linear-gradient(#4a4a4a, #4a4a4a),
    linear-gradient(#9CEE69, #9CEE69),
    linear-gradient(#ffffff, #ffffff),
    linear-gradient(#9CEE69, #9CEE69),
    linear-gradient(#2c2c2c, #2c2c2c),
    linear-gradient(#2c2c2c, #2c2c2c),
    linear-gradient(#2c2c2c, #2c2c2c);
  background-size: 20% 4%, 50% 8%, 34% 8%, 20% 8%, 26% 22%, 26% 22%, 26% 22%;
  background-position:
    left 6% top 8%,
    left 25% top 24%,
    left 33% top 36%,
    left 40% top 55%,
    left 6% top 72%,
    left 37% top 72%,
    left 68% top 72%;
}

/* the one real screenshot: the Printx theme */
.buynow-popup__page--printx {
  background-color: #f1f1f1;
  background-image: url("../img/printx-preview.jpg");
  background-position: center;
  background-size: cover;
}

@media (max-width: 640px) {
  .buynow-popup {
    padding: 12px;
  }
  .buynow-popup__box {
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .buynow-popup__body {
    padding: 20px 20px 18px;
  }
  .buynow-popup__eyebrow {
    margin-bottom: 12px;
  }
  .buynow-popup__title {
    font-size: 23px;
  }
  .buynow-popup__desc {
    margin-bottom: 14px;
    font-size: 14px;
  }
  .buynow-popup__price {
    margin-bottom: 14px;
    padding: 10px 0;
  }
  .buynow-popup__amount {
    font-size: 42px;
  }
  .buynow-popup__features {
    gap: 8px;
    margin-bottom: 18px;
  }
  .buynow-popup__feature {
    font-size: 14px;
  }
  .buynow-popup__cta {
    padding: 15px 20px;
    font-size: 15px;
  }
  /* compact strip of cards on top, cropped at the bottom edge */
  .buynow-popup__visual {
    order: -1;
    height: 112px;
    padding: 0;
  }
  .buynow-popup__stack {
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
  }
  .buynow-popup__shot {
    width: 46%;
  }
  .buynow-popup__shot--back {
    top: 24px;
    left: 4%;
    transform: rotate(-5deg);
  }
  .buynow-popup__shot--mid {
    top: 14px;
    left: 27%;
    transform: rotate(-1deg);
  }
  .buynow-popup__shot--front {
    top: 28px;
    right: 4%;
    bottom: auto;
    transform: rotate(4deg);
  }
  .promo-banner {
    padding: 10px 12px;
  }
  .promo-banner__content {
    gap: 10px;
  }
  .promo-banner__text {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buynow-popup,
  .buynow-popup__box {
    transition: none;
  }
}
