/* Printable QR cards. Screen preview mirrors the paper layout. */

:root {
    --paper: #ffffff;
    --ink: #14150f;
    --muted: #6c6f64;
    --line: #d9dbd1;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.print-body {
    margin: 0;
    padding: 24px;
    background: #eceade;
    color: var(--ink);
}

.print-toolbar {
    max-width: 210mm;
    margin: 0 auto 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
}
.print-toolbar strong { display: block; font-size: 15px; }
.print-toolbar span { font-size: 13px; color: var(--muted); }
.print-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.print-group-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.print-chip {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-family: inherit;
    text-decoration: none; color: inherit; background: var(--paper); cursor: pointer;
}
.print-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.print-hint { max-width: 210mm; margin: 0 auto 18px; font-size: 13px; color: var(--muted); }

.print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 10mm;
    background: var(--paper);
    display: grid;
    gap: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}

.print-a5-1 .print-sheet { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.print-a5-1 .qr-card:nth-child(n+2) { display: none; }
.print-a6-2 .print-sheet { grid-template-columns: 1fr; grid-template-rows: repeat(2, 1fr); }
.print-a6-4 .print-sheet { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6mm;
    padding: 8mm;
    text-align: center;
    border: 1px dashed var(--line);
}

.qr-card-logo {
    display: block;
    max-width: 48mm;
    max-height: 16mm;
    margin: 0 auto 3mm;
    object-fit: contain;
}
.print-a5-1 .qr-card-logo { max-width: 70mm; max-height: 22mm; }
.qr-card-bare .qr-card-logo { margin-bottom: 0; }
.qr-card-head strong { display: block; font-size: 16pt; letter-spacing: -.02em; }
.qr-card-head span { display: block; margin-top: 2mm; font-size: 10pt; color: var(--muted); }
.qr-card-code { width: 55mm; }
.print-a5-1 .qr-card-code { width: 80mm; }
.qr-card-bare .qr-card-code { width: 70mm; }
.print-a5-1 .qr-card-bare .qr-card-code { width: 110mm; }
.qr-card-code svg { width: 100%; height: auto; display: block; }
.qr-card-foot strong { display: block; font-size: 11pt; }
.qr-card-foot span { display: block; margin-top: 1mm; font-size: 8pt; color: var(--muted); }

.qr-product-card { gap: 3mm; padding: 5mm; justify-content: flex-start; }
.qr-product-logo { max-width: 32mm; max-height: 10mm; margin-bottom: 0; }
.qr-product-photo {
    width: 100%;
    max-width: 42mm;
    max-height: 32mm;
    object-fit: contain;
    border-radius: 2mm;
    background: #f6f6f2;
}
.print-a5-1 .qr-product-photo { max-width: 60mm; max-height: 45mm; }
.qr-product-copy { display: flex; flex-direction: column; gap: 1.5mm; width: 100%; }
.qr-product-name { font-size: 11pt; line-height: 1.25; letter-spacing: -.02em; }
.qr-product-meta, .qr-product-desc, .qr-product-dims { font-size: 8pt; color: var(--muted); line-height: 1.35; }
.qr-product-price { font-size: 10pt; margin-top: 1mm; }
.qr-product-price s { margin-left: 2mm; color: var(--muted); font-size: 8pt; }
.qr-product-card .qr-card-code { width: 38mm; margin-top: auto; }
.print-a5-1 .qr-product-card .qr-card-code { width: 55mm; }

@media print {
    @page { size: A4 portrait; margin: 0; }
    .print-body { padding: 0; background: var(--paper); }
    .no-print { display: none !important; }
    .print-sheet { width: auto; min-height: auto; height: 297mm; margin: 0; box-shadow: none; }
    .qr-card { border-color: #e6e6e6; }
}

@media (max-width: 820px) {
    .print-sheet { width: 100%; min-height: auto; }
    .print-a6-4 .print-sheet { grid-template-columns: 1fr; }
}
