/* Katalog publik & halaman detail buku — PT. RESOLUTION INDONESIA GROUP */
:root {
  --ri-navy: #102542;
  --ri-navy-deep: #0a1a31;
  --ri-white: #ffffff;
  --ri-soft: #f4f7fb;
  --ri-muted: #60738f;
  --ri-gold: #f4c44e;
  --ri-gold-deep: #c99a1e;
  --ri-border: #e2e8f0;
  --ri-shadow: 0 14px 36px rgba(16, 37, 66, 0.08);
  --ri-shadow-hover: 0 20px 44px rgba(16, 37, 66, 0.14);
}

.product-catalog-body,
.book-detail-body {
  min-height: 100vh;
  background: var(--ri-soft);
  color: var(--ri-navy);
}

/* ---------- Intro katalog ---------- */
.product-catalog-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.product-catalog-intro {
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

.product-catalog-intro .eyebrow {
  margin: 0 0 10px;
  color: var(--ri-muted);
}

.product-catalog-intro h1 {
  margin: 0;
  color: var(--ri-navy);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
}

.product-catalog-intro h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 18px auto 0;
  border-radius: 99px;
  background: var(--ri-gold);
}

.product-catalog-subtitle {
  margin: 16px 0 0;
  color: var(--ri-muted);
  font-size: 0.98rem;
}

/* ---------- Grid kartu buku ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.book-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ri-border);
  border-radius: 16px;
  background: var(--ri-white);
  box-shadow: var(--ri-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--ri-shadow-hover);
}

.book-tile-cover {
  display: block;
  position: relative;
  aspect-ratio: 1600 / 1130;
  overflow: hidden;
  background: var(--ri-soft);
}

.book-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-fallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 22px 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px),
    linear-gradient(150deg, var(--ri-navy) 0%, #1c3a63 100%);
  color: var(--ri-white);
}

.book-cover-fallback::before {
  content: "";
  width: 40px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 99px;
  background: var(--ri-gold);
}

.book-cover-fallback strong {
  font-size: 1.05rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-cover-fallback small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.book-tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
}

.book-tile-category {
  margin: 0;
  color: var(--ri-gold-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.book-tile h2,
.book-tile h3 {
  margin: 0;
  color: var(--ri-navy);
  font-size: 1.05rem;
  line-height: 1.35;
}

.book-tile h2 a,
.book-tile h3 a {
  color: inherit;
}

.book-tile-author {
  margin: 0;
  color: var(--ri-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.book-tile-summary {
  margin: 4px 0 0;
  color: var(--ri-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-tile-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ri-navy);
  color: var(--ri-white);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.book-tile-body > .book-tile-link {
  margin-top: 14px;
}

.book-tile-link:hover,
.book-tile-link:focus-visible {
  background: var(--ri-navy-deep);
  text-decoration: none;
}

.catalog-empty {
  grid-column: 1 / -1;
  padding: 28px 20px;
  border: 1px dashed var(--ri-border);
  border-radius: 14px;
  background: var(--ri-white);
  color: var(--ri-muted);
  text-align: center;
}

/* Landing page section */
.home-books .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.home-books .section-heading h2 {
  margin: 0;
}

.home-books .section-heading p {
  margin: 8px 0 0;
  color: var(--ri-muted);
}

.home-books .book-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* ---------- Detail buku ---------- */
.book-detail-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--ri-muted);
  font-size: 0.86rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: #a3b1c4;
}

.breadcrumb a {
  color: var(--ri-muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--ri-navy);
  font-weight: 600;
}

.preview-banner {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #f0d58c;
  border-radius: 12px;
  background: #fff8e6;
  color: #6b4e00;
  font-size: 0.9rem;
}

.book-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--ri-border);
  border-radius: 20px;
  background: var(--ri-white);
  box-shadow: var(--ri-shadow);
}

.book-detail-cover {
  overflow: hidden;
  aspect-ratio: 1600 / 1130;
  max-width: 100%;
  border-radius: 12px;
  background: var(--ri-soft);
  box-shadow: 0 18px 40px rgba(16, 37, 66, 0.18);
}

.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-detail-info .book-tile-category {
  margin-bottom: 10px;
}

.book-detail-info h1 {
  margin: 0;
  color: var(--ri-navy);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.2;
}

.book-detail-author {
  margin: 12px 0 0;
  color: var(--ri-muted);
  font-size: 1.02rem;
}

.book-detail-author strong {
  color: var(--ri-navy);
}

.book-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid var(--ri-border);
  border-radius: 14px;
  background: var(--ri-white);
}

.book-detail-meta div {
  padding: 14px 16px;
  box-shadow: 1px 0 0 var(--ri-border), 0 1px 0 var(--ri-border);
}

