    .wrapper{
    max-width: 100%;
}

.body{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10px;
}

.wrapper .gallery{
display: flex;
flex-wrap: wrap; 
}

.gallery span{
    display: flex;
    width: 100%;
    overflow: hidden;
}
.gallery .image{
    width: calc(100%/4);
    padding: 5px;
}

.gallery .image img{
    width: 100%;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.gallery .image:hover img{
transform: scale(1.1);
}

@media (max-width: 1000px){
  .gallery .image{
    width: calc(100%/3);
    
}  
}

@media (max-width: 600px){
  .gallery .image{
    width: calc(100%/2);
    padding: 4px;
}  
}

.preview-box{
    position: fixed;
    max-width: 700px;
    width: 100%;
    top: 50%;
    left: 50%;
    z-index: 5;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    padding: 0 5px 5px 5px;
    opacity: 0;
    pointer-events: none;
    border-radius: 3px;
    box-shadow: 0px 0px 15px rgba(0,0,0,0.2);
}

.preview-box.show{
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    transition: all 0.3s ease;
}

.preview-box .details{
    display: flex;
    align-items: center;
    padding: 12px 15px 12px 10px;
    justify-content: space-between;
}

.details .title{
    display: flex;
    font-size: 18px;
    font-weight: 400;
}

.details .title p{
    margin: 0 5px;
}

.details .title p.current-img{
    font-weight: 500;
}
.img-box .slide{
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    font-size: 30px;
    cursor: pointer;
    color: #fff;
    width: 60px;
    height: 50px;
    line-height: 50px;
    text-align: center;
}

.img-box .slide.prev{
    left: #fff;
}
.img-box .slide.next{
    right: 0;
}

.preview-box .details .icon{
    color: #007bff;
    cursor: pointer;
    font-size: 20px;
}

.preview-box .img-box{
display: flex;
width: 100%;
}

.preview-box .img-box img{
    width: 100%;
    border-radius: 0 0 3px 3px;
}

.shadow{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: none;
    background: rgba(0,0,0,0.4);
}
