/* Print styles for labels */
@media print {
    body { margin: 0; padding: 0; background: #fff; }
    .no-print { display: none !important; }

    .label-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, var(--label-w));
        gap: 3mm;
        padding: 4mm;
    }

    .label {
        width: var(--label-w);
        height: var(--label-h);
        border: 0.5px solid #ccc;
        padding: 1.5mm;
        page-break-inside: avoid;
        font-size: 7pt;
        font-family: 'Prompt', sans-serif;
        overflow: hidden;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .label-top {
        display: flex;
        gap: 2mm;
        align-items: flex-start;
    }

    .label-qr {
        width: 18mm;
        height: 18mm;
        flex-shrink: 0;
    }

    .label-info { flex: 1; overflow: hidden; }
    .label-name { font-weight: 600; font-size: 7.5pt; line-height: 1.2; }
    .label-variant { font-size: 6.5pt; color: #555; }
    .label-sku { font-size: 6pt; color: #888; }
    .label-price { font-weight: 700; font-size: 8pt; color: #c00; margin-top: 1mm; }

    .label-barcode canvas,
    .barcode-canvas {
        width: 100% !important;
        max-height: 10mm;
    }

    .label-product-img {
        width: 14mm;
        height: 14mm;
        object-fit: cover;
        border-radius: 1mm;
        flex-shrink: 0;
    }
}

/* Screen preview (non-print) */
@media screen {
    .label-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
    }

    .label {
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 6px;
        font-size: 10px;
        font-family: 'Prompt', sans-serif;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .label-top { display: flex; gap: 6px; align-items: flex-start; }
    .label-qr { width: 60px; height: 60px; }
    .label-name { font-weight: 600; font-size: 11px; }
    .label-variant { color: #555; }
    .label-sku { color: #888; font-size: 9px; }
    .label-price { font-weight: 700; color: #c00; }
    .label-barcode { text-align: center; }
    .barcode-canvas { max-width: 100%; }
}
