.carousel-caption {
    background: #333333;
    opacity: 0.8;
}

.carousel .carousel-control {
    text-decoration: none;
}

.carousel .item {
    height: 300px;
}

.carousel .item img {
    margin: auto;
    text-align: center;
}

.gallery-layouts a {
    text-decoration: none;
    display: block;
    float: right;
}

.gallery-layouts-label {
    line-height: 30px;
}

.gallery-layouts a.selected {
    background-color: #ddd;
}


@media (max-width: 979px) { 

    .carousel .item {
        height: auto;
    }

    .carousel .carousel-caption {
        position: relative;
    }

}

.mss-gallery > ul {
    list-style: none;
    display: table;
    margin: 0 0 20px;
    padding: 0;
    width: 100%;
}
.mss-gallery > ul > li {
    display: inline;
    position: relative;
    overflow: hidden;
    float: left;
    padding: 0;
    margin: 0 1px 1px 0;
    width: 168px;
    height: 168px;
    vertical-align: top;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}
.mss-gallery > ul > li > a {
    display: inline-block;
    position: absolute;
    overflow: hidden;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    background-color: #f4f4f4;
}

.mss-gallery > ul > li > a > img {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: none;
    min-width: 100%;
    min-height: 100%;
}

@media (min-width: 1170px) {
    .mss-gallery > ul > li {
        width: 208px;
        height: 208px;    
    }

}

@media (min-width: 768px) and (max-width: 979px) {
    .mss-gallery > ul > li {
        width: 128px;
        height: 128px;  
    }

}

@media (max-width: 767px) {
    .mss-gallery > ul > li {
        width: 49%;        
        height: 220px;  
        margin: 0 1px 1px 0;
    }
}

@media (max-width: 480px) {

    .mss-gallery > ul {
        display: block;
    }
    .mss-gallery > ul > li {
        width: 100%;  
        height: 220px;  
    }
}