/* The book shop and book pages, in the Marketplace look: its font, light page, white rounded cards and colourful pills.
   The book pages also use the shared component classes from app.css, so their colours are set here to the Marketplace palette. */
body.bk-store {
  --surface: #FFFFFF; --surface-2: #F4F4F7; --text: #121212; --text-muted: #6B6B6B; --text-faint: #9A9A9A; --muted: #6B6B6B;
  --border: #ECECEC; --primary: #121212; --primary-hover: #2B2B2B; --primary-ink: #FFFFFF; --focus: #4266FF;
  --accent: #7B5CFF; --accent-soft: rgba(123, 92, 255, .12); --danger: #E0362C; --success: #1FAA59;
  color-scheme: light;
}
.bk-page { display: flex; flex-direction: column; gap: 20px; padding-bottom: 64px; }
.bk-page > * { margin: 0; }
.bk-page h1 { color: var(--mk-n800); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.bk-page h2 { color: var(--mk-n800); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.bk-page h3 { color: var(--mk-n800); }
.bk-page p { color: var(--mk-n600); }

/* Cards and panels: white, rounded, softly lifted. */
.bk-page .card, .bk-page .glass, .bk-page .panel { background: var(--mk-n100); border: 0; border-radius: var(--mk-r-xl); box-shadow: var(--mk-shadow);
  padding: clamp(18px, 3vw, 28px); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--mk-n600); }
.bk-page .muted, .bk-page .hint { color: var(--mk-n500); }
.bk-page a { color: inherit; }

/* Buttons and fields in the Marketplace style. */
.bk-page .btn { font-family: inherit; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--mk-r); background: var(--mk-n800); color: #fff; font-weight: 600; box-shadow: none; }
.bk-page .btn:hover { background: #2B2B2B; }
.bk-page .btn.secondary { background: var(--mk-n100); color: var(--mk-n800); box-shadow: inset 0 0 0 1px var(--mk-n300); }
.bk-page .btn.secondary:hover { background: var(--mk-n200); }
.bk-page .btn.lg { min-height: 52px; font-size: 16px; }
.bk-page .input, .bk-page .select, .bk-page textarea { font-family: inherit; background: var(--mk-n200); border: 1px solid var(--mk-n300); border-radius: var(--mk-r); color: var(--mk-n800); min-height: 48px; }
.bk-page .input:focus, .bk-page .select:focus { border-color: var(--mk-blue); outline: 0; box-shadow: 0 0 0 3px rgba(66, 102, 255, .18); }
.bk-page .label { color: var(--mk-n700); font-weight: 600; }

/* The shop header: no picture falls back to a colourful gradient, and the card sits over it. */
.bk-shop-hero .mk-cover:empty { aspect-ratio: 21 / 6; background: linear-gradient(120deg, var(--mk-violet), var(--mk-pink) 55%, var(--mk-amber)); }
.bk-shop-hero .mk-biz-actions form { margin: 0; }
.bk-shop-hero .mk-cover img { object-position: center 20%; }
.mk-pill.bk-violet { background: #EFEAFF; color: #5A3FD6; }
.mk-pill.bk-amber { background: #FFF3D6; color: #8A5A00; }
@media (max-width: 760px) {
  .bk-shop-hero .mk-biz-card { grid-template-columns: auto minmax(0, 1fr); margin: -40px 10px 0; }
  .bk-shop-hero .mk-biz-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .bk-shop-hero .mk-biz-logo { width: 64px; height: 64px; }
}

/* The demo note: a warm band, not a warning box. */
.bk-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--mk-r-xl); background: linear-gradient(120deg, #FFF4DC, #FFE6EE); color: var(--mk-n700); font-size: 15px; line-height: 1.55; }
.bk-note strong { color: var(--mk-n800); }
.bk-note-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--mk-coral); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.bk-note a { display: inline-block; margin-left: 4px; font-weight: 700; color: var(--mk-coral); text-decoration: underline; text-underline-offset: 3px; }

/* The search bar. */
.bk-searchbar { display: flex; align-items: center; gap: 8px; background: var(--mk-n100); border-radius: var(--mk-r-xl); padding: 8px 8px 8px 20px; box-shadow: var(--mk-shadow), inset 0 0 0 1px var(--mk-n300); }
.bk-searchbar-ico { color: var(--mk-n500); }
.bk-searchbar input { flex: 1; min-width: 0; min-height: 52px; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 17px; color: var(--mk-n800); }
.bk-searchbar .mk-btn { min-height: 52px; border-radius: var(--mk-r-lg); }
.bk-audience { margin-top: -6px; }

/* Shelves: each heading gets its own colour. */
.bk-page .bk-layout { gap: 20px; }
.bk-page .bk-layout > .stack { gap: 20px; }
.bk-page .bk-layout > .stack > .card > h2:first-child, .bk-page .bk-layout > .stack > .card > .row > h2:first-child, #pass h2 { display: flex; align-items: center; gap: 12px; }
.bk-page .bk-layout > .stack > .card > h2:first-child::before, .bk-page .bk-layout > .stack > .card > .row > h2:first-child::before, #pass h2::before {
  content: ""; width: 12px; height: 12px; border-radius: 4px; flex: none; background: var(--mk-blue); }
.bk-page .bk-layout > .stack > .card:nth-child(5n+2) > h2:first-child::before { background: var(--mk-coral); }
.bk-page .bk-layout > .stack > .card:nth-child(5n+3) > h2:first-child::before { background: var(--mk-amber); }
.bk-page .bk-layout > .stack > .card:nth-child(5n+4) > h2:first-child::before { background: var(--mk-teal); }
.bk-page .bk-layout > .stack > .card:nth-child(5n+5) > h2:first-child::before { background: var(--mk-pink); }
#pass h2::before { background: var(--mk-violet); }
#pass { background: linear-gradient(120deg, #F3EFFF, #FFFFFF 70%); }

/* The filter list. */
.bk-page .bk-rail { gap: 22px; align-self: start; }
.bk-page .bk-rail h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mk-n500); }
.bk-page .bk-rail a { min-height: 44px; border-radius: var(--mk-r); color: var(--mk-n700); font-weight: 500; }
.bk-page .bk-rail a:hover { background: var(--mk-n200); text-decoration: none; }
.bk-page .bk-rail a.on { background: var(--mk-n800); color: #fff; font-weight: 600; }
.bk-page .bk-rail a.on .muted { color: rgba(255, 255, 255, .7); }

/* Tags and sorting as soft colourful pills. */
.bk-page .bk-tag { min-height: 32px; padding: 4px 14px; font-weight: 600; font-size: 13px; background: var(--mk-n200); color: var(--mk-n700); box-shadow: inset 0 0 0 1px var(--mk-n300); text-decoration: none; }
.bk-page .bk-tags .bk-tag:nth-child(4n+1) { background: #E9EDFF; color: #2440C4; box-shadow: none; }
.bk-page .bk-tags .bk-tag:nth-child(4n+2) { background: #FFECE6; color: #B83516; box-shadow: none; }
.bk-page .bk-tags .bk-tag:nth-child(4n+3) { background: #E3F7F4; color: #0B7F74; box-shadow: none; }
.bk-page .bk-tags .bk-tag:nth-child(4n+4) { background: #FFF3D6; color: #8A5A00; box-shadow: none; }
.bk-page .bk-tags .bk-tag[aria-current="true"] { background: var(--mk-n800); color: #fff; }
.bk-page .bk-tag.sale { background: #FFECE6; color: #C23A1A; }

/* Books in a grid: covers lift, prices read clearly. */
.bk-page .bk-card .bk-cover-wrap { box-shadow: 0 2px 6px rgba(18, 18, 18, .08); }
.bk-page .bk-card-title { color: var(--mk-n800); }
.bk-page .bk-card-price { color: var(--mk-n800); }
.bk-page .bk-mini.pass { background: #EFEAFF; color: #5A3FD6; }
.bk-page .bk-option { border: 1px solid var(--mk-n300); border-radius: var(--mk-r-lg); background: var(--mk-n100); }
.bk-page .bk-price { color: var(--mk-n800); }

/* A book's page: the top card holds the cover, the title and the details card. */
.bk-book-top h1 { font-size: clamp(28px, 4vw, 44px); }
.bk-book-top .bk-hero > div:first-child .bk-cover { box-shadow: 0 10px 30px rgba(18, 18, 18, .18); }
/* A book's page, laid out like a product page: the cover beside the title and the buying options,
   then the description and reviews beside the details card, which stays in view while reading. */
@media (min-width: 1000px) {
  .bk-page .bk-pdp { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; }
  .bk-page .bk-pdp > div:first-child { position: sticky; top: 20px; }
}
.bk-page .bk-pdp-info { gap: 14px; }
.bk-page .bk-pdp-info > .card { background: var(--mk-n200); box-shadow: none; border-radius: var(--mk-r-lg); padding: 20px; gap: 12px; }
.bk-page .bk-pdp-info > .card h2 { font-size: 18px; }
.bk-page .bk-pdp-info .bk-buy { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.bk-page .bk-pdp-info .bk-option { background: var(--mk-n100); border: 0; box-shadow: 0 1px 2px rgba(18, 18, 18, .05); }
.bk-pdp-body { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.bk-pdp-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bk-pdp-main:empty { display: none; }
@media (min-width: 1000px) {
  .bk-pdp-body.has-aside { grid-template-columns: minmax(0, 1fr) 400px; }
  .bk-pdp-aside { align-self: start; }
}
.bk-pdp-main .card > p { font-size: 17px; line-height: 1.7; }

/* The details card: a white card of its own, coloured icons on the group headings, plain black icons on the rows. */
.bk-page .bk-m3 { max-width: none; margin: 0; background: var(--mk-n100); border-radius: var(--mk-r-xl); box-shadow: var(--mk-shadow); padding: 22px 22px 14px; }
.bk-page .bk-m3-head { border-bottom-color: var(--mk-n300); }
.bk-page .bk-m3-head .bk-m3-ico { background: var(--mk-n800); color: #fff; box-shadow: none; }
.bk-page .bk-m3-chips .bk-pill { background: var(--mk-n200); border-color: var(--mk-n300); }
.bk-page .bk-m3-row dt .bk-m3-ico { flex: 0 0 20px; width: 20px; height: 20px; background: none; box-shadow: none; border-radius: 0; color: var(--mk-n800); font-size: 14px; }
.bk-page .bk-m3-row dt { color: var(--mk-n600); }
.bk-page .bk-m3-row dd { color: var(--mk-n800); }
.bk-page .bk-m3-row { border-bottom-color: var(--mk-n300); }
.bk-page .bk-m3-group { padding-top: 22px; }
.bk-page .bk-m3-group h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; gap: 12px; margin-bottom: 8px; color: var(--mk-n800); }
.bk-page .bk-m3-group h3 i { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 16px; color: #fff; background: var(--mk-violet); }
.bk-page .bk-m3-group.g-edition h3 i { background: var(--mk-blue); }
.bk-page .bk-m3-group.g-inside h3 i { background: var(--mk-coral); }
.bk-page .bk-m3-group.g-reading h3 i { background: var(--mk-teal); }
.bk-page .bk-m3-group.g-made h3 i { background: var(--mk-amber); }
.bk-page .bk-m3-group.g-more h3 i { background: var(--mk-pink); }
.bk-page .bk-m3-more > summary { background: var(--mk-n200); border-color: var(--mk-n300); color: var(--mk-n800); }
.bk-page .bk-stars { color: var(--mk-amber); }
details.bk-more > summary { color: var(--mk-n800); }
/* On phones the details card comes straight after the description, before the reviews. */
@media (max-width: 999px) { .bk-pdp-body { display: flex; flex-direction: column; } .bk-pdp-main { display: contents; } .bk-pdp-aside { order: 1; } .bk-pdp-body #reviews { order: 2; } .bk-pdp-body #more-books { order: 3; } }
