/* Books & Books Online storefront styles. Started from the approved prototype (redesign/styles.css + redesign/final/final.css). */
/* =========================================================
   Books & Books Online — redesign prototype
   One stylesheet, design tokens as CSS variables.
   Mobile-first. Breakpoints: 640px (tablet), 960px (desktop).
   ========================================================= */

:root {
  /* Brand (taken from the existing logo / style.css) */
  --brand: #5A2E0A;          /* logo brown — the ONE primary colour */
  --brand-hover: #46230A;
  --brand-tint: #F5EDE5;     /* selected / hover wash */
  --accent: #C89048;         /* logo copper "&" — decorative only, never small text */
  --accent-ink: #94592A;     /* copper darkened for text (passes AA on white) */
  --accent-tint: #FAF1E6;

  /* Neutrals (warm, paper-like) */
  --paper: #FBF9F6;          /* page background */
  --surface: #FFFFFF;
  --line: #ECE5DC;
  --line-strong: #DCD2C6;
  --ink: #231A14;            /* body text */
  --ink-2: #5C5049;          /* secondary text */
  --ink-3: #6F6259;          /* meta, struck prices (AA on white) */

  /* Semantic (used sparingly) */
  --ok: #3E6B4E;

  /* Type */
  --font-body: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  --font-display: "Noto Serif Bengali", "Hind Siliguri", Georgia, serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.125rem;    /* 18 */
  --fs-xl: 1.375rem;    /* 22 */
  --fs-2xl: 1.75rem;    /* 28 */

  /* Space, radius, shadow */
  --gutter: 16px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(35, 26, 20, .05), 0 4px 16px rgba(35, 26, 20, .06);
  --container: 1200px;
  --header-h: 60px;
  --bottom-nav-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-6); }
.section + .section { padding-top: 0; }
.muted { color: var(--ink-2); }
.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--brand); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-md); line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--brand); }
.btn-outline:hover { border-color: var(--brand); }
.btn-block { width: 100%; }
.link { color: var(--brand); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--brand); }

/* ---------- Header ---------- */
.utility { display: none; background: var(--surface); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2); }
.utility .container { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: var(--s-4); }
.utility a:hover { color: var(--brand); }
.utility nav { display: flex; gap: var(--s-5); }

.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-icon { height: 34px; width: auto; }
.logo-word { height: 26px; width: auto; }
.search.header-search { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 var(--s-2);
  border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink);
  font-size: var(--fs-sm);
}
.icon-btn:hover { background: var(--brand-tint); color: var(--brand); }
.icon-btn .label { display: none; }
.hide-sm { display: none !important; }
.call-btn { color: var(--brand); }
.count {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.mobile-search { padding-bottom: var(--s-3); }

/* Search field (shared by header, hero, mobile) */
.search { position: relative; display: flex; width: 100%; }
.search input {
  width: 100%; min-width: 0; height: 48px;
  padding: 0 56px 0 44px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-size: var(--fs-md);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 20px; height: 20px; pointer-events: none; }
.search button {
  position: absolute; right: 4px; top: 4px; bottom: 4px;
  padding: 0 var(--s-4); border: 0; border-radius: 4px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: var(--fs-sm);
}
.search-lg input { height: 56px; font-size: var(--fs-lg); padding-left: 48px; padding-right: 96px; }
.search-lg button { padding: 0 var(--s-5); font-size: var(--fs-md); }

/* Desktop primary nav */
.primary-nav { display: none; border-top: 1px solid var(--line); }
.primary-nav ul { display: flex; gap: var(--s-1); align-items: center; }
.primary-nav a, .primary-nav button {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 var(--s-3);
  border: 0; background: none; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav button:hover { color: var(--brand); }
.primary-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.primary-nav .nav-feature { color: var(--brand); font-weight: 600; }
.primary-nav .icon { width: 18px; height: 18px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.bottom-nav a, .bottom-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; font-size: 12px; color: var(--ink-2);
}
.bottom-nav [aria-current="page"] { color: var(--brand); font-weight: 600; }
.bottom-nav .count { top: 6px; right: calc(50% - 22px); }

/* ---------- Drawer / sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(35, 26, 20, .35); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.drawer {
  position: fixed; z-index: 61; top: 0; bottom: 0; left: 0;
  width: min(360px, 88vw); background: var(--surface);
  transform: translateX(-100%); transition: transform .25s ease; visibility: hidden;
  display: flex; flex-direction: column;
}
.drawer.is-right { left: auto; right: 0; transform: translateX(100%); }
.drawer.is-open { transform: none; visibility: visible; }
.drawer.is-open ~ .scrim, .scrim.is-open { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: var(--fs-lg); }
.drawer-body { overflow-y: auto; padding: var(--s-4); flex: 1; }
.drawer-foot { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); display: flex; gap: var(--s-2); }
.drawer-foot .btn { flex: 1; }
.cat-group + .cat-group { margin-top: var(--s-5); }
.cat-group h3 { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); letter-spacing: .02em; margin-bottom: var(--s-2); }
.cat-group a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.cat-group a:hover { color: var(--brand); }
.cat-group a span { color: var(--ink-3); font-size: var(--fs-xs); }
body.no-scroll { overflow: hidden; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 70; left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-size: var(--fs-sm);
  transform: translateY(20px); opacity: 0; visibility: hidden; transition: all .2s;
}
.toast.is-visible { transform: none; opacity: 1; visibility: visible; }
.toast a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Home: hero search ---------- */
.hero { padding-block: var(--s-6) var(--s-5); text-align: left; }
.hero h1 { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--ink); }
.hero p { color: var(--ink-2); margin-top: var(--s-1); margin-bottom: var(--s-4); }
.quick { display: flex; gap: var(--s-2); margin-top: var(--s-3); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.quick::-webkit-scrollbar { display: none; }
.quick-label { flex: none; align-self: center; font-size: var(--fs-xs); color: var(--ink-3); }

.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); background: var(--surface); }
.trust .icon { color: var(--brand); margin-top: 2px; }
.trust strong { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; }
.trust span { display: block; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.45; }

