/* Стиль для overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный фон */
    z-index: 9998;  /* Чуть ниже корзины */
    display: none;  /* Скрыто по умолчанию */
}

/* Когда overlay активен */
.overlay.active {
    display: block;
}


/* Стиль для скрытого состояния корзины */
.cart-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: -150%;  /* Скрываем окно за пределами экрана */
    right: 0;
    width: 800px;
    height: 100%;
    background-color: #fff;
    transition: top 0.5s ease;
    z-index: 9999;
}

/* Когда корзина открыта */
.cart-drawer.open {
    top: 0;
    padding: 50px;
}

/* Стили для заголовка корзины */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    color: #101010;
}

/* Стили для закрывающей кнопки */
.close-cart {
    cursor: pointer;
    font-size: 45px;
}
.cart-drawer.open .cart-items {
    border-top: unset;
    padding: 20px 0px;
    max-height: 400px;
    overflow: auto;
}
.cart-drawer.open .cart-items .product {
    border-bottom: unset;
    padding: 20px 0px 20px 0px;
    border-top: 0.5px solid gray;
}
.cart-drawer.open .cart-items .product:last-child {
    border-bottom: 0.5px solid gray;
}
.cart-drawer.open .cart-items .small_title {
    color: #101010;
    text-decoration: revert;
}

.cart-drawer.open .price-info {
    padding: 20px 0px;
    margin-bottom: auto;
}
.cart-drawer.open button {
    margin-bottom: 80px;
}
@media screen and (max-width: 1160px) {
    .cart-drawer.open .cart-items {
        display: block;
    }
}
@media screen and (max-width: 1160px) {
    .cart-drawer.open .cart-items {
        display: block;
    }
    .cart-drawer.open  {
        width: 94%; height: 100%;
        padding: 30px;
    }
}
@media screen and (max-width: 660px) {
    .cart-drawer.open  {
        width: 90%; height: 100%;
        padding: 20px;
    }
    .cart-drawer.open .cart-items .product .present_product {
        gap: 20px;
    }
}
