/* Coloring books (website) */

.cb-hero {
  padding-bottom: 8px;
}

.cb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 8px 0 56px;
}

.cb-card-link {
  display: grid;
  gap: 12px;
  text-decoration: none;
  color: var(--deep-ink);
}

.cb-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  background: var(--ice-blue, #ddf3ff);
  box-shadow: var(--shadow, 0 12px 32px rgba(16, 42, 86, 0.08));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cb-card-link:hover .cb-card-cover,
.cb-card-link:focus-visible .cb-card-cover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(16, 42, 86, 0.16);
}

.cb-card-img,
.cb-card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cb-card-img {
  object-fit: cover;
}

.cb-card-frame {
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cb-card-frame.is-on {
  opacity: 1;
}

.cb-card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(16, 42, 86, 0.08);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cb-card-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--eliot-blue, #155eef);
}

.cb-card-link.is-previewing .cb-card-progress {
  opacity: 1;
}

.cb-card-meta {
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(16, 42, 86, 0.72);
}

/* book page */

.cb-preview-note {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff1d6;
  font-weight: 700;
}

.cb-book-head {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.cb-book-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow, 0 12px 32px rgba(16, 42, 86, 0.08));
}

.cb-book-intro h1 {
  margin-top: 0;
}

.cb-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cb-book-actions .btn,
.cb-page-actions .btn,
.cb-lock .btn {
  width: auto;
}

.cb-amazon-btn {
  background: #ffb84d;
  color: #232f3e;
}

.cb-page-grid {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.cb-public-page {
  display: grid;
  gap: 12px;
  align-content: start;
}

.cb-public-page figure {
  margin: 0;
  display: grid;
  gap: 8px;
}

.cb-public-art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow, 0 12px 32px rgba(16, 42, 86, 0.08));
}

.cb-public-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cb-public-page.is-locked .cb-public-art img {
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.04);
}

.cb-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(255, 249, 240, 0.7);
}

.cb-public-page figcaption {
  font-weight: 700;
  color: rgba(16, 42, 86, 0.72);
}

.cb-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cb-page-actions .btn {
  padding: 10px 16px;
  font-size: 0.95rem;
}

.cb-back {
  margin: 8px 0 56px;
}

@media (max-width: 960px) {
  .cb-grid,
  .cb-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cb-grid,
  .cb-page-grid {
    grid-template-columns: 1fr;
  }

  .cb-book-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cb-book-cover {
    max-width: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb-card-cover,
  .cb-card-frame {
    transition: none;
  }
}
