@media print {
    @page {
        margin: 0;
        size: auto;
    }

    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Override Venta min-h-screen on page wrapper which creates empty printed pages */
    .page-wrapper {
        min-height: auto !important;
    }

    /* Prevent page breaks inside table rows */
    .cart-totals,
    .cart-summary-wrapper,
    #shopping-cart-table tbody tr {
        break-inside: avoid;
    }

    /* Ensure table doesn't break awkwardly */
    #shopping-cart-table {
        break-inside: auto;
    }

    /* Hide checkout button in print view */
    .checkout-cart-index a[aria-label*="Checkout"] {
        display: none;
    }
}
