.popup-overlay {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* Ẩn mặc định */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease forwards;
}

/* --- Hộp popup chính --- */
.popup-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: popupShow 0.4s ease forwards;
}

/* --- Hình ảnh trong popup --- */
.popup-image {
  display: block;
  height: auto;
  border-radius: 16px;
}

/* --- Nút đóng nằm trong hình --- */
.popup-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.popup-close span {
  position: absolute;
  width: 16px;
  height: 2px;
  background-color: var(--secondary-color);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.popup-close span:first-child {
  transform: rotate(45deg);
}

.popup-close span:last-child {
  transform: rotate(-45deg);
}

/* --- Hiệu ứng hover --- */
.popup-close:hover {
  background: rgba(255, 255, 255, 0.9) !important;
}

.popup-close:hover span {
  background-color: var(--third-color);
}
@media (min-width: 991px) {
	.popup-image {
	  max-width: 900px;
	}
}

/* --- Responsive: điều chỉnh nút to hơn trên mobile --- */
@media (max-width: 768px) {
  .popup-box {
    max-width: 90%;
    border-radius: 12px;
  }

  .popup-close {
    width: 40px;
    height: 40px;
    top: 8px;
    right: 8px;
  }

  .popup-close span {
    width: 18px;
  }
}

/* --- Hiệu ứng hiển thị popup --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popupShow {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}