/* css/cart-page.css */

.cart-page {
	                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
}



.cart-page .container {
                width: 1200px;
            }

/* Таблица */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cart-table th,
.cart-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Колонки */
.col-image { width: 80px; }
.col-name { min-width: 200px; }
.col-params { width: 120px; color: #666; font-size: 0.875rem; }
.col-price { width: 100px; white-space: nowrap; }
.col-quantity { width: 140px; }
.col-total { width: 120px; font-weight: 600; white-space: nowrap; }
.col-remove { width: 40px; text-align: center; }

/* Изображение */
.cart-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.cart-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Название */
.col-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.col-name a:hover {
    color: #C90254;
}

/* Описание */
.pack-desc {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #999;
}

/* Количество */
.cart-table .qty-control {
	width: 100px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.25rem;
}

.cart-table .qty-minus,
.cart-table .qty-plus {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s, color 0.2s;
}

.cart-table .qty-minus:hover,
.cart-table .qty-plus:hover {
    background: #C90254;
    color: #fff;
}

.cart-table .qty-value {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
}

/* Удаление */
.btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.btn-remove:hover {
    color: #dc3545;
    background: #fee;
}

/* Итого */
.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 600;
}

#cart-grand-total {
    font-size: 1.5rem;
    color: #C90254;
}

.btn-checkout {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Пустая корзина */
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.cart-empty p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Загрузка */
#cart-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

/* Анимации */
.cart-row.removing {
    opacity: 0.5;
    pointer-events: none;
}

.cart-row.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Адаптив */
@media (max-width: 768px) {
    .cart-table { display: block; }
    .cart-table thead { display: none; }
    .cart-table tbody { display: block; }
    
    .cart-row {
        display: grid;
        grid-template-columns: 70px 1fr auto;
        grid-template-areas:
            "image name remove"
            "image params params"
            "quantity price total";
        gap: 0.5rem;
        padding: 1rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .cart-row td { padding: 0; border: none; }
    
    .col-image { grid-area: image; }
    .col-name { grid-area: name; }
    .col-params { grid-area: params; }
    .col-price { grid-area: price; text-align: center; }
    .col-quantity { grid-area: quantity; }
    .col-total { grid-area: total; text-align: right; }
    .col-remove { grid-area: remove; text-align: right; }
    
    .cart-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-checkout { width: 100%; }
}

/* Добавьте эти стили к существующим */

/* Секция оформления заказа */
.checkout-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.checkout-form {
    margin-top: 1.5rem;
}

.checkout-form h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.btn-checkout {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-checkout:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.checkout-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

/* Алерты */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

/* Блок авторизации для гостей */
.checkout-auth-required {
    text-align: center;
    padding: 10px;;
}

.checkout-auth-required p {
    color: #666;
    margin-bottom: 10px;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-buttons .btn {
    min-width: 150px;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Адаптив */
@media (max-width: 768px) {
    .checkout-section {
        padding: 1.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .auth-buttons .btn {
        width: 100%;
    }
}