﻿#cart-content {
    width: calc(90% - 16px);
    max-width: 900px;
    margin: 15px auto;
}

#description-cart {
    position: relative;
    width: 180px;
    border: 1px solid #a8a8a8;
    border-bottom: none;
    border-radius: 2px;
    background-color: #ffffff;
    text-align: center;
    z-index: 1;
    line-height: 40px;
}

.section-inside-cart {
    position: relative;
    top: -1px;
    border: 1px solid #a8a8a8;
}

.content-inside-cart {
    display: inline-block;
    width: 100%;
    max-width: 600px;
    border-right: 1px #a8a8a8 solid;
}

.cart-item-info {
    display: grid;
    height: 140px;
    grid-template-columns: 90px 1fr;
    padding: 10px;
    border-bottom: 1px solid #a8a8a8;
}

.cart-item-info:last-child {
    border-bottom: none;
}

.cart-item-image {
    align-self: center;
    width: 90px;
}

.product-options {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: repeat(9, 1fr);
    grid-template-areas: 
        "t t t t t t t t b"
        "p p p p c c c c c"
        ". . . . d d d d d";
    align-items: center;
    justify-items: center;
}

.product-name {
    grid-area: t;
    text-align: center;
    font-size: 22px;
}

.product-button-delete {
    grid-area: b;
    cursor: pointer;
}

.product-button-delete img {
    width: 30px;
}

.product-price {
    grid-area: p;
}

/*--Поле количество товара--*/
.input-count {
    grid-area: c;
    position: relative;
    display: grid;
    grid-template-columns: 31px 1fr 30px;
    justify-items: center;
    align-items: center;
    user-select: none;
    box-sizing: border-box;
    margin-left: 30px;
}

.field-quantity {
    width: 100px;
    height: 30px;
    background: #FFFFFF;
    border: 1px solid #a8a8a8;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
    outline: none;
    text-align: center;
    font-size: 16px;
}

.button-counter {
    display: flex;
    align-items: center;
    justify-items: center;
    width: 31px;
    height: 30px;
    border: 1px solid #a8a8a8;
    box-sizing: border-box;
    cursor: pointer;
}

.button-counter img {
    margin: auto;
    width: 15px;
}

.button-counter:hover {
    background-color: #f4f6f6;
}

.button-counter:active {
    background-color: #a8a8a8;
    border-color: #a8a8a8;
}

/*--Меню выбора цвета--*/
.dropdown-select-menu {
    grid-area: d;
    margin-left: 30px;
    justify-self: center;
}

.select-color {
    display: block;
    width: 162px;
    height: 30px;
    outline: none;
    border-color: #a8a8a8;
}

.select-color option {
    text-align: center;
}

.total-cart {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    height: 100%;
    width: calc(100% - 610px);
    padding: 10px 0 15px 0;
}

.total-sum-title {
    display: block;
    font-size: 24px;
}

.total-sum {
    display: block;
    font-size: 30px;
    padding: 10px 0;
    color: #ba0000;
}

/*--Кнопка Купить--*/
.button-buy {
    display: block;
    width: 90%;
    max-width: 200px;
    height: 35px;
    line-height: 35px;
    border: none;
    font-size: 20px;
    margin: 5px auto 0 auto;
    background-color: #3b7eb2;
    color: #ffffff;
    cursor: pointer;
}

.button-buy:hover {
    background-color: #0880AE;
}

/*--Элемент, когда корзина пустая--*/
.no-product-cart {
    width: 100%;
    text-align: center;
    vertical-align: middle;
    margin: 0 0 20px 0;
}

.no-product-cart img {
    display: inline-block;
    margin: 20px 0;
}

.no-product-cart-title {
    display: block;
    width: 100%;
    font-size: 28px;
    margin: 10px 0;
}

.catalog-link a {
    width: 100%;
    margin: 10px 0;
    color: #2e638c;
}

#message-index{
    display: block;
    margin: 10px 0;
    text-align: center;
    color: #ff0000;
    font-size: 18pt;
}

/*--Окно подтверждения удаления товара--*/
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #000;
    padding: 10px;
    z-index: 20;
    background-color: #fff;
    display: none;
}

.modal .text {
    margin: 30px;
}

.buttons-area {
    display: block;
    text-align: center;
}

.button-confirm {
    width: 100px;
    height: 30px;
    text-decoration: none;
    display: inline-block;
    border: none;
    background: #3b7eb2;
    cursor: pointer;
    font-size: 16px;
    color: white;
    text-align: center;
    outline: none;
}

.button-confirm:hover {
    background-color: #0880AE;
}

.button-confirm-delete {
    background: #9c2727;
}

.button-confirm-delete:hover {
    background-color: #c13333;
}

.modal.is-show,
.overlay.is-show {
    display: block;
}

.modal__cross {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .4);
    z-index: 10;
    display: none;
}

/* Media
==================== */
@media (max-width: 1000px) {
    .total-cart {
        width: 100%;
        border-top: 1px #a8a8a8 solid;
    }
    
    .content-inside-cart {
        max-width: none;
        border-right: none;
    }
}

@media (max-width: 640px) {
    .cart-item-info {
        height: 100%;
    }
    
    .product-name {
        font-size: 19px;
    }
    
    .input-count {
        margin-left: 0;
    }
    
    .dropdown-select-menu {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .product-name {
        width: 100%;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
    
    .product-options {
        grid-template-rows: 1fr 1fr 1fr 1fr;
        grid-template-areas: 
        "t t t t t t t t b"
        "p p p p p p p p p"
        "c c c c c c c c c"
        "d d d d d d d d d";
    }
    
    .field-quantity {
        width: 40px;
    }
    
    .select-color {
        width: 102px;
    }
}
.total-cart-descr{
    margin: 5px;
    font-size: 8pt;
    text-align: left;
}