@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

/* ── Custom Variables (controlled by PHP) ── */
:root {
  --hp-primary-color: #0E3690;
  --hp-primary-text-color: #ffffff;
}

/* ── Overlay ── */
#hp-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#hp-popup-overlay.hp-active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal Card Base ── */
#hp-popup {
  background: #fff;
  width: 100%;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
  overflow: hidden;
  box-sizing: border-box;
}

#hp-popup-overlay.hp-active #hp-popup {
  transform: translateY(0);
  opacity: 1;
}

/* ──── LAYOUT: SPLIT MODE ──── */
#hp-popup.hp-layout-split {
  max-width: 780px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

#hp-popup.hp-layout-split .hp-popup__image {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

#hp-popup.hp-layout-split .hp-popup__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: brightness(0.88);
  transition: transform 6s ease;
}

#hp-popup.hp-layout-split:hover .hp-popup__image img {
  transform: scale(1.04);
}

#hp-popup.hp-layout-split .hp-popup__content {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 44px;
  box-sizing: border-box;
}

/* ──── LAYOUT: VERTICAL MODE (Centered Promo Style) ──── */
#hp-popup.hp-layout-vertical {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px 32px;
  text-align: center;
  border-radius: 24px; /* Premium rounded corner like the reference image */
}

#hp-popup.hp-layout-vertical .hp-popup__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#hp-popup.hp-layout-vertical .hp-popup__image {
  width: 100%;
  max-width: 320px;
  margin: 16px auto;
  border-radius: 8px;
  overflow: hidden;
}

#hp-popup.hp-layout-vertical .hp-popup__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Element Styles ── */

/* Image thin label */
.hp-popup__image-label {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 18px;
  white-space: nowrap;
  pointer-events: none;
}

/* Tag */
.hp-popup__tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fff;
  background: #0a0a0a;
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 24px;
  align-self: flex-start;
}

.hp-layout-vertical .hp-popup__tag {
  align-self: center;
  background: transparent;
  color: var(--hp-primary-color);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding: 0;
  text-transform: none;
}

/* Headline */
.hp-popup__headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 4.5vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  color: #0a0a0a;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.hp-layout-vertical .hp-popup__headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 700;
  color: var(--hp-primary-color);
  margin: 0 0 8px;
}

.hp-popup__headline em {
  font-style: italic;
  font-weight: 400;
}

/* Discount Badge */
.hp-popup__discount {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(54px, 7vw, 72px);
  font-weight: 600;
  line-height: 1;
  color: #0a0a0a;
  letter-spacing: -0.03em;
  margin: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  align-self: flex-start;
}

.hp-layout-vertical .hp-popup__discount {
  align-self: center;
  font-size: clamp(48px, 8vw, 68px);
  color: var(--hp-primary-color);
}

.hp-popup__discount sup {
  font-size: 0.38em;
  margin-top: 10px;
  font-weight: 300;
}

.hp-popup__discount sub {
  font-size: 0.26em;
  align-self: flex-end;
  margin-bottom: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

/* Subline */
.hp-popup__sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #777;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 28px;
  text-align: left;
}

.hp-layout-vertical .hp-popup__sub {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  color: var(--hp-primary-color);
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 16px;
}

/* Divider */
.hp-popup__divider {
  width: 40px;
  height: 1px;
  background: #0a0a0a;
  margin: 0 0 28px;
}

/* Reviews Row (Used in Vertical) */
.hp-popup__reviews {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #666;
  margin-bottom: 20px;
}

.hp-popup__reviews-label {
  font-weight: 600;
  color: var(--hp-primary-color);
}

.hp-popup__reviews-stars {
  color: #FFC107;
  letter-spacing: 2px;
}

/* CTA buttons container */
.hp-popup__actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 12px;
}

/* CTA button */
.hp-popup__cta {
  display: inline-block;
  background: var(--hp-primary-color);
  color: var(--hp-primary-text-color);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 36px;
  position: relative;
  overflow: hidden;
  transition: color 0.35s ease, background-color 0.35s ease;
  align-self: flex-start;
  border: 1.5px solid var(--hp-primary-color);
  text-align: center;
  box-sizing: border-box;
}