/* ---------- Section heading ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.sec-head h2 { font-family: var(--font-display); font-size: var(--fs-xl); }
.sec-head p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.sec-head .more { flex: none; font-size: var(--fs-sm); font-weight: 600; color: var(--brand); white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reader tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-3);
  min-height: 116px; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tile h3 { font-size: var(--fs-md); font-weight: 600; }
.tile p { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.5; }
.tile .icon { color: var(--accent); width: 26px; height: 26px; }
.tile-feature { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile-feature p { color: rgba(255, 255, 255, .8); }
.tile-feature .icon { color: var(--accent); }

/* ---------- Job prep band ---------- */
.band { background: var(--accent-tint); border-block: 1px solid #F0E2CF; padding-block: var(--s-6); }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); margin-bottom: var(--s-1); }
.exam-chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) var(--s-4); padding-inline: var(--gutter); }
.exam-chips::-webkit-scrollbar { display: none; }

/* ---------- Book rows & grid ---------- */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: var(--s-4);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  padding-bottom: var(--s-1);
  position: relative; /* clip absolutely-positioned descendants (e.g. .visually-hidden) */
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }

/* Book card */
.book { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-link { display: block; }
.book-link:hover .book-title { color: var(--brand); }
.book-link:hover .cover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(35, 26, 20, .14); }
.book-title {
  margin-top: var(--s-3); font-size: var(--fs-sm); font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.45em * 2);
}
.book-author { font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); margin-top: var(--s-1); }
.price strong { font-size: var(--fs-md); font-weight: 700; }
.price s { font-size: var(--fs-xs); color: var(--ink-3); }
.price .off { font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.btn-add {
  margin-top: var(--s-2); min-height: 40px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--brand); font-size: var(--fs-sm); font-weight: 600;
}
.btn-add:hover { border-color: var(--brand); background: var(--brand-tint); }
.btn-add.is-added { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Generated cover placeholder */
.cover {
  --c: #6F7F8C;
  position: relative; aspect-ratio: 2 / 3; width: 100%;
  border-radius: 3px 6px 6px 3px; overflow: hidden;
  background: var(--c);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14% 12% 10% 16%;
  box-shadow: 0 1px 2px rgba(35, 26, 20, .12), 0 3px 10px rgba(35, 26, 20, .08);
  transition: transform .2s, box-shadow .2s;
}
.cover::before { /* spine shading */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 80%);
}
.cover::after { /* subtle paper grain via gradient */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .08));
  pointer-events: none;
}
.cover-kicker, .cover-title, .cover-rule, .cover-author, .cover-mark { display: block; }
.cover-kicker { position: relative; font-size: clamp(8px, 2.4cqw, 11px); letter-spacing: .04em; opacity: .85; }
.cover-title { position: relative; font-family: var(--font-display); font-weight: 600; font-size: clamp(13px, 10cqw, 22px); line-height: 1.3; }
.cover-rule { position: relative; width: 28%; height: 2px; background: rgba(255, 255, 255, .6); margin-block: 8% 6%; }
.cover-author { position: relative; font-size: clamp(9px, 6cqw, 13px); opacity: .9; line-height: 1.35; }
.cover-mark { position: relative; font-size: clamp(8px, 5cqw, 11px); opacity: .75; letter-spacing: .05em; }
.cover-wrap { container-type: inline-size; }
.cover.is-light { color: var(--ink); }
.cover.is-light .cover-rule { background: rgba(35, 26, 20, .35); }
/* job-prep series look: band at top */
.cover.series { padding-top: 22%; }
.cover.series .series-band {
  position: absolute; left: 0; right: 0; top: 0; height: 13%;
  background: rgba(255, 255, 255, .92); color: var(--brand);
  display: flex; align-items: center; padding-left: 16%; font-size: clamp(7px, 5cqw, 11px); font-weight: 600; letter-spacing: .02em;
}

/* ---------- Authors ---------- */
.authors { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: var(--s-4); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.authors::-webkit-scrollbar { display: none; }
.author { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-2); }
.author:hover { color: var(--brand); }
.avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600;
}

