/* MegaSham flyers (2026-10-16): «نشرة التاجر» merchant_flyer.php and «نشرة السائق» driver_flyer.php — two A4 sheets, print / PDF.
   .drv on <body> = the driver's colours (blue). */
    :root { --g: #0F6E56; --g2: #064e3b; --gold: #FAC775; --ink: #0f172a; --mut: #475569; --or: #d97706; }
    * { box-sizing: border-box; }
    body { margin: 0; font-family: Cairo, Tahoma, Arial, sans-serif; color: var(--ink); background: #e2e8f0; line-height: 1.7; }
    .bar { position: sticky; top: 0; z-index: 5; background: #0f172a; padding: 10px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
    .bar a, .bar button { font: 800 15px Cairo, Tahoma; border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
    .bar .p { background: #22c55e; color: #fff; } .bar .w { background: #25D366; color: #073042; } .bar .b { background: #334155; color: #fff; }
    .note { text-align: center; color: #334155; font-size: 13px; padding: 6px 10px 0; }
    .sheet { width: 210mm; min-height: 297mm; margin: 14px auto; background: #fff; padding: 12mm 12mm 10mm; position: relative; overflow: hidden; box-shadow: 0 4px 22px rgba(0,0,0,.15); }
    .hero { background: linear-gradient(135deg, var(--g2), var(--g) 60%, #10b981); color: #fff; border-radius: 18px; padding: 16px 20px; display: flex; gap: 16px; align-items: center; }
    .hero img.logo { width: 74px; height: 74px; border-radius: 18px; background: #fff; padding: 6px; flex-shrink: 0; }
    .hero h1 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 800; }
    .hero p { margin: 4px 0 0; color: #d1fae5; font-size: 15px; }
    .tag { display: inline-block; background: var(--gold); color: #3f2d00; font-weight: 800; border-radius: 999px; padding: 2px 12px; font-size: 13px; margin-top: 6px; }
    h2 { font-size: 21px; margin: 14px 0 6px; color: var(--g); font-weight: 800; display: flex; align-items: center; gap: 8px; }
    h2 .n { background: var(--g); color: #fff; border-radius: 10px; padding: 0 10px; font-size: 15px; }
    .lead { color: var(--mut); margin: 0 0 8px; font-size: 14.5px; }
    .shots { display: grid; grid-template-columns: 1fr 1fr 0.62fr; gap: 10px; align-items: start; }
    .shots figure { margin: 0; } .shots img { width: 100%; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: block; }
    .shots figcaption { font-size: 12.5px; color: var(--mut); text-align: center; margin-top: 4px; font-weight: 700; }
    .wow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
    .wow div { border: 2px solid #fde68a; background: #fffbeb; border-radius: 14px; padding: 8px 12px; }
    .wow b { color: #92400e; font-size: 15.5px; display: block; }
    .wow span { font-size: 13.5px; color: #44403c; }
    .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .f { border: 1px solid #a7f3d0; background: #ecfdf5; border-radius: 14px; padding: 7px 11px; line-height: 1.55; }
    .f b { display: block; color: #065f46; font-size: 15px; } .f span { font-size: 13px; color: #334155; }
    .steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .steps div { counter-increment: s; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px; font-size: 13.5px; position: relative; padding-top: 34px; }
    .steps div::before { content: counter(s); position: absolute; top: 8px; right: 10px; background: var(--or); color: #fff; font-weight: 800; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; }
    .cta { margin-top: 12px; background: var(--g2); color: #fff; border-radius: 18px; padding: 14px 18px; display: flex; gap: 16px; align-items: center; }
    .cta .qr { background: #fff; border-radius: 12px; padding: 6px; width: 118px; flex-shrink: 0; } .cta .qr svg { display: block; width: 100%; height: auto; }
    .cta h3 { margin: 0 0 4px; font-size: 21px; color: var(--gold); } .cta p { margin: 2px 0; font-size: 14.5px; }
    .cta .big { font-size: 17px; font-weight: 800; direction: ltr; unicode-bidi: embed; }
    .free { text-align: center; margin: 10px 0 0; font-weight: 800; color: var(--g); font-size: 16px; }
    /* the site name stands out on every printed page (2026-10-16): a green band at the foot, a pill in the opening, big in the call */
    .foot { position: absolute; bottom: 5mm; left: 12mm; right: 12mm; display: flex; justify-content: space-between; align-items: center; background: var(--g); color: #fff; border-radius: 12px; padding: 5px 14px; }
    .foot .site { font-size: 22px; font-weight: 800; direction: ltr; letter-spacing: .3px; } .foot .site i { color: var(--gold); font-style: normal; }
    .foot .nm { font-size: 15px; font-weight: 800; } .foot .pg { font-size: 11.5px; color: #d1fae5; }
    .hero .url { margin-inline-start: auto; align-self: flex-start; background: #fff; color: var(--g2); font-weight: 800; font-size: 20px; border-radius: 12px; padding: 4px 12px; direction: ltr; white-space: nowrap; }
    .cta .site { font-size: 30px; font-weight: 800; color: var(--gold); direction: ltr; unicode-bidi: embed; display: block; line-height: 1.2; margin: 2px 0 4px; text-align: right; }
    @media screen and (max-width: 820px) {   /* phones only: the printed A4 (≈ 794 px wide) keeps the two-page layout */
        .sheet { width: auto; min-height: 0; margin: 10px; padding: 14px 12px 40px; }
        .shots { grid-template-columns: 1fr 1fr; } .shots figure:last-child { grid-column: 1 / -1; max-width: 60%; margin: 0 auto; }
        .wow, .grid { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr 1fr; }
        .hero h1 { font-size: 23px; } .cta { flex-direction: column; text-align: center; }
        .hero { flex-wrap: wrap; } .hero .url { margin: 0 auto; font-size: 17px; } .cta .site { text-align: center; }
        .foot .nm { display: none; } .foot .site { font-size: 18px; }
    }
    @page { size: A4; margin: 0; }
    @media print {
        body { background: #fff; } .bar, .note { display: none !important; }
        .sheet { margin: 0; box-shadow: none; page-break-after: always; break-after: page; width: 210mm; height: 297mm; min-height: 0; }
        .sheet:last-child { page-break-after: auto; break-after: auto; }
        * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
        /* iPhone / iPad (2026-10-16): Safari ignores «@page margin: 0» and adds its own margins, so each full A4 sheet spilled onto two
           pages (4 pages instead of 2). There the sheet prints a little smaller (html.ms-flyer-ios, set by the flyers) to fit its page. */
        html.ms-flyer-ios .sheet { zoom: 0.84; }
    }

/* the driver's flyer */
body.drv { --g: #1d4ed8; --g2: #1e3a8a; --or: #0891b2; }
body.drv .f { border-color: #bfdbfe; background: #eff6ff; } body.drv .f b { color: #1e3a8a; }
.duo { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.duo img { width: 100%; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: block; }
.duo figcaption { font-size: 12.5px; color: var(--mut); text-align: center; margin-top: 4px; font-weight: 700; }
.duo figure { margin: 0; }
.pts { list-style: none; margin: 0; padding: 0; } .pts li { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 7px 11px; margin-bottom: 7px; font-size: 13.5px; line-height: 1.55; }
.pts li b { display: block; color: #1e3a8a; font-size: 15px; }
.shots2 { display: grid; grid-template-columns: 240px 135px; gap: 18px; align-items: end; justify-content: center; }   /* fits above the foot band of A4 */
.shots2 figure { margin: 0; } .shots2 img { width: 100%; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: block; }
.shots2 figcaption { font-size: 12.5px; color: var(--mut); text-align: center; margin-top: 4px; font-weight: 700; }
@media screen and (max-width: 820px) { .duo, .shots2 { grid-template-columns: 1fr; } .shots2 figure:first-child { max-width: 100%; } .shots2 figure:last-child { max-width: 60%; margin: 0 auto; } }

/* the customer's flyer (2026-10-16): purple, and the four ways an order reaches him */
body.cus { --g: #6d28d9; --g2: #4c1d95; --or: #db2777; }
body.cus .f { border-color: #ddd6fe; background: #f5f3ff; } body.cus .f b { color: #4c1d95; }
body.cus .pts li { background: #f5f3ff; border-color: #ddd6fe; } body.cus .pts li b { color: #4c1d95; }
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ways div { border: 2px solid #e2e8f0; border-radius: 16px; padding: 10px 10px 8px; text-align: center; font-size: 13px; color: #334155; line-height: 1.5; position: relative; }
.ways div .ic { font-size: 30px; display: block; line-height: 1.2; }
.ways div b { display: block; font-size: 15.5px; color: #0f172a; margin: 2px 0; }
.ways div.star { border-color: #7c3aed; background: #f5f3ff; box-shadow: 0 4px 14px rgba(124,58,237,.18); }
.ways div.star::after { content: 'جديد ومميّز'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #db2777; color: #fff; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
@media screen and (max-width: 820px) { .ways { grid-template-columns: 1fr 1fr; } }