body {
    background-color: #f4f4f4;
}

.basket-container {
    padding: 0px 72px;
    display: flex;
    margin: 0 auto;
    flex-direction: column;
}

.basket-wrapper{
    margin-top: 50px;
}

.basket-container .under-top {
    margin-top: 20px;
}

.basket-top {
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.basket-top img {
    height: 40px;
}

.basket-top h1 {
    margin: 0;
    margin-top: 10px;
    font-weight: 500;
}

.under-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.under-top p {
    color: #6C757D;
    font-size: 16px;
}

.basket-items {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    align-items: center;
    gap: 20px;
    overflow-y: auto;
}
.basket-items::-webkit-scrollbar-button {
    display: none;
  }
  
  .basket-items::-webkit-scrollbar {
    width: 6px;
  }
  
  .basket-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
  }
  
  .basket-items::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
  

.basket-group {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0; /* Убраны лишние марджины */
}

.basket-group img {
    max-width: 100%;
    min-width: 119px;
    height: auto;
}

.basket-card .product-code {
    width: 100px;
    margin-right: 0; /* Убраны марджины для симметрии */
    margin-left: 0;
}

.basket-wrapper {
    background-color: #fff;
    border-top-right-radius: 46px;
    border-top-left-radius: 46px;
    padding: 32px 32px 0;
}

.basket-discription {
    display: flex;
    flex-direction: column;
}

.price-left,
.price-right {
    font-size: 28px;
    font-weight: 500;
    line-height: 36px;
    color: #212529;
    text-align: right; /* Выравнивание по правому краю */
}

.price-right {
    color: #1E8194;
    margin-left: 0; /* Убраны марджины */
}

.price-left,
.price-right {
    display: inline-block;
}

.price-left {
    width: 50px; /* Фиксированная ширина */
}

.price-right {
    font-size: 28px;
    font-weight: 500;
    line-height: 36px;
    color: #1E8194;
    margin-left: 0; /* Убраны марджины */
    text-align: cent;
}

.basket-card .price-left {
    font-size: 18px;
    text-wrap: nowrap;
}

.basket-card .price-right {
    font-size: 18px;
}

.price-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-total span {
    font-size: 30px;
    font-weight: 500;
    color: #212529;
}

.price-total p {
    font-size: 20px;
    font-weight: 300;
    color: #212529;
}

.continue-btn, .oform-btn {
    width: 100%;
    padding: 16px 24px;
    margin-top: 16px; /* Уменьшен верхний марджин */
    margin-bottom: 8px;
    border-radius: 41px;
    color: #6C757D;
    border: none;
    background-color: #DEE2E6;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.continue-btn:hover {
    background-color: rgba(33, 37, 41, 0.7);
    color: white
}

.oform-btn {
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 8px;
    border-radius: 41px;
    color: white;
    border: none;
    background-color: #1E8194;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.oform-btn:hover {
    background-color: rgba(33, 37, 41, 0.8);
    color: white;
}

