/* Print documents: quotes, invoices, brochures. A4, bilingual (RTL/LTR), saved as PDF from the print dialog. */
:root {
  --ink: #15181a; --ink-2: #50565a; --muted: #7a7f84; --line: #e4e0d7; --soft: #f6f4ef;
  --accent: #0b6b45; --accent-soft: #e3eee7; --gold: #b98a2e;
  --font-display: 'Manrope', system-ui, sans-serif; --font-body: 'Instrument Sans', system-ui, sans-serif;
}
:lang(ar) { --font-display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif; --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body.print { background: #dcd8cf; color: var(--ink); font-family: var(--font-body); font-size: 10.5pt; line-height: 1.55; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@page { size: A4; margin: 0; }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; justify-content: center; align-items: center; padding: 12px; background: #1b1f1d; color: #fff; font: 14px/1 var(--font-body); }
.toolbar button, .toolbar a { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; background: #fff; color: #111; text-decoration: none; }
.toolbar button.primary { background: var(--accent); color: #fff; }
.toolbar span { opacity: .75; }
.page { position: relative; width: 210mm; min-height: 297mm; margin: 10mm auto; background: #fff; padding: 16mm 16mm 20mm; box-shadow: 0 6px 30px rgba(0,0,0,.18); overflow: hidden; break-after: page; page-break-after: always; }
.page:last-child { break-after: auto; page-break-after: auto; }
@media print {
  body.print { background: none; }
  .toolbar { display: none; }
  .page { margin: 0; box-shadow: none; }
}
.page h1, .page h2, .page h3 { font-family: var(--font-display); margin: 0; line-height: 1.2; }
.page:lang(en) h1, .page:lang(en) h2 { letter-spacing: -0.01em; }
.page .muted { color: var(--muted); }
.page .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Document header / footer */
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 10mm; border-bottom: 2px solid var(--ink); }
.doc-head img.logo { height: 16mm; width: auto; }
.doc-head .doc-title { text-align: end; }
.doc-head .doc-title h1 { font-size: 22pt; }
.doc-head .doc-title .ref { font: 700 11pt var(--font-display); color: var(--accent); direction: ltr; unicode-bidi: isolate; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin: 8mm 0; }
.doc-meta h3 { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2mm; font-family: var(--font-body); }
:lang(ar) .doc-meta h3 { letter-spacing: 0; text-transform: none; }
.doc-meta p { margin: 0; }
.doc-foot { position: absolute; inset-inline: 16mm; bottom: 9mm; display: flex; justify-content: space-between; gap: 10px; font-size: 8pt; color: var(--muted); border-top: 1px solid var(--line); padding-top: 3mm; }

/* Line items */
table.lines { width: 100%; border-collapse: collapse; margin-top: 4mm; }
table.lines th { font-size: 8.5pt; text-align: start; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--ink); padding: 2.5mm 2mm; }
table.lines td { padding: 3mm 2mm; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lines td.thumb { width: 16mm; }
table.lines td.thumb img { width: 14mm; height: 14mm; object-fit: contain; border-radius: 2mm; background: var(--soft); display: block; }
table.lines td .kind { display: inline-block; font-size: 7.5pt; color: var(--accent); background: var(--accent-soft); border-radius: 2mm; padding: .4mm 1.6mm; margin-inline-start: 2mm; }
table.lines th.r, table.lines td.r { text-align: end; }
.totals { margin-inline-start: auto; width: 78mm; margin-top: 5mm; }
.totals div { display: flex; justify-content: space-between; padding: 1.6mm 0; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 1mm; padding-top: 2.5mm; font: 800 14pt var(--font-display); }
.totals .due { color: var(--accent); font-weight: 700; }
.notes { margin-top: 7mm; padding: 4mm 5mm; background: var(--soft); border-radius: 3mm; white-space: pre-line; }
.terms { margin-top: 6mm; font-size: 8.5pt; color: var(--ink-2); }
.terms ol { margin: 1mm 0 0; padding-inline-start: 5mm; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 12mm; }
.sign div { border-top: 1px solid var(--ink); padding-top: 2mm; font-size: 8.5pt; color: var(--muted); }
.stamp { display: inline-block; border: 2px solid var(--accent); color: var(--accent); border-radius: 3mm; padding: 2mm 4mm; font: 800 11pt var(--font-display); transform: rotate(-3deg); }

/* Brochures ------------------------------------------------------------------------------------------
   Editorial A4 pages: every page is exactly one sheet (no spill-over). Cover, contents, chapter openers
   with a full-bleed photo, a feature page per chapter, range pages without boxes, a running head and
   folio on every inside page, and a dark back cover. */
.page.bro { height: 297mm; min-height: 0; padding: 0; display: flex; flex-direction: column; --stone: #ece7dd; --night: #121614; }
/* Printing: each brochure page fills exactly the printable area of one sheet, whatever the paper or
   margins chosen in the print dialog. A page even a fraction of a millimetre taller than the sheet
   spills onto a second, empty sheet (every page doubled). */
@media print {
  html, body { width: 100%; }
  .page.bro { width: 100%; height: 100vh; max-height: 297mm; margin: 0; break-inside: avoid; }
}
.bro .bro-in { padding: 0 16mm; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.bro .kicker { font: 600 8.5pt var(--font-body); color: var(--gold); text-transform: uppercase; letter-spacing: .14em; }
:lang(ar) .bro .kicker { text-transform: none; letter-spacing: 0; font-size: 10pt; }
.bro h2, .bro h3 { color: var(--ink); }
.bro .tag { display: inline-flex; align-items: center; height: 7.5mm; padding: 0 3.2mm; border-radius: 999px; background: var(--ink); color: #fff; font: 700 9.5pt var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bro .tag.req { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 .3mm var(--gold); font-size: 8.5pt; }
.bro .tag.big { height: 10mm; padding: 0 4.5mm; font-size: 13pt; }
.bro .qr svg { display: block; width: 13mm; height: 13mm; }
.bro .sku { font-size: 7.5pt; color: var(--muted); direction: ltr; unicode-bidi: isolate; }

/* running head + folio */
.run-head { display: flex; justify-content: space-between; align-items: center; margin: 9mm 16mm 7mm; padding-bottom: 2.5mm; border-bottom: .25mm solid var(--ink); font: 600 8pt var(--font-body); color: var(--ink-2); }
.run-head b { font: 800 8pt var(--font-display); color: var(--gold); margin-inline-end: 2.5mm; }
.run-head .rh-brand { font: 800 8pt var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.folio { display: flex; align-items: center; gap: 4mm; margin: auto 16mm 0; padding: 4mm 0 8mm; font-size: 7.5pt; color: var(--muted); }
.folio .fo-title { flex: 1; }
.folio .fo-no { font: 800 11pt var(--font-display); color: var(--ink); min-width: 9mm; text-align: end; }

/* cover */
.bro.cover { position: relative; background: var(--night); color: #f3efe6; }
.cover .cv-art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cover .cv-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,22,20,.55) 0%, rgba(18,22,20,0) 22%, rgba(18,22,20,0) 45%, rgba(18,22,20,.92) 78%, var(--night) 100%); }
.cover .cv-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14mm 16mm 0; font-size: 9pt; color: #e6e0d3; }
.cover .cv-top img { height: 12mm; filter: brightness(0) invert(1); }
.cover .cv-text { position: relative; margin-top: auto; padding: 0 16mm 16mm; }
.cover .cv-kicker { display: inline-block; font: 600 9.5pt var(--font-body); color: #d9b36a; border-top: .5mm solid #d9b36a; padding-top: 2.5mm; }
.cover h1 { font-size: 44pt; line-height: 1.08; color: #fff; margin: 5mm 0 4mm; max-width: 165mm; }
:lang(ar) .cover h1 { line-height: 1.3; }
.cover p { font-size: 12.5pt; color: #d6cfbf; max-width: 140mm; margin: 0; }
.cover .cv-chapters { list-style: none; margin: 11mm 0 0; padding: 4mm 0 0; border-top: .25mm solid rgba(255,255,255,.25); display: flex; flex-wrap: wrap; gap: 2mm 7mm; font-size: 9pt; color: #e6e0d3; }
.cover .cv-chapters b { font: 800 9pt var(--font-display); color: #d9b36a; margin-inline-end: 1.6mm; }

/* contents */
.bro.toc .bro-in { padding-top: 22mm; }
.toc .toc-title { font-size: 30pt; margin: 3mm 0 10mm; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { display: grid; grid-template-columns: 14mm 22mm 1fr auto; gap: 5mm; align-items: center; padding: 4mm 0; border-top: .25mm solid var(--line); }
.toc-list li:last-child { border-bottom: .25mm solid var(--line); }
.toc-no { font: 800 18pt var(--font-display); color: var(--gold); }
.toc-list img, .toc-ph { width: 22mm; height: 15mm; border-radius: 1.5mm; object-fit: cover; background: var(--stone); display: block; }
.toc-name b { display: block; font: 700 12.5pt var(--font-display); }
.toc-name small { display: block; font-size: 8.5pt; color: var(--muted); margin-top: .8mm; }
.toc-page { font: 700 12pt var(--font-display); font-variant-numeric: tabular-nums; }
.toc-art { flex: 1; min-height: 0; margin: 10mm 0 6mm; background: var(--stone) center / cover; }
.toc-note { margin-top: auto; margin-bottom: 4mm; display: grid; gap: 1.5mm; padding: 5mm 6mm; background: var(--soft); border-inline-start: 1mm solid var(--accent); font-size: 9pt; color: var(--ink-2); }
.toc-note b { font: 700 10pt var(--font-display); color: var(--ink); }

/* about */
.about .ab-art { height: 112mm; background: var(--stone) center / cover; }
.about .bro-in { padding-top: 10mm; }
.about .ab-lead { font: 600 15pt/1.45 var(--font-display); color: var(--ink); margin: 3mm 0 9mm; max-width: 170mm; }
.about .ab-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
.about h3 { font-size: 11pt; margin-bottom: 3mm; }
ol.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: 2.2mm; }
ol.numbered li { counter-increment: n; display: grid; grid-template-columns: 8mm 1fr; font-size: 9.5pt; color: var(--ink-2); line-height: 1.45; }
ol.numbered li::before { content: counter(n, decimal-leading-zero); font: 800 8.5pt var(--font-display); color: var(--gold); padding-top: .4mm; }
.about .ab-stats { margin-top: auto; margin-bottom: 2mm; display: grid; grid-template-columns: repeat(3, 1fr); border-top: .5mm solid var(--ink); }
.about .ab-stats div { padding: 5mm 0 0; }
.about .ab-stats div + div { border-inline-start: .25mm solid var(--line); padding-inline-start: 6mm; }
.about .ab-stats strong { display: block; font: 800 26pt var(--font-display); color: var(--ink); line-height: 1.1; }
.about .ab-stats span { font-size: 8.5pt; color: var(--muted); }

/* chapter opener */
.opener .op-art { height: 168mm; background: var(--stone) center / cover; }
.opener .op-band { display: flex; align-items: flex-end; gap: 7mm; padding: 0 16mm; margin-top: -21mm; position: relative; }
.opener .op-no { font: 800 64pt/0.9 var(--font-display); color: #fff; text-shadow: 0 1mm 6mm rgba(0,0,0,.35); }
.opener .op-band > div { background: #fff; padding: 6mm 7mm 5mm; flex: 1; box-shadow: 0 2mm 10mm rgba(0,0,0,.06); }
.opener h2 { font-size: 26pt; line-height: 1.15; }
.opener .op-band p { margin: 2mm 0 0; font-size: 10.5pt; color: var(--ink-2); }
.opener .op-in { padding-top: 7mm; }
.op-list { list-style: none; margin: 3mm 0 0; padding: 0; columns: 2; column-gap: 10mm; font-size: 9pt; color: var(--ink-2); }
.op-list li { break-inside: avoid; padding: 1.4mm 0; border-bottom: .2mm solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-list li.more { color: var(--gold); font-weight: 600; border-bottom: 0; }

/* feature / spec page */
.feature .ft-stage { position: relative; margin: 0 16mm; height: 120mm; background: radial-gradient(ellipse at 50% 60%, #fff 0%, var(--soft) 55%, var(--stone) 100%); display: flex; align-items: center; justify-content: center; }
.feature.is-spec .ft-stage { height: 105mm; }
.feature .ft-stage img { max-width: 82%; max-height: 92%; object-fit: contain; mix-blend-mode: multiply; }
.feature .ft-flag { position: absolute; top: 5mm; inset-inline-start: 5mm; font: 700 8pt var(--font-body); color: #fff; background: var(--accent); padding: 1.2mm 3mm; }
.feature .ft-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 9mm; padding-top: 8mm; align-content: start; }
.feature h3 { font-size: 19pt; line-height: 1.25; }
.feature .ft-lead { margin: 3mm 0 0; font-size: 10.5pt; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
ul.ticks { list-style: none; margin: 5mm 0 0; padding: 0; display: grid; gap: 2.4mm; }
ul.ticks li { position: relative; padding-inline-start: 6mm; font-size: 9.5pt; color: var(--ink); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
ul.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.3mm; width: 3.2mm; height: 1.8mm; border-inline-start: .55mm solid var(--accent); border-bottom: .55mm solid var(--accent); transform: rotate(-45deg); }
:lang(ar) ul.ticks li::before { transform: rotate(45deg) scaleX(-1); }
.feature .ft-side { display: flex; flex-direction: column; gap: 5mm; }
dl.specs { margin: 0; border-top: .5mm solid var(--ink); }
dl.specs > div { display: grid; grid-template-columns: 40% 1fr; gap: 3mm; padding: 2mm 0; border-bottom: .2mm solid var(--line); font-size: 8.5pt; }
dl.specs dt { color: var(--muted); }
dl.specs dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.feature .ft-buy { display: flex; justify-content: space-between; align-items: center; gap: 4mm; }
.feature .ft-buy .qr svg { width: 18mm; height: 18mm; }

/* range pages: no boxes, hairlines between rows */
.range .pg-title { margin-bottom: 7mm; }
.range .pg-title h2 { font-size: 26pt; margin-top: 1mm; }
.range-grid { display: grid; column-gap: 8mm; row-gap: 0; align-content: start; }
.range-grid.g2 { grid-template-columns: 1fr 1fr; }
.range-grid.g3 { grid-template-columns: 1fr 1fr 1fr; column-gap: 6mm; }
.r-item { display: flex; flex-direction: column; gap: 1.6mm; padding: 3.5mm 0 4mm; border-top: .25mm solid var(--line); break-inside: avoid; min-width: 0; }
.range-grid.g2 .r-item:nth-child(-n+2), .range-grid.g3 .r-item:nth-child(-n+3) { border-top: .5mm solid var(--ink); }
.r-img { background: var(--soft); height: 36mm; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5mm; }
.range-grid.g3 .r-img { height: 34mm; }
.range-grid.g3.tall .r-img { height: 66mm; }
.r-img img { max-width: 86%; max-height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.r-item h3 { font-size: 11pt; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.range-grid.g3 .r-item h3 { font-size: 9.5pt; }
.r-sum { margin: 0; font-size: 8.5pt; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.range-grid.g3 .r-sum { -webkit-line-clamp: 2; font-size: 8pt; }
.r-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 3mm; padding-top: 1.5mm; }
.range-grid.g3 .qr svg { width: 10mm; height: 10mm; }
.range-grid.g2 .qr svg { width: 11mm; height: 11mm; }

/* price list */
.pricelist { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.pricelist th { text-align: start; font-size: 8pt; color: var(--muted); border-bottom: .5mm solid var(--ink); padding: 2mm; }
.pricelist td { border-bottom: .2mm solid var(--line); padding: 2.1mm 2mm; }
.pricelist tr.group td { background: var(--soft); color: var(--ink); font: 700 10pt var(--font-display); padding-top: 3.5mm; border-bottom: .5mm solid var(--ink); }
.pricelist .sku-cell { color: var(--muted); font-size: 8.5pt; }

/* back cover */
.bro.back { background: var(--night); color: #e9e3d6; justify-content: center; }
.back .bk-in { padding: 0 22mm; display: flex; flex-direction: column; gap: 6mm; }
.back img { height: 14mm; width: max-content; filter: brightness(0) invert(1); }
.back h2 { font-size: 32pt; line-height: 1.2; color: #fff; max-width: 150mm; margin-top: 6mm; }
.back p { margin: 0; font-size: 12pt; color: #bfb7a6; }
.back .bk-grid { display: grid; grid-template-columns: 1fr auto; gap: 12mm; align-items: end; margin-top: 12mm; padding-top: 8mm; border-top: .25mm solid rgba(255,255,255,.2); }
.back .bk-contacts { font-size: 11.5pt; line-height: 2; }
.back .bk-contacts .dim { color: #9d9686; font-size: 10pt; }
.back .bk-qr { display: grid; justify-items: center; gap: 2.5mm; }
.back .bk-qr .qr { background: #fff; padding: 2.5mm; display: block; }
.back .bk-qr .qr svg { width: 30mm; height: 30mm; }
.back .bk-qr small { font-size: 8pt; color: #bfb7a6; }
.feature .ft-also { flex: 0 0 auto; padding-top: 6mm; }
.feature .ft-also .range-grid { margin-top: 2.5mm; }
.feature .ft-also .r-img { height: 34mm; }
.feature:has(.ft-also) .ft-stage { height: 104mm; }

/* feature page with an AI in-use photo: the scene full width, the real product inset */
.feature .ft-stage.has-scene { background: var(--stone) center / cover; }
.feature .ft-inset { position: absolute; bottom: 5mm; inset-inline-end: 5mm; width: 34mm; height: 34mm; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2mm 8mm rgba(0,0,0,.18); }
.feature .ft-inset img { max-width: 88%; max-height: 88%; object-fit: contain; mix-blend-mode: normal; }

/* contents page with many chapters: tighter rows; two columns from ten chapters */
.toc.dense .toc-title { font-size: 24pt; margin: 2mm 0 6mm; }
.toc.dense .toc-list li { grid-template-columns: 11mm 16mm 1fr auto; gap: 3.5mm; padding: 2.4mm 0; }
.toc.dense .toc-no { font-size: 14pt; }
.toc.dense .toc-list img, .toc.dense .toc-ph { width: 16mm; height: 11mm; }
.toc.dense .toc-name b { font-size: 11pt; }
.toc.dense .toc-name small { font-size: 8pt; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.toc.two .toc-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 9mm; }
.toc.two .toc-list li:last-child { border-bottom: 0; }
.toc.two .toc-list li:nth-last-child(-n+2) { border-bottom: .25mm solid var(--line); }

/* QR poster (catalog.zonixtec.net/qr): one A4 sheet, a large QR code to the live catalogue */
.bro.poster { background: #fff; }
.poster .ps-top { display: flex; justify-content: space-between; align-items: center; padding: 16mm 18mm 0; font-size: 10pt; color: var(--ink-2); }
.poster .ps-top img { height: 13mm; }
.poster .ps-main { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10mm 18mm 0; }
.poster .ps-kicker { font: 600 11pt var(--font-body); color: var(--gold); border-top: .6mm solid var(--gold); padding-top: 2.5mm; }
.poster h1 { font-size: 34pt; line-height: 1.2; margin: 6mm 0 3mm; max-width: 165mm; }
.poster .ps-main p { margin: 0; font-size: 13pt; color: var(--ink-2); max-width: 150mm; }
.poster .ps-qr { margin-top: 10mm; padding: 6mm; border: .5mm solid var(--ink); border-radius: 5mm; }
.poster .ps-qr svg { display: block; width: 112mm; height: 112mm; }
.poster .ps-url { margin-top: 5mm; font: 800 17pt var(--font-display); letter-spacing: .02em; }
.poster .ps-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm; height: 30mm; margin: 8mm 18mm 0; }
.poster .ps-strip span { background: var(--stone) center / cover; border-radius: 2mm; }
.poster .ps-foot { padding: 6mm 18mm 12mm; text-align: center; font-size: 10.5pt; color: var(--ink-2); }

/* QR stickers (catalog.zonixtec.net/qr/stickers): 12 cut-out cards on one A4 sheet */
.bro.stickers { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); padding: 8mm; gap: 0; }
.stickers .st-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6mm; border: .25mm dashed #b9b3a6; text-align: center; padding: 3mm; }
.stickers .st-card img { height: 6mm; }
.stickers .st-qr svg { display: block; width: 40mm; height: 40mm; }
.stickers .st-card b { font: 700 10pt var(--font-display); }
.stickers .st-card small { font-size: 7.5pt; color: var(--ink-2); }

/* On screens narrower than an A4 page (phones), pages are zoomed to fit (--fit is set by catalog.js);
   printing is unaffected. */
@media screen {
  .page { zoom: var(--fit, 1); }
  .toolbar { flex-wrap: wrap; }
}
@media screen and (max-width: 640px) {
  .page { margin: 8px auto; }
  .toolbar { gap: 8px; padding: 10px; font-size: 13px; }
  .toolbar span { flex-basis: 100%; text-align: center; }
}
