/* ===== СТИЛИ СТРАНИЦЫ КОРЗИНЫ ===== */

/* Основной контент */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0 60px;
    background: #fff;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 13px;
}

.breadcrumbs a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #e31e24;
}

.breadcrumbs .separator {
    color: #ccc;
}

.breadcrumbs .current {
    color: #e31e24;
}

/* Заголовок страницы */
.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
}

/* Действия с корзиной */
.cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 5px;
}

.select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.select-all input {
    display: none;
}

.select-all .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #2196F3;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.select-all input:checked + .checkmark {
    background: #2196F3;
}

.select-all input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 12px;
}

.select-all-text {
    color: #2196F3;
    font-size: 14px;
    font-weight: 500;
}

/* Кнопка очистить корзину */
.clear-cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #e31e24;
    color: #e31e24;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.clear-cart-btn:hover {
    background: #e31e24;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.2);
}

.clear-cart-btn i {
    font-size: 14px;
}

/* Список товаров */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Карточка товара */
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Чекбокс товара */
.item-checkbox {
    cursor: pointer;
    user-select: none;
}

.item-checkbox input {
    display: none;
}

.item-checkbox .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.item-checkbox input:checked + .checkmark {
    background: #e31e24;
    border-color: #e31e24;
}

.item-checkbox input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 12px;
}

/* Изображение товара */
.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация о товаре */
.item-info {
    flex: 1;
    min-width: 0;
}

.item-info a {
    text-decoration: none;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.item-price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    color: #e31e24;
}

.item-old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.item-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    max-width: 300px;
}

/* Количество */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: #e31e24;
    color: #e31e24;
    background: #fff5f5;
}

.qty-btn i {
    font-size: 10px;
}

.qty-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    min-width: 24px;
    text-align: center;
}

/* Сумма по товару */
.item-total {
    font-weight: 700;
    color: #333;
    font-size: 16px;
    min-width: 100px;
    text-align: right;
    flex-shrink: 0;
}

/* Кнопка удаления */
.remove-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    color: #999;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #e31e24;
    color: #fff;
    transform: rotate(90deg);
}

/* Футер корзины - ИСПРАВЛЕННЫЙ */
.cart-footer {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

/* Итоговая сумма - фиксированная ширина */
.cart-summary {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px 25px;
    min-width: 280px;
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #666;
    font-size: 14px;
}

.summary-row.discount {
    color: #4caf50;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
}

/* Кнопка оформления - НЕ растягивается */
.checkout-btn-wrapper {
    flex-shrink: 0;
}

.checkout-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 50px;
    background: #e31e24;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.checkout-btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.4);
}

.checkout-summary {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
}

/* Стили для пустой корзины */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 16px;
}

.empty-cart-icon {
    width: 100px;
    height: 100px;
    background: #e31e24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: #fff;
    font-size: 40px;
}

.empty-cart-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart-text {
    color: #666;
    margin-bottom: 25px;
}

.empty-cart-btn {
    display: inline-block;
    padding: 14px 35px;
    background: #e31e24;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.empty-cart-btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.3);
}

/* Уведомление */
.cart-notification {
    position: fixed;
    top: 140px;
    right: 20px;
    background: #4caf50;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.cart-notification.show {
    transform: translateX(0);
}

/* Адаптивность */
@media (max-width: 992px) {
    /* Карточка остаётся горизонтальной, просто убираем описание */
    .item-description {
        display: none;
    }

    .item-total {
        min-width: 70px;
    }

    /* Футер — вертикально */
    .cart-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .cart-summary {
        min-width: auto;
    }

    .checkout-btn {
        width: 100%;
        padding: 16px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 0 40px;
        padding-top: 40px;
    }

    .page-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    /* Карточка — горизонтальная, компактная */
    .cart-item {
        gap: 10px;
        padding: 12px;
    }

    .item-image {
        width: 70px;
        height: 70px;
    }

    .item-name {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .item-price {
        font-size: 14px;
    }

    .item-old-price {
        font-size: 11px;
    }

    .item-total {
        font-size: 14px;
        min-width: 60px;
    }

    .qty-btn {
        width: 26px;
        height: 26px;
    }

    .qty-value {
        font-size: 13px;
    }

    .item-quantity {
        gap: 6px;
    }

    .remove-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Итого */
    .cart-summary {
        padding: 15px;
    }

    .summary-row.total {
        font-size: 16px;
    }

    .checkout-btn {
        padding: 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }

    .cart-item {
        gap: 6px;
        padding: 10px;
    }

    .item-checkbox .checkmark {
        width: 18px;
        height: 18px;
    }

    .item-image {
        width: 55px;
        height: 55px;
        border-radius: 6px;
    }

    /* Цена и название компактнее */
    .item-name {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .item-price {
        font-size: 12px;
    }

    .item-old-price {
        display: none;
    }

    /* Количество — совсем маленькое */
    .item-quantity {
        gap: 4px;
    }

    .qty-btn {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }

    .qty-value {
        font-size: 11px;
        min-width: 14px;
    }

    /* Итого — без min-width */
    .item-total {
        font-size: 11px;
        min-width: 0;
        white-space: nowrap;
    }

    .remove-btn {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .clear-cart-btn {
        font-size: 12px;
        padding: 8px 15px;
    }

    .summary-row {
        font-size: 13px;
    }

    .summary-row.total {
        font-size: 15px;
    }

    .checkout-btn {
        font-size: 13px;
        padding: 13px;
    }
}