.under-basket {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.clear-basket {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
}

.clear-basket button {
    color: #000000;
    font-size: 20px;
    font-weight: 300;
    border: none;
    padding: 12px;
    background-color: white;
}

.header-group-basket {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-group {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr; /* Фото, название, количество, цена */
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-info-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.total-cost {
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
}

.cart-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.bottom-wraper {
    background-color: #fff;
    border-bottom-left-radius: 46px;
    border-bottom-right-radius: 46px;
    padding: 32px;
}

.basket-card {
    display: grid;
    grid-template-columns: 20px 1fr 100px 125px 50px 100px;
    justify-content: space-between;
    align-items: center;
    padding-right: 32px;
    padding-left: 32px;
    background-color: #F8F9FA;
    border-radius: 22px;
    width: 100%;
    gap: 30px;
}

.basket-group a {
    width: 119px;
    height: 119px;
    margin-left: 24px;
    margin-right: 32px;
}

.basket-group svg {
    margin-left: 16px;
    max-width: 18px;
    height: auto;
}

.counter-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
}

.counter-button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    border: 1px solid #212529;
    background-color: #FFFFFF;
    color: #212529;
    transition: background-color 0.2s;
}

.counter-button:hover {
    background-color: #495057;
    color: white;
}

.counter-button.plus {
    background-color: #212529;
    color: #fff;
}

.counter-button.plus:hover {
    background-color: #495057;
}

.remove-item-svg {
    cursor: pointer;
    max-width: 18px;
    height: auto;

}

@media (max-width: 1280px) {
    .basket-group a {
        max-width: 85px;
        height: auto;
    }
/*
    .product-code {
        display: none;
    }
*/
    .basket-container {
        padding: 32px;
        
    }

    .basket-card {
        grid-template-columns: 20px 1fr 125px 50px 100px;
        padding-left: 48px;
        gap: 20px;
        padding-left: 24px;
    }
    
  }

  @media (max-width: 1024px) {
    .basket-container {
        margin-top: 50px;
    }
    .basket-group a {
        max-width: 85px;
        height: auto;
        margin: 0px 12px;
    }

    .basket-discription h5 {
        font-size: 16px;
    }

    .width-info {
        font-size: 12px;
    }

    .product-code {
        display: none;
    }

    .basket-card {
        grid-template-columns: 20px 1fr 125px 100px;
        padding-left: 48px;
        gap: 20px;
        padding-left: 24px;
    }

    .price-left {
        display: none;
    }

    .counter-container {
        gap: 12px;
    }
    .cart-image {
        width: 30px;
        height: 30px;
    }

  }


  @media (max-width: 768px) {

    .under-top{ 
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .under-basket {
        display: flex;
        flex-direction: column;
    }
    .basket-status {
        font-size: 34px;
    }
    .price-left {
        display: none;
    }

    .basket-container {
        padding: 12px;
    }

    .price-right {
        margin-left: 12px;
    }

    .basket-wrapper {
        padding: 16px 16px 0;
        margin-top: 20px;
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
    }

    .basket-group {
        width: 100%;
    }

    .basket-group svg {
        margin: 0;
    }
        
    .basket-card {
        display: grid;
        grid-template-columns: 1fr; /* Одноколоночная сетка */
        grid-template-rows: auto auto auto; /* Три строки */
        padding: 16px; /* Отступы внутри карточки */
    }

    .basket-card .remove-item-svg {
        grid-row: 1; /* Размещаем в первой строке */
        justify-self: start; /* Выравниваем по левому краю */
    }

    .basket-card .basket-group {
        grid-row: 2; /* Размещаем во второй строке */
        justify-self: center;
        width: 100%; /* Растягиваем на всю ширину */
    }

    .basket-card .counter-container,
    .basket-card .price-right {
        grid-row: 3; /* Размещаем в третьей строке */
    }

    .basket-card .counter-container {
        justify-self: start; /* Выравниваем по левому краю */
    }

    .basket-card .price-right {
        justify-self: end; /* Выравниваем по правому краю */
    }

    .product-sort__section {
        width: 100%;
        justify-content: space-between;
    }

    .basket-count__item {
        padding-left: 4px;
        margin-bottom: 10px;
    }

    .btn-group .btn {
        padding: 4px;
    }

    .view-options {
        border-left: none;
    }

    .basket-delete-btn {
        margin-bottom: 10px;
    }

    .oform-btn, .continue-btn {
        padding: 12px 16px;
        /* margin-top: 0; */
    }

    .under-basket {
        margin-top: 16px;
        gap: 0;
    }

    .bottom-wraper {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        padding: 16px;
    }

}

@media (max-width: 480px) {
    .basket-card {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        /*display: grid;
        grid-template-columns: 1fr; /* Одноколоночная сетка */
        /*grid-template-rows: auto auto 1fr; /* Три строки */
        /*gap: 12px; /* Уменьшенные отступы между строками */
        /*width: 100%;*/
    }

    .basket-delete-btn {
        display: flex;
        flex-basis: 8%;
        justify-content: center;
        align-items: center;
    }

    .price-total span {
        font-size: 34px;
    }

    .basket-status {
        font-size: 24px;
    }

    .under-basket button {
        font-size: 16px;
    }

    .oform-btn {
        font-size: 16px;
    }

    .bottom-wraper {
        padding: 32px 0px;
    }

    .cart-image {
        width: 24px;
        height: auto;
    }

    .basket-card .remove-item-svg {
        grid-row: 1; /* Размещаем в первой строке */
        justify-self: start; /* Выравниваем по левому краю */
        max-width: 24px; /* Уменьшаем размер иконки */
    }

    .basket-card .basket-group {
        grid-row: 1; /* Размещаем во второй строке */
        width: 100%; /* Растягиваем на всю ширину */
        flex-basis: 86%;
    }

    .basket-card .counter-container,
    .basket-card .price-right {
        grid-row: 2; /* Размещаем в третьей строке */
        display: flex;
        justify-content: space-between; /* Распределяем элементы по краям */
        align-items: center; /* Выравниваем по вертикали */
        flex-wrap: wrap; /* Позволяем перенос элементов при нехватке места */
    }

    .basket-card .counter-container {
        justify-self: flex-start; 
    }

    .basket-card .price-right {
        justify-self: flex-start; /* Расположить в конце строки */
        font-size: 18px; /* Уменьшаем размер текста для мобильных */
        margin: 0;
    }

    .basket-group img {
        width: 80%; /* Уменьшаем размер изображения */
        height: auto;
        margin: 0 auto; /* Центрируем изображение */
        min-width: 80px;
        max-width: 100px;
    }

    .counter-button {
        width: 30px;
        height: 30px;
        font-size: 14px; /* Уменьшенный размер кнопок */
    }

    .basket-card {
        /*gap: 8px; /* Дополнительно уменьшаем отступы */
        border-radius: 12px;
    }

    .basket-container{
        padding: 8px;
    }

    .basket-wrapper {
        padding: 8px 8px 0;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        margin-top: 20px;
    }

    .bottom-wraper {
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        padding: 8px;
    }

    a.continue-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    } 

    .basket-group a {
        max-width: 100px;
    }
}
