/* ===== КОРЗИНА (стили под оригинал Tilda) ===== */

/* Основной контейнер */
.cart {
    position: fixed;
    right: 50px;
    top: 100px;
    z-index: 4000;
    display: block;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Блок с суммой (появляется при наведении) */
.cart__text {
    background: #292929;
    border-radius: 3px;
    box-sizing: border-box;
    color: #fff;
    font-size: 15px;
    opacity: 0;
    padding: 9px 13px;
    pointer-events: none;
    position: absolute;
    right: 130%;
    top: 50%;
    transform: translateX(0) translateY(-50%);
    transition: opacity 0.3s linear;
    white-space: nowrap;
}

.cart__text:after {
    border: 10px solid transparent;
    border-left-color: #292929;
    content: "";
    height: 0;
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
}

/* При наведении на иконку показываем текст с суммой */
.cart__icon-wrapper:hover + .cart__text,
.cart__text:hover {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Обёртка иконки (кружок) */
.cart__icon-wrapper {
    position: relative;
    cursor: pointer;
}

/* Кружок с иконкой корзины */
.cart__icon-imgwrap {
    background-color: rgba(255,255,255,0.8);
    border-radius: 50px;
    box-shadow: 0 0 10px 0 rgba(0,0,0,0.2);
    cursor: pointer;
    height: 80px;
    width: 80px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease-in-out;
    will-change: transform;
}

.cart__icon-imgwrap:hover {
    transform: scale(1.1);
}

/* Иконка корзины (SVG) */
.cart__icon-img {
    stroke: #000;
    stroke-width: 3;
    height: 80px;
    width: 80px;
    padding: 18px 20px 22px;
}

/* Счётчик товаров (на кружке) */
.cart__counter {
    background-color: #7ba6db; /* ваш цвет */
    border-radius: 30px;
    bottom: -3px;
    box-sizing: border-box;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    height: 30px;
    line-height: 30px;
    min-width: 30px;
    padding: 0 5px;
    position: absolute;
    right: -3px;
    text-align: center;
    width: auto;
    font-size: 14px;
    font-weight: 700;
}

/* ===== МОДАЛЬНОЕ ОКНО КОРЗИНЫ (без изменений, ваше) ===== */
.modal__container--cart {
    max-width: 600px;
}

.cart-modal__products {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0 25px;
    border-top: 1px solid rgba(0, 0, 0, .2);
    border-bottom: 1px solid rgba(0, 0, 0, .2);
    padding: 10px 0;
}
.cart-model__left-item{
    display: flex;
    align-items: center;
}

.cart-modal__product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    justify-content: space-between;
}

.cart-modal__product:last-child {
    border-bottom: none;
}

.cart-modal__product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-modal__product-info {
    flex: 1;
    min-width: 0;
}

.cart-modal__product-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-modal__product-price,.cart-modal__quantity-value {
    color: #000;
    display: table-cell;
    font-size: 16px;
    padding: 15px;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.55;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 300;
}

.cart-modal__product-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50%;
    justify-content: inherit;
}

.cart-modal__quantity {
    display: flex;
    align-items: center;
    
    overflow: hidden;
}

.cart-modal__quantity-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: background 0.2s;
}

.cart-modal__quantity-btn:hover {
    
}



.cart-modal__product-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    padding: 0 5px;
    transition: color 0.2s;
}

.cart-modal__product-remove:hover {
    color: #ff4444;
}

.cart-modal__total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
}

.cart-modal__total-amount {
    color: #000;
    font-size: 22px;
}

.cart-modal__empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.cartwin-heading{
    font-size: 24px;
    line-height: 1.35;
    text-align: left;
}

.cart:hover .cart__text {
    opacity: 1;
    pointer-events: auto;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media screen and (max-width: 960px) {
    .cart {
        right: 20px;
    }
}

@media screen and (max-width: 640px) {
    .cart__icon-imgwrap {
        height: 60px;
        width: 60px;
    }
    .cart__icon-img {
        height: 64px;
        width: 64px;
        padding: 12px 13px 14px;
    }
    .cart__counter {
        bottom: -6px;
        font-size: 14px;
        height: 24px;
        line-height: 24px;
        min-width: 24px;
        right: -6px;
    }
    .cart__text {
        font-size: 14px;
        padding: 7px 11px;
    }
    .cart-modal__product {
        flex-wrap: wrap;
    }
    .cart-modal__product-controls {
        margin-left: auto;
    }
    .cart-modal__total {
        justify-content: space-between;
    }
    .cart-modal__product-name{
        font-size: 12px;
    }
    .cart-modal__quantity-value,.cart-modal__product-price {
        padding:0px
    }
}