.hp-popup__cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hp-primary-text-color);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.hp-popup__cta:hover {
  color: var(--hp-primary-color);
}

.hp-popup__cta:hover::after {
  transform: translateX(0);
}

.hp-popup__cta span {
  position: relative;
  z-index: 2;
}

/* Vertical specific button style (stacked, rounded, full-width) */
.hp-layout-vertical .hp-popup__cta {
  align-self: stretch;
  border-radius: 30px;
  font-size: 12px;
  padding: 14px 20px;
}

/* Skip / Secondary link */
.hp-popup__skip {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbb;
  text-decoration: none;
  margin-top: 14px;
  align-self: flex-start;
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  padding: 6px 10px;
  margin-left: -10px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.hp-popup__skip:hover {
  color: #fff;
  background: #0a0a0a;
  border-color: #0a0a0a;
}

/* Vertical secondary button (matches "NO" in screenshot) */
.hp-layout-vertical .hp-popup__skip {
  align-self: stretch;
  border-radius: 30px;
  font-size: 12px;
  padding: 14px 20px;
  border: 1.5px solid var(--hp-primary-color);
  background: #fff;
  color: var(--hp-primary-color);
  font-weight: 600;
  text-align: center;
  margin-left: 0;
  margin-top: 0;
}

.hp-layout-vertical .hp-popup__skip:hover {
  background: var(--hp-primary-color);
  color: var(--hp-primary-text-color);
  border-color: var(--hp-primary-color);
}

/* ── Close Button ── */
#hp-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: background 0.2s;
}

#hp-popup-close:hover {
  background: #333;
}

#hp-popup-close svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
}

/* Close button for vertical layout */
.hp-layout-vertical #hp-popup-close {
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e8e8;
  transition: background 0.2s, transform 0.2s;
}

.hp-layout-vertical #hp-popup-close:hover {
  background: #dcdcdc;
  transform: scale(1.05);
}

.hp-layout-vertical #hp-popup-close svg {
  width: 10px;
  height: 10px;
  stroke: #888;
  stroke-width: 2.5;
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
  #hp-popup-overlay {
    padding: 12px;
    align-items: flex-start;
    overflow-y: auto;
  }

  #hp-popup {
    max-height: calc(100vh - 24px);
    margin: auto 0;
  }

  #hp-popup.hp-layout-split {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  #hp-popup.hp-layout-split .hp-popup__image {
    min-height: auto;
    aspect-ratio: 4/3;
  }

  #hp-popup.hp-layout-split .hp-popup__image img {
    flex: none;
    height: 100%;
    width: 100%;
    position: absolute;
    inset: 0;
    object-position: center center;
  }

  #hp-popup.hp-layout-split .hp-popup__content {
    padding: 28px 24px 32px;
  }

  #hp-popup.hp-layout-vertical {
    max-width: 100%;
    padding: 32px 20px 24px;
    border-radius: 16px;
  }

  #hp-popup.hp-layout-vertical .hp-popup__image {
    max-width: 240px;
    margin: 12px auto;
  }

  .hp-popup__headline {
    font-size: 28px;
  }

  .hp-layout-vertical .hp-popup__headline {
    font-size: clamp(28px, 6vw, 38px);
  }

  .hp-popup__discount {
    font-size: 52px;
  }

  .hp-layout-vertical .hp-popup__discount {
    font-size: clamp(38px, 8vw, 52px);
  }

  .hp-layout-vertical .hp-popup__sub {
    font-size: clamp(18px, 4vw, 24px);
  }

  .hp-popup__tag {
    margin-bottom: 20px;
  }

  .hp-popup__divider {
    margin-bottom: 24px;
  }

  #hp-popup-close {
    top: 10px;
    right: 10px;
  }

  .hp-layout-vertical #hp-popup-close {
    top: 12px;
    right: 12px;
  }
}
