﻿/* cart.css - стили для страницы корзины */

.cart-container {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
}

/* Пустая корзина */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

    .cart-empty i {
        font-size: 80px;
        color: #ddd;
        margin-bottom: 20px;
    }

    .cart-empty h2 {
        font-size: 28px;
        font-weight: 600;
        margin-bottom: 15px;
        color: #333;
    }

    .cart-empty p {
        color: #666;
        margin-bottom: 30px;
    }

    .cart-empty .btn-primary {
        display: inline-block;
        padding: 12px 30px;
        background: #ff5b00;
        color: white;
        text-decoration: none;
        border-radius: 25px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

        .cart-empty .btn-primary:hover {
            background: #e65200;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255,91,0,0.3);
        }

/* Таблица корзины */
.cart-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

    .cart-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .cart-table th {
        background: #f8f9fa;
        padding: 15px;
        text-align: left;
        font-weight: 600;
        color: #333;
        border-bottom: 2px solid #eaeaea;
    }

    .cart-table td {
        padding: 20px 15px;
        border-bottom: 1px solid #eaeaea;
        vertical-align: middle;
    }

/* Товар в корзине */
.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .cart-product img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 10px;
    }

.cart-product-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cart-product-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.stock-info {
    font-size: 12px;
    color: #28a745;
    margin-top: 5px;
}

    .stock-info.out-of-stock {
        color: #dc3545;
    }

/* Блок количества */
.cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #eaeaea;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .quantity-btn:hover:not(:disabled) {
        border-color: #ff5b00;
        color: #ff5b00;
    }

    .quantity-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.quantity-input {
    width: 60px;
    height: 35px;
    border: 2px solid #eaeaea;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* Цена */
.cart-price {
    font-size: 18px;
    font-weight: 600;
    color: #ff5b00;
}

/* Кнопка удаления */
.cart-remove {
    color: #dc3545;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

    .cart-remove:hover {
        transform: scale(1.1);
        color: #c82333;
    }

/* Блок итого */
.cart-summary {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eaeaea;
}

    .summary-row.total {
        font-size: 20px;
        font-weight: 600;
        color: #ff5b00;
        border-bottom: none;
        padding-top: 20px;
        margin-bottom: 10px;
    }

/* Кнопка оформления заказа */
.checkout-btn {
    width: 100%;
    background: #ff5b00;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

    .checkout-btn:hover:not(.disabled) {
        background: #e65200;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255,91,0,0.3);
    }

    .checkout-btn.disabled {
        background: #ccc;
        cursor: not-allowed;
        pointer-events: none;
        opacity: 0.7;
    }

/* Кнопка очистки корзины */
.clear-cart {
    background: none;
    border: 2px solid #dc3545;
    color: #dc3545;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .clear-cart:hover {
        background: #dc3545;
        color: white;
    }

/* Кнопка продолжения покупок */
.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn-continue:hover {
        background: #e9ecef;
        color: #ff5b00;
    }

/* Действия с корзиной */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px 20px; /* Меньше */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
    font-size: 14px; /* Добавить */
}

    .notification.error {
        background: #dc3545;
    }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-container .container > div:first-of-type {
        grid-template-columns: 1fr !important;
    }

    .cart-table table {
        display: block;
        overflow-x: auto;
    }

    .cart-product {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-summary {
        position: static;
        margin-top: 20px;
    }
}
