/* Cart Page */
.scdev-cart-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.scdev-cart-page h1 {
    margin-bottom: 30px;
}

.empty-cart {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 10px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-table th,
.cart-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-qty {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.btn-remove-item {
    background: #dc3545;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.btn-remove-item:hover {
    background: #c82333;
}

.cart-table tfoot td {
    font-size: 18px;
    padding: 10px;
}

.cart-total {
    font-size: 24px;
    color: #28a745;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.btn-continue-shopping,
.btn-checkout {
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    background: #3498db;
    color: #fff;
}

.btn-continue-shopping:hover,
.btn-checkout:hover {
    background: #2980b9;
}

/* Checkout Page */
.scdev-checkout-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.scdev-checkout-page h1 {
    margin-bottom: 30px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.checkout-form,
.order-summary {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkout-form h2,
.order-summary h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.user-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.user-info p {
    margin: 8px 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.summary-items {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.total-amount {
    font-size: 24px;
    color: #28a745;
}

.btn-place-order {
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.btn-place-order:hover {
    background: #218838;
}

/* Responsive */
@media (max-width: 768px) {
    .scdev-cart-page {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .scdev-cart-page h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Make cart table responsive - card layout */
    .cart-table {
        display: block;
        font-size: 14px;
        box-shadow: none;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody {
        display: block;
    }
    
    .cart-table tr {
        display: block;
        margin-bottom: 10px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 10px;
        border-bottom: none;
    }
    
    .cart-table td {
        display: block;
        text-align: left;
        padding: 6px 0;
        border-bottom: none;
    }
    
    .cart-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 80px;
        margin-right: 10px;
    }
    
    .cart-product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cart-product-info img {
        width: 100%;
        max-width: 120px;
        height: auto;
    }
    
    .cart-qty {
        width: 60px;
    }
    
    .cart-table tfoot {
        display: block;
    }
    
    .cart-table tfoot tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        margin-bottom: 0;
    }
    
    .cart-table tfoot td {
        display: inline-block;
        padding: 0;
    }
    
    .cart-table tfoot td:before {
        display: none;
    }
    
    .cart-total {
        font-size: 20px;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-continue-shopping,
    .btn-checkout {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
}

/* Night Mode for Cart */
body.night-mode .scdev-cart-page,
body.night-mode .scdev-checkout-page {
    color: #e0e0e0;
}

body.night-mode .scdev-cart-page h1,
body.night-mode .scdev-checkout-page h1 {
    color: #e0e0e0;
}

body.night-mode .cart-table {
    background: #2a2a2a;
}

body.night-mode .cart-table th {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.night-mode .cart-table td {
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.night-mode .cart-table tr {
    background: #2a2a2a;
}

body.night-mode .cart-qty {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.night-mode .empty-cart {
    color: #999;
}

body.night-mode .checkout-form,
body.night-mode .order-summary {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.night-mode .user-info {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.night-mode .form-group input,
body.night-mode .form-group textarea {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.night-mode .summary-items {
    border-bottom-color: #444;
}

/* Digital-only checkout (no shipping) */
.checkout-container.digital-only {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-container.digital-only .order-summary {
    padding: 10px;
    text-align: center;
}

.checkout-container.digital-only .user-info {
    text-align: left;
}

.checkout-container.digital-only .summary-items,
.checkout-container.digital-only .summary-total {
    text-align: left;
}