/* Publishers */
.pubs { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Promise block */
.promise { display: grid; gap: var(--s-4); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.promise h2 { font-family: var(--font-display); font-size: var(--fs-xl); }
.promise p { color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { margin-top: var(--s-7); background: var(--surface); border-top: 1px solid var(--line); padding-block: var(--s-6) var(--s-5); font-size: var(--fs-sm); color: var(--ink-2); }
.footer-grid { display: grid; gap: var(--s-5); }
.footer h3 { font-size: var(--fs-sm); color: var(--ink); margin-bottom: var(--s-2); }
.footer li + li { margin-top: 6px; }
.footer a:hover { color: var(--brand); }
.footer .logo-word { height: 24px; margin-bottom: var(--s-3); }
.pay { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.pay span { padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: var(--fs-xs); color: var(--ink); background: var(--paper); }
.legal { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: var(--fs-xs); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); padding-block: var(--s-4) 0; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--brand); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }

/* ---------- Category page ---------- */
.page-head { padding-block: var(--s-3) var(--s-4); }
.page-head h1 { font-family: var(--font-display); font-size: var(--fs-2xl); }
.page-head p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; max-width: 60ch; }
.toolbar {
  position: sticky; top: calc(var(--header-h) + 60px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding-block: var(--s-3); margin-bottom: var(--s-4);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.toolbar .result-count { font-size: var(--fs-sm); color: var(--ink-2); }
.toolbar-actions { display: flex; gap: var(--s-2); }
.select {
  height: 40px; padding: 0 32px 0 var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  font-size: var(--fs-sm); -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C5049' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.btn-sm { min-height: 40px; padding: 0 var(--s-3); font-size: var(--fs-sm); }
.listing { display: grid; gap: var(--s-6); }
.filters { display: none; }
.filter-group + .filter-group { margin-top: var(--s-5); }
.filter-group h3 { font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-2); }
.check { display: flex; align-items: center; gap: var(--s-2); min-height: 40px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.check span { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs); }
.load-more { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); margin-top: var(--s-6); font-size: var(--fs-xs); color: var(--ink-3); }
.empty { grid-column: 1 / -1; padding: var(--s-6); text-align: center; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: var(--s-5); padding-top: var(--s-4); }
.pdp-media { max-width: 260px; width: 62%; margin-inline: auto; }
.pdp-media .cover { box-shadow: 0 2px 4px rgba(35, 26, 20, .12), 0 12px 32px rgba(35, 26, 20, .14); }
.look-inside { display: flex; justify-content: center; margin-top: var(--s-3); }
.look-inside a { font-size: var(--fs-sm); }
.pdp-info h1 { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.3; }
.byline { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); }
.byline a { color: var(--brand); font-weight: 500; }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); background: var(--brand-tint); color: var(--brand); font-weight: 500; }
.badge.ok { background: #EEF4EF; color: var(--ok); }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-4); }
.pdp-price strong { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.pdp-price s { color: var(--ink-3); }
.pdp-price .off { color: var(--accent-ink); font-weight: 600; font-size: var(--fs-sm); }
.buy { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.buy .btn-primary { grid-column: 2; }
.buy .btn-outline { grid-column: 1 / -1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); height: 48px; }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 1.25rem; color: var(--ink-2); }
.qty button:hover { color: var(--brand); }
.qty input { width: 36px; border: 0; text-align: center; background: none; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 36px; }
.qty-sm button { width: 32px; font-size: 1.1rem; }
.qty-sm input { width: 28px; font-size: var(--fs-sm); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.delivery { margin-top: 0; }
.delivery li { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); font-size: var(--fs-sm); }
.delivery li + li { border-top: 1px solid var(--line); }
.delivery .icon { color: var(--brand); width: 20px; height: 20px; margin-top: 3px; }
.delivery strong { font-weight: 600; }
.delivery span { color: var(--ink-2); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: var(--s-5); }
.facts div { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font-size: var(--fs-xs); color: var(--ink-3); }
.facts dd { margin: 0; font-size: var(--fs-sm); font-weight: 500; }

.prose { max-width: 68ch; color: var(--ink); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: var(--s-3); }
.prose ul { list-style: none; display: grid; gap: var(--s-2); }
.prose li { position: relative; padding-left: 20px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prose h3 { font-size: var(--fs-md); margin-top: var(--s-5); margin-bottom: var(--s-2); }
.clamp { position: relative; max-height: 15em; overflow: hidden; }
.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4em; background: linear-gradient(rgba(251, 249, 246, 0), var(--paper)); }
.clamp.is-open { max-height: none; }
.clamp.is-open::after { display: none; }
.toc { counter-reset: toc; display: grid; gap: 0; }
.toc li { counter-increment: toc; display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); font-size: var(--fs-sm); }
.toc li + li { border-top: 1px solid var(--line); }
.toc li::before { content: counter(toc, bengali); color: var(--accent-ink); font-weight: 600; min-width: 1.2em; }
.toc li span { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.reviews-empty { padding: var(--s-5); text-align: center; color: var(--ink-2); font-size: var(--fs-sm); }

.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(35, 26, 20, .06);
}
.sticky-buy .sb-price { line-height: 1.2; }
.sticky-buy .sb-price strong { display: block; font-size: var(--fs-lg); }
.sticky-buy .sb-price s { font-size: var(--fs-xs); color: var(--ink-3); }
.sticky-buy .btn { flex: 1; }
.has-sticky-buy .bottom-nav { display: none; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; gap: var(--s-5); padding-top: var(--s-2); }
.cart-items { display: grid; }
.cart-item { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item .cover { padding: 12% 10% 8% 14%; }
.cart-item .cover.series { padding-top: 12%; }
.cart-item .cover .series-band { display: none; }
.cart-item .cover-title { font-size: 9px; }
.cart-item .cover-author, .cart-item .cover-kicker, .cart-item .cover-rule { display: none; }
.ci-title { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }
.ci-title:hover { color: var(--brand); }
.ci-meta { font-size: var(--fs-xs); color: var(--ink-2); }
.ci-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); flex-wrap: wrap; }
.ci-price { text-align: right; line-height: 1.3; }
.ci-price strong { display: block; }
.ci-price s { font-size: var(--fs-xs); color: var(--ink-3); }
.remove { border: 0; background: none; padding: 4px 0; font-size: var(--fs-xs); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.remove:hover { color: var(--brand); }

.summary { padding: var(--s-5) var(--s-4); }
.summary h2 { font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.step { margin: 0; padding: var(--s-4) 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.step-first { border-top: 0; padding-top: 0; }
.step legend { float: left; width: 100%; padding: 0; }
.step legend + * { clear: both; }
.step-title { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-3); }
.step-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12px; }
.choice { display: grid; gap: var(--s-2); }
.choice-pay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-pay .option:first-child { grid-column: 1 / -1; }
.choice-pay .option:not(:first-child) { min-height: 48px; padding-inline: var(--s-2); gap: var(--s-2); }
.option {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
  font-size: var(--fs-sm);
}
.option input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.option small { display: block; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.4; }
.option .opt-end { margin-left: auto; font-weight: 600; white-space: nowrap; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pay-note { margin-top: var(--s-2); padding: var(--s-3); border-radius: var(--radius-sm); background: var(--accent-tint); font-size: var(--fs-xs); color: var(--ink-2); }
.pay-note[hidden] { display: none; }
.field { display: grid; gap: 4px; }
.field + .field { margin-top: var(--s-3); }
.auth-form > .btn { margin-top: var(--s-5); }
.field label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--fs-md);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.totals { display: grid; gap: var(--s-2); font-size: var(--fs-sm); }
.totals div { display: flex; justify-content: space-between; gap: var(--s-3); }
.totals .save { color: var(--accent-ink); }
.totals .grand { padding-top: var(--s-3); margin-top: var(--s-1); border-top: 1px solid var(--line); font-size: var(--fs-lg); font-weight: 700; }
.fine { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--ink-2); text-align: center; }
.notice { margin-top: var(--s-3); padding: var(--s-3); border-radius: var(--radius-sm); background: #EEF4EF; color: var(--ok); font-size: var(--fs-sm); }
.notice[hidden] { display: none; }

/* =========================================================
   Tablet ≥ 640px
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .row { grid-auto-columns: 28%; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { left: auto; right: var(--gutter); width: 360px; }
  .hero h1 { font-size: 2rem; }
  .pdp { grid-template-columns: 220px 1fr; align-items: start; }
  .pdp-media { width: 100%; margin: 0; position: sticky; top: calc(var(--header-h) + 80px); }
}

/* =========================================================
   Desktop ≥ 960px
   ========================================================= */
@media (min-width: 960px) {
  :root { --header-h: 72px; --s-6: 40px; }
  body { padding-bottom: 0; }
  .bottom-nav, .mobile-search, .sticky-buy { display: none; }
  .utility { display: block; }
  .logo-icon { height: 42px; }
  .logo-word { height: 32px; }
  .search.header-search { display: flex; flex: 1; max-width: 560px; margin-inline: var(--s-6) auto; }
  .header-actions { margin-left: 0; gap: var(--s-2); }
  .icon-btn .label { display: inline; }
  .hide-sm { display: inline-flex !important; }
  .call-btn { display: none; }
  .icon-btn { padding: 0 var(--s-3); }
  .icon-btn .count { position: static; margin-left: 2px; }
  .primary-nav { display: block; }
  .toast { bottom: 24px; }
  .toolbar { top: calc(var(--header-h) + 45px); }

  .hero { padding-block: var(--s-7) var(--s-6); text-align: center; }
  .hero h1 { font-size: 2.375rem; }
  .hero form, .hero .quick { max-width: 680px; margin-inline: auto; }
  .hero .quick { justify-content: center; flex-wrap: wrap; padding-inline: 0; }
  .page-home .header-search { visibility: hidden; opacity: 0; transition: opacity .2s; }
  .page-home.hero-passed .header-search { visibility: visible; opacity: 1; }

  .row { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .row > :nth-child(n+7) { display: none; }
  .authors { grid-auto-flow: row; grid-template-columns: repeat(8, 1fr); grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .exam-chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .sec-head h2 { font-size: 1.625rem; }
  .tile { min-height: 148px; padding: var(--s-5); }
  .tile h3 { font-size: var(--fs-lg); }
  .tile p { font-size: var(--fs-sm); }

  .listing { grid-template-columns: 240px 1fr; align-items: start; gap: var(--s-6); }
  .filters { display: block; position: sticky; top: calc(var(--header-h) + 64px); }
  .filters-btn { display: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }

  .pdp { grid-template-columns: 320px 1fr 300px; gap: var(--s-6); padding-top: var(--s-5); }
  .pdp-buybox { position: sticky; top: calc(var(--header-h) + 64px); }
  .pdp-info h1 { font-size: 2.125rem; }
  .delivery { margin-top: 0; }
  .buy { grid-template-columns: auto 1fr; }

  .cart-layout { grid-template-columns: 1fr 400px; gap: var(--s-7); align-items: start; }
  .summary { position: sticky; top: calc(var(--header-h) + 64px); padding: var(--s-5); }
  .cart-item { grid-template-columns: 88px 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-6); }
}

@media (min-width: 1200px) {
  .pdp { grid-template-columns: 340px 1fr 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- final design additions ---- */
/* =========================================================
   Final homepage — sections taken from other sources,
   restyled with Prototype A tokens (../styles.css).
   ========================================================= */

/* ---------- Hero banner (from live site, L2) ---------- */
.banner { position: relative; margin-top: var(--s-4); }
.banner-track { position: relative; aspect-ratio: 2064 / 512; border-radius: var(--radius); overflow: hidden; background: var(--accent-tint); }
/* Phones show the slide's mobile image (1200×600). */
@media (max-width: 640px) { .banner-track { aspect-ratio: 2 / 1; } }
.banner-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.banner-slide.is-active { opacity: 1; visibility: visible; }
.banner-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: none; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .9); color: var(--brand); box-shadow: var(--shadow); cursor: pointer;
}
.banner-nav:hover { background: #fff; }
.banner-nav .icon { width: 20px; height: 20px; }
.banner-nav.prev { left: var(--s-3); }
.banner-nav.next { right: var(--s-3); }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--s-2); }
.banner-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: width .2s, background .2s; }
.banner-dots button[aria-selected="true"] { width: 22px; background: var(--brand); }

/* Order on the page follows the collage: browse tiles, then the promise strip */
.page-final .trust { margin-top: 0; }

/* ---------- Job-prep exam panel (from Prototype C, C4) ---------- */
.exam-panel { position: relative; overflow: hidden; background: var(--brand); color: #fff; border-radius: 16px; padding: 22px 16px 16px; }
.exam-panel::before {
  content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 144, 72, .45), rgba(200, 144, 72, 0) 70%); pointer-events: none;
}
.exam-intro { position: relative; }
.exam-panel .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: #E9C99B; }
.exam-panel .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.exam-panel h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 4px; color: #fff; }
.exam-intro p { color: rgba(255, 255, 255, .82); font-size: var(--fs-sm); margin-top: 4px; }
.btn-white {
  display: none; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: #fff; color: var(--brand); font-weight: 600;
}
.btn-white:hover { background: var(--accent-tint); }
.btn-white .icon { width: 18px; height: 18px; }
.exam-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.exam {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 104px;
  padding: 10px 2px 8px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff;
  text-align: center; font-size: 13px; line-height: 1.3; font-weight: 600; transition: background .15s, transform .15s;
}
.exam:hover { background: rgba(255, 255, 255, .15); transform: translateY(-2px); }
.exam .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--brand); flex: none; }
.exam .ico .icon { width: 22px; height: 22px; }
.exam small { display: block; font-weight: 400; font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.exam.is-all .ico { background: var(--accent); color: #fff; }

/* ---------- Real cover images (same card as every book row) ---------- */
.cover-img {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: var(--accent-tint);
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 1px 2px rgba(35, 26, 20, .12), 0 3px 10px rgba(35, 26, 20, .08);
  transition: transform .2s, box-shadow .2s;
}
.book-link:hover .cover-img { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(35, 26, 20, .14); }
.avatar-img { object-fit: cover; padding: 0; }
img.monogram { object-fit: cover; }

/* ---------- Author spotlight (from Prototype B, B9) ---------- */
.spot-band { background: var(--accent-tint); border-block: 1px solid #F0E2CF; padding-block: var(--s-6); }
.spot-band .kicker { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.author-main { display: grid; grid-template-columns: 72px 1fr; gap: 16px; }
.monogram {
  width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 30px; color: var(--brand); background: var(--surface);
}
.author-name { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
.author-name a:hover { color: var(--brand); }
.author-years { font-size: var(--fs-sm); color: var(--accent-ink); font-weight: 500; margin-top: 2px; }
.author-bio { margin-top: var(--s-3); color: var(--ink-2); max-width: 60ch; }
.author-main .more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-3); font-weight: 600; color: var(--brand); font-size: var(--fs-sm); }
.author-main .more .ic, .author-main .more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.author-index { margin-top: var(--s-6); }
.issue-label { font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.author-index ul { list-style: none; margin: 4px 0 0; padding: 0; columns: 2; column-gap: 24px; }
.author-index li { break-inside: avoid; border-bottom: 1px solid var(--line-strong); }
.author-index a { display: flex; align-items: center; min-height: 48px; font-size: var(--fs-md); line-height: 1.35; padding: 6px 0; }
.author-index a:hover { color: var(--brand); }

@media (min-width: 960px) {
  .banner { margin-top: var(--s-5); }
  .banner-nav { display: grid; }
  .banner-dots { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; }
  .banner-dots button { background: rgba(255, 255, 255, .7); }
  .banner-dots button[aria-selected="true"] { background: var(--brand); }

  .exam-panel { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 36px 40px; }
  .exam-panel::before { width: 420px; height: 420px; right: auto; left: -140px; top: -200px; }
  .exam-panel h2 { font-size: 2rem; }
  .exam-intro p { font-size: 15.5px; margin-top: 8px; }
  .btn-white { display: inline-flex; margin-top: 20px; }
  .exam-grid { margin-top: 0; gap: 12px; }
  .exam { min-height: 128px; padding: 16px 6px 12px; font-size: 15px; gap: 8px; }
  .exam .ico { width: 52px; height: 52px; border-radius: 16px; }
  .exam small { font-size: 12.5px; }

  .spot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .author-main { grid-template-columns: 120px 1fr; gap: 32px; }
  .monogram { width: 120px; height: 120px; font-size: 52px; }
  .author-name { font-size: 2.5rem; }
  .author-bio { font-size: var(--fs-lg); line-height: 1.75; }
  .author-index { margin-top: 0; }
}

/* ---------- Side rails: fill the empty margins on wide screens ---------- */
main { position: relative; }
.rail { display: none; }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4); }
.rail-card + .rail-card { margin-top: var(--s-4); }
.rail-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); }
.rail-cats { list-style: none; margin: 0; padding: 0; }
.rail-cats a { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: var(--fs-sm); color: var(--ink-2); border-radius: var(--radius-sm); padding: 0 6px; margin-inline: -6px; }
.rail-cats a:hover { background: var(--brand-tint); color: var(--brand); }
.rail-cats .icon { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.rail-more { display: inline-block; margin-top: var(--s-2); font-size: var(--fs-sm); font-weight: 600; color: var(--brand); }
.rail-help { background: var(--brand); border-color: var(--brand); color: #fff; }
.rail-help .rail-title { color: #fff; }
.rail-help p { font-size: var(--fs-xs); color: rgba(255, 255, 255, .78); }
.rail-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-3); font-weight: 700; font-size: var(--fs-lg); color: #fff; }
.rail-phone .icon { width: 18px; height: 18px; }
.rail-offer { background: var(--accent-tint); border-color: #F0E2CF; }
.rail-book { display: block; }
.rail-book img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow); }
.rail-book-title { display: block; margin-top: var(--s-2); font-weight: 600; font-size: var(--fs-sm); line-height: 1.4; }
.rail-offer .btn-add { width: 100%; margin-top: var(--s-2); }
.rail-promise ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.rail-promise li { padding: 6px 0; border-top: 1px solid var(--line); }
.rail-promise li:first-child { border-top: 0; }
.rail-promise strong { color: var(--brand); }

@media (min-width: 1680px) {
  .rail { display: block; position: absolute; top: var(--s-5); bottom: var(--s-6); width: min(240px, calc((100vw - 1200px) / 2 - 56px)); z-index: 5; }
  .rail-l { right: calc(50% + 600px + 28px); }
  .rail-r { left: calc(50% + 600px + 28px); }
  .rail-inner { position: sticky; top: calc(var(--header-h) + 72px); }
}

@media (prefers-reduced-motion: reduce) {
  .banner-slide, .exam, .cover-img { transition: none; }
}

/* =========================================================
   Inner pages
   ========================================================= */

/* ---------- Category: header band ---------- */
.cat-hero {
  position: relative; overflow: hidden; display: grid; gap: var(--s-4); align-items: center;
  background: var(--brand); color: #fff; border-radius: 16px; padding: var(--s-5) var(--s-4); margin-block: var(--s-3) var(--s-4);
}
.cat-hero::before {
  content: ""; position: absolute; width: 320px; height: 320px; left: -120px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 144, 72, .45), rgba(200, 144, 72, 0) 70%); pointer-events: none;
}
.cat-hero-text { position: relative; }
.cat-hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: #E9C99B; }
.cat-hero .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cat-hero h1 { font-family: var(--font-display); font-size: var(--fs-2xl); color: #fff; margin-top: 2px; }
.cat-hero p { color: rgba(255, 255, 255, .82); font-size: var(--fs-sm); max-width: 56ch; margin-top: 4px; }
.cat-hero-covers { display: none; }
.filter-help { margin-top: var(--s-5); padding: var(--s-4); border-radius: var(--radius); background: var(--accent-tint); font-size: var(--fs-sm); }
.filter-help p { color: var(--ink-2); margin: 2px 0 6px; }
.drawer .filter-help { display: none; }

/* ---------- Book: cover ---------- */
.gallery-main { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 8px 8px 4px; box-shadow: 0 2px 6px rgba(35, 26, 20, .12), 0 10px 30px rgba(35, 26, 20, .10); background: var(--accent-tint); }

/* ---------- Cart: real covers ---------- */
.cart-item > a .cover-img { width: 100%; }

/* ---------- Order success ---------- */
.narrow-page { max-width: 880px; padding-block: var(--s-5) var(--s-6); }
.success { text-align: center; padding: var(--s-6) var(--s-4); }
.success-mark { width: 64px; height: 64px; margin: 0 auto var(--s-3); border-radius: 50%; display: grid; place-items: center; background: #EEF4EF; color: var(--ok); }
.success-mark .icon { width: 32px; height: 32px; stroke-width: 2.4; }
.success h1 { font-family: var(--font-display); font-size: var(--fs-xl); }
.success > p { margin-top: var(--s-2); color: var(--ink-2); }
.track { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: var(--s-5) 0; padding: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1.3; }
.track li span { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.track li::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.track li:first-child::before { display: none; }
.track li.done span { background: var(--ok); border-color: var(--ok); }
.track li.done, .track li.now { color: var(--ink); font-weight: 600; }
.track li.now span { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.track li.now::before, .track li.done + li::before { background: var(--ok); }
.success-grid { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.success-grid .panel { padding: var(--s-5); }
.success-grid h2 { font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.mini-items { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.mini-items li { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.mini-items img { width: 40px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.mini-items small { display: block; color: var(--ink-3); }

/* ---------- Login ---------- */
.auth { max-width: 460px; margin-inline: auto; padding: var(--s-6) var(--s-5); }
.auth h1 { font-family: var(--font-display); font-size: var(--fs-xl); }
.auth > .muted { margin: var(--s-2) 0 var(--s-5); }
.auth-perks { list-style: none; margin: var(--s-5) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.auth-perks li { padding-left: 22px; position: relative; margin-bottom: 4px; }
.auth-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

@media (min-width: 960px) {
  .cat-hero { grid-template-columns: 1fr auto; padding: var(--s-6) var(--s-6); margin-top: var(--s-4); }
  .cat-hero h1 { font-size: 2.25rem; }
  .cat-hero p { font-size: var(--fs-md); }
  .cat-hero-covers { position: relative; display: flex; align-items: flex-end; height: 150px; padding-right: var(--s-4); }
  .cat-hero-covers img { width: 92px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
  .cat-hero-covers img:nth-child(1) { transform: rotate(-7deg) translate(18px, 6px); }
  .cat-hero-covers img:nth-child(2) { z-index: 1; width: 108px; }
  .cat-hero-covers img:nth-child(3) { transform: rotate(7deg) translate(-18px, 6px); }
  .success-grid { grid-template-columns: 1.3fr 1fr; }
}

/* =========================================================
   More pages: search, account, author/publisher, indexes, info, 404
   ========================================================= */
[hidden] { display: none !important; }
.center { text-align: center; }
.badge.ok { background: #EEF4EF; color: var(--ok); border-color: transparent; }
.group-title { font-family: var(--font-display); font-size: var(--fs-lg); }
.author small { color: var(--ink-3); font-size: 12px; }
.drawer-all { display: block; margin-bottom: var(--s-3); font-weight: 600; }

/* ---------- Search ---------- */
.search-head h1 { font-size: var(--fs-xl); }
.search-group { margin-bottom: var(--s-5); }
.search-group .group-title { margin-bottom: var(--s-3); }
.search-empty { padding: var(--s-6) var(--s-5); text-align: center; display: grid; gap: var(--s-3); justify-items: center; margin-block: var(--s-4) var(--s-6); }
.search-empty h2 { font-family: var(--font-display); font-size: var(--fs-xl); }
.search-empty p { color: var(--ink-2); max-width: 52ch; }
.search-empty .pubs { justify-content: center; }
[data-search-page] .toolbar { margin-top: 0; }

/* ---------- Order tracking ---------- */
.track-form { display: grid; gap: var(--s-3); padding: var(--s-5); align-items: end; }
.track-form .field + .field { margin-top: 0; }
.track-result { padding: var(--s-5); margin-top: var(--s-4); scroll-margin-top: 170px; }
.track-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.track-result-head h2 { font-family: var(--font-display); font-size: var(--fs-xl); }
.track-log { list-style: none; margin: 0 0 var(--s-4); padding: 0; border-left: 2px solid var(--line); }
.track-log li { position: relative; padding: 0 0 var(--s-3) var(--s-4); font-size: var(--fs-sm); }
.track-log li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.track-log li:first-child::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.track-log span { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.fine.center { margin-top: var(--s-4); }

/* ---------- Account ---------- */
.acct { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4) var(--s-6); }
.acct-nav { padding: var(--s-3); align-self: start; }
.acct-who { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-2) var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-2); }
.acct-who > .icon { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.acct-who span { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.acct-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.acct-nav a, .acct-nav button { display: flex; align-items: center; gap: var(--s-2); white-space: nowrap; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--radius-sm); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); background: none; border: 0; cursor: pointer; }
.acct-nav a:hover, .acct-nav button:hover { background: var(--paper); color: var(--brand); }
.acct-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.acct-body { display: grid; gap: var(--s-4); min-width: 0; }
.acct-card { padding: var(--s-5) var(--s-4); }
.acct-card h1, .acct-card h2 { font-family: var(--font-display); font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.acct-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); flex-wrap: wrap; }
.acct-card-head h1, .acct-card-head h2 { margin-bottom: 0; }
.acct-card .track { margin-block: var(--s-5); }
.acct-body > .success-grid { margin-top: 0; }
.orders { list-style: none; margin: 0; padding: 0; }
.order-row { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.order-covers { display: flex; grid-row: span 2; }
.order-covers img { width: 40px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 4px rgba(35, 26, 20, .18); }
.order-covers img + img { margin-left: -16px; }
.order-meta { display: grid; }
.order-no { font-weight: 600; color: var(--ink); }
.order-no:hover { color: var(--brand); }
.order-meta span { font-size: var(--fs-xs); color: var(--ink-3); }
.order-row .badge { justify-self: start; }
.order-actions { grid-column: 1 / -1; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.addr-grid { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.addr { position: relative; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.addr.is-default { border-color: var(--brand); }
.addr .badge { position: absolute; top: var(--s-3); right: var(--s-3); }
.addr p { color: var(--ink-2); margin: 4px 0 var(--s-2); }
.addr .link, .acct-card-head .link { border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.profile-form { display: grid; gap: var(--s-3); max-width: 440px; }
.profile-form .field + .field { margin-top: 0; }
.profile-form .btn { justify-self: start; }
.field input:disabled { background: var(--paper); color: var(--ink-3); }

/* ---------- Author / publisher ---------- */
.profile-hero { display: grid; gap: var(--s-4); justify-items: center; text-align: center; padding: var(--s-5) var(--s-4); margin-block: var(--s-3) var(--s-4); border-radius: 16px; background: var(--accent-tint); }
.photo-credit { margin-top: var(--s-2); font-size: 12px; color: var(--ink-3); }
.photo-credit a { color: inherit; }
.profile-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(35, 26, 20, .15); }
.profile-mono { display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--font-display); font-size: 3rem; font-weight: 600; }
.profile-text .eyebrow { font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.profile-text h1 { font-family: var(--font-display); font-size: var(--fs-2xl); }
.profile-sub { color: var(--ink-3); font-size: var(--fs-sm); }
.profile-text > p:not(.profile-sub) { color: var(--ink-2); max-width: 60ch; margin: var(--s-2) auto 0; }
.profile-stats { list-style: none; display: flex; justify-content: center; gap: var(--s-5); margin: var(--s-3) 0; padding: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.profile-stats strong { font-size: var(--fs-lg); color: var(--brand); margin-right: 2px; }
[data-follow][aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Authors / publishers index ---------- */
.index-search { position: relative; max-width: 520px; margin-bottom: var(--s-4); }
.index-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.index-search input { width: 100%; min-height: 48px; padding: 0 var(--s-4) 0 44px; border: 1px solid var(--line-strong); border-radius: 999px; font: inherit; background: var(--surface); }
.index-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.az-letters { display: flex; flex-wrap: wrap; gap: 4px; margin-block: var(--s-5) var(--s-4); }
.az-letters a { min-width: 36px; min-height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 600; color: var(--brand); }
.az-letters a:hover { background: var(--brand); color: #fff; }
.az { columns: 1; column-gap: var(--s-5); padding-bottom: var(--s-6); }
.az-group { break-inside: avoid; margin-bottom: var(--s-4); scroll-margin-top: 170px; }
.az-group h2 { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--accent-ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: var(--s-2); }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { display: flex; justify-content: space-between; gap: var(--s-2); padding: 6px 0; font-size: var(--fs-sm); }
.az-group li span { color: var(--ink-3); font-size: var(--fs-xs); }
.az-group a { color: var(--ink); }
.az-group a:hover { color: var(--brand); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--s-3); padding-bottom: var(--s-6); }
.pub-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.pub-card:hover { border-color: var(--brand); }
.pub-card small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.pub-mono { flex: none; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }

/* ---------- All categories ---------- */
.cat-cards { display: grid; gap: var(--s-4); }
.cat-card { padding: var(--s-5) var(--s-4); }
.cat-card h2 { display: flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.cat-card h2 .icon { color: var(--accent-ink); }
.cat-card ul { list-style: none; margin: 0; padding: 0; }
.cat-card a { display: flex; justify-content: space-between; gap: var(--s-2); padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: var(--fs-sm); }
.cat-card li:last-child a { border-bottom: 0; }
.cat-card a:hover { color: var(--brand); }
.cat-card a span { color: var(--ink-3); font-size: var(--fs-xs); }
.cat-card-feature { background: var(--brand); border-color: var(--brand); }
.cat-card-feature h2, .cat-card-feature h2 .icon, .cat-card-feature a { color: #fff; }
.cat-card-feature a { border-color: rgba(255, 255, 255, .16); }
.cat-card-feature a span { color: #E9C99B; }
.cat-card-feature a:hover { color: #E9C99B; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Exam page ---------- */
.stages { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-3); }
.stages li { display: flex; gap: var(--s-3); padding: var(--s-4); }
.stage-no { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; }
.stages h2 { font-size: var(--fs-md); }
.stages p { font-size: var(--fs-sm); color: var(--ink-2); margin: 2px 0 6px; }
.stages .link { font-size: var(--fs-sm); font-weight: 600; }

/* ---------- Info pages ---------- */
.info-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-3) var(--s-7); }
.info-nav { padding: var(--s-2); align-self: start; }
.info-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.info-nav a { display: block; white-space: nowrap; padding: 10px var(--s-3); border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--fs-sm); }
.info-nav a:hover { color: var(--brand); background: var(--paper); }
.info-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.info-body { min-width: 0; }
.info-body .page-head { padding-top: 0; }
.info-body h3[id] { scroll-margin-top: 170px; }
.draft-note { padding: var(--s-3); margin-bottom: var(--s-4); border-radius: var(--radius-sm); background: var(--accent-tint); border-left: 3px solid var(--accent); font-size: var(--fs-sm); color: var(--ink-2); }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--accent-tint); color: var(--accent-ink); font-size: 12px; font-weight: 600; vertical-align: 1px; }
.info-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info-table th, .info-table td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { background: var(--paper); font-size: var(--fs-xs); color: var(--ink-2); }
.pay-cards, .contact-cards { display: grid; gap: var(--s-3); margin-bottom: var(--s-3); }
.pay-cards .panel { padding: var(--s-4); }
.pay-cards h3 { margin-top: 0; }
.contact-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); color: var(--ink); }
.contact-card > .icon { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.contact-card small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
a.contact-card:hover { border-color: var(--brand); }
.contact-form { display: grid; gap: var(--s-3); max-width: 520px; }
.contact-form .field + .field { margin-top: 0; }
.contact-form .btn { justify-self: start; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: var(--s-2); }
.faq summary { cursor: pointer; padding: var(--s-3) var(--s-4); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s-3); min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-size: var(--fs-lg); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 var(--s-4) var(--s-4); color: var(--ink-2); }
.prose .faq { max-width: none; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding-block: var(--s-7) var(--s-5); display: grid; justify-items: center; gap: var(--s-3); }
.nf-code { font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--accent); }
.nf h1 { font-family: var(--font-display); font-size: var(--fs-2xl); }
.nf-search { width: 100%; max-width: 560px; }
.nf-links { justify-content: center; }

/* ---------- Wishlist button on the book page ---------- */
.wish-btn[aria-pressed="true"] { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.wish-btn[aria-pressed="true"] .icon { fill: currentColor; }

@media (min-width: 640px) {
  .track-form { grid-template-columns: 1fr 1fr auto; }
  .order-row { grid-template-columns: auto 1fr auto auto; }
  .order-covers { grid-row: auto; }
  .order-actions { grid-column: auto; }
  .addr-grid, .pay-cards, .contact-cards { grid-template-columns: 1fr 1fr; }
  .az { columns: 2; }
  .profile-hero { grid-template-columns: auto 1fr; justify-items: start; text-align: left; padding: var(--s-6); }
  .profile-text > p:not(.profile-sub) { margin-inline: 0; }
  .profile-stats { justify-content: flex-start; }
  .stages { grid-template-columns: repeat(3, 1fr); }
  .stages li { flex-direction: column; }
}
@media (min-width: 960px) {
  .acct { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .acct-nav { position: sticky; top: 150px; }
  .acct-nav ul { flex-direction: column; overflow: visible; }
  .acct-card { padding: var(--s-6); }
  .info-layout { grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-6); }
  .info-nav { position: sticky; top: 150px; }
  .info-nav ul { flex-direction: column; overflow: visible; }
  .az { columns: 4; }
  .profile-photo { width: 160px; height: 160px; }
  .cat-cards { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .grid-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .wish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Listing pages on desktop: the result bar scrolls with the page so it never covers the
   sticky filter column; the filter column sits just under the header. */
@media (min-width: 960px) {
  .toolbar { position: static; }
  .filters { top: 136px; max-height: calc(100vh - 152px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
}

/* ---- Laravel build additions ---- */
.footer-contact { margin-top: 12px; }
.footer-sub { margin-top: 20px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
button.rail-more { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
button.rail-more:hover { text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 32px 0 8px; flex-wrap: wrap; }
.pager-step { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; color: var(--brand); background: var(--surface); }
a.pager-step:hover { border-color: var(--brand); }
span.pager-step { color: var(--ink-3); opacity: .6; }
.pager-now { color: var(--ink-3); font-size: var(--fs-sm); }
button.chip { font-family: inherit; cursor: pointer; }
.drawer-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.filters-clear { display: inline-block; margin-top: 16px; }
.notice { padding: 12px 16px; margin-bottom: 16px; border-left: 4px solid var(--ok); }
.expand-btn { margin-top: 8px; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.review { padding: 16px; }
.review + .review { margin-top: 12px; }
.review-head { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 4px; }
.stars { color: #C98A1B; letter-spacing: 1px; }
.review-form { display: grid; gap: 12px; padding: 16px; margin-top: 16px; max-width: 560px; }
.review-form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.review-login { margin-top: 12px; color: var(--ink-2); }
.stars-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars-input legend { float: left; width: 100%; font-weight: 600; margin-bottom: 4px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { font-size: 28px; line-height: 1; color: var(--line-strong); cursor: pointer; padding: 4px; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: #C98A1B; }
.stars-input input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.field-error { color: #B42318; font-size: var(--fs-sm); }
.form-errors { padding: 12px 16px; margin-bottom: 16px; border-left: 4px solid #B42318; }
.form-errors ul { margin-top: 4px; padding-left: 18px; list-style: disc; }
.option.is-disabled { opacity: .55; cursor: not-allowed; }
.summary-sub { font-size: 14px; margin: -6px 0 16px; }
.more-books { margin-top: 16px; }
.place-order { margin-top: 16px; }
.field [aria-invalid="true"] { border-color: #B42318; }
.ci-bottom form.qty { margin: 0; }
.success-sub { margin-top: 24px; }
.center-actions { text-align: center; margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.order-no { white-space: nowrap; }
.not-found, .cancelled { border-left-color: #B42318; }
.auth-alt { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.auth-sub { font-size: var(--fs-md); margin: 24px 0 8px; }
.remember { margin: 12px 0 4px; }
.field-error { display: block; margin-top: 2px; }
.acct-nav form { margin: 0; }
.acct-nav form button { width: 100%; text-align: left; }
.order-actions form { display: inline; margin: 0; }
.fine.left { text-align: left; }
.wish-item { display: grid; align-content: start; gap: 6px; }
.wish-remove { justify-self: center; font-size: var(--fs-sm); color: var(--ink-2); }
.account-choice { border: 0; padding: 0; margin: 16px 0 0; }
.account-choice .choice { display: grid; gap: 8px; }
.account-password { margin-top: 12px; }
.account-password[hidden] { display: none; }
