/* Shop pages: the 4-book list, book pages, add-on cards, cart, the checkout picker and the free reader.
   Loaded after site.css (and after combo.css on the book pages). Same brand rules: flat cards,
   at most three sticker-style items per page, no gradients. */

/* ---------- shop list (courses.html) ---------- */
.offer-strip { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; background: var(--lebu); border: 3px solid var(--ink); border-radius: var(--radius-md); box-shadow: var(--shadow-sticker); padding: 14px 20px; margin-bottom: 28px; }
.offer-strip b { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.offer-strip span { font-size: 16.5px; font-weight: 600; }
.shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
@media (max-width: 980px) { .shop-list { grid-template-columns: minmax(0, 1fr); } }
.shop-list .shop-card { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 20px; box-shadow: none; border-width: 2px; }
@media (max-width: 640px) { .shop-list .shop-card { grid-template-columns: minmax(0, 1fr); } .shop-list .shop-cover { max-width: 150px; } }
.shop-card .shop-cover img, .addon-cover img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 3px 8px 8px 3px; background: var(--white); }
.shop-card h2 a, .addon h3 a { color: inherit; text-decoration: none; }
.shop-card h2 a:hover, .addon h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.shop-list .shop-body h2 { font-size: clamp(24px, 2.6vw, 28px); line-height: 1.2; }
.shop-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 16px; font-weight: 600; }
.shop-links a { color: var(--beguni); }
.shop-list .shop-buy { margin-top: auto; }
.shop-list .price .now { font-size: 34px; }
.shop-list .shop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-list .shop-actions .btn { font-size: 16.5px; padding: 10px 14px; }
.btn[data-in-cart="true"] { background: var(--lebu-tint); color: var(--ink); border-color: var(--ink); }

/* ---------- book pages ---------- */
.book-hero .cover-wrap img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 4px 10px 10px 4px; box-shadow: var(--shadow-sticker); background: var(--white); }
.book-hero h1 { font-size: clamp(36px, 5.6vw, 62px); }
.book-hero .price-row .badge { font-size: 15.5px; padding: 6px 14px; }
.hero-free { margin-top: 16px; font-size: 16.5px; color: var(--lilac); }
.hero-free a { color: var(--lebu); font-weight: 700; }
#inside .cb-toc { margin-top: 30px; }
.free-more { margin: 26px 0 10px; color: var(--ink-muted); font-weight: 600; }

.addon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .addon-grid { grid-template-columns: minmax(0, 1fr); } }
.addon { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-md); padding: 16px; align-items: start; }
.addon h3 { font-size: 20px; line-height: 1.25; }
.addon p { font-size: 15.5px; color: var(--ink-muted); margin-top: 4px; }
.addon-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.addon-price b { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.addon-price s { font-size: 14px; opacity: .7; }

/* ---------- bonus guide that comes free with a book ---------- */
.hero-bonus { margin-top: 16px; font-size: 17px; color: var(--paper); }
.hero-bonus b { color: var(--lebu); }
.hero-bonus a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hero-bonus + .hero-free { margin-top: 8px; }
.bonus-box { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; background: var(--lebu-tint); border: 3px solid var(--ink); border-radius: var(--radius-md); padding: 24px; }
.bonus-box h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin-top: 6px; }
.bonus-box p { margin-top: 10px; font-size: 17.5px; }
.bonus-cover img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 3px 8px 8px 3px; background: var(--white); }
.bonus-points { margin-top: 16px; }
@media (max-width: 700px) { .bonus-box { grid-template-columns: minmax(0, 1fr); padding: 18px; } .bonus-cover { max-width: 150px; } }
.shop-bonus { font-size: 16px; margin-top: 4px; }
.shop-bonus b { background: var(--lebu); padding: 1px 7px; border-radius: 4px; }

/* ---------- picker rows: checkout (tick boxes) and cart ---------- */
.pick-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.pick { border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.pick[data-on="true"] { border-color: var(--ink); background: var(--lebu-tint); }
.pick label { display: grid; grid-template-columns: 24px 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; }
.pick input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--beguni); }
.pick img { display: block; width: 46px; height: auto; border: 1.5px solid var(--ink); border-radius: 2px 5px 5px 2px; }
.pick-t { display: grid; gap: 2px; min-width: 0; }
.pick-t b { font-size: 17px; line-height: 1.3; }
.pick-t a { color: inherit; text-decoration: none; }
.pick-s { font-size: 14px; color: var(--ink-muted); }
.pick-p { display: grid; justify-items: end; line-height: 1.1; white-space: nowrap; }
.pick-p b { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.pick-p s { font-size: 13.5px; opacity: .7; }
.pick-div { list-style: none; font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.35; margin-top: 8px; padding: 9px 12px; background: var(--lilac); border: 2px dashed var(--ink); border-radius: var(--radius-sm); }
p.pick-div { margin-top: 20px; }
.pick-note { margin-top: 10px; font-size: 16px; color: var(--ink-muted); }
.pick--cart { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; }
@media (max-width: 520px) { .pick--cart { grid-template-columns: 46px minmax(0, 1fr) auto; } .pick--cart .btn { grid-column: 2 / -1; justify-self: start; } }
#co-books .err { display: block; margin-top: 10px; font-size: 15px; color: #B3261E; font-weight: 600; }
#co-books .err[hidden] { display: none; }
.order-total small { font-weight: 500; color: var(--ink-muted); font-size: 15px; }
.cart-go { display: flex; width: 100%; margin-top: 16px; }
#cart-root h2 { font-size: 24px; }
.co-submit .js-total { font: inherit; }

/* ---------- floating cart link ---------- */
.cart-pill { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 9; background: var(--ink); color: var(--paper); border: 2px solid var(--lebu); border-radius: var(--radius-pill); padding: 10px 16px; font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; }
.cart-pill[data-over-bar="true"] { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.cart-pill[hidden] { display: none; }

/* ---------- free reader (read.html) ---------- */
.reader-head h1 { font-size: clamp(30px, 5vw, 48px); max-width: 24ch; }
.reader-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.reader-tabs a { border: 2px solid var(--ink); border-radius: var(--radius-pill); padding: 6px 14px; font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--ink); background: var(--white); }
.reader-tabs a[aria-current="true"] { background: var(--beguni); color: var(--on-beguni); }
.reader { border: 3px solid var(--ink); border-radius: var(--radius-md); overflow: hidden; background: var(--white); height: min(82vh, 900px); height: min(82dvh, 900px); }
.reader iframe { display: block; width: 100%; height: 100%; border: 0; }
.reader[hidden], .reader-pages[hidden], .reader-alt[hidden] { display: none; }
.reader-pages { display: grid; gap: 14px; }
.reader-pages img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--white); }
.reader-alt { margin-top: 10px; font-size: 15px; color: var(--ink-muted); }
.reader-buy { margin-top: 22px; background: var(--lilac); border: 2px solid var(--ink); border-radius: var(--radius-md); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.reader-buy b { display: block; font-family: var(--font-display); font-size: 21px; line-height: 1.3; }
.reader-buy span { font-size: 16px; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Checkout: a book the order script cannot deliver yet. The payment steps stay hidden until it can. */
.co-hold { margin-top: 14px; background: var(--white); border: 2px solid var(--komola); border-radius: var(--radius-md); padding: 14px 16px; font-size: 16px; line-height: 1.6; }
.co-hold[hidden] { display: none; }
.co-form[data-hold="true"] .co-step:not(#co-books) { display: none; }
