.content_template_gallery {
    padding-bottom: 0 !important;
}
.headermenu_id-photo_gallery {
    padding: 6px;
    border: 1px solid #151515;
    border-radius: 8px;
}
.gallery-news-list {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    border-left: solid 1px #CCC;
}
.gallery-news-list:before {
    content: none;
}

.gallery-news-list .col-news-layout{
    max-width: 292px;
    max-height: 292px;
    width: 100%;
    padding: 0;
    border-top: solid 1px #CCC;
    border-right: solid 1px #CCC;
    border-bottom: solid 1px #CCC;
    cursor: pointer;
    overflow: hidden;
}
.gallery-news-list .col-news-layout .image img {
    transform-origin: center;
    transition: transform 1.5s cubic-bezier(.22,1,.36,1);
}
.gallery-news-list .col-news-layout:hover .image img {
    transform: scale(1.06);
}
.gallery-news-list .col-news-layout .image img{
    width: 100%;
}

@media screen and (max-width: 991px) {
    .gallery-news-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
@media screen and (max-width: 767px) {
    .gallery-news-list {
        grid-template-columns: 1fr 1fr;
        padding: 0 18px;
        border-top: none;
    }
    .gallery-news-list .col-news-layout:nth-child(odd) {
        margin-left: auto;
    }
    .gallery-news-list .col-news-layout:nth-child(even) {
        margin-right: auto;
    }
}

/* GALLERY POPUP */
.news-ncategory.modal-open{
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .modal-gallery-element{
        background-color: #fff;
    }
    .modal-gallery-element .modal-content {
        box-shadow: none;
    }
}

.modal-gallery-element .modal-lg {
    width: 1074px;
}
.modal-gallery-element .modal-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
}
.modal-gallery-element .modal-body {
    padding: 24px;
}
.modal-gallery-element .modal-header button .icon_new-close {
    font-size: 24px;
    color: #143810;
}
.modal-gallery-element .modal-header button.close {
    z-index: 10;
}
.modal-gallery-element .modal-main-content {
    display: flex;
    gap: 30px;
}
.modal-gallery-element .modal-main-content .column_element .column_element-heading {
    margin: 17px 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 23px;
    color: #143810;
    max-width: 90%;
}
.modal-gallery-element .modal-main-content .column_element .column_element-subtitle {
    margin-bottom: 20px;
    color: #000000;
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
}
.modal-gallery-element .modal-main-content .column_element .column_element-description p {
    margin-bottom: 24px;
    font-weight: 400;
    font-size: 16px;
    line-height: 21px;
    color: #595959;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products {
    display: flex;
    flex-wrap: wrap;
    width: fit-content;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout {
    max-width: 33.3%;
    border: solid 1px #e5e5e5;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout .product-thumb .image {
    padding: 0;
    max-width: 110px;
    margin: auto;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout .product-thumb .caption {
    padding: 16px 5px 0;
    text-align: center;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout .product-thumb .caption .name {
    word-wrap: break-word;
    font-weight: 700;
    font-size: 13px;
    line-height: 15px !important;
    color: #000000;
    text-transform: uppercase;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout .product-thumb .caption .price {
    margin-top: 8px;
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
    color: #AAC078;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout .product-thumb .caption .price-old {
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    text-decoration-line: line-through;
    color: #BFBFBF;
}
.modal-gallery-element .modal-main-content .column_element-img img {
    max-width: 592px;
}

@media screen and (max-width: 1200px) {
    .modal-gallery-element .modal-lg {
        width: 920px;
    }
    .modal-gallery-element .modal-main-content .column_element-img img {
        max-width: 450px;
    }
}
@media screen and (min-width: 981px) {
    .modal-gallery-element .modal-main-content .column_element:nth-child(1) {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}
@media screen and (max-width: 980px) {
    .modal-gallery-element .modal-lg {
        max-width: 600px;
    }
    .modal-gallery-element .modal-main-content {
        flex-direction: column;
        align-items: center;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-heading {
        margin-top: 0;
        max-width: 100%;
    }
}
@media screen and (min-width: 768px) {
    .modal-gallery-element .modal-header button .icon_new-close .icon_custom-close {
        display: none;
    }
}
@media screen and (max-width: 767px) {
    .modal-gallery-element .modal-main-content .column_element .column_element-subtitle {
        padding: 0 18px
    }
    .modal-gallery-element .modal-header button .icon_new-close{
        display: none;
    }
    .modal-gallery-element .modal-header button {
        left: 29px;
        right: initial;
    }
    .modal-gallery-element .modal-body {
        padding: 0;
    }
    .modal-gallery-element {
        padding: 0 !important;
    }
    .modal-gallery-element .modal-lg {
        margin: 0 !important;
        width: 100%;
        max-width: 100%;
        height: 100%;
    }
    .modal-gallery-element .modal-lg .modal-content {
        min-height: 100%;
        border: none;
    }
    .modal-gallery-element .modal-lg .modal-content .modal-main-content {
        padding-top: 75px;
    }
    .modal-gallery-element .modal-main-content .column_element {
        padding: 0;
        width: 100%;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-heading {
        padding: 0 18px;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-description {
        padding: 0 18px;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-products {
        overflow-x: auto;
        flex-wrap: unset;
        width: 100%;
        border-top: none;
        padding-bottom: 30px;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-products::-webkit-scrollbar {
        display: none;
    }
    .modal-gallery-element .modal-main-content .column_element-img {
        display: flex;
    }
    .modal-gallery-element .modal-main-content .column_element-img img {
        width: 100%;
        margin: 0 auto;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout {
        border-top: solid 1px #e5e5e5;
        max-width: 110px;
        min-width: 110px;
    }
    .modal-gallery-element .modal-main-content .column_element .column_element-products .product-layout:first-of-type {
        margin-left: 18px;
        border-left: 1px solid #e5e5e5;
    }
}