  .popup-overlay {
    display: flex;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 999;
  }

  /* กล่อง popup */
  .popup {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    max-width: 1000px;
    width: 95%;
    position: relative;
    overflow: hidden;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
  }

  @keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  /* ปุ่มปิด */
  .close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: white;
    color: black;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    line-height: 30px;
    z-index: 10;
  }

  .close-btn:hover {
    background: rgb(177, 176, 176);
  }

  /* รูปภาพใน popup */
  .popup img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  .popup p {
    margin: 10px 0 15px;
    color: #333;
    font-size: 1rem;
  }

  /* เอฟเฟกต์ตอนปิด popup */
  .fade-out {
    animation: fadeOut 0.5s forwards;
  }

  @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
  }

  /* ปรับ layout ให้เหมาะกับมือถือ */
  @media (max-width: 480px) {
    .popup {
      max-width: 90%;
      border-radius: 8px;
    }
    .popup p {
      font-size: 0.9rem;
      padding: 0 10px;
    }
  }