.book-detail-meta dt {
  color: var(--ri-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.book-detail-meta dd {
  margin: 4px 0 0;
  color: var(--ri-navy);
  font-weight: 700;
  word-break: break-word;
}

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

.book-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-download {
  background: var(--ri-navy);
  color: var(--ri-white);
}

.btn-download:hover,
.btn-download:focus-visible {
  background: var(--ri-navy-deep);
  color: var(--ri-white);
}

.btn-download small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.btn-outline {
  border-color: var(--ri-border) !important;
  background: var(--ri-white);
  color: var(--ri-navy);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--ri-navy) !important;
  color: var(--ri-navy);
}

.btn-download svg,
.btn-outline svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.book-detail-note {
  margin: 14px 0 0;
  color: var(--ri-muted);
  font-size: 0.86rem;
}

.book-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 820px;
  margin-top: 40px;
}

.book-quote {
  position: relative;
  margin: 0;
  padding: 26px 28px 26px 32px;
  border-left: 4px solid var(--ri-gold);
  border-radius: 0 16px 16px 0;
  background: var(--ri-white);
  color: var(--ri-navy);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.75;
}

.book-quote p {
  margin: 0;
}

.book-description h2,
.related-books h2 {
  margin: 0 0 12px;
  color: var(--ri-navy);
  font-size: 1.35rem;
}

.book-description p {
  margin: 0 0 14px;
  color: #33475f;
  line-height: 1.8;
}

.related-books {
  margin-top: 56px;
}

.not-found-box {
  max-width: 560px;
  margin: 40px auto;
  padding: 40px 28px;
  border: 1px solid var(--ri-border);
  border-radius: 20px;
  background: var(--ri-white);
  text-align: center;
  box-shadow: var(--ri-shadow);
}

.not-found-box h1 {
  margin: 0 0 10px;
  color: var(--ri-navy);
}

.not-found-box p {
  color: var(--ri-muted);
}

.copy-feedback {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #2f7a4f;
  font-size: 0.84rem;
}

@media (max-width: 820px) {
  .book-detail-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
  }

  .book-detail-cover {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .book-grid {
    gap: 16px;
  }

  .book-tile-body {
    padding: 14px;
  }

  .book-tile h2,
  .book-tile h3 {
    font-size: 0.95rem;
  }


  .book-tile-link {
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .book-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Status proses buku ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-isbn {
  background: #fdf3d6;
  color: #7a5a00;
}

.status-pill.is-hki {
  background: #e4ecf8;
  color: #1c3a63;
}

.status-pill.is-terbit {
  background: #e3f5ea;
  color: #1e6b41;
}

.book-tile-cover .status-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(16, 37, 66, 0.18);
}

.book-detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.book-detail-tags .book-tile-category {
  margin: 0;
}

.book-cover-fallback {
  justify-content: center;
  padding: 24px 28px;
}

.book-cover-fallback strong {
  -webkit-line-clamp: 3;
}

@media (max-width: 1020px) {
  .book-detail-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Tampilan kartu buku (gaya katalog baru) ---------- */
:root {
  --ri-navy: #0d3160;
  --ri-navy-deep: #0a1f3d;
  --ri-gold: #f6c534;
  --ri-gold-deep: #8a6100;
  --ri-border: #e2e8f0;
  --ri-soft: #f8fafc;
}

.product-catalog-body,
.book-detail-body { background: #f8fafc; }

.book-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}

.book-tile {
  padding: 20px;
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.book-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}

.book-tile-cover { border-radius: 16px; }

.book-tile-cover .status-pill { left: 12px; top: 12px; }

.book-tile-body { gap: 8px; padding: 20px 4px 4px; }

.book-tile-isbn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ri-gold-deep);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem;
  font-weight: 600;
}

.book-tile h2,
.book-tile h3 { font-size: 1.12rem; line-height: 1.35; }

.book-tile h2 a:hover,
.book-tile h3 a:hover { color: var(--ri-navy); }

.book-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--ri-border);
}

.book-tile-date { color: #64748b; font-size: .82rem; }

.book-tile-body > .book-tile-link,
.book-tile-link {
  margin-top: 0;
  padding: 8px 16px;
  border: 1px solid var(--ri-border);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: .8rem;
}

.book-tile-link:hover,
.book-tile-link:focus-visible {
  border-color: var(--ri-navy);
  background: #fff;
  color: var(--ri-navy);
}

.product-catalog-main { width: min(1200px, calc(100% - 48px)); padding: 64px 0 88px; }

.product-catalog-intro h1::after { background: var(--ri-gold); }

.book-detail-hero { border-radius: 24px; }

.btn-download { border-radius: 999px !important; background: var(--ri-navy); }
.btn-outline { border-radius: 999px !important; }

@media (max-width: 560px) {
  .product-catalog-main { width: calc(100% - 32px); padding: 44px 0 64px; }
  .book-tile { padding: 14px; }
}

.home-books .section-heading .eyebrow,
.product-catalog-intro .eyebrow { color: #8a6100; }
