
.header-basket{
    position: relative;
}
/*     p e r s o n a l -- e l e m e n t s     */
.personal-elements {
    gap: var(--gap-default);
}

.personal-element {
    gap: 3px;
    height: 54px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    position: relative;
    color: #FFF;
}

.personal-element:hover,
.personal-element:active,
.personal-element:focus {
    color: var(--color-main);
}

.personal-element__svg {
    width: 20px;
    height: 20px;
}

.personal-element__svg svg use {
    fill: #FFF;
    stroke: none;
}

.personal-element__count {
    white-space: nowrap;
    background-color: var(--color-gray2);
    border-radius: 50%;
    color: var(--color-black);
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0px;
    left: 18px;
}
.personal-element__count:has(.count-product.active) {
    /* Стили для самого контейнера, когда внутри есть активный элемент */
    /* background-color: #218377;
    color: #f5f5f6; */
    background-color: #F7F7F8;
}
.personal-element__count-in-cart {
    background-color: var(--color-main);
    color: var(--color-text-white);
}

.basket_wrap .header-basket__subitems.hideCartModal {
    animation: hideCartModal .15s ease-in forwards
}

.basket_wrap .header-basket__subitems {
    display: none;
    width: 500px;
    opacity: 0;

    position: absolute;
    top: 50px;
    /*right: -77px;*/
    right: 0;
    z-index: 100;

    transform-origin: top right;
    transition: top, .5s;
    animation: showCartModal .15s ease-in forwards;
}

.header-basket:not(.basket_empty) .basket_wrap .header-basket__subitems.on,
.header-basket__subitems.showed {
    display: block;
}

@keyframes showCartModal {
    0% {
        opacity: 0
    }

    10% {
        opacity: 0;
        transform: scale(.8)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes hideCartModal {
    0% {
        opacity: 1;
        transform: scale(1)
    }

    to {
        opacity: 0;
        transform: scale(.8)
    }
}

.header-basket__subitems .wrap-items {
    padding: 20px;
}

.header-basket__subitems .items{
    overflow: auto;
    max-height: 140px;
}

.header-basket__subitems .items::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.header-basket__subitems .items::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 3px;
}

.header-basket__subitems .items::-webkit-scrollbar-track {
    background: var(--color-text-white);
}

.header-basket__subitems .wrap{
    width: 100%;
    z-index: 90;
    background: var(--color-text-white);
    color: var(--color-black);
    -moz-border-radius: var(--border-small-radius);
    -webkit-border-radius: var(--border-small-radius);
    border-radius: var(--border-small-radius);
    box-shadow: #0000001a 0 0 0 200vh;
    margin-top: 10px;
}

.header-basket__subitems.hover{
    height: auto;
}

.header-basket__subitems .item:not(:last-child) {
    margin-bottom: 10px;
}

.header-basket__subitems .item.process{
    opacity: 0.7;
    pointer-events: none;
}

.header-basket__subitems .item .image{
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 10px;
    width: 70px;
    height: 70px;
    line-height: 70px;
    float: left;
}


.header-basket__subitems .item .image a{
    display: contents;
}

.header-basket__subitems .item .image img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-basket__subitems .item .left-info-basket{
    gap: 10px;
    width: 100%;
}

.header-basket__subitems .item .left-info-basket .name {
    flex-grow: 1;
}

.header-basket__subitems .item .left-info-basket .total{
    white-space: nowrap;
}

.header-basket__subitems .item .left-info-basket .remove_bl{
    cursor: pointer;
}

.header-basket__subitems .subitems__footer{
    justify-content: flex-end;
    gap: 10px;
    padding: 0px 20px 20px;
}

@media (max-width: 1199px) {
    .basket_wrap .header-basket__subitems {
        /*right: -71px;*/
        right: 0;
    }
}

@media (max-width: 991px) {
    .personal-element--favorite {
        display: none;
    }
}

@media (max-width: 567px) {
    .header-basket__subitems {
        display: none !important;
    }
}
