/* Palette & type from the design sheet (out/design/design-sheet.pdf). */
:root {
  --ink: #2B2A33; --paper: #FFF6E5; --red: #E8553E; --orange: #F5A33A; --yellow: #FFD45C;
  --green: #7BC67E; --teal: #3FB7B0; --blue: #5B9BE6; --purple: #A07BD8; --pink: #F49AB4;
  --brown: #B07A4E; --grey: #A9A9B5;
  --muted: #6d675e; --line: #e5d6bd; --card: #fffdf8;
  --bw: 2.5px; --r: 18px; --shadow: 4px 4px 0 var(--ink);
  --lat: "Andika", system-ui, sans-serif;
  --ara: "Baloo Bhaijaan 2", "Andika", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--lat); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; }
html[dir="rtl"] body { font-family: var(--ara); font-size: 17px; }
[lang="ar"], [dir="rtl"] { font-family: var(--ara); }
[lang="fr"], [lang="en"] { font-family: var(--lat); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.5; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.small { font-size: 13px; color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: var(--bw) solid var(--ink);
  border-radius: 999px; background: #fff; font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--red); color: #fff; }
.btn.wa { background: var(--green); }
.btn.yellow { background: var(--yellow); }
.btn.sm { padding: 6px 12px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--paper); border-bottom: var(--bw) solid var(--ink); }
.hdr { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; padding: 8px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; }
.logo img { height: 52px; width: auto; flex: none; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover, .nav a[aria-current] { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.nav-cart svg { width: 20px; height: 20px; }
.cart-count { background: var(--red); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; font-size: 13px;
  display: inline-grid; place-items: center; border: 2px solid var(--ink); font-family: var(--lat); }
.cart-count[hidden] { display: none; }
.lang-switch { display: flex; border: var(--bw) solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button { border: 0; background: none; padding: 5px 11px; font-weight: 700; font-size: 14px; font-family: var(--lat); }
.lang-switch button[data-lang="ar"] { font-family: var(--ara); font-size: 16px; padding-block: 2px; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 48px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { font-size: 18px; color: #4a463f; max-width: 56ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 26px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { border: var(--bw) solid var(--ink); border-radius: 14px; padding: 6px 14px; background: #fff; display: flex; align-items: baseline; gap: 6px; }
.stat b { font-size: 24px; font-family: var(--lat); }
.stat:nth-child(1) b { color: var(--red); } .stat:nth-child(2) b { color: var(--teal); } .stat:nth-child(3) b { color: var(--purple); }
.hero-books { position: relative; height: 340px; }
.hero-books .hb { position: absolute; width: 46%; transition: transform .3s; filter: drop-shadow(6px 8px 0 rgba(43, 42, 51, .9)); }
.hero-books .hb .cover { border: var(--bw) solid var(--ink); }
.hero-books .hb:nth-child(1) { inset-inline-start: 2%; top: 30px; transform: rotate(-8deg); z-index: 1; }
.hero-books .hb:nth-child(2) { inset-inline-start: 28%; top: 0; transform: rotate(3deg); z-index: 3; width: 50%; }
.hero-books .hb:nth-child(3) { inset-inline-start: 54%; top: 60px; transform: rotate(9deg); z-index: 2; }
.hero-books .hb:hover { transform: rotate(0) scale(1.04); z-index: 5; }

/* ---------------------------------------------------------------- series strip */
.section-h { display: flex; align-items: baseline; gap: 12px; border-bottom: var(--bw) solid var(--ink); padding-bottom: 6px; margin: 0 0 18px; }
.section-h h2 { margin: 0; font-size: 26px; }
.series-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin-bottom: 40px; }
.series-card { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--tint); padding: 14px; text-align: start;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: transform .12s, box-shadow .12s; }
.series-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.series-card[aria-pressed="true"] { outline: 4px solid var(--c); outline-offset: 3px; }
.series-card .sw { width: 34px; height: 12px; border-radius: 6px; background: var(--c); border: 2px solid var(--ink); }
.series-card b { font-size: 16px; line-height: 1.35; }
.series-card small { color: var(--muted); font-family: var(--lat); }

/* ---------------------------------------------------------------- toolbar */
.toolbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-block: var(--bw) solid var(--ink); padding: 10px 0; margin-bottom: 26px; }
.tb { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; border: var(--bw) solid var(--ink); background: #fff; border-radius: 999px; padding: 6px 14px; }
.search input { border: 0; outline: 0; flex: 1; font: inherit; background: none; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.count { font-size: 14px; color: var(--muted); margin-inline-start: auto; font-family: var(--lat); }
html[dir="rtl"] .count { font-family: var(--ara); }

/* ---------------------------------------------------------------- catalogue */
.series-block { margin-bottom: 48px; }
.series-block .section-h { border-color: var(--ink); }
.series-block .section-h .sw { width: 16px; height: 28px; border-radius: 5px; background: var(--c); border: 2px solid var(--ink); align-self: center; }
.series-block .blurb { color: #4a463f; margin: -6px 0 18px; max-width: 80ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.thumb { background: var(--tint); height: 190px; display: grid; place-items: center; padding: 16px; border-bottom: var(--bw) solid var(--ink);
  text-decoration: none; position: relative; }
.thumb .cover { max-width: 100%; max-height: 100%; }
.thumb .cover.l { width: 100%; height: auto; }
.thumb .cover.p { height: 100%; width: auto; }
.thumb .lang-tag { position: absolute; top: 8px; inset-inline-end: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 8px;
  padding: 0 7px; font-size: 12px; font-weight: 700; font-family: var(--lat); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.4; text-decoration: none; }
.card-title[dir="rtl"] { font-size: 17px; line-height: 1.6; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.tag { border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 8px; background: #fff; white-space: nowrap; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.price { font-weight: 700; font-family: var(--lat); }
html[dir="rtl"] .price { font-family: var(--ara); }
.price.req { font-size: 13px; color: var(--muted); font-weight: 400; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

/* ---------------------------------------------------------------- cover + byline */
.cover { position: relative; container-type: inline-size; background: #fff; border-radius: 3px 6px 6px 3px; overflow: hidden;
  box-shadow: 0 1px 0 var(--ink), 3px 4px 0 rgba(43, 42, 51, .85); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.18) 2.5%, rgba(0,0,0,0) 6%); }
.cover .byline { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; text-align: center; background: rgba(255, 246, 229, .94);
  border-top: max(1px, .5cqw) solid var(--ink); font-weight: 700; font-size: clamp(7px, 4.2cqw, 20px); line-height: 1.55; padding: .3cqw 2cqw .6cqw; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover.on-book { width: 100%; height: 100%; box-shadow: none; border-radius: 2px 5px 5px 2px; }

/* ---------------------------------------------------------------- 3D mockup */
.stage { position: relative; width: 100%; height: calc(var(--H) + 90px); display: grid; place-items: center; perspective: 1800px;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage:active { cursor: grabbing; }
.book3d { position: relative; width: var(--W); height: var(--H); transform-style: preserve-3d; }
.book3d.anim { transition: transform .9s cubic-bezier(.2, .75, .25, 1); }
.face { position: absolute; top: 0; left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front, .back { width: var(--W); height: var(--H); border-radius: 2px 6px 6px 2px; }
.spine-right .front, .spine-right .back { border-radius: 6px 2px 2px 6px; }
.front { transform: translateZ(calc(var(--T) / 2)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.back { transform: rotateY(180deg) translateZ(calc(var(--T) / 2)); background: var(--tint); overflow: hidden; container-type: size;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.spine { width: var(--T); height: var(--H); background: var(--c); display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 0 0 0 1.5px var(--ink), inset 3px 0 6px rgba(0,0,0,.25); }
.spine span { writing-mode: vertical-rl; font-size: calc(var(--T) * .5); font-weight: 700; color: var(--ink); white-space: nowrap; max-height: 92%; overflow: hidden; }
.spine-left .spine { left: calc(var(--T) / -2); transform: rotateY(-90deg); }
.spine-left .pages-side { left: calc(var(--W) - var(--T) / 2); transform: rotateY(90deg); }
.spine-right .spine { left: calc(var(--W) - var(--T) / 2); transform: rotateY(90deg); }
.spine-right .pages-side { left: calc(var(--T) / -2); transform: rotateY(-90deg); }
.pages-side { width: var(--T); height: calc(var(--H) - 6px); top: 3px; background: repeating-linear-gradient(90deg, #fffdf6 0 1px, #e6dbc6 1px 2px); }
.pages-top, .pages-bottom { width: calc(var(--W) - 6px); left: 3px; height: var(--T); background: repeating-linear-gradient(0deg, #fffdf6 0 1px, #e6dbc6 1px 2px); }
.pages-top { top: calc(var(--T) / -2); transform: rotateX(90deg); }
.pages-bottom { top: calc(var(--H) - var(--T) / 2); transform: rotateX(-90deg); }
.floor { position: absolute; bottom: 18px; left: 50%; width: calc(var(--W) * 1.05); height: 26px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(43, 42, 51, .35), transparent); z-index: -1; }
.mock-ctrl { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.mock-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* back cover (sizes follow the cover through container units) */
.bc { position: absolute; inset: 0; padding: 4.5cqh 5cqw; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center; background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.7) 0 6cqw, transparent 6.2cqw),
    radial-gradient(circle at 92% 88%, rgba(255,255,255,.6) 0 9cqw, transparent 9.2cqw), var(--tint);
  border: max(2px, .7cqw) solid var(--ink); border-radius: inherit; }
.bc-series { font-weight: 700; font-size: min(4.6cqw, 6.4cqh); line-height: 1.4; color: var(--ink); }
.bc-h { font-weight: 700; font-size: min(3.6cqw, 5cqh); color: var(--ink); background: #fff; border: max(1.5px, .45cqw) solid var(--ink);
  border-radius: 99px; padding: 0 3cqw; line-height: 1.6; }
.bc-h.small { font-size: min(3cqw, 4.2cqh); }
.bc-books { display: flex; gap: 2.6cqw; justify-content: center; align-items: flex-end; }
.bc-book img { max-height: 25cqh; max-width: 19cqw; width: auto; height: auto; border: max(1.5px, .4cqw) solid var(--ink); border-radius: 2px;
  box-shadow: .8cqw .8cqw 0 rgba(43,42,51,.8); background: #fff; pointer-events: none; }
.bc-qr { display: flex; gap: 6cqw; justify-content: center; }
.bc-q { display: flex; flex-direction: column; align-items: center; text-decoration: none; gap: .4cqh; }
.bc-q svg { width: min(15cqw, 22cqh); height: auto; border: max(1.5px, .4cqw) solid var(--ink); border-radius: 1.4cqw; background: #fff; }
.bc-q span { font-weight: 700; font-size: min(2.8cqw, 3.8cqh); line-height: 1.3; }
.bc-q small { font-size: min(2.2cqw, 3cqh); font-family: var(--lat); line-height: 1.2; white-space: nowrap; }
.bc-by { font-size: min(2.8cqw, 3.8cqh); font-weight: 700; color: #4a463f; }
@container (min-aspect-ratio: 5/4) {
  .bc { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 4cqw; row-gap: 2.5cqh; align-items: center; }
  .bc-series, .bc-by { grid-column: 1 / -1; }
  .bc-h:not(.small) { grid-column: 1; grid-row: 2; justify-self: center; }
  .bc-books { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqh 2.4cqw; align-self: center; justify-items: center; }
  .bc-books .bc-book img { max-height: 27cqh; max-width: 100%; }
  .bc-h.small { grid-column: 2; grid-row: 2; justify-self: center; }
  .bc-qr { grid-column: 2; grid-row: 3; gap: 3cqw; }
  .bc-q svg { width: min(15cqw, 30cqh); }
}

/* ---------------------------------------------------------------- book page */
.crumb { margin: 22px 0 8px; font-weight: 700; display: inline-block; text-decoration: none; }
.crumb:hover { text-decoration: underline; }
.book-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: start; margin-bottom: 40px; }
.mock-col { position: sticky; top: 16px; }
.info .series-pill { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: var(--tint); border-radius: 999px;
  padding: 2px 12px; font-weight: 700; font-size: 14px; text-decoration: none; }
.info .series-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--ink); }
.info h1 { font-size: clamp(28px, 3.6vw, 42px); margin: 12px 0 2px; }
.info h1[dir="rtl"] { line-height: 1.6; }
.info .sub { font-size: 19px; color: #4a463f; margin: 0 0 14px; }
.meta { display: grid; grid-template-columns: auto 1fr; border: var(--bw) solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; margin: 18px 0; }
.meta dt, .meta dd { margin: 0; padding: 8px 14px; border-bottom: 1.5px solid var(--line); }
.meta dt { font-weight: 700; background: #fbf3e2; }
.meta dt:nth-last-of-type(1), .meta dd:last-child { border-bottom: 0; }
.buy { border: var(--bw) solid var(--ink); border-radius: var(--r); background: #fff; box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px; }
.buy .price { font-size: 26px; }
.buy .price.req { font-size: 18px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stepper { display: inline-flex; align-items: center; border: var(--bw) solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { border: 0; background: none; width: 38px; height: 38px; font-size: 20px; font-weight: 700; }
.stepper button:hover { background: var(--paper); }
.stepper input { width: 42px; text-align: center; border: 0; font: inherit; font-weight: 700; -moz-appearance: textfield; background: none; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.panel { border: var(--bw) solid var(--ink); border-radius: var(--r); background: #fff; padding: 22px; margin-bottom: 26px; }
.panel h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.panel h2::before { content: ""; width: 12px; height: 24px; border-radius: 4px; background: var(--c, var(--red)); border: 2px solid var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.about-box { border-inline-start: 4px solid var(--c); padding-inline-start: 14px; margin-top: 14px; }
.about-box p { margin: .3em 0; }
.about-box .q { font-size: 19px; font-weight: 700; line-height: 1.9; color: var(--ink); background: var(--tint); border-radius: 12px; padding: 8px 14px; margin: 6px 0; }
.about-box .v { font-weight: 700; line-height: 2; text-align: center; background: #fbf3e2; border-radius: 10px; padding: 4px 10px; margin: 4px 0; }
.about-box .src { color: var(--muted); font-size: 15px; }
.about-box ul { margin: .3em 0; padding-inline-start: 1.2em; columns: 2; column-gap: 24px; }
.inside-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.inside-list li { display: flex; gap: 10px; align-items: flex-start; }
.inside-list li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.peek { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.peek figure { margin: 0; }
.protected { position: relative; border: var(--bw) solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 3px 3px 0 var(--ink); }
.protected img { width: 100%; pointer-events: none; -webkit-user-drag: none; filter: saturate(.95); }
.protected::after { content: ""; position: absolute; inset: 0; }
.peek figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.peek-note { font-size: 14px; color: var(--muted); margin: -4px 0 16px; }
.lightbox { border: var(--bw) solid var(--ink); border-radius: 14px; padding: 10px; background: #fff; max-width: min(92vw, 640px); }
.lightbox::backdrop { background: rgba(43, 42, 51, .7); }
.lightbox .protected { cursor: default; box-shadow: none; }
.lightbox p { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.lightbox .x { position: absolute; top: 4px; inset-inline-end: 4px; z-index: 3; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.mini-grid .card .thumb { height: 150px; }

/* ---------------------------------------------------------------- QR blocks */
.qr-pair { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; border: var(--bw) solid var(--ink);
  border-radius: 16px; padding: 12px 14px 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink); width: 170px; transition: transform .12s; }
.qr-card:hover { transform: translateY(-2px); }
.qr-card svg { width: 130px; height: 130px; }
.qr-card b { color: var(--red); }
.qr-card.wa b { color: #2f9a3a; }
.qr-card small { font-family: var(--lat); font-size: 12px; color: var(--muted); word-break: break-all; text-align: center; }

/* ---------------------------------------------------------------- contact band */
.contact-band { background: var(--yellow); border-block: var(--bw) solid var(--ink); padding: 40px 0; margin-top: 30px; }
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.contact-band h2 { font-size: 30px; }
.steps { padding-inline-start: 1.2em; margin: 8px 0 0; }
.steps li { margin: 4px 0; font-weight: 700; }

/* ---------------------------------------------------------------- order page */
.order-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 30px; align-items: start; margin: 26px 0 40px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1.5px dashed var(--line); }
.line:last-child { border-bottom: 0; }
.line .cover { width: 64px; }
.line .t { font-weight: 700; line-height: 1.45; text-decoration: none; display: block; }
.line .s { font-size: 13px; color: var(--muted); }
.line .r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line .rm { border: 0; background: none; color: var(--red); font-size: 13px; text-decoration: underline; padding: 0; }
.total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; border-top: var(--bw) solid var(--ink); padding-top: 12px; margin-top: 6px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.form input, .form textarea, .form select { font: inherit; font-weight: 400; border: 2px solid var(--ink); border-radius: 12px; padding: 9px 12px; background: #fff; width: 100%; }
.form textarea { min-height: 80px; resize: vertical; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; background: #fff; cursor: pointer; font-weight: 700; }
.radio-row input { width: auto; accent-color: var(--red); }
.err { color: var(--red); font-weight: 700; min-height: 1.5em; margin: 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: var(--bw) solid var(--ink); padding: 26px 0 30px; background: var(--ink); color: var(--paper); }
.ftr { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ftr p { margin: 4px 0 0; color: #d8cfbf; }
.ftr-contact { display: grid; gap: 4px; font-family: var(--lat); }
.ftr-contact a { text-decoration: none; }
.ftr-contact a:hover { text-decoration: underline; }
.site-footer .small { color: #a9a294; margin-top: 16px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 10px 20px;
  border-radius: 999px; font-weight: 700; transition: transform .25s; z-index: 100; border: 2px solid var(--paper); }
.toast.show { transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-grid, .book-top, .two, .order-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-books { height: 260px; max-width: 460px; }
  .mock-col { position: static; }
  .about-box ul { columns: 1; }
}
@media (max-width: 560px) {
  .hdr { gap: 8px; }
  .logo img { height: 42px; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; flex-wrap: nowrap; }
  .nav a { padding: 4px 8px; font-size: 14px; }
  .nav a[href$="#contact"] { display: none; }
  .series-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .series-card { padding: 10px; } .series-card b { font-size: 14px; }
  .lang-switch { margin-inline-start: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .thumb { height: 150px; padding: 10px; }
  .card-body { padding: 10px; }
  .card-title { font-size: 14px; }
  .card-title[dir="rtl"] { font-size: 15px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .hero { padding-top: 28px; }
  .panel { padding: 16px; }
  .qr-card { width: 145px; } .qr-card svg { width: 110px; height: 110px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
/* keep titles aligned with the page even when the book's language has the other direction */
html[dir="rtl"] .line .t, html[dir="rtl"] .card-title, html[dir="rtl"] .info h1, html[dir="rtl"] .info .sub { text-align: right; }
html[dir="ltr"] .line .t, html[dir="ltr"] .card-title, html[dir="ltr"] .info h1, html[dir="ltr"] .info .sub { text-align: left; }
