section.complects-table {
    margin: 0 auto;
}

section.complects-table .data {
    border: 1px solid var(--color-unactive);
    padding: 10px;
    border-radius: var(--box-radius);
}

section.complects-table .product {
    display: grid;
    grid-template-areas: "img name price quantity summa";
    grid-template-columns: 180px 2fr 1fr 150px 1fr;
    align-items: center;
    justify-items: stretch;
    border-bottom: 1px solid #dedede;
    padding: 10px 0;
    margin: 0;
}

section.complects-table .product:last-child {
    border-bottom: none;
}

section.complects-table .product > .img {
    grid-area: img;
}

section.complects-table .product > .name {
    grid-area: name;
    text-align: left;
    padding: 0 1em;
}

section.complects-table .product > .name .secondary {
    color: var(--color-secondary);
}

section.complects-table .product > .quantity {
    grid-area: quantity;
}

section.complects-table .product > .price {
    grid-area: price;
    text-align: right;
    padding-right: 50%;
}

section.complects-table .product > .price .wrapper {
    display: inline-block;
    text-align: left;
}

section.complects-table .product > .summa {
    grid-area: summa;
    text-align: left;
    padding-left: 50%;
}

section.complects-table .product .sum {
    white-space: nowrap;
}

section.complects-table .product .sum label {
    display: block;
    font-size: 12px;
    color: var(--color-secondary);
    line-height: 1em;
}

section.complects-table .product .sum s {
    display: block;
    margin-bottom: -0.4em;
    color: var(--color-unactive);
}

section.complects-table .product .sum s + span {
    /*color: red;*/
}

section.complects-table .product .sum .sum_str:after {
    content: '₽';
    display: inline-block;
    /*position: absolute;*/
    margin-left: 2px;
    font-size: 1em;
}

section.complects-table .product .img {
    height: 120px;
    /*width: 200px;*/
    display: block;
    line-height: 120px;
    text-align: center;
    font-size: 0em;
    border-bottom: none;
}

section.complects-table .product img {
    display: inline-block;
    max-width: 100%;
    max-height: 120px;
    line-height: inherit;
    vertical-align: middle;
}

@media screen and (max-width: 860px) {
    section.complects-table .product {
        grid-template-areas:
            "img name name name"
            "img quantity price summa";
        grid-template-columns: 180px  150px 1fr 1fr;
        gap: 0 20px;
    }

    section.complects-table .product > .name {
        padding: 0;
    }

    section.complects-table .product > .summa,
    section.complects-table .product > .price {
        padding: 0;
        text-align: center;
    }

    section.complects-table .product > .remove {
        align-self: flex-start;
    }
}

@media screen and (max-width: 600px) {
    section.complects-table .product {
        grid-template-areas:
            "img  name name name name "
            "quantity price price summa summa ";
        grid-template-columns: 200px 1fr 50px 1fr 50px;
        gap: 10px 0;
    }

    section.complects-table .product > .summa,
    section.complects-table .product > .price {
        text-align: left;
    }
}

@media screen and (max-width: 440px) {
    section.complects-table .product {
        grid-template-areas:
            "img  img img"
            "name  price price"
            "quantity summa summa";
        grid-template-columns: 2fr 1fr auto;
    }

    section.complects-table .product > .img {
        justify-self: flex-start;
    }

    section.complects-table .product > .summa,
    section.complects-table .product > .price {
        text-align: right;
        padding-left: 20%;
        /*align-self: flex-start;*/
    }

    section.complects-table .product > .price .wrapper {
        text-align: right;
    }

    section.complects-table .product > .quantity {
        /*align-self: flex-start;*/
        justify-content: flex-start;
    }
}


section.complects-table .bottom-data .totals,
section.complects-table .bottom-data .total-complects {
    text-align: right;
}

section.complects-table .bottom-data .totals table {
    color: var(--color-secondary);
}

section.complects-table .totals td {
    padding: 5px 0;
}

section.complects-table .totals tr td:first-child {
    padding-right: 20px;
    text-align: left;
}

section.complects-table .totals tr.itogo {
    color: var(--color-black);
    font-weight: 600;
}

section.complects-table .totals .ifdiscount {
    display: none;
}

section.complects-table .totals .hasdiscount div.ifdiscount {
    display: block;
}

section.complects-table .totals .hasdiscount span.ifdiscount {
    display: inline;
}

section.complects-table .totals [rel]:after {
    content: '₽';
    font-size: 1em;
    margin-left: 0.2em;
}

section.complects-table .totals [rel=totalkol]:after {
    display: none;
}


section.complects-table .bottom-data {
    padding: 30px 10px;
    gap: 30px 0;
    display: grid;
    grid-template-areas:
        ". . qtotal totals"
        ". order_button order_button order_button";

    grid-template-columns: 180px 150px 3fr 1fr;
    align-items: start;
    justify-items: end;
}

section.complects-table .bottom-data > .totals {
    grid-area: totals;
    text-align: right;
    padding-left: 20px;
}

section.complects-table .bottom-data > .order-button {
    grid-area: order_button;
    display: flex;
    gap: 12px 24px;
    flex-wrap: wrap;
}

section.complects-table .total-complects {
    grid-area: qtotal;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--color-secondary);
}

@media screen and (max-width: 860px) {
    section.complects-table .bottom-data {
        grid-template-areas:
        "qtotal  qtotal totals totals"
        "order_button  order_button order_button order_button";
        grid-template-columns: 180px 150px 1fr 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 600px) {
    section.complects-table .bottom-data {
        grid-template-areas:
        "qtotal  totals "
        "order_button  order_button ";
        grid-template-columns: 200px 1fr;
    }

    section.complects-table .total-complects {
        justify-content: center;
    }

}

@media screen and (max-width: 440px) {
    section.complects-table .bottom-data {
        grid-template-columns: auto auto;

    }

    section.complects-table .total-complects {
        justify-content: flex-start;
    }
}

@media screen and (max-width: 380px) {
    section.complects-table .bottom-data {
        grid-template-areas:
        "qtotal -"
        "totals totals"
        "order_button order_button";
        grid-template-columns: 200px 1fr;
        align-items: flex-start;
        justify-items: flex-start;
    }

    section.complects-table .bottom-data > .totals,
    section.complects-table .bottom-data > .total-complects,
    section.complects-table .bottom-data > .order-button {
        width: 100%;
        max-width: unset;
        padding: 0;
        box-sizing: border-box;
        margin: 0;
    }

    section.complects-table .bottom-data > .totals table {
        width: 100%;
    }

    section.complects-table .bottom-data > .order-button {
        justify-self: inherit;
        text-align: left;
    }
}

