




.popup-photo {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  z-index: 1000000 !important;
  isolation: isolate;   /* 🔥 VERY IMPORTANT */

  background: rgba(0, 0, 0, 0.7);
  /* background: rgba(0,0,0,0.4); */
  backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
}


.popup-photo-content {
  background: #222;
  padding: 20px;
  border-radius: 15px;
  position: relative;

  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 80vh;

  display: flex;
  align-items: center;
  justify-content: center;

  animation: fadeIn 0.3s ease;
}

/* 
.popup-photo-content {
  background: #222;
  padding: 30px;
  padding-bottom: 20px;
  border-radius: 15px;
  text-align: center;
  width: 55%;
  height: 80%;
  position: relative;
  z-index: 99999;
  animation: fadeIn 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
} */

.close-photo-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 34px;
  cursor: pointer;
}

.pop-photo-above{
  max-width: max-content;
  width: auto;
  height: auto;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  padding-bottom: 30px;
  gap: 0px;
}




/* .pop-photo-style{
  display: flex;
  justify-content: center;
  width: 90%;
  max-height: fit-content;
  border-radius: 10px;
  overflow: hidden;
} */


.pop-photo-style {
  display: flex;
  justify-content: center;
  align-items: center;

  max-width: 80%;
  max-height: 80%;

  overflow: hidden;
  border-radius: 12px;
}


/* .pop-photo-style img{
  width: 100%;
  max-height: fit-content;
  border-radius: 20px;
  object-fit: cover;
} */

.pop-photo-style img {
  max-width: 100%;
  max-height: 80vh;

  width: auto;
  height: auto;

  object-fit: contain; /* 🔥 key change */
  border-radius: 12px;
}







@media(max-width: 786px){


/* .popup-photo-content {
  width: 80%;
  height: 60%;
  background: #222;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
} */

.pop-photo-above{
    flex-direction: column;
    width: 90%;
    height: 90%;
    gap: 20px;
    padding: 0px ;
    overflow: hidden;
  }

  .popup-photo-content {
    max-width: 90vw;
    max-height: 85vh;
    padding: 12px;
  }

  .pop-photo-style img {
    max-height: 70vh;
  }


  .pop-photo-style{
  width: 90%;
  max-height: fit-content;
  padding: 10px;
}

 /* .pop-photo-style img{
  width: 100%;
  max-height: fit-content;
  object-fit: cover;
  object-position:center
 } */

}