/* =========================================================
   FILTER-ONLINE OFFER POPUP
   File: /frontpage-stats/css/fo-offer-popup.css
   ========================================================= */

/* =========================================================
   MAIN SETTINGS
   Change these first when adjusting layout.
   ========================================================= */

.fo-offer-popup {
  --fo-popup-width: 860px;
  --fo-popup-height: 440px;

  --fo-popup-green: #3a5a40;
  --fo-popup-green-dark: #263f2b;
  --fo-popup-green-soft: #dcecc7;
  --fo-popup-yellow: #ffd83d;
  --fo-popup-yellow-dark: #f2bb14;

  --fo-popup-text-color: #243528;
  --fo-popup-muted-color: #526657;

  /* Product image placement */
  --fo-image-left: -7%;
  --fo-image-top: 8%;
  --fo-image-width: 45%;
  --fo-image-z: 18;

  /* Main text placement */
  --fo-text-left: 38%;
  --fo-text-top: 15%;
  --fo-text-width: 44%;
  --fo-text-z: 5;

  /* Discount box placement */
  --fo-discount-right: -7%;
  --fo-discount-bottom: 6%;
  --fo-discount-width: 36%;
  --fo-discount-height: 124px;
  --fo-discount-z: 20;
}

/* =========================================================
   OVERLAY
   ========================================================= */

.fo-offer-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: rgba(0, 0, 0, 0.58);
  box-sizing: border-box;
}

.fo-offer-popup-overlay.is-active {
  display: flex;
}

/* =========================================================
   POPUP BOX
   ========================================================= */

.fo-offer-popup {
  position: relative;
  width: min(var(--fo-popup-width), 100%);
  height: min(var(--fo-popup-height), calc(100vh - 120px));
  overflow: visible;
  background: #f7fbef;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  box-sizing: border-box;
}

/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.fo-offer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent !important;
  color: var(--fo-popup-green-dark);
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.fo-offer-close:hover {
  background: transparent !important;
  color: #111111;
}

/* =========================================================
   STAGE
   The stage allows product image and discount box to pop out.
   ========================================================= */

.fo-offer-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

/* =========================================================
   CLIPPED BACKGROUND LAYER
   Add this div as first child inside .fo-offer-stage:
   <div class="fo-offer-stage-bg"></div>
   ========================================================= */

.fo-offer-stage-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.98) 0, rgba(255, 255, 255, 0.68) 34%, transparent 62%),
    linear-gradient(116deg, #fbfdf7 0%, #eef7df 46%, #d9ebc4 100%);
  pointer-events: none;
}

/* Soft texture */
.fo-offer-stage-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.13;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.35) 0,
      rgba(255, 255, 255, 0.35) 1px,
      transparent 1px,
      transparent 5px
    );
  pointer-events: none;
}

/* Large white wave */
.fo-offer-stage-bg::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: 8%;
  z-index: 2;
  width: 125%;
  height: 43%;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 50% 50% 0 0;
  transform: rotate(-6deg);
  transform-origin: left bottom;
  pointer-events: none;
}

/* Green wave layers, clipped inside background */
.fo-offer-stage-bg .fo-wave-one,
.fo-offer-stage-bg .fo-wave-two {
  position: absolute;
  left: -18%;
  width: 78%;
  height: 42%;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

.fo-offer-stage-bg .fo-wave-one {
  bottom: -18%;
  z-index: 3;
  background: rgba(120, 177, 88, 0.42);
  transform: rotate(8deg);
}

.fo-offer-stage-bg .fo-wave-two {
  bottom: -25%;
  z-index: 4;
  background: rgba(58, 90, 64, 0.28);
  transform: rotate(14deg);
}

/* =========================================================
   PRODUCT IMAGE AREA
   ========================================================= */

.fo-offer-image-area {
  position: absolute;
  left: var(--fo-image-left);
  top: var(--fo-image-top);
  z-index: var(--fo-image-z);
  width: var(--fo-image-width);
  aspect-ratio: 1 / 1.18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transform: scale(1.04);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.24));
}

.fo-offer-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   MAIN TEXT AREA
   ========================================================= */

.fo-offer-content-area {
  position: absolute;
  left: var(--fo-text-left);
  top: var(--fo-text-top);
  z-index: var(--fo-text-z);
  width: var(--fo-text-width);
  color: var(--fo-popup-text-color);
  box-sizing: border-box;
}

