/* GPF · Pop-up del código de descuento + barra fija */
.gpf-offer-popup[hidden], .gpf-offer-bar[hidden] { display: none !important; }

.gpf-offer-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
}
.gpf-offer-popup__veil { position: absolute; inset: 0; background: color-mix(in srgb, var(--gpf-offer-shade) 82%, transparent); }
.gpf-offer-popup__box {
  position: relative;
  display: flex;
  width: 820px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--gpf-offer-border);
  border-radius: 4px;
  background: var(--gpf-offer-bg);
}
.gpf-offer-popup__media {
  flex: 0 0 300px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--gpf-offer-price) 40%, var(--gpf-offer-shade)), var(--gpf-offer-price)) center / cover no-repeat;
}
.gpf-offer-popup__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 44px 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--gpf-offer-bg);
}
.gpf-offer-popup__body .gpf-offer__eyebrow { margin: 0 !important; }
.gpf-offer-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gpf-offer-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.gpf-offer-popup__close:hover { color: var(--gpf-offer-text); }
.gpf-offer-popup__title {
  margin: 0;
  padding-right: 32px;
  font-family: var(--gpf-offer-heading-font);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
  text-wrap: balance;
  color: var(--gpf-offer-text);
}
.gpf-offer-popup__text { font-size: 16px; color: var(--gpf-offer-muted); max-width: 44ch; }
.gpf-offer-popup__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 4px; }
.gpf-offer-popup__code { border-style: dashed; font-size: 19px; padding: 14px 22px; }
.gpf-offer-popup__dismiss {
  align-self: flex-start;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--gpf-offer-muted);
  font-family: var(--gpf-offer-body-font);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
body.gpf-offer-popup-open { overflow: hidden; }
/* Con el pop-up abierto se oculta el botón flotante de WhatsApp para que no tape el contenido. */
body.gpf-offer-popup-open .gpf-float-social-button { display: none; }

/* Barra fija con el código */
.gpf-offer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  background: color-mix(in srgb, var(--gpf-offer-price) 12%, var(--gpf-offer-bg));
  border-top: 1px solid var(--gpf-offer-price);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--gpf-offer-shade) 35%, transparent);
}
.gpf-offer-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px var(--gpf-offer-pad-x);
}
.gpf-offer-bar__text { flex: 999 1 380px; min-width: 0; }
.gpf-offer-bar__text .gpf-offer__eyebrow { margin: 0 0 3px !important; font-size: 11.5px; }
.gpf-offer-bar__detail { font-size: 14.5px; color: var(--gpf-offer-muted); }
.gpf-offer-bar__actions { display: flex; gap: 12px; align-items: center; }
body.gpf-offer-has-bar { padding-bottom: var(--gpf-offer-bar-height, 96px); }
/* El botón flotante de WhatsApp de gpf sube para no quedar encima de la barra. */
body.gpf-offer-has-bar .gpf-float-social-button { bottom: calc(var(--gpf-offer-bar-height, 96px) + 10px); transition: bottom .2s ease; }

@media (max-width: 767px) {
  .gpf-offer-popup { align-items: flex-end; padding: 0; }
  .gpf-offer-popup__box { flex-direction: column; border-radius: 4px 4px 0 0; max-height: 92vh; }
  .gpf-offer-popup__media { flex: 0 0 96px; }
  .gpf-offer-popup__body { padding: 28px 20px 24px; }
  .gpf-offer-popup__title { font-size: 27px; }
  .gpf-offer-popup__code { width: 100%; text-align: center; }
  .gpf-offer-popup__actions .gpf-offer__btn { width: 100%; }

  .gpf-offer-bar__inner { padding: 12px 16px; gap: 10px; }
  .gpf-offer-bar__detail { display: none; }
  .gpf-offer-bar__actions { width: 100%; }
  .gpf-offer-bar__actions .gpf-offer__code { font-size: 14px; padding: 10px 12px; }
  .gpf-offer-bar__actions .gpf-offer__btn { flex: 1 1 auto; min-height: 44px; padding: 10px 14px; }
}
