/* cart.css */
/* Основные стили для страницы корзины */
.cart-page {
    padding-top: 8rem;
    padding-bottom: 3rem;
}

.cart-page h1 {
    font-weight: 700;
    color: #602c07;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.cart-page h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: #602c07;
}

/* Стили для таблицы корзины */
.cart-table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.cart-table thead {
    background-color: #602c07;
    color: white;
}

.cart-table th {
    font-weight: 500;
    padding: 1rem;
}

.cart-table td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-table tbody tr {
    transition: all 0.2s ease;
}

.cart-table tbody tr:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.cart-item-image:hover {
    transform: scale(1.05);
}

.quantity-input {
    width: 70px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.375rem 0.5rem;
    transition: border-color 0.3s ease;
}

.quantity-input:focus {
    border-color: #602c07;
    box-shadow: 0 0 0 0.25rem rgba(96, 44, 7, 0.25);
}

.remove-item {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.remove-item:hover {
    transform: rotate(90deg) scale(1.1);
    background-color: #dc3545;
}

.cart-total-row {
    font-weight: 600;
    background-color: #f8f9fa;
}

.cart-total {
    font-size: 1.2rem;
    color: #602c07;
}

/* Стили для кнопок */
.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-continue {
    background-color: white;
    color: #602c07;
    border: 2px solid #602c07;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-continue:hover {
    background-color: #602c07;
    color: white;
    transform: translateY(-2px);
}

.btn-checkout {
    background-color: #602c07;
    padding: 0.5rem 2rem;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    background-color: #4a2205;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 44, 7, 0.3);
}

/* Стили для пустой корзины */
.empty-cart {
    text-align: center;
    padding: 3rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.empty-cart .alert {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.empty-cart .btn {
    padding: 0.5rem 2rem;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Адаптивные стили */
@media (max-width: 767.98px) {
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 0.5rem;
    }
    
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border-bottom: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
        color: #602c07;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Эффект при удалении товара */
@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.item-removing {
    animation: slideOut 0.3s ease forwards;
}