/* Story Books detail page -- book gallery cards (TT-SB-004). */

.sb-pitch {
  font-size: 1.15rem;
  color: var(--text-color);
  max-width: 42em;
  line-height: 1.55;
}

/* Page-level promise chips -- signals what this collection is, distinct from
   the site-wide Freebies shelf (which lists free books across every product). */
.sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.sb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.sb-crosslink {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.sb-crosslink a {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.sb-crosslink a:hover,
.sb-crosslink a:focus-visible {
  border-color: var(--accent-color);
}

.sb-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .sb-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sb-gallery {
    grid-template-columns: 1fr;
  }
}

/* Signature: each title reads as a shelved book, not a generic product tile --
   a colored spine on the left edge, a slight lean, and a lift-and-straighten
   on hover/focus. */
.sb-book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 18px 20px 24px;
  border-radius: 4px 10px 10px 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), inset 6px 0 0 var(--accent-color);
  background: var(--bg-white);
  transform: rotate(-0.6deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sb-book-card:hover,
.sb-book-card:focus-within {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), inset 6px 0 0 var(--accent-color);
}

.sb-book-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.sb-book-title {
  font-size: 1.15rem;
  font-family: var(--font-ibm);
  color: var(--primary-color);
  margin: 0 0 4px;
}

.sb-book-author {
  font-size: 0.9rem;
  color: var(--shop-text-gray, #666);
  margin: 0 0 14px;
}

/* Coming-soon titles: same shelved-book shape, muted so the eye lands on the
   live books first -- flat spine, no lift on hover, no CTA. */
.sb-book-card.sb-coming-soon {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 6px 0 0 var(--shop-border, #e0e0e0);
  background: var(--shop-bg-muted, #f2ebe0);
}

.sb-book-card.sb-coming-soon:hover,
.sb-book-card.sb-coming-soon:focus-within {
  transform: rotate(-0.6deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 6px 0 0 var(--shop-border, #e0e0e0);
}

.sb-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--primary-light), var(--bg-white));
}

.sb-book-blurb {
  font-size: 0.85rem;
  color: var(--text-color);
  line-height: 1.45;
  margin: 0 0 14px;
}

.sb-coming-soon-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Pricing-tier chips -- this page covers every tier (free, free-with-signup,
   unlockable), so each coming-soon title previews which tier it'll land in. */
.sb-price-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sb-price-free {
  background: var(--primary-light);
  color: var(--primary-color);
}

.sb-price-signup {
  background: var(--light-blue);
  color: var(--blue-dark);
}

.sb-price-unlock {
  background: var(--accent-orange-light);
  color: var(--primary-color);
}

.sb-soon-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--shop-text-gray, #666);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
  .sb-book-card {
    transition: none;
    transform: none;
  }
  .sb-book-card:hover,
  .sb-book-card:focus-within {
    transform: none;
  }
}
