.popup__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 1;
  transition: opacity 300ms ease;
}

.popup {
  position: fixed;
  z-index: 9999;
  opacity: 0;
  transition: opacity 300ms ease, transform 300ms ease;
}
.popup--visible { opacity: 1; }

.popup__link { display: block; line-height: 0; }
.popup__link img { width: 100%; height: auto; object-fit: contain; }

.popup__close {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.popup__close--modal_centralizado {
  top: calc(50% - min(45vh, 240px) - 18px);
  left: calc(50% + min(45vw, 240px) - 18px);
}
.popup__close--banner_inferior {
  bottom: 12px;
  right: 12px;
}
.popup__close--canto_inferior_direito {
  bottom: calc(16px + var(--popup-h, 200px) - 18px);
  right: -2px;
}

.popup--modal_centralizado {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  max-width: min(90vw, 480px);
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.popup--modal_centralizado.popup--visible { transform: translate(-50%, -50%); }

.popup--banner_inferior {
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
}
.popup--banner_inferior.popup--visible { transform: translateY(0); }
.popup--banner_inferior .popup__link img { max-height: 160px; }

.popup--canto_inferior_direito {
  right: 16px;
  bottom: 16px;
  width: min(90vw, 320px);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
}
.popup--canto_inferior_direito.popup--visible { transform: translateY(0); }
