@import "../_defFuncValues.scss";
@import "../_function.scss";

.catalog-sort-pnl {
    display: table;
    width: 100%;

    .catalog-sort, .catalog-change-views {
        vertical-align: middle;
        display: table-cell;
    }

    .catalog-sort {
        width: 65%;
    }

    .catalog-change-views {
        width: 35%;
        text-align: right;
    }
}

.products-view-variants-item {
    display: inline-block;
    vertical-align: middle;
    padding: toEm(9px) toEm(7px);
    border: 1px solid transparent;
    text-decoration: none;
    -moz-border-radius: 0.3125rem;
    -webkit-border-radius: 0.3125rem;
    border-radius: 0.3125rem;
}

.products-view-variants-selected {
    color: #61646c;
    border-color: #e2e3e4;
}

.catalog-view-table {
    width: 100%;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    table-layout: fixed;

    .cat-cell {
        vertical-align: middle;
        width: 50%;
        border-left-width: 0;
        border-right-width: 0;
        border-top-width: 0;
        border-bottom-width: 1px;
        border-bottom-style: solid;
        padding: 5px;
        text-align: center;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;

        a {
            display: inline;
        }

        .cat-name {
            font-size: toEm(18px);
            line-height: toEm(20px);
        }

        .goods-count {
            font-size: toEm(18px);
            margin-top: toEm(3px);
        }
    }

    tr:last-child .cat-cell {
        border: none;
        border-width: 0;
    }
}

.prod-cell {
    text-align: center;
    width: 50%;
    border-left-width: 0;
    border-right-width: 0;
    border-top-width: 0;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    padding: 10px;
    vertical-align: top;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;

    a {
        display: block;
        margin-bottom: toEm(5px);
    }

    .prod-photo {
        margin: toEm(5px) 0;
        width: auto;
        white-space: nowrap;

        &:after, img {
            display: inline-block;
            vertical-align: middle;
        }

        &:after {
            content: "";
            width: 0;
            height: 100%;
        }
    }

    .prod-name {
        height: 55px;
        overflow: hidden;
        position: relative;

        &:after {
            content: "";
            text-align: right;
            position: absolute;
            height: 13.5px;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white 70%);
        }
    }
}

.tiles-table {
    width: 99%;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    table-layout: fixed;
}

.catalog-product-item {
    text-decoration: none;
    font-size: .75rem;
    white-space: normal;
    line-height: 1;
    position: relative;
}

.mobile-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 12px 14px 8px;
    box-sizing: border-box;
    align-items: stretch;

    .catalog-product-item {
        display: flex;
        flex-direction: column;
        justify-self: stretch;
        width: 100%;
        min-width: 0;
        min-height: 278px;
        padding: 12px;
        border: 0;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
        box-sizing: border-box;
        overflow: hidden;
        color: #111;
    }

    .prod-photo {
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 0 0 140px;
        width: 100%;
        max-width: 100%;
        height: 140px;
        margin: 0 0 10px;
        white-space: normal;
    }

    .prod-photo-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-width: 0;
    }

    .prod-photo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .prod-text {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 118px;
        flex: 1 1 auto;
        text-align: left;
    }

    .prod-name {
        min-height: 48px;
        max-height: 72px;
        font-size: 1.05rem;
        font-weight: bold;
        line-height: 1.25;
        color: #111;
        text-align: center;
        overflow: hidden;
    }

    .prod-name:after {
        display: none;
    }

    .mobile-prod-artno {
        display: none;
    }

    .products-view-labels {
        position: absolute;
        top: 8px;
        right: 8px;
        margin-top: 0;
        font-size: .7rem;
        line-height: 1.2;
        text-align: right;
    }
}

.prod-card-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin-top: auto;
}

.prod-card-price {
    margin-top: 0;
    color: #111;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.prod-card-price .price-number,
.prod-card-price .price-currency {
    color: #111;
}

.prod-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.prod-card-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    padding: 0;
    border-radius: 8px;
    background: #e4002b;
    color: #fff;
    line-height: 1;
}

.prod-card-add:hover,
.prod-card-add:active,
.prod-card-add:focus {
    background: #e4002b;
    color: #fff;
}

.prod-card-add:before {
    margin: 0;
    font-size: 1.25rem;
}

.prod-card-preorder {
    min-height: 42px;
    padding: 0 10px;
    border-radius: 8px;
    line-height: 42px;
}

.catalog-product-item:hover {
    text-decoration: none;
}

.prod-list-title {
    text-align: center;
}

.tags {
    margin: 0.625rem 1rem;
}

.tags .tag-item.selected {
    padding-right: 1.875rem;
    position: relative;
}

.tags .tag-item {
    padding: 0.625rem;
    border: 1px;
    margin: 0.1875rem 0.1875rem 0 0;
    border-style: solid;
    border-color: transparent;
    border-radius: 0.3125rem;
    text-decoration: none;
    line-height: 1;
    display: inline-block;
    margin-top: 10px;
}

.tags .tag-item .icon-unselect {
    padding: 10px 5px;
    position: absolute;
    top: 0;
    right: 0;
}

.cat-image-wrap {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

