/* Bookly storefront. Reference artwork and icon credit appears in the footer. */
.store-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}
.filters .cats a { align-items: center; gap: .5rem; }
.filters .filter-label { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.filters .filter-icon {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: 7px;
  background: var(--card);
  color: color-mix(in srgb, var(--store-coral, var(--accent)) 58%, var(--accent));
}
.filters .filter-icon .store-icon { width: 19px; height: 19px; }
.filters .cats a.active :is(.filter-icon, small) { color: inherit; }
.filters .cats a.active .filter-icon {
  border-color: color-mix(in srgb, currentColor 45%, transparent);
  background: transparent;
}
.store-topbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: .83rem;
}
.store-topbar a {
  padding: .45rem .5rem;
  color: var(--muted);
}
.store-topbar a + a { border-inline-start: 1px solid var(--border); }
.store-topbar a:hover { color: var(--accent); }
.site-header .header-row { position: relative; min-height: 86px; }
.site-header .cat-nav {
  flex: 1 1 auto;
  justify-content: safe center;
  align-items: center;
  padding: 0;
  min-width: 0;
}
.site-header .cat-nav a { padding: .35rem .55rem; }
.site-header .cat-nav a[aria-current] { color: var(--accent); }
.site-header .header-actions { margin-inline-start: auto; }
.site-header .header-actions :is(.icon-btn, .cart-btn, .user-menu > button) {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 34px;
  width: auto;
  height: 36px;
  padding-inline: .35rem;
  border-radius: 4px;
  color: var(--text);
}
.site-header .header-actions :is(.icon-btn, .cart-btn, .user-menu > button):hover { color: var(--accent); }
.site-header .header-actions .cart-btn { display: inline-flex; align-items: center; gap: .2rem; }
.site-header .cart-btn .badge:not([hidden]) { position: static; background: transparent; color: inherit; }
.site-header .cart-btn .badge:not([hidden])::before { content: "("; }
.site-header .cart-btn .badge:not([hidden])::after { content: ")"; }
.site-header #headerSearch {
  display: none;
  position: absolute;
  inset-block-start: calc(100% - 3px);
  inset-inline-end: var(--store-padding, 1rem);
  width: min(400px, calc(100% - 2rem));
  border: 1px solid var(--border);
  background: var(--card);
  z-index: 2;
  box-shadow: var(--shadow);
}
.site-header #headerSearch.store-search-open { display: flex; }
.site-header #headerSearch button { min-width: 44px; }
.site-header::after { display: none; }

