.cart-page { padding: 40px 15px; min-height: 60vh; }
.page-title { margin-bottom: 30px; font-weight: 700; color: #333; }

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    color: #666;
}

.cart-table td {
    padding: 15px;
    border-top: 1px solid #eee;
    vertical-align: middle;
}

.product-info-td { display: flex; align-items: center; gap: 15px; }
.cart-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid #eee; }
.product-name { font-weight: 600; color: #222; }

.subtotal-cell { font-weight: 700; color: #2c3e50; }

.cart-summary {
    margin-top: 20px;
    text-align: right;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.total-amount {
    font-size: 24px;
    font-weight: 800;
    color: #e67e22;
    margin-left: 15px;
}

/* Форма */
.checkout-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.checkout-section h3 { margin-bottom: 20px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border 0.3s;
}

.form-group input:focus { border-color: #3498db; outline: none; }

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-checkout:hover { background: #219150; }
.form-note { font-size: 12px; color: #888; margin-top: 10px; text-align: center; }

.empty-cart-message { text-align: center; padding: 50px 0; }
.empty-cart-message i { font-size: 50px; color: #ccc; margin-bottom: 15px; }

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: fit-content;
}
.qty-btn {
    padding: 5px 12px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}
.qty-btn:hover { background: #e9ecef; }
.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: bold;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
}
.btn-remove:hover { color: #cc0000; transform: scale(1.1); }
.remove-cell { text-align: center; }

/* Адаптивність */
@media (max-width: 992px) {
    .cart-grid { grid-template-columns: 1fr; }
    .checkout-section { order: 2; }
}

@media (max-width: 600px) {
    .cart-table thead { display: none; } /* Ховаємо шапку на мобільних */
    .cart-table tr { display: block; margin-bottom: 15px; border: 1px solid #eee; }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 15px;
        font-size: 14px;
    }
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
    }
    .product-info-td { flex-direction: column; text-align: center; }
    .product-info-td::before { content: "Товар" !important; }
}