body.book_detail-page {
  overflow-y: auto;
}

.bd-breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
.bd-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bd-breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin: 0 0.6em;
  color: var(--text-secondary, #555);
}
.bd-breadcrumbs a {
  text-decoration: none;
  color: var(--primary-color, #0056b3);
}
.bd-breadcrumbs a:hover {
  text-decoration: underline;
}

.bd-wrap {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.bd-left {
  top: 1.5rem;
  align-self: start;
}

.bd-cover {
  margin: 0 0 1.5rem;
  position: relative;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.1));
}

.bd-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  background-color: var(--border-color, #e1e4e8);
}

.bd-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.bd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bd-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary, #555);
}

.bd-meta li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color, #e1e4e8);
}

.bd-meta li:first-child {
  border-top: 1px solid var(--border-color, #e1e4e8);
}

.bd-meta strong {
  color: var(--text-primary, #121212);
  font-weight: 600;
}

.bd-head {
  margin-bottom: 1.5rem;
}
.bd-head h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--text-primary, #121212);
}

.bd-author {
  font-size: 1.25rem;
  color: var(--text-secondary, #555);
  margin: 0 0 1rem;
}
.bd-author span {
  color: var(--primary-color, #0056b3);
  font-weight: 500;
}

.bd-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--star-color, #fbbc05);
}
.bd-rating .bd-count {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary, #555);
}

.bd-buy {
  background-color: var(--surface-color, #fff);
  padding: 1.1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e1e4e8);
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.bd-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #121212);
  margin-right: auto;
}

.bd-form {
  display: flex;
  gap: 0.5rem;
}

.bd-currency {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-color, #e1e4e8);
  background-color: #fff;
}

.bd-cta {
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.bd-desc {
  line-height: 1.7;
  color: var(--text-secondary, #555);
  max-height: 200px;
  overflow-y: auto;
  padding: var(--space-lg, 20px); 
  background: transparent;
  padding-right: var(--space-md, 14px); 
}

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

/* Stars */
.bd-stars { display:inline-flex; gap:6px; }
.bd-stars .star { background:transparent; border:none; padding:0; cursor:pointer; line-height:1; }
.bd-stars .star i { font-size:1.05rem; color:#c9ced6; transition:transform .12s ease, color .12s ease; }
.bd-stars .star.active i { color:#f4b400; }
.bd-stars .star:hover i { transform:translateY(-1px); }
.bd-stars.big .star i { font-size:1.6rem; }

/* Small buttons next to stars */
.bd-icon-btn, .bd-link-btn {
  background: transparent;
  border: 1px solid var(--border-color, #e1e4e8);
  color: var(--text-secondary, #555);
  padding: 6px 10px;
  border-radius: 8px;
  margin-left: 10px;
  cursor: pointer;
}
.bd-icon-btn:hover, .bd-link-btn:hover { background: var(--dark-bg, #f6f7f9); }

/* Modals */
.bd-overlay {
  position: fixed; inset: 0; z-index: 1300;
  display: none; align-items: center; justify-content: center;
  background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
}
.bd-overlay.is-open { display: flex; }
.bd-modal {
  background: var(--surface-color,#fff);
  border: 1px solid var(--border-color,#e1e4e8);
  border-radius: 12px; width: min(650px, 94vw);
  max-height: 86vh; overflow: auto; padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
}
.bd-modal h3 { margin: 0 0 12px; }
.bd-modal-close {
  position: absolute; top: 8px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-color,#e1e4e8);
  background: var(--neutral-50,#fafbfc); cursor: pointer;
  font-size: 20px; line-height: 1;
}

.bd-input, .bd-textarea {
  width: 100%;
  border: 1px solid var(--border-color,#e1e4e8);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  margin-top: 12px;
  font: inherit;
}
.bd-textarea { resize: vertical; }

.bd-modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top: 14px; }
.bd-help { margin-top: 8px; font-size: .9rem; }

.bd-reviews { display: grid; gap: 16px; margin-top: 10px; }
.bd-review { border:1px solid var(--border-color,#e1e4e8); border-radius: 10px; padding: 12px; background:#fff; }
.bd-review-head { display:flex; align-items:center; gap: 10px; flex-wrap: wrap; }
.bd-review-stars i { color:#f4b400; }
.bd-review-meta small { color: var(--text-secondary,#555); }
.bd-verified { background:#e6f7ef; color:#0a8f55; border:1px solid #bdebd5; padding:2px 6px; border-radius: 999px; font-size: .75rem; margin-left: 6px; }
.bd-review-title { margin: 6px 0 4px; }
.bd-review-body { margin: 0; color: var(--text-secondary,#444); }
.bd-empty { color: var(--text-secondary,#666); font-style: italic; }

@media (max-width: 800px) {
  .bd-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .bd-left {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bd-cover {
    max-width: 300px;
    width: 100%;
  }
  
  .bd-actions, .bd-meta {
    width: 100%;
    max-width: 300px;
  }
  
  .bd-head h1 {
    font-size: 2rem;
  }
  
  .bd-buy {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .bd-price {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 540px) {
  .bd-breadcrumbs { margin-bottom: 1rem; font-size: 0.82rem; }
  .bd-wrap { gap: 1.1rem; padding: 0 var(--space-sm); }
  .bd-cover { max-width: 180px; margin: 0 auto 0.75rem; }
  .bd-actions { max-width: 220px; gap: 0.6rem; grid-template-columns: 1fr; }
  .bd-meta { max-width: 240px; font-size: 0.85rem; }
  .bd-meta li { padding: 0.4rem 0; }
  .bd-head { max-width: 260px; margin: 0 auto; text-align: center; }
  .bd-head h1 { font-size: 1.4rem; margin-bottom: 0.35rem; word-break: break-word; }
  .bd-author { font-size: 0.95rem; margin: 0 0 0.5rem; }
  .bd-rating { justify-content: center; }
  .bd-buy { padding: 0.85rem; gap: 0.65rem; }
  .bd-price { font-size: 1.5rem; }
  .bd-form { width: 100%; justify-content: center; }
  .bd-desc { max-height: none; padding: var(--space-md); line-height: 1.6; }
  .bd-cta {
    width: auto;
    min-width: 180px;
    max-width: 240px;
    padding: 0.8rem 1rem;
    margin-left: auto;
    margin-right: auto;
  }
}