#app:has(> .storefront-hero) { max-width: none; width: 100%; margin-block-start: 0; padding-inline: 0; }
#app > .app-banner { margin-inline: auto; width: min(calc(100% - 2rem), 1210px); }
.storefront-hero {
  background: var(--store-banner, var(--card));
  color: var(--text);
}
.storefront-slider { position: relative; }
.storefront-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 6rem);
  min-height: clamp(490px, 50vw, 800px);
  padding: clamp(2.5rem, 6vw, 6rem) clamp(2.7rem, 7vw, 7.5rem);
}
.storefront-slide-empty { grid-template-columns: minmax(0, 1fr); }
.storefront-slide-copy h1 {
  font-size: clamp(2.05rem, 3.4vw, 3.9rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .75rem;
  color: inherit;
  text-wrap: balance;
}
.storefront-slide-copy p { color: var(--muted); max-width: 33rem; margin: 0 0 1.5rem; }
.storefront-slide-cover {
  width: min(100%, clamp(190px, 24vw, 410px));
  justify-self: center;
}
.storefront-slide-cover .cover {
  box-shadow: 0 22px 38px #23252c38, inset 4px 0 6px #23252c56;
  border-radius: 5px 10px 10px 5px;
}
.storefront-slide-cover .cover:not(.img) {
  padding: 13% 12%;
  font-size: clamp(1rem, 2.4vw, 2.4rem);
  justify-content: center;
  gap: .45em;
}
.storefront-slide-cover .cover .ct { text-wrap: balance; }
.storefront-slide-cover .cover .ca { font-size: .62em; }
.storefront-slider :is(.store-slide-prev, .store-slide-next) {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.storefront-slider :is(.store-slide-prev, .store-slide-next):hover { color: var(--accent); }
.storefront-slider .store-icon { width: 42px; height: 42px; }
.store-slide-prev { inset-inline-start: 8px; }
.store-slide-next { inset-inline-end: 8px; }

.storefront-content .features {
  margin-block: clamp(2.2rem, 6vw, 6rem);
  gap: clamp(.75rem, 2vw, 2rem);
}
.storefront-content .feature {
  align-items: flex-start;
  padding: 0;
  gap: .8rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.storefront-content .feature .fi {
  padding: 0;
  background: transparent;
  color: var(--store-coral, var(--accent));
}
.storefront-content .feature .fi .store-icon { width: 33px; height: 33px; }
.storefront-content .feature b { font-size: clamp(.93rem, 1.35vw, 1.16rem); color: var(--text); }
.storefront-content .section { margin-block: clamp(2.25rem, 5vw, 5.5rem); }
.storefront-content .section-head { margin-bottom: 1.25rem; }
.storefront-content .section-head h2 { padding: 0; color: var(--text); font-size: clamp(1.25rem, 2vw, 1.9rem); }
.storefront-content .section-head h2::before { content: none; }
.storefront-content .section-head .hi { display: none; }
.btn.store-action {
  border-radius: 100vw;
  background: var(--store-coral, var(--btn-bg, var(--primary)));
  color: var(--store-action-text, #fff);
  min-height: 44px;
  padding: .6rem 1.35rem;
  box-shadow: none;
  white-space: nowrap;
}
.btn.store-action:hover { background: var(--store-hover, var(--btn-hover, var(--primary-600))); color: #fff; }
.storefront-slide-copy .store-action { padding: .8rem 1.8rem; }
.storefront-content .book-row { grid-auto-columns: clamp(154px, 18vw, 225px); }
.home-book-lists {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(.875rem, 1.55vw, 1.5rem);
  margin-block: clamp(2.75rem, 6vw, 6rem);
}
.home-book-list {
  min-width: 0;
  padding: clamp(1rem, 1.65vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
}
.home-book-list h2 {
  margin: 0 0 clamp(1.3rem, 2.7vw, 2.7rem);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
}
.home-book-list h2 a, .home-book-entry { color: var(--text); }
.home-book-list h2 a:hover, .home-book-entry:hover h3 { color: var(--accent); }
.home-book-list ul { list-style: none; margin: 0; padding: 0; }
.home-book-list li + li {
  margin-block-start: 1.15rem;
  padding-block-start: 1.15rem;
  border-top: 1px solid var(--border);
}
.home-book-entry {
  display: grid;
  grid-template-columns: clamp(48px, 4.7vw, 74px) minmax(0, 1fr);
  align-items: start;
  gap: .8rem;
}
.home-book-cover .cover {
  border-radius: 2px;
  box-shadow: 0 2px 5px #27272724;
}
.home-book-cover .cover:not(.img) { justify-content: center; }
.home-book-cover .ca, .home-book-cover .cm { display: none; }
.home-book-info h3 {
  margin: 0;
  font-size: clamp(.92rem, 1.08vw, 1.12rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.home-book-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .15rem .4rem;
  margin-block: .15rem .2rem;
  line-height: 1.3;
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}
.book-stars {
  display: inline-flex;
  gap: 1px;
  color: #d38c00;
  direction: ltr;
}
.book-stars.unrated { color: var(--muted); }
.book-stars .store-icon { width: 13px; height: 13px; }
.home-book-list .price {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .4rem;
}
.home-book-list .price .now { color: var(--store-list-price, var(--accent)); }
.home-book-list > p { margin: 0 0 .5rem; font-size: .88rem; }
.book-card { gap: .2rem; }
.book-card h3 { margin-block-start: .2rem; min-height: 0; line-height: 1.35; }
.book-card .author { line-height: 1.3; }
.book-card .rating { display: flex; align-items: center; gap: .25rem; line-height: 1.3; }
.book-card .bottom { margin-block-start: .1rem; }
.book-card .store-icon { width: 20px; height: 20px; stroke: none; fill: currentColor; }
.book-card .book-stars .store-icon { width: 13px; height: 13px; }
.book-card .heart.on .store-icon { fill: currentColor; stroke: currentColor; stroke-width: .6; }
.bookly-credit {
  text-align: center;
  padding-block: .75rem 1.25rem;
  color: inherit;
  font-size: .82rem;
}
.bookly-credit a { text-decoration: underline; }

html:is([data-theme="light"], :not([data-theme])) {
  --bg: #fff;
  --card: #fff;
  --text: #272727;
  --muted: #595454;
  --border: #e9e5e5;
  --primary: #a53546;
  --primary-600: #872635;
  --primary-50: #fff0f1;
  --accent: #aa394a;
  --accent-600: #842939;
  --accent-50: #fff2f3;
  --btn-bg: #a53546;
  --btn-hover: #872635;
  --cta: #a53546;
  --gold-soft: #e8b0b1;
  --shadow: 0 3px 16px #2727270d;
  --store-banner: #f0e5ef url("/img/bookly/banner-bg.jpg") center / cover no-repeat;
  --store-coral: #f86d72;
  --store-list-price: #c23e4d;
  --store-action-text: #2d1619;
  --store-hover: #272727;

  & .site-header { background: #fff; box-shadow: 0 1px 0 var(--border); }
  & .site-header .cat-nav a { color: var(--text); background: transparent; border: 0; }
  & .site-header .cat-nav a:is(:hover, .active, [aria-current]) { color: var(--accent); }
  & .storefront-content .feature .fi { color: var(--store-coral); }
  & .book-card {
    background: #fff;
    border-color: var(--border);
    border-radius: 12px;
    box-shadow: none;
  }
  & .book-card .cover-link { background: #f8f7f7; padding: .7rem; }
  & .book-card .cover { border-radius: 4px; box-shadow: 0 5px 10px #27272720; }
  & .book-card .author { color: var(--muted); }
  & .book-card :is(.heart, .add) {
    background: #fff;
    color: #272727;
    border: 1px solid var(--border);
    box-shadow: none;
  }
  & .book-card .heart.on { color: var(--accent); }
  & .book-card .add:hover:not(:disabled) { background: var(--store-coral); color: #2d1619; }
  & .ribbon:not(.out) { background: var(--store-coral); color: #2d1619; }
  & .site-footer { background: #fff; color: var(--muted); border-top: 1px solid var(--border); }
  & .site-footer::before { display: none; }
  & .site-footer :is(h4, a) { color: var(--text); }
  & .site-footer a:hover { color: var(--accent); }
  & .site-footer .copyright { border-color: var(--border); color: var(--muted); }
}

@media (max-width: 980px) {
  .site-header .header-row { flex-wrap: wrap; gap: .45rem .75rem; }
  .site-header .cat-nav { order: 1; flex-basis: 100%; justify-content: start; }
  .home-book-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .site-header .header-row { min-height: auto; }
  .site-header .header-actions { gap: .2rem; }
  .site-header .logo { gap: .35rem; }
  .site-header .logo img { width: 38px; height: 38px; }
  .site-header .logo small { display: none; }
  .store-topbar { font-size: .69rem; }
  .storefront-slide { grid-template-columns: minmax(0, 1fr); text-align: center; padding-block: 2rem; min-height: 0; }
  .storefront-slide-cover { order: -1; width: min(54vw, 240px); }
  .storefront-slide-copy p { margin-inline: auto; }
  .storefront-slider :is(.store-slide-prev, .store-slide-next) { top: clamp(100px, 41vw, 208px); width: 38px; }
  .storefront-slider .store-icon { width: 30px; height: 30px; }
  .storefront-content .feature .fi .store-icon { width: 25px; height: 25px; }
}
@media (max-width: 560px) {
  .home-book-lists { grid-template-columns: minmax(0, 1fr); }
}
