@page { size: A4; margin: 0; }
:root { --deep: #053b33; --green: #0a5a4e; --gold: #c9a24a; --gold2: #f0d68a; --cream: #fbf7ee; --ink: #12261f; }
* { box-sizing: border-box; }
body { margin: 0; background: #1c2422; font-family: "Cairo", Tahoma, sans-serif; color: var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tools { position: sticky; top: 0; z-index: 9; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; padding: 10px; background: #fff; }
.tools button, .tools a, .tools input, .tools select { padding: 8px 13px; border-radius: 9px; border: 1px solid var(--green); background: #fff; color: var(--green); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.tools .main, .tools button[aria-pressed="true"] { background: var(--green); color: #fff; }
.warn { background: #fff3cd; color: #6b5200; text-align: center; padding: 7px; font-size: 13px; font-weight: 700; }

.page { position: relative; width: 210mm; height: 297mm; margin: 16px auto; overflow: hidden; display: flex; flex-direction: column; background: var(--cream); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.page::after { content: ""; position: absolute; inset: 4mm; border: .35mm solid var(--gold); border-radius: 3mm; pointer-events: none; z-index: 4; }
.ft { display: flex; justify-content: space-between; align-items: center; padding: 2mm 11mm 6mm; font-size: 11px; font-weight: 700; color: var(--green); }
.ft b { border: .3mm solid var(--gold); border-radius: 99px; padding: 0 4mm; }
.stamp { position: absolute; bottom: 5.5mm; left: 40mm; z-index: 6; transform: rotate(-6deg); padding: 0 4mm; border: .5mm solid #c1121f; border-radius: 2mm; color: #c1121f; background: rgba(255,255,255,.92); font-size: 11px; font-weight: 800; pointer-events: none; }

/* cover */
.art { display: block; width: 100%; height: auto; }
.band { text-align: center; color: #fff; padding: 6mm 10mm 7mm; background: linear-gradient(180deg, var(--green), var(--deep)); border-top: 1.4mm solid var(--gold); border-bottom: 1.4mm solid var(--gold); }
.band h1 { margin: 0; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 66px; line-height: 1.25; font-weight: 700; color: var(--gold2); text-shadow: 0 1px 0 #b8923a, 0 2px 0 #9a7828, 0 6px 14px rgba(0,0,0,.45); }
.rule { display: flex; align-items: center; justify-content: center; gap: 4mm; font-size: 16px; font-weight: 700; color: #e8f1ee; }
.rule::before, .rule::after { content: ""; height: .35mm; width: 30mm; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.when { display: inline-block; margin-top: 3mm; padding: .5mm 9mm 1mm; border: .4mm solid var(--gold); border-radius: 99px; font-size: 15px; font-weight: 800; color: var(--gold2); }
.inside { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3mm; padding: 3mm 12mm; }
.inside b { width: 100%; text-align: center; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 22px; color: var(--green); }
.inside span { display: inline-flex; align-items: center; gap: 2mm; padding: 1.5mm 4mm; background: #fff; border: .3mm solid var(--gold); border-radius: 99px; font-size: 13px; font-weight: 800; }
.inside .ti { font-size: 18px; color: var(--gold); }
.order { display: flex; align-items: center; justify-content: space-between; gap: 5mm; margin: 0 9mm 3mm; padding: 2.5mm 5mm; border: .35mm solid var(--gold); border-radius: 3mm; background: #fff; font-size: 12.5px; font-weight: 700; }
.order img { height: 15mm; }
.order strong, .filler strong { display: block; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 20px; color: var(--green); line-height: 1.4; }
.qr { width: 18mm; height: 18mm; flex: none; background: #fff; }
.qr > div, .qr svg { width: 100%; height: 100%; display: block; }

/* deal of the week: marble + golden light */
.deal { background: var(--deep); }
.stage { position: relative; height: 178mm; display: flex; align-items: flex-end; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(255, 228, 150, .75) 0, rgba(255, 228, 150, .18) 30%, transparent 58%),
    repeating-conic-gradient(from 0deg at 50% 36%, rgba(255, 232, 165, .10) 0 5deg, transparent 5deg 15deg),
    linear-gradient(180deg, #0b6154, #04332c); }
.ribbon { position: absolute; top: 12mm; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 40px; color: #3a2a00; padding: 0 14mm 2mm; border-radius: 99px; background: linear-gradient(180deg, #fff3c4, #e8c15a 60%, #c99a2e); box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.podium { position: relative; width: 150mm; height: 135mm; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22mm; }
.podium::before { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 42mm; border-radius: 50%;
  background:
    linear-gradient(115deg, transparent 22%, rgba(150, 150, 160, .35) 23%, transparent 25%, transparent 55%, rgba(140, 140, 150, .28) 56%, transparent 59%),
    linear-gradient(70deg, transparent 40%, rgba(170, 160, 140, .3) 41%, transparent 43%),
    radial-gradient(ellipse at 50% 30%, #fff, #e8e4db 70%);
  box-shadow: 0 5mm 0 #b9933b, 0 6mm 0 #8a6a22, 0 14mm 16mm rgba(0,0,0,.45); }
.podium img { position: relative; max-width: 105mm; height: 105mm; width: auto; object-fit: contain; border-radius: 5mm; background: #fff; padding: 4mm; box-shadow: 0 8mm 14mm rgba(0,0,0,.35); }
.dealinfo { flex: 1; text-align: center; padding: 8mm 12mm 0; background: var(--cream); border-top: 1.4mm solid var(--gold); }
.dealinfo h2 { margin: 0; font-size: 30px; font-weight: 900; }
.dealprice { display: flex; align-items: center; justify-content: center; gap: 8mm; margin-top: 3mm; }
.dealprice .old { font-size: 28px; font-weight: 800; color: #9b9b92; } .dealprice del { text-decoration: line-through 3px #c1121f; }
.dealprice .new { display: inline-block; padding: 0 10mm 1mm; border-radius: 5mm; background: linear-gradient(180deg, var(--green), var(--deep)); border: .8mm solid var(--gold); color: var(--gold2); line-height: 1.25; }
.dealprice .new b { font-size: 68px; font-weight: 900; } .dealprice .new i { font-style: normal; font-size: 18px; color: #fff; }
.youSave { display: inline-block; margin-top: 4mm; padding: .5mm 7mm 1mm; background: #c1121f; color: #fff; border-radius: 99px; font-size: 18px; font-weight: 800; }
.dealinfo p { margin: 3mm 0 0; font-size: 13px; color: #55645f; }

/* category corners */
.inner { padding-top: 4mm; }
.corner { flex-basis: 0; min-height: 0; display: flex; flex-direction: column; padding: 0 9mm; }
.chead { display: flex; align-items: center; gap: 3mm; margin-top: 3mm; padding: 1.5mm 4mm; border-radius: 3mm; background: linear-gradient(90deg, var(--deep), var(--green)); border-bottom: .8mm solid var(--gold); color: #fff; }
.chead h2 { margin: 0; flex: 1; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 24px; color: var(--gold2); line-height: 1.35; }
.chead img { height: 9mm; background: #fff; border-radius: 2mm; padding: .5mm 2mm; }
.medal { width: 11mm; height: 11mm; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #fff3c4, #c99a2e); color: var(--deep); font-size: 20px; }
.grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5mm; padding: 3mm 0 1mm; }
.it { position: relative; display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, #fff 55%, #f6efdd); border-radius: 3mm; border: .3mm solid #e6dcc2; box-shadow: 0 3px 14px rgba(70,55,10,.09); overflow: hidden; }
.ph { position: relative; flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; padding: 3mm 3mm 5mm; }
.ph img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: bottom; mix-blend-mode: multiply; }
.shelf { position: absolute; left: 3mm; right: 3mm; bottom: 1.5mm; height: 4.5mm; border-radius: 1mm;
  background: repeating-linear-gradient(92deg, rgba(90, 55, 20, .18) 0 .6mm, transparent .6mm 3mm), linear-gradient(180deg, #d9ad72 0 35%, #a87440 36%, #8a5b2d);
  box-shadow: 0 2mm 3mm rgba(60, 35, 5, .28); }
.noimg { position: relative; z-index: 1; align-self: center; font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 18px; color: var(--gold); text-align: center; line-height: 1.7; }
.nm { padding: 0 2.5mm; height: 10mm; overflow: hidden; text-align: center; font-size: 13px; font-weight: 800; line-height: 1.5; margin-top: 1mm; }
.nm small { color: #8a8a80; font-weight: 500; }
.plate { display: flex; align-items: center; justify-content: space-between; gap: 2mm; margin-top: 1mm; padding: 1mm 3.5mm 1.2mm; background: linear-gradient(90deg, var(--deep), var(--green)); border-top: .5mm solid var(--gold); }
.plate del { color: #9fbdb5; font-size: 13px; font-weight: 700; }
.plate .now { color: var(--gold2); white-space: nowrap; }
.plate .now b { font-size: 24px; font-weight: 800; line-height: 1.25; } .plate .now i { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.save { position: absolute; top: 0; right: 0; z-index: 2; padding: .3mm 3mm .8mm; background: var(--gold); color: #3a2a00; font-size: 11px; font-weight: 800; border-radius: 0 0 0 3mm; }
.add { position: absolute; z-index: 3; top: 2mm; left: 2mm; width: 9mm; height: 9mm; border-radius: 50%; border: .5mm solid #fff; background: var(--green); color: #fff; font: inherit; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .15s; }
.add:hover { transform: scale(1.12); }
.add.done { background: #22a06b; }
.add.big { position: absolute; top: auto; bottom: 6mm; left: 10mm; width: auto; height: auto; border-radius: 99px; padding: 2mm 7mm; font-size: 15px; background: var(--gold2); color: #3a2a00; }
.promo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5mm; min-height: 0; border-radius: 3mm; border: .6mm solid var(--gold); background: linear-gradient(160deg, var(--green), var(--deep)); color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 2mm; }
.promo strong { font-family: "Reem Kufi", "Cairo", sans-serif; font-size: 19px; color: var(--gold2); line-height: 1.4; }
.promo .qr { padding: 1mm; border-radius: 2mm; }
.filler { flex-basis: 0; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 6mm; margin: 4mm 9mm 2mm; border: .5mm dashed var(--gold); border-radius: 4mm; font-size: 14px; font-weight: 700; }
.filler .qr { width: 26mm; height: 26mm; }
.inner > .ft { margin-top: auto; }

/* magazine mode */
.pager { position: fixed; z-index: 20; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 99px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); font-weight: 800; white-space: nowrap; }
.pager[hidden] { display: none; }
.pager button { border: 0; border-radius: 99px; padding: 8px 18px; background: var(--green); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.cartfab { position: fixed; z-index: 21; top: 76px; left: 14px; padding: 9px 16px; border-radius: 99px; background: var(--gold2); color: #3a2a00; font-weight: 800; text-decoration: none; box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.cartfab[hidden] { display: none; }
body.mag { overflow: hidden; }
body.mag .warn { display: none; }
body.mag #book { position: relative; height: calc(100vh - var(--tools-h, 60px)); overflow: hidden; perspective: 2400px; }
body.mag #book .page { position: absolute; top: 8px; left: 50%; margin: 0; transform-origin: top center; transform: translateX(-50%) scale(var(--fit, .6)); display: none; }
body.mag #book .page.is-on { display: flex; animation: turn .5s cubic-bezier(.2,.7,.2,1); }
body.mag #book .page.is-on.back { animation-name: turnback; }
@keyframes turn { from { opacity: 0; transform: translateX(-50%) scale(var(--fit)) rotateY(-28deg); } }
@keyframes turnback { from { opacity: 0; transform: translateX(-50%) scale(var(--fit)) rotateY(28deg); } }
@media (prefers-reduced-motion: reduce) { body.mag #book .page.is-on { animation: none; } .add { transition: none; } }
@media screen and (max-width: 830px) { body:not(.mag) .page { zoom: .46; } .tools { font-size: 12px; } .tools input { max-width: 130px; } }
@media print { body { background: #fff; } .tools, .warn, .noexp { display: none !important; } .page { margin: 0; box-shadow: none; break-after: page; zoom: 1; } body.mag { overflow: visible; } body.mag #book { height: auto; overflow: visible; } body.mag #book .page { position: relative; display: flex; left: auto; top: auto; transform: none; } }
