
.wrapper {
  max-width: 1100px;
  width: 100%;
  position: relative;
}

.wrapper i {
  top: 50%;
  height: 50px;
  width: 50px;
  cursor: pointer;
  font-size: 1.25rem;
  position: absolute;
  text-align: center;
  line-height: 50px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0,0,0,0.23);
  transform: translateY(-50%);
  transition: transform 0.1s linear;
}
.wrapper i:active{
  transform: translateY(-50%) scale(0.85);
}
.wrapper i:first-child{
  left: -22px;
}
.wrapper i:last-child{
  right: -22px;
}
.wrapper .carousel{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% / 3) - 12px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  border-radius: 8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.carousel.no-transition {
  scroll-behavior: auto;
}
.carousel.dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.carousel.dragging .card {
  cursor: grab;
  user-select: none;
}
.carousel :where(.card, .img) {
  //centra la imagen
  display: flex;
  justify-content: center;
  align-items: center;
}
.carousel .card {
  scroll-snap-align: start;
  height: 342px;
  list-style: none;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  border-radius: 8px;
}
.carousel .card .img {
  padding:5px;
  background: #FFF;
  height: 100%;
  width: 100%;
  border-radius: 8px;
}
.card .img img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover; //para que no se deforme la imagen
  border: 4px solid #fff;
}
.carousel .card h2 {
  font-weight: 500;
  font-size: 1.56rem;
  margin: 30px 0 5px;
}
.carousel .card span {
  color: #6A6D78;
  font-size: 1.31rem;
}


/*--------------- modal ---------------*/
.modal {
    position: absolute;
    top:0;
    bottom:0;
    left:0;
    right:0;
    width:100%;
    height:100%;
    align-items: center;
    justify-content: center;
    background: rgba(77,77,77,.7);
    transition: all .4s;
	z-index:200000;
	display:none;
}

.modal-content {
    padding: 5px;
    position:absolute;
    background: white; //transparent; //white;
    border-radius:10px;
    box-shadow: 0 0 5px rgba(0 0 0 / .15);
	
	z-index:20000;
    
}

.modal-img {

}

.modal-img img {
    width:90vw;
    height: 90vh;
    max-width:90vw;
    max-height: 90vh;
    object-fit: contain;
    display:inline-block;
    box-sizing: border-box;
    border-radius: 10px;
}

.close-btn {
    /*visibility: hidden;
    opacity: 0;*/
    position: absolute;
    top:10px;
    right:10px;
    float:right;
    width:30px;
    height:30px;
    border-radius: 5px;
    
    background: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn a {
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
}

.close-btn a:hover {
    color: orangered;
}



.modal-bg:active, .modal-bg:hover, .modal-bg:visited, .modal-bg:link {
    text-decoration: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    -webkit-transition: all .7s;
    transition: all .7s;
    cursor: default;
}






/*------------ fin modal ----------------*/

@media screen and (max-width: 1200px) {
  .wrapper .carousel {
    grid-auto-columns: calc((100% / 2) - 9px);
  }
  .modal {
    display: block;
  }
  .modal-img img {
    width:100%;
    height:auto;
    max-width: 100%;
  }
  .close-btn {
    visibility:visible;
    opacity: 1;
  }
}

@media screen and (max-width: 900px) {
  .wrapper .carousel {
    grid-auto-columns: calc((100% / 2) - 9px);
  }
  .modal {
    display: block;
  }
  .modal-img img {
    width:100%;
    height:auto;
    max-width: 100%;
  }
  .close-btn {
    visibility:visible;
    opacity: 1;
  }
}

@media screen and (max-width: 600px) {
  .wrapper .carousel {
    grid-auto-columns: 100%;
  }
      .modal {
    display: block;
  }
  .modal-img img {
    width:100%;
    height:auto;
    max-width: 100%;
  }
  .close-btn {
    visibility:visible;
    opacity: 1;
  }
}