.fo-offer-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  background: rgba(58, 90, 64, 0.12);
  color: var(--fo-popup-green);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fo-offer-content-area h2 {
  margin: 0 0 14px;
  color: var(--fo-popup-green-dark);
  font-family: Arial, sans-serif;
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.fo-offer-content-area p {
  margin: 0 0 24px;
  max-width: 410px;
  color: var(--fo-popup-muted-color);
  font-family: Arial, sans-serif;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.45;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.fo-offer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fo-offer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 2px solid var(--fo-popup-green);
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.fo-offer-button-primary {
  background: var(--fo-popup-green);
  color: #ffffff;
}

.fo-offer-button-primary:hover {
  background: var(--fo-popup-green-dark);
  border-color: var(--fo-popup-green-dark);
  color: #ffffff;
  text-decoration: none;
}

.fo-offer-button-secondary {
  background: rgba(255, 255, 255, 0.45);
  color: var(--fo-popup-green);
}

.fo-offer-button-secondary:hover {
  background: #ffffff;
  color: var(--fo-popup-green-dark);
}

/* =========================================================
   DISCOUNT BOX
   ========================================================= */

.fo-offer-discount-area {
  position: absolute;
  right: var(--fo-discount-right);
  bottom: var(--fo-discount-bottom);
  z-index: var(--fo-discount-z);
  width: var(--fo-discount-width);
  min-height: var(--fo-discount-height);
  padding: 17px 18px 15px;
  box-sizing: border-box;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(135deg, var(--fo-popup-yellow) 0%, #ffe875 52%, var(--fo-popup-yellow-dark) 100%);
  color: #1f2417;
  box-shadow:
    0 18px 32px rgba(82, 69, 13, 0.32),
    0 4px 8px rgba(0, 0, 0, 0.16);
  transform: rotate(-3deg) scale(1.06);
}

.fo-offer-discount-main {
  font-family: Arial, sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.fo-offer-discount-text {
  margin-top: 6px;
  font-family: Arial, sans-serif;
  font-size: clamp(13px, 1.7vw, 18px);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.fo-offer-discount-note {
  margin-top: 5px;
  font-family: Arial, sans-serif;
  font-size: clamp(11px, 1.3vw, 13px);
  font-weight: 700;
  line-height: 1.2;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 820px) {
  .fo-offer-popup {
    --fo-popup-height: 520px;

    --fo-image-left: -7%;
    --fo-image-top: 25%;
    --fo-image-width: 46%;

    --fo-text-left: 34%;
    --fo-text-top: 14%;
    --fo-text-width: 58%;

    --fo-discount-right: -6%;
    --fo-discount-bottom: 8%;
    --fo-discount-width: 43%;
  }

  .fo-offer-content-area h2 {
    font-size: clamp(30px, 6vw, 44px);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
  .fo-offer-popup-overlay {
    padding: 24px;
  }

  .fo-offer-popup {
    width: min(420px, 100%);
    height: min(680px, calc(100vh - 48px));

    --fo-image-left: 54%;
    --fo-image-top: 45%;
    --fo-image-width: 64%;

    --fo-text-left: 7%;
    --fo-text-top: 8%;
    --fo-text-width: 86%;

    --fo-discount-right: auto;
    --fo-discount-bottom: 5%;
    --fo-discount-width: 66%;
  }

  .fo-offer-image-area {
    transform: translateX(-50%) scale(1.04);
    align-items: center;
  }

  .fo-offer-content-area h2 {
    font-size: clamp(31px, 10vw, 42px);
  }

  .fo-offer-content-area p {
    max-width: none;
    font-size: 15px;
  }

  .fo-offer-buttons {
    gap: 10px;
  }

  .fo-offer-button {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .fo-offer-discount-area {
    left: -4%;
    right: auto;
    width: var(--fo-discount-width);
    min-height: 105px;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .fo-offer-popup {
    --fo-image-top: 47%;
    --fo-image-width: 66%;
    --fo-discount-width: 70%;
  }

  .fo-offer-content-area h2 {
    font-size: 31px;
  }

  .fo-offer-content-area p {
    font-size: 14px;
    line-height: 1.4;
  }

  .fo-offer-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .fo-offer-button {
    width: 100%;
  }
}