.cart-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    z-index: 1050;
    outline: 0;
}

.modal-title {
    text-transform: uppercase;
}


.cart-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    text-align: center;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    outline: 0;
    margin: 20px;
}

.cart-header {
    padding: 1rem;
    border-bottom: none;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
    position: relative;
    z-index: 1;
    -webkit-box-shadow: 0 2px 10px 0 rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 0 2px 10px 0 rgba(34, 60, 80, 0.2);
    box-shadow: 0 2px 10px 0 rgba(34, 60, 80, 0.2);
}

.cart-header .close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.cart-header .close img {
    width: 35px; /* Задайте размер иконки */
    height: 35px;
    opacity: 0.5;
}

.cart-header .close img:hover,
.cart-header .close img:focus {
    opacity: 1;
}

.cart-body {
    flex: 1 1 auto;
    padding: 2rem;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative; /* Добавлено для smooth-scrollbar */
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
    border-bottom-right-radius: 0.3rem;
    border-bottom-left-radius: 0.3rem;
    text-align: center;
    position: sticky;
    bottom: 0;
    background-color: #fff;
    -webkit-box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
    box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
}

#openOrderFormBtn {
    margin-left: 10px;
}

.cart-modal.show {
    display: block;
}

.cart-backdrop.show {
    display: block;
}

/* Добавляем базовые стили для ячеек корзины */
.cart-item {
    width: 10vw; /* Фиксированная ширина ячеек */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1vw; /* Пропорциональные отступы */
    margin: 0.5vw; /* Пропорциональные отступы */
    flex: none;
}

.input-number-small {
    width: 4ch;
    text-align: center;
    padding: 0.5vw;
    padding-top: 0.7vw;
    border: 1px solid #ccc;
    border-radius: 0.5vw;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-number-small:focus {
    border-color: #007bff;
    box-shadow: 0 0 0.5vw rgba(0, 123, 255, 0.5);
}

.input-number-small::-webkit-inner-spin-button,
.input-number-small::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item.cart-7 {
    display: flex;
    align-items: center;
    gap: 0.5vw;
}

.view-layout-btn, .download-btn {
    display: inline-block;
    width: 10vw;
}

/* Расположение ячеек в строку на десктопе */
.cart-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

/* Стили для hr */
.hr-line {
    margin: 20px 0;
    padding: 0;
    height: 0;
    border: none;
    border-top: 1px solid #ff6d00;
}

.cart-1 {
    width: 1vw;
}

.cart-2 {
    width: 10vw;
}

.cart-3 {
    width: 27vw;
}

.cart-4, .cart-6, .cart-5 {
    width: 10vw;
}

.cart-7, .cart-8, .cart-9 {
    width: 10vw;
}

.cart-10 {
    width: 8vw;
}

.cart-2 img {
    width: 100%;
    height: auto;
}

.cart-3 img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
    box-shadow: 0 -2px 10px 0 rgba(34, 60, 80, 0.2);
}

.box-button {
    display: flex;
    flex-direction: column;
}

.remove-item-btn {
    width: 10vw;
}

/* Стили для ячеек внутри блоков */
.box-price .cart-item {
    flex: none;
    margin: 0.5vw;
}

#cart-summary {
    font-weight: bold;
    margin-top: 2vw;
    display: none;
    text-align: center;
}

[data-scrollbar] .scrollbar-thumb, [scrollbar] .scrollbar-thumb, .scrollbar .scrollbar-thumb {
    left: -4px;
}

#downloadPNGButton.button,
#saveLayoutButton.button,
#clearButton.button {
    width: 200px;
}

@media (max-width: 1024px) {
    .cart-row {
        display: block;
        text-align: center; /* Добавляем центрирование текста для всех элементов внутри строки */
        margin-bottom: 5vw;
    }

    .cart-item {
        height: auto;
        width: 100%;
        padding-left: 0;  /* Убираем внутренние отступы по бокам */
        padding-right: 0; /* Убираем внутренние отступы по бокам */
        margin-left: 0;   /* Убираем внешние отступы по бокам */
        margin-right: 0;  /* Убираем внешние отступы по бокам */
        margin-bottom: 3vw;
        display: flex; /* Используем Flexbox для вертикального центрирования */
        align-items: center; /* Вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
    }

    .cart-1, .cart-2, .cart-3, .cart-4, .cart-5, .cart-6, .cart-7, .cart-8, .cart-9, .cart-10 {
        width: 100%;
        text-align: center; /* Центрируем текст внутри каждого элемента */
    }


    .cart-1 {
        background: #f2f2f2;
    }

    .cart-2 img {
        width: 50%;
        display: block;
        margin: 0 auto; /* Центрирование изображения */
    }

    .cart-3 img {
        width: 90%;
        display: block;
        margin: 0 auto; /* Центрирование изображения */
    }

    .box-price .cart-item, .box-button .cart-item {
        width: 100%;
        padding-left: 0;  /* Убираем внутренние отступы по бокам */
        padding-right: 0; /* Убираем внутренние отступы по бокам */
        margin-left: 0;   /* Убираем внешние отступы по бокам */
        margin-right: 0;  /* Убираем внешние отступы по бокам */
        display: flex; /* Используем Flexbox для вертикального центрирования */
        align-items: center; /* Вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
    }

    .view-layout-btn, .download-btn {
        padding: 6px 0;
        width: 35vw;
        display: flex; /* Используем Flexbox для вертикального центрирования */
        align-items: center; /* Вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
        margin: 0 50px!important;
        font-size: 14px;
        border-radius: 0.7vw;
    }

    .remove-item-btn {
        padding: 6px 0;
        width: 35vw;
        align-items: center;
        justify-content: center;
        margin: 0 50px !important;
        font-size: 14px;
        border-radius: 0.7vw;
    }

    .cart-footer {
        padding: 1rem;
    }

    .box-2-3-inner .button {
        margin: 2px;
        padding: 6px 10px;
    }

    .btn-secondary, .btn-primary  {
        padding: 6px 0;
        width: 45vw;
        display: flex; /* Используем Flexbox для вертикального центрирования */
        align-items: center; /* Вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
        margin: 0;
        font-size: 14px;
        border-radius: 0.7vw;
    }

    .btn-secondary {
        margin-bottom: 3vw;
    }


    .box-button, .box-price {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center; /* Центрирование содержимого */
    }

    .box-button .cart-item, .box-price .cart-item {
        width: auto;
        flex: 1; /* Равномерное распределение ширины */
    }

    .info-close-btn-cart, .info-view-btn-cart, .close-btn, #copyLinkButton {
        padding: 6px 10px;
    }

    #downloadPNGButton.button,
    #saveLayoutButton.button,
    #clearButton.button {
        width: 110px;
    }
}
