/* Cart Page Styles */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cart-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.cart-item-info p {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.item-price {
    font-weight: bold;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.qty-btn:hover {
    background-color: var(--light-gray);
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.btn-remove {
    padding: 0.5rem 1rem;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-remove:hover {
    background-color: #cc0000;
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

.cart-summary {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Billing Form */
.billing-section {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.billing-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Payment Section */
.payment-section {
    text-align: center;
    margin-top: 2rem;
}

.btn-pay-now {
    padding: 1rem 3rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 1rem;
}

.btn-pay-now:hover {
    background-color: #218838;
}

.btn-print {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-print:hover {
    background-color: var(--hover-color);
}

/* QR Code Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--accent-color);
    border: none;
    background: none;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

#qrcode {
    margin: 1rem auto;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
}

.order-details {
    margin-top: 1rem;
    text-align: left;
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
}

.order-details p {
    margin-bottom: 0.5rem;
}

/* Print Styles */
@media print {
    header,
    nav,
    .payment-section,
    .btn-print,
    .btn-pay-now,
    .modal {
        display: none !important;
    }

    .cart-container {
        max-width: 100%;
        padding: 0;
    }

    .cart-item {
        page-break-inside: avoid;
    }

    .billing-section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
    }

    .invoice-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .invoice-header h1 {
        font-size: 24pt;
        margin-bottom: 0.5rem;
    }

    .invoice-header p {
        font-size: 10pt;
    }
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-item-controls {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .cart-item-total {
        grid-column: 2;
        text-align: left;
        margin-top: 0.5rem;
    }

    .btn-pay-now,
    .btn-print {
        width: 100%;
        margin-bottom: 1rem;
        margin-right: 0;
    }
}

