.has-bookstore {
  --bookstore-ink: #21334a;
  --bookstore-muted: #516277;
  --bookstore-line: #dce5ee;
  --bookstore-wash: #f2f6fb;
  --bookstore-link: #235785;
}
.bookstore-header, .bookstore-footer, .bookstore-support, .bookstore-main {
  color: var(--bookstore-ink);
}
.bookstore-header *, .bookstore-footer *, .bookstore-support *, .bookstore-main * { box-sizing: border-box; }
.bookstore-header.bookstore-header {
  display: block; position: relative; inset: auto; z-index: 4; width: 100%;
  padding: 0; margin: 0; border: 0; border-block-end: 1px solid var(--bookstore-line);
  background: #fff; color: var(--bookstore-ink); box-shadow: none;
}
.bookstore-header-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  width: min(calc(100% - 36px), 1360px); min-height: 88px; margin-inline: auto;
}
.bookstore-header .bookstore-brand, .bookstore-footer .bookstore-brand {
  display: inline-flex; gap: 8px; align-items: center; padding: 0; color: var(--bookstore-ink);
  text-decoration: none; font-size: 1.06rem; font-weight: 800; white-space: nowrap;
}
.bookstore-header .bookstore-brand img, .bookstore-footer .bookstore-brand img {
  display: block; width: 72px; height: 72px; min-width: 72px; max-width: none; max-height: none; object-fit: contain;
}
.bookstore-header .bookstore-nav, .bookstore-header .bookstore-controls {
  display: flex; gap: 4px; align-items: center; padding: 0; margin: 0; border: 0; background: transparent;
}
.bookstore-header .bookstore-nav { justify-content: center; }
.bookstore-header .bookstore-controls { justify-content: end; }
.bookstore-header .bookstore-nav[hidden], .bookstore-header .bookstore-menu[hidden] { display: none; }
.bookstore-header .bookstore-nav a, .bookstore-header .bookstore-controls a,
.bookstore-header .bookstore-controls button, .bookstore-header .bookstore-currency,
.bookstore-header button.bookstore-menu {
  display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-height: 44px;
  min-width: 44px; padding: 4px 9px; margin: 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--bookstore-ink); font: inherit; font-size: .9rem; font-weight: 650;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.bookstore-header .bookstore-controls button, .bookstore-header .bookstore-currency,
.bookstore-header button.bookstore-menu { border-color: var(--bookstore-line); }
.bookstore-header .bookstore-nav a:hover, .bookstore-header .bookstore-nav a[aria-current="page"],
.bookstore-header .bookstore-controls :is(a, button):hover, .bookstore-header button.bookstore-menu:hover {
  background: var(--bookstore-wash); color: var(--bookstore-link);
}
.bookstore-page { margin: 0; background: #fff; font: 1rem/1.55 system-ui, sans-serif; }
.bookstore-main, .bookstore-support, .bookstore-footer-inner {
  width: min(calc(100% - 36px), 1320px); margin-inline: auto; min-width: 0;
}
.bookstore-main { padding-block: 28px 26px; }
.bookstore-main h1, .bookstore-main h2, .bookstore-main h3, .bookstore-support h2 { color: var(--bookstore-ink); line-height: 1.2; }
.bookstore-hero {
  display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 560px);
  place-content: center; align-items: center; gap: clamp(20px, 5vw, 64px);
  min-height: 320px; padding: clamp(24px, 5vw, 62px);
  border: 1px solid var(--bookstore-line); border-radius: 20px; background: var(--bookstore-wash);
}
.bookstore-hero img { display: block; inline-size: 100%; block-size: auto; object-fit: contain; mix-blend-mode: multiply; }
.bookstore-hero h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.8rem); letter-spacing: -.025em; }
.bookstore-hero p { margin: 12px 0 0; color: var(--bookstore-muted); }
.bookstore-main a.bookstore-primary {
  display: inline-flex; align-items: center; min-height: 48px; margin-block-start: 18px; padding: 8px 18px;
  border: 1px solid #9fb8d2; border-radius: 9px; background: #dce9f7; color: #173b60;
  font-weight: 750; text-decoration: none;
}
.bookstore-collection, .bookstore-extras { margin-block: 36px 0; min-width: 0; }
.bookstore-main > .bookstore-collection:first-child { margin-block-start: 10px; }
.bookstore-collection-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-end: 12px; }
.bookstore-collection-heading :is(h1,h2), .bookstore-extras h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.bookstore-collection-heading > a, .bookstore-details {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 3px; color: var(--bookstore-link);
  font-weight: 700; text-underline-offset: .2em;
}
.bookstore-collection-heading > a { white-space: nowrap; }
.bookstore-shelf, .bookstore-grid, .bookstore-extras ul {
  display: grid; gap: 14px; list-style: none; padding: 0; margin: 0;
}
.bookstore-shelf {
  grid-auto-flow: column; grid-auto-columns: clamp(158px, 16.1vw, 212px);
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline proximity; padding: 2px 2px 12px;
  scrollbar-color: #aebed0 var(--bookstore-wash);
}
.bookstore-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); }
.bookstore-card {
  display: flex; position: relative; flex-direction: column; min-width: 0; padding: 10px;
  background: #fff; border: 1px solid var(--bookstore-line); border-radius: 12px; scroll-snap-align: start;
}
.bookstore-cover {
  display: grid; place-items: center; aspect-ratio: 1 / 1.14; padding: 9px;
  border-radius: 8px; background: var(--bookstore-wash); overflow: hidden;
}
.bookstore-cover img { display: block; width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.bookstore-card :is(h2,h3) { font-size: 1rem; line-height: 1.35; margin: 12px 0 4px; overflow-wrap: anywhere; }
.bookstore-card p { font-size: .83rem; color: var(--bookstore-muted); margin: 0 0 10px; }
.bookstore-card .bookstore-price { margin-block-start: auto; }
.bookstore-price, .has-bookstore .product-price:has([data-parent-price]) {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .3em .7em; color: var(--bookstore-ink);
}
.bookstore-price del, .has-bookstore .product-price del {
  color: var(--bookstore-muted); font-weight: 500; white-space: nowrap; text-decoration: line-through;
}
.bookstore-price strong, .bookstore-price > span, .has-bookstore .product-price strong { font-weight: 800; white-space: nowrap; }
.bookstore-extras ul { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block-start: 16px; }
.bookstore-extras a {
  display: grid; min-height: 44px; overflow: hidden; color: var(--bookstore-link);
  border: 1px solid var(--bookstore-line); border-radius: 11px; text-decoration: none; font-weight: 750;
}
.bookstore-extras img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; background: var(--bookstore-wash); }
.bookstore-extras a span { padding: 12px; }
.bookstore-support { padding-block: 20px 38px; }
.bookstore-trust {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 30px; list-style: none; margin: 0 0 28px;
  padding: 16px; text-align: center; background: var(--bookstore-wash); border-radius: 10px; font-weight: 650;
}
.bookstore-faq { max-width: 780px; margin-inline: auto; }
.bookstore-faq h2 { font-size: 1.4rem; margin: 0 0 10px; }
.bookstore-faq details { border-block-end: 1px solid var(--bookstore-line); }
.bookstore-faq summary { min-height: 44px; padding: 11px 0; cursor: pointer; font-weight: 650; }
.bookstore-faq p { margin: 0 0 12px; color: var(--bookstore-muted); }
footer.bookstore-footer {
  display: block; padding: 22px 0; margin: 0; text-align: start;
  border: 0; border-block-start: 1px solid var(--bookstore-line); background: var(--bookstore-wash);
}
.bookstore-footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: center; }
.bookstore-footer p { color: var(--bookstore-muted); margin: 2px 0; }
.bookstore-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; justify-content: end; }
.bookstore-footer nav a, .bookstore-footer a[href^="mailto:"] {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--bookstore-link); overflow-wrap: anywhere;
}
.bookstore-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.has-bookstore :is(.bookstore-header,.bookstore-main,.bookstore-support,.bookstore-footer) :focus-visible {
  outline: 2px solid var(--bookstore-link); outline-offset: 2px;
}
.has-bookstore .shop-item { min-width: 0; }
.has-bookstore .shop-item .item-image { height: auto; aspect-ratio: 1 / 1; padding: 10px; background: var(--bookstore-wash); }
.has-bookstore .shop-item .item-image img { width: 100%; height: 100%; object-fit: contain; }
.has-bookstore #category-filters :is(a, button), .has-bookstore .shop-item .item-cta,
.has-bookstore .shop-tools :is(input, select), .has-bookstore .result-row :is(select, button, label),
.has-bookstore .more-row button, .has-bookstore .shop-item h3 a { min-height: 44px; }
.has-bookstore .shop-item h3 a { display: inline-flex; align-items: center; }
@media (max-width: 980px) {
  .bookstore-header-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding-block: 5px; }
  .bookstore-header .bookstore-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; justify-content: start; padding-block-end: 4px; }
  .bookstore-header .bookstore-controls { grid-column: 3; grid-row: 1; }
}
@media (max-width: 590px) {
  .bookstore-header-inner { grid-template-columns: minmax(0,1fr) auto; width: calc(100% - 24px); gap: 0 6px; }
  .bookstore-header .bookstore-brand { grid-column: 1; grid-row: 1; }
  .bookstore-header button.bookstore-menu { grid-column: 2; grid-row: 1; justify-self: end; }
  .bookstore-header .bookstore-controls { grid-column: 1 / -1; grid-row: 2; justify-content: start; padding-block-end: 6px; }
  .bookstore-header .bookstore-nav { grid-row: 3; }
  .bookstore-main, .bookstore-support, .bookstore-footer-inner { width: calc(100% - 24px); }
  .bookstore-hero { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
  .bookstore-hero img { width: min(145px, 100%); }
  .bookstore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bookstore-extras ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bookstore-footer-inner { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bookstore-footer nav { justify-content: start; }
}
html.has-bookstore body .bookstore-hero { background: var(--bookstore-wash) !important; }
html.has-bookstore body .bookstore-footer { background: var(--bookstore-wash) !important; }
.has-bookstore .price-row .bookstore-price { display: inline-flex; }
.has-bookstore .shop-item .item-footer { flex-wrap: wrap; row-gap: 8px; }
.bookstore-cover.adult-cover-card,
.has-bookstore .shop-item .item-image.adult-cover-card {
  aspect-ratio: 1;
  padding: 0;
}
.bookstore-cover.adult-cover-card {
  margin: -10px -10px 0;
  border-radius: 11px 11px 0 0;
}
.bookstore-cover.adult-cover-card img,
.has-bookstore .shop-item .item-image.adult-cover-card img {
  object-fit: cover;
}
.book-trio-banner {
  display: grid; gap: .22em; margin: 16px 0; padding: 12px 16px;
  background: #eef4fc; border: 1px solid #d7e5f4; border-radius: 10px; color: #21334a;
}
.book-trio-banner small { font-size: .82rem; }
.bookstore-departments { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-block: 14px 22px; }
.bookstore-departments a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bookstore-link); }
/* Compact first screen: four real covers with a complete purchase action. */
.bookstore-buy { display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; margin-top:7px; border:1px solid #97afc7; border-radius:8px; padding:7px 10px; background:#e0ecf8; color:#173c60; font:inherit; font-weight:800; cursor:pointer; }
.bookstore-featured { margin-top:0; }
.bookstore-featured .bookstore-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.bookstore-featured .bookstore-cover { padding:0; aspect-ratio:auto; height:260px; }
.bookstore-featured .bookstore-cover img { object-fit:contain; }
.bookstore-card .bookstore-cover { padding:0; }
.bookstore-usage { max-width:32rem; }
.bookstore-usage summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:700; }
@media(max-width:680px){
 .bookstore-header-inner { width:calc(100% - 20px); min-height:76px; grid-template-columns:1fr auto auto; gap:4px; }
 .bookstore-header .bookstore-brand { font-size:.92rem; gap:5px; }
 .bookstore-header .bookstore-brand img { width:52px; height:52px; min-width:52px; }
 .bookstore-header .bookstore-controls { grid-column:auto; grid-row:1; justify-content:end; padding-bottom:0; }
 .bookstore-header .bookstore-nav { grid-column:1 / -1; }
 .bookstore-header .bookstore-controls :is(button,a), .bookstore-header button.bookstore-menu { font-size:.8rem; padding:4px 6px; }
 .bookstore-main { width:calc(100% - 20px); padding-top:10px; }
 .bookstore-featured .bookstore-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .bookstore-featured .bookstore-collection-heading { margin-bottom:8px; }
 .bookstore-featured .bookstore-collection-heading :is(h1,h2) { font-size:1.2rem; }
 .bookstore-featured .bookstore-card { padding:6px; border-radius:9px; }
 .bookstore-featured .bookstore-cover { height:min(25vh,212px); }
 .bookstore-featured .bookstore-card h3 { margin:5px 0 2px; font-size:.875rem; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .bookstore-featured .bookstore-card p { font-size:.75rem; margin:0 0 3px; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .bookstore-featured .bookstore-price { gap:5px; font-size:.87rem; line-height:1.5; }
 .bookstore-featured .bookstore-buy { min-height:44px; font-size:.9rem; margin-top:4px; padding:5px; }
 .bookstore-grid { gap:8px; }
 .bookstore-card { padding:6px; }
 .bookstore-cover { aspect-ratio: 1 / 1.26; }
 .bookstore-card p { font-size:.76rem; }
 .bookstore-card :is(h2,h3) { font-size:.9rem; }
 .has-bookstore .shop-item .item-image { padding:0; }
}
