ul#product_list {
    border: none;

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

ul#product_list li {
    float: left;
    width: 175px;
    height: 400px;
    padding: 0;
    position: relative;

    margin-bottom: 43px;
    line-height: 21px;
}

@media screen and (min-width: 1281px) {

    /* 5 products on row */

    /* push products to the left if the last row is not filled */

    ul#product_list li:last-child:nth-child(5n + 2) {
        margin-right: 654px;
    }

    ul#product_list li:last-child:nth-child(5n + 3) {
        margin-right: 436px;
    }

    ul#product_list li:last-child:nth-child(5n + 4) {
        margin-right: 218px;
    }

}

@media screen and (max-width: 1280px) {

    /* 4 products on row */

    /* push products to the left if the last row is not filled */

    ul#product_list li:last-child:nth-child(4n + 2) {
        margin-right: 390px;
    }

    ul#product_list li:last-child:nth-child(4n + 3) {
        margin-right: 195px;
    }
}

@media screen and (max-width: 450px) {

    ul#product_list li:last-child:nth-last-child(1) {
        margin-right: 0;
    }
}

ul#product_list li h2 {
    display: block;
    height: 38px;

    padding: 0;
    margin-top: 20px;
    margin-bottom: 2px;

    overflow: hidden;

    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

ul#product_list li h2 a {
    color: black;
    font-size: 16px;
    font-weight: bold;
    height: 100%;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    
    /* https://caniuse.com/#search=-webkit-line-clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

ul#product_list li h2 a.title-short {
    display: inline-block;
    /* line-height: 36px; */ /* middle */
    /* line-height: 54px; */ /* bottom */
}

ul#product_list li h2 a:hover {
    color: black;
    text-decoration: none;
}

ul#product_list li .product-author {
    display: block;
    color: #8A8A8A;
    font-size: 14px;
    min-height: 21px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

ul#product_list li .product-available {
    display: block;
    color: #3DAB0F;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
}

ul#product_list li .product-unavailable {
    display: block;
    color: black;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
}

ul#product_list li .image-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 233px;
}

ul#product_list li a.product_img_link {
    display: block;
    text-align: center;
    position: relative;
    min-width: 124px;
}

ul#product_list li a.product_img_link .product-sale {
    position: absolute;
    top: -1px;
    right: -1px;
    overflow: hidden;
    width: 75px;
    height: 75px;
}

ul#product_list li a.product_img_link .product-sale > span {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 132px;
    font-family: 'Asap', sans-serif;
    font-weight: bold;
    font-size: 20px;
    line-height: 20px;
    color: white;
    background-color: #D80000;
    border: solid 2px white;
    padding: 2px 0;
    text-align: center;
    transform: rotate(45deg) translate(36px, -22px);
}

ul#product_list li a.product_img_link .product-sale .percent {
    font-size: 16px;
}

ul#product_list li .image-block img {
    display: inline-block;
    max-width: 175px;
    max-height: 233px;
    vertical-align: bottom;
    line-height: normal;
    box-shadow: 0 9px 8px rgba(0, 0, 0, 0.16);
}

ul#product_list li a.hide-img-shadow img {
    box-shadow: none;
}

ul#product_list li img.default-img {

}
ul#product_list li .text {
    display: inline-block;
    width: 150px;
    margin: 0 0 5px 19px;
}

ul#product_list li .text p {
    padding: 0;
    display: inline-block;
    float: left;
}

ul#product_list li .text strong span.price_currency {
}


ul#product_list li .product-bottom-box  {
    margin-top: 12px;
    height: 58px;
    text-align: center;

    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;

    font-family: 'Asap', sans-serif;
}

ul#product_list li .product-bottom-box .left-col  {
    vertical-align: middle;
    display: inline-block;
    text-align: right;
    margin-right: 20px;
    line-height: 20px;
}

ul#product_list li .product-bottom-box .left-col > *  {
    display: block;
    height: 20px;
}

/* if .left-col has only 2 children, select the 1st */
ul#product_list li .product-bottom-box .left-col > *:nth-child(1):nth-last-child(2)  {
    margin-top: 10px;
}
/* if .left-col has only 2 children, select the 2nd */
ul#product_list li .product-bottom-box .left-col > *:nth-child(2):nth-last-child(1)  {
    margin-bottom: 10px;
}
/* if .left-col has only 1 child */
ul#product_list li .product-bottom-box .left-col > *:only-child  {
    margin-top: 20px;
    margin-bottom: 20px;
}

