/*
 * DigitalUp category page overrides for Journal 3.
 * Loaded in common/header.twig after Journal's style.css, inline CSS and Custom CSS.
 */

/* Category description "Read more": content is clamped by height; JS adds .is-collapsible only when it overflows. */
.du-readmore {
    --du-readmore-height: 250px;
    --du-readmore-fade: #fff;
    --du-readmore-color: rgb(34 64 154);
}

.du-readmore__toggle {
    display: none;
}

.du-readmore.is-collapsible .du-readmore__content {
    position: relative;
    max-height: var(--du-readmore-height);
    overflow: hidden;
}

/* Fade-out hint at the bottom of the collapsed text. */
.du-readmore.is-collapsible .du-readmore__content::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--du-readmore-fade));
    pointer-events: none;
}

.du-readmore.is-collapsible.is-expanded .du-readmore__content {
    max-height: none;
}

.du-readmore.is-expanded .du-readmore__content::after {
    display: none;
}

.du-readmore.is-collapsible .du-readmore__toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--du-readmore-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media only screen and (max-width: 767px) {
    .main-products.product-list{
        .product-layout{
            .image{
                float: none;
                height: auto
            }
        }
    }
}

@media only screen and (min-width: 768px) {
    .main-products.product-list{
        .product-layout{
            .product-thumb{
                display: flex;
                flex-wrap: nowrap;
                align-items: flex-start;
                justify-content: space-between;
                flex-direction: row;
                .image{
                    float: none;
                    height: auto;
                    flex-basis: 35%;
                    max-width: 35%;
                    width: 35%;
                }
                .caption{
                    padding-left: 0;
                    flex-basis: 60%;
                    max-width: 60%;
                    width: 60%;
                }
                .name{
                    a{
                        text-overflow: unset;
                        overflow: unset;
                        white-space: wrap;
                    }
                }
            }
        }
    }
}

@media only screen and (max-width: 1023px){
    .product-thumb .caption{
        padding-bottom: 10px;
    }
}

