/* Попап корзины */
.cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Анимация управляется в popup-animations.css */
}

.cart-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    /* Анимация управляется в popup-animations.css */
}

.cart-popup__container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 75%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: auto;
    /* Анимация управляется в popup-animations.css */
}

.cart-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.cart-popup__heading {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-transform: none;
}

.cart-popup__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    padding: 0;
}

.cart-popup__close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.cart-popup__close i {
    font-size: 16px;
}

.cart-popup__body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cart-popup__list {
    padding: 0;
}

.cart-popup__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.cart-popup__item:hover {
    background: #f9f9f9;
}

.cart-popup__item:last-child {
    border-bottom: none;
}

.cart-popup__item-content {
    flex: 1;
    min-width: 0;
}

.cart-popup__item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.2s ease;
}

.cart-popup__item-name:hover {
    color: #f0cf4c;
}

.cart-popup__item-quantity {
    flex-shrink: 0;
}

.cart-popup__quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

.cart-popup__quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    padding: 0;
}

.cart-popup__quantity-btn:hover {
    background: #f0cf4c;
    border-color: #f0cf4c;
    color: #000;
}

.cart-popup__quantity-btn:active {
    transform: scale(0.95);
}

.cart-popup__quantity-btn i {
    font-size: 12px;
}

.cart-popup__quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0;
    outline: none;
}

.cart-popup__quantity-unit {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    text-align: center;
    width: 100%;
}

.cart-popup__item-price {
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
}

.cart-popup__item-total {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.cart-popup__item-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    padding: 0;
    flex-shrink: 0;
}

.cart-popup__item-remove:hover {
    background: #ff4444;
    color: #fff;
    transform: rotate(90deg);
}

.cart-popup__item-remove i {
    font-size: 14px;
}

.cart-popup__empty {
    padding: 40px 24px;
    text-align: center;
    color: #999;
}

.cart-popup__footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.cart-popup__total {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-popup__total-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.cart-popup__total-count span {
    font-weight: 700;
    color: #333;
}

.cart-popup__total-price {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.cart-popup__btns {
    display: flex;
    gap: 12px;
}

.cart-popup__btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cart-popup__btn.btn-primary {
    background: #f0cf4c;
    color: #000;
}

.cart-popup__btn.btn-primary:hover {
    background: #e0bf3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 207, 76, 0.3);
}

.cart-popup__btn.btn-secondary {
    background: #fff;
    color: #333;
    border: 2px solid #f0cf4c;
}

.cart-popup__btn.btn-secondary:hover {
    background: #f0cf4c;
    color: #000;
    border-color: #f0cf4c;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-popup__container {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    
    .cart-popup__header {
        padding: 16px 20px;
    }
    
    .cart-popup__heading {
        font-size: 18px;
    }
    
    .cart-popup__item {
        padding: 16px 20px;
        gap: 12px;
    }
    
    .cart-popup__item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-popup__item-name {
        font-size: 13px;
    }
    
    .cart-popup__item-total {
        font-size: 14px;
    }
    
    .cart-popup__footer {
        padding: 16px 20px;
    }
    
    .cart-popup__total-price {
        font-size: 20px;
    }
    
    .cart-popup__btns {
        flex-direction: column;
    }
    
    .cart-popup__btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .cart-popup__item {
        flex-wrap: wrap;
    }
    
    .cart-popup__item-quantity {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }
    
    .cart-popup__quantity-controls {
        justify-content: center;
    }
}