ul#product_list li .product-bottom-box .rating  {
    color: #8A8A8A;
    font-weight: bold;
}

ul#product_list li .product-bottom-box .rating .product-small-star {
    background: url(/img/svg/star.svg) 0 0 no-repeat;
    width: 17px;
    height: 16px;
    display: inline-block;
    vertical-align: top;
    line-height: 20px;
    margin-right: 2px;
}

ul#product_list li .product-bottom-box .old-price  {
    position: relative;
    color: #8A8A8A;
    /*text-decoration: line-through;*/

    display: inline-block;
    white-space: nowrap;
}

ul#product_list li .product-bottom-box .old-price::after  {
    /* manualni preskrtnuti stare ceny, line-through byl ve firefoxu moc nizko */
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #8A8A8A;
    left: 0;
    top: 56%;
}

ul#product_list li .product-bottom-box .price  {
    font-size: 18px;
    font-weight: bold;
}


ul#product_list li .product-bottom-box .product-add-to-cart  {
    width: 33px;
    height: 28px;
    vertical-align: middle;
    padding: 12px 9px 11px 9px;
    margin-bottom: 2px;
}


ul#product_list li .product-bottom-box .product-add-to-cart.unavailable  {
    width: 31px;
    height: 26px;
    background-color: #ECECEC;
    cursor: default;
}

ul#product_list li .text a.button2 {
    background: url('../img/css/list-books-button.png') 0 0 no-repeat;
    border-radius: 0;
    text-indent: -9999px;
    display: inline-block;
    width: 38px;
    height: 38px;
    border: none;
    float: right;
    padding: 0;
}

ul#product_list li:hover a.button2 {
    background-position: 0 -38px;
}

ul#product_list li span.button2 {
    display: block;
    margin: 1px 0 0 97px;
    color: #d20000;
}

ul#product_list li:hover span.button2 {
    color: #d20000;
}

ul#product_list li.first_item,
ul#product_list li.first {
    margin-left: 0;
}
ul#product_list li.ajax_load a.product_img_link{
    background: url('../img/css/ajax-loader.gif') center 150px no-repeat;
}
ul#product_list li.last_item {
    margin-right: 0;
}

ul#product_list li a.product_img_link:hover {
    text-decoration: none;
}


a.categoryAssignerButton {
    display: none;
    border: 1px solid #353535;
    height: 20px;
    width: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 20px;
    font-weight: bold;
    float: right;
    position: absolute;
    bottom: 11px;
    right: 2px;
    text-decoration: none;
    background-color: #518003;
    color: #fff;
    border-radius: 3px;
}

a.categoryAssignerButton.clicked {
    display: none;
}

a.categoryAssignerButton:hover {
    background-color: #8e8e8e;
}

a.categoryAssignerButton.unAssign {
    background-color: #800204;
    right: 26px;
}


.vypis-produktu-ul{
    border: none;
}
.vypis-produktu-author{
    font-family: Arial, sans-serif;
    font-size:14px;
    font-weight: normal;
    margin-left: 17px;
    padding-bottom: 10px;
    line-height: 14px;
    margin-top: 5px;
    height: 14px;
    overflow: hidden;
}

.vypis-produktu-author a {
    color: #d20000;
    text-decoration: underline;
}

.vypis-produktu-author a:hover {
    text-decoration: none;
}

.vypis-produktu-name{
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: normal;
    margin-left: 17px;
    margin-top: 11px;
    padding-bottom: 0;
    line-height: 15px;
    height: 29px;
    width: 155px;
    overflow:hidden;
    display: block;
    margin-bottom: 1px;
}
.vypis-produktu-name a {
    text-decoration: none;
    display: table;
}
.vypis-produktu-name a:hover {
    text-decoration: underline;
}

.vypis-produktu-name a span {
    display: table-cell;
    vertical-align: middle;
}


.vypis-produktu-li{
    float: left;
    width: 174px;
    height: 378px;
    margin: 0 0 40px 0;
    overflow: hidden;
    background: url('../img/css/list-books.png') -4px 345px no-repeat;
    padding: 8px 8px 4px;
}
.vypis-produktu-li:hover{
    background: url('../img/stin.png') no-repeat;
}
.vypis-produktu-ul li .text strong {
    color: #c10000;
    font: bold 26px/26px 'Crimson Text', Times, serif;
    display: inline-block;
}
.vypis-produktu-ul li .text .price {
    width: 154px;
    margin-left: 15px;
    padding-right: 0;
    margin-right: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    float: left;
}
.vypis-produktu-ul li .text strong .price_currency {
    color: #000000;
    font: bold 20px/20px 'Crimson Text', Times, serif;
    display: inline-block;
}
.vypis-produktu-ul li .text strong.vypis-produktu-availability{
    color:#0eb100;
    font: bold 16px/16px 'Arial';
    display: inline-block;
    float: right;
    margin-right: 13px;
    margin-top: 4px;
}

.text p.price span.button2 {
    float: right;
    margin-top: 4px;
}

.vypis-produktu.vypis-produktu-relative {
    margin-top: 5px;
}

.vypis-produktu-info{
    float: right;
    margin-right: 5px;
    background:url(../img/info_hover.png);
    width: 124px;
    height: 35px;
}
.vypis-produktu-info:hover{
    background-position: 0 -35px;
}
.vypis-produktu-cart{
    background: url('../img/test_category_add_to_cart.png');
    width: 35px;
    height: 35px;
    float: right;
    margin-right: 5px;
}
.vypis-produktu-cart:hover{
    background-position: 0 -35px;
}
.vypis-produktu-img{
    display: inline-block;
    max-width: 164px;
    max-height: 236px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}
.vypis-produktu-ul li a.product_img_link {
    display: block;
    width: 164px;
    margin: 5px 5px 0;
    height: 236px;
    overflow: hidden;
    position: relative;
}

ul#product_list li .free_shipping {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: bold;

    padding-left: 7px;
    padding-right: 4px;

    position: absolute;
    bottom: 18px;
    left: -12px;

    height: 23px;
    line-height: 23px;

    color: #CCFFBA;
    background-color: #40AE12;

    border: 1px solid #278500;
    border-radius: 4px;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;

    text-transform: uppercase;
}

ul#product_list li .free_shipping:hover {
    color: white;
}

ul#product_list li .free_shipping::after {
    content: ' ';
    position: absolute;
    top: -1px;
    right: -10px;
    width: 10px;
    height: 25px;
    background: url(/img/svg/free_shipping_ribbon_end.svg) no-repeat -36px 0;
    background-size: 46px 25px;
}

ul#product_list li .btn-favorite-overlay {
    display: none;
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 234px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

ul#product_list li:hover .btn-favorite-overlay {
    display: block;
}

ul#product_list li .btn-remove-favorite {
    position: absolute;
    top: 98px;
    display: block;
    width: 100%;
    height: 37px;
    color: rgba(44, 44, 44, 1);
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 35px;
    background-color: rgba(248, 248, 248, 1);
    border: 1px solid rgba(211, 211, 211, 1);
    border-radius: 5px;
    box-sizing: border-box;
    align-items: center;
    cursor: pointer;
}

ul#product_list li .btn-remove-favorite:hover {
    background-color: white;
}

/* temporarily disable mobile theme (max-width: 450) */
/*
@media screen and (max-width: 1px) {

    ul#product_list li {
        width: 168px;
        height: 273px;
    
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 40px;
        line-height: 19px;
    }

    ul#product_list li:nth-child(2n) {
        margin-right: 19px;
    }

    ul#product_list li:nth-child(2n-1) {
        margin-left: 19px;
    }



    ul#product_list li a.product_img_link {
        height: 123px;
        line-height: 123px;
    }

    ul#product_list li img {
        max-width: 92px;
        max-height: 123px;
    }

    ul#product_list li h2 {
        margin-top: 12px;
    }

    ul#product_list li .free_shipping {
     !* todo: remove display:none *!

        font-family: unset;
        font-size: 14px;
        font-weight: normal;
    
        top: 78px;
        left: 20px;
    
        text-transform: none;
    }

    ul#product_list li a.product_img_link .product-sale {
        width: 118px;
        font-size: 16px;
        line-height: 16px;
        padding: 2px 0;
    }
    
}*/
