/* ============================================
   СТРАНИЦА КОРЗИНЫ
   ============================================ */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.cart-container h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Список товаров */
.cart-items {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto 100px 90px;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cart-item:hover {
    background: #fafafa;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Изображение */
.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация */
.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
}

.cart-item-title:hover {
    color: #007bff;
}

.cart-item-price {
    font-size: 14px;
    color: #28a745;
    font-weight: 500;
}

/* Количество */
.cart-item-quantity {
    min-width: 110px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.cart-qty-btn {
    width: 36px;
    height: 40px;
    border: none;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.cart-qty-btn:hover {
    background: #e44c2c;
    color: white;
}

.cart-qty-value {
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    background: #fff;
    padding: 0 5px;
    line-height: 40px;
}

/* Сумма */
.cart-item-total {
    font-size: 18px;
    font-weight: 700;
    color: #e44c2c;
    text-align: right;
}

/* Кнопка удаления */
.cart-item-remove {
    text-align: center;
}

.cart-remove-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    color: #666;
    white-space: nowrap;
}

.cart-remove-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}

/* Боковая панель */
.cart-summary {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
    color: #555;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: #e44c2c;
    border-top: 2px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 15px;
}

.checkout-btn, .clear-cart-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
}

.checkout-btn {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.clear-cart-btn {
    background: #f8f9fa;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.clear-cart-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Пустая корзина */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-cart-hint {
    font-size: 14px;
    color: #999;
}

.continue-shopping {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.continue-shopping:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 900px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
        grid-template-areas:
            "image info"
            "quantity quantity"
            "total remove";
        gap: 12px;
    }

    .cart-item-image {
        grid-area: image;
        width: 70px;
        height: 70px;
    }

    .cart-item-info {
        grid-area: info;
    }

    .cart-item-quantity {
        grid-area: quantity;
        justify-self: start;
    }

    .cart-item-total {
        grid-area: total;
        text-align: left;
        justify-self: start;
        font-size: 16px;
    }

    .cart-item-remove {
        grid-area: remove;
        justify-self: end;
    }

    .cart-remove-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 500px) {
    .cart-container {
        padding: 20px 15px;
    }

    .cart-item {
        padding: 15px;
        gap: 10px;
    }

    .cart-item-title {
        font-size: 14px;
    }

    .cart-item-price {
        font-size: 12px;
    }

    .cart-item-total {
        font-size: 14px;
    }

    .cart-qty-btn {
        width: 30px;
        height: 34px;
        font-size: 16px;
    }

    .cart-qty-value {
        min-width: 35px;
        line-height: 34px;
        font-size: 14px;
    }

    .cart-remove-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
}




/* ============================================
   ТЕЛЕФОНЫ (ДО 768px)
   ============================================ */
@media (max-width: 768px) {
    .cart-summary {
        order: -1;
        margin-bottom: 0;
        border-radius: 16px;
        padding: 20px;
    }
}

