.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-box {
  position: relative;
  background-color: #fff;
  border-radius: 5px;
  width: 40rem;
  height: 35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.popup-img {
  width: 85%;
  aspect-ratio: 1/1;
  object-fit: contain;
}

/* 좌우 버튼 */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  background: #E6E6E6;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  padding: 0.5rem 0.7rem;
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.close-button {
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #E6E6E6;
  border: none;
  border-radius: 30px;
  height: 40px;
  padding: 0 80px;
  font-size: 1rem;
  cursor: pointer;
}

.close-icon {
  display: none;
}

@media (max-width: 850px) {
  .popup-box {
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    width: 100%;
    height: 80vh;
    border-radius: 20px 20px 0 0;
    transform: none;
    overflow-y: auto;
  }

  .popup-img {
    width: 80%;
    margin-top: 3rem;  /* X 아이콘과 간격 */
  }

  .close-button { display: none; }

  .close-icon {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    z-index: 20;
  }
}