:root {
  --book-shadow: 0 10px 32px rgba(18, 48, 99, .08);
}

.book-page {
  background: #f8fafd;
  color: #46536a;
  font-size: 16px;
}

.book-hero,
.book-detail-hero {
  padding: 24px 0 36px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 87% 25%, rgba(66, 143, 230, .13), transparent 18%),
    linear-gradient(135deg, #f2f7ff, #fbfdff);
}

.book-detail-hero {
  padding-bottom: 24px;
}

.book-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.book-hero-row>div:first-child>span {
  color: var(--blue2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.book-hero h1 {
  margin: 8px 0;
  color: var(--blue);
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 800;
}

.book-hero p {
  max-width: 830px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.book-hero-books {
  position: relative;
  width: 205px;
  height: 125px;
  flex: 0 0 205px;
}

.hero-book {
  position: absolute;
  bottom: 2px;
  display: grid;
  width: 69px;
  height: 105px;
  place-items: center;
  border-radius: 4px 9px 9px 4px;
  color: #fff;
  font-size: 25px;
  box-shadow: 0 10px 24px rgba(8, 46, 101, .16);
}

.hero-book::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: rgba(255, 255, 255, .28);
  content: "";
}

.book-one {
  left: 6px;
  transform: rotate(-8deg);
  background: linear-gradient(155deg, #146bc4, #07397f);
}

.book-two {
  z-index: 2;
  bottom: 7px;
  left: 70px;
  height: 113px;
  background: linear-gradient(155deg, #744ac0, #392276);
}

.book-three {
  right: 2px;
  transform: rotate(7deg);
  background: linear-gradient(155deg, #0a9870, #075540);
}

.book-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.book-stats article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.book-stats i {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 9px;
  background: #edf4ff;
  color: var(--blue);
  font-size: 20px;
}

.book-stats article div {
  display: grid;
}

.book-stats strong {
  color: #2f3d55;
  font-size: 22px;
}

.book-stats span {
  color: #7c899d;
  font-size: 13px;
}

.book-featured {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 26px;
  margin-bottom: 20px;
  border: 1px solid #cfdced;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef5ff, #fff);
  box-shadow: var(--book-shadow);
}

.book-featured-cover,
.book-detail-cover,
.book-cover {
  position: relative;
  overflow: hidden;
  background: #0a3b7c;
}

.book-featured-cover {
  width: 226px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 5px 12px 12px 5px;
  box-shadow: 12px 15px 28px rgba(7, 35, 77, .25);
}

.book-featured-cover::after,
.book-detail-cover::after,
.book-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 28, 66, .12), rgba(3, 35, 79, .9));
  content: "";
}

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

.book-featured-cover>div,
.book-detail-cover>div,
.book-cover>div {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 20px;
  color: #fff;
}

.book-featured-cover span,
.book-detail-cover span,
.book-cover div>span {
  color: #9ed0ff;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
}

.book-featured-cover h2,
.book-detail-cover h2,
.book-cover div>h3 {
  margin: 7px 0;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.book-featured-cover small,
.book-detail-cover small,
.book-cover div>small {
  color: #d1e4f7;
  font-size: 8px;
}

.book-featured-body>span {
  color: var(--blue2);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .07em;
}

.book-featured-body>h2 {
  margin: 7px 0 8px;
  color: #2f3e57;
  font-size: clamp(21px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.45;
}

.book-featured-author {
  color: var(--blue2) !important;
  font-size: 13px !important;
}

.book-featured-body>p {
  color: #667389;
  font-size: 14px;
  line-height: 1.7;
}

.book-featured-body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 15px 0;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  overflow: hidden;
}

.book-featured-body dl>div {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding: 10px;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
}

.book-featured-body dl>div:nth-child(2n) {
  border-right: 0;
}

.book-featured-body dl>div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.book-featured-body dt {
  color: #8591a3;
  font-size: 11px;
  font-weight: 500;
}

.book-featured-body dd {
  margin: 0;
  color: #46536a;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.book-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-featured-actions :is(a, button) {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.book-featured-actions a {
  background: var(--blue);
  color: #fff;
}

.book-toolbar {
  padding: 18px;
  margin-bottom: 21px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--book-shadow);
}

.book-search-box {
  display: flex;
  height: 48px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dce3ee;
  border-radius: 8px;
}

.book-search-box>i {
  margin-left: 14px;
  color: var(--blue2);
}

.book-search-box input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 12px;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.book-search-box button {
  align-self: stretch;
  padding: 0 21px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.book-filter-grid {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr auto;
  gap: 11px;
  align-items: end;
  margin-top: 13px;
}

.book-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.book-filter-grid label>span {
  color: #657188;
  font-size: 13px;
  font-weight: 650;
}

.book-filter-grid select {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #526078;
  font-size: 14px;
}

.book-filter-grid>button {
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--blue2);
  font-size: 13px;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 20px;
  align-items: start;
}

.book-main {
  min-width: 0;
}

.book-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 15px;
}

.book-result-head>div:first-child {
  display: grid;
  gap: 3px;
}

.book-result-head>div:first-child>span {
  color: var(--blue2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.book-result-head h2 {
  margin: 0;
  color: #354259;
  font-size: 20px;
}

.book-result-head>div:last-child {
  display: flex;
  gap: 7px;
}

.book-result-head select {
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.book-view-toggle {
  display: flex;
}

.book-view-toggle button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: #7d899b;
}

.book-view-toggle button:first-child {
  border-radius: 7px 0 0 7px;
}

.book-view-toggle button:last-child {
  border-left: 0;
  border-radius: 0 7px 7px 0;
}

.book-view-toggle button.active {
  background: var(--blue);
  color: #fff;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.book-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 17px rgba(18, 48, 99, .045);
  transition: transform .22s, box-shadow .22s;
}

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

.book-cover {
  display: block;
  aspect-ratio: 3 / 4;
}

.book-cover>div {
  padding: 17px;
}

.book-cover div>h3 {
  font-size: clamp(13px, 1.2vw, 17px);
}

.book-cover>em {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 13px;
  background: #ffce3c;
  color: #664400;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.cover-green::after {
  background: linear-gradient(180deg, rgba(3, 63, 43, .08), rgba(3, 72, 50, .9));
}

.cover-purple::after {
  background: linear-gradient(180deg, rgba(48, 22, 90, .08), rgba(64, 31, 113, .9));
}

.cover-orange::after {
  background: linear-gradient(180deg, rgba(91, 44, 8, .08), rgba(135, 65, 8, .91));
}

.cover-teal::after {
  background: linear-gradient(180deg, rgba(2, 65, 72, .08), rgba(4, 91, 97, .92));
}

.cover-red::after {
  background: linear-gradient(180deg, rgba(86, 16, 24, .08), rgba(124, 24, 36, .92));
}

.book-card-body {
  padding: 15px;
}

.book-category {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.book-category.green {
  background: #e4f7ed;
  color: #087a57;
}

.book-category.purple {
  background: #f1eaff;
  color: #7144bc;
}

.book-category.orange {
  background: #fff0df;
  color: #b96509;
}

.book-category.teal {
  background: #e4f6f7;
  color: #087d82;
}

.book-category.red {
  background: #ffebed;
  color: #bf3f49;
}

.book-card-body>h3 {
  margin: 7px 0;
  color: #344158;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.book-author {
  min-height: 34px;
  margin: 0 0 10px;
  color: #748095;
  font-size: 10px;
  line-height: 1.5;
}

.book-publishing {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
  color: #8490a3;
  font-size: 9px;
}

.book-publishing b {
  color: #59667c;
}

.book-card-footer {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  align-items: center;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: #8290a3;
  font-size: 9px;
}

.book-card-footer>a {
  justify-self: end;
  color: var(--blue2);
  font-weight: 700;
}

.book-grid.list-view {
  grid-template-columns: 1fr;
}

.book-grid.list-view .book-card {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
}

.book-grid.list-view .book-cover {
  aspect-ratio: 3 / 4;
}

.book-grid.list-view .book-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.book-grid.list-view .book-card-body>h3 {
  font-size: 18px;
}

.book-grid.list-view .book-author {
  min-height: 0;
  font-size: 12px;
}

.book-grid.list-view .book-publishing,
.book-grid.list-view .book-card-footer {
  font-size: 11px;
}

.book-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 55px;
  border: 1px dashed #c9d5e6;
  border-radius: 10px;
  color: #8190a5;
}

.book-empty i {
  font-size: 34px;
}

.book-empty h3 {
  margin: 0;
  font-size: 18px;
}

.book-empty p {
  margin: 0;
  font-size: 14px;
}

/* Nút "Xem thêm" thật thay cho phân trang giả của mockup — đúng khuôn .load-more-photos của
   Thư viện ảnh (gallery.css), không phải mockup gốc vì mockup dùng .book-pagination giả. */
.load-more-books {
  display: block;
  margin: 28px auto 0px;
  height: 41px;
  padding: 0px 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255, 255, 255);
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
}

.load-more-books:disabled {
  color: rgb(141, 151, 168);
}

.book-sidebar,
.book-detail-sidebar {
  position: sticky;
  top: 15px;
  display: grid;
  gap: 14px;
}

.book-sidebar>section,
.book-metrics-card,
.book-info-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--book-shadow);
}

.book-sidebar h2,
.book-info-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.book-categories {
  display: grid;
}

.book-categories button {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px dashed var(--line);
  background: transparent;
  color: #536078;
  font-size: 11px;
  text-align: left;
}

.book-categories button:last-child {
  border: 0;
}

.book-categories button>i {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 7px;
  background: #edf4ff;
  color: var(--blue);
}

.book-categories b {
  color: var(--blue2);
}

.popular-books {
  padding: 0;
  margin: 0;
  list-style: none;
}

.popular-books li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.popular-books li:last-child {
  border: 0;
}

.popular-books li>b {
  color: #c2cede;
  font-size: 18px;
}

.popular-books li div {
  display: grid;
}

.popular-books a {
  color: #46536a;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.popular-books span {
  color: #8a95a7;
  font-size: 9px;
}

.book-request {
  display: grid;
  grid-template-columns: 38px 1fr 16px;
  gap: 10px;
  align-items: center;
  padding: 17px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0a50bd, #06388f);
  color: #fff;
}

.book-request>i:first-child {
  font-size: 28px;
}

.book-request span {
  display: grid;
}

.book-request strong {
  font-size: 13px;
}

.book-request small {
  font-size: 10px;
  opacity: .82;
}

/* Detail */
.book-detail-content {
  padding-top: 20px;
}

.book-showcase {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid #d5e0ee;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef5ff, #fff);
  box-shadow: var(--book-shadow);
}

.book-detail-cover {
  width: 235px;
  aspect-ratio: 3 / 4;
  border-radius: 5px 12px 12px 5px;
  box-shadow: 13px 17px 30px rgba(7, 35, 77, .25);
}

.book-detail-cover>em {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  border-radius: 13px;
  background: #ffcf42;
  color: #684600;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.book-detail-category {
  color: var(--blue2);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.book-showcase-body>h1 {
  margin: 7px 0 9px;
  color: #2e3e57;
  font-size: clamp(24px, 2.7vw, 37px);
  font-weight: 800;
  line-height: 1.4;
}

.book-detail-author {
  color: #586a83;
  font-size: 13px;
}

.book-detail-author i {
  margin-right: 5px;
  color: var(--blue2);
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0;
}

.book-rating>span {
  color: #f4b51c;
  font-size: 14px;
}

.book-rating b {
  color: #435169;
  font-size: 13px;
}

.book-rating small {
  color: #8490a3;
  font-size: 10px;
}

.book-summary {
  max-width: 890px;
  color: #647187;
  font-size: 14px;
  line-height: 1.75;
}

.book-showcase-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin: 15px 0;
  border: 1px solid #dce4ef;
  border-radius: 8px;
}

.book-showcase-meta>div {
  display: grid;
  padding: 11px;
  border-right: 1px solid #dce4ef;
}

.book-showcase-meta>div:last-child {
  border: 0;
}

.book-showcase-meta span {
  color: #8a95a7;
  font-size: 10px;
}

.book-showcase-meta strong {
  color: #46536a;
  font-size: 11px;
}

.book-showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-showcase-actions :is(a, button) {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.book-showcase-actions>a {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.book-showcase-actions button.bookmarked {
  border-color: #f2bd30;
  background: #fff8e2;
  color: #9a6800;
}

.book-availability {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 12px;
  color: #788499;
  font-size: 10px;
}

.book-availability i {
  margin-right: 4px;
  color: var(--blue2);
}

.book-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 22px;
  align-items: start;
}

.book-detail-main {
  min-width: 0;
}

.book-detail-tabs-section,
.book-preview-section,
.book-files-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.book-preview-section,
.book-files-section {
  margin-top: 14px;
}

.book-detail-tabs {
  display: flex;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.book-detail-tabs button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #637087;
  font-size: 12px;
  font-weight: 650;
}

.book-detail-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.book-tab-pane {
  display: none;
  padding-top: 18px;
}

.book-tab-pane.active {
  display: block;
}

.book-tab-pane>h2 {
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.book-tab-pane>h3 {
  color: #3d4b62;
  font-size: 16px;
}

.book-tab-pane>p,
.book-tab-pane>ul {
  color: #58667c;
  font-size: 14px;
  line-height: 1.85;
}

.book-tab-pane blockquote {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-left: 3px solid var(--blue2);
  background: #f2f7ff;
}

.book-tab-pane blockquote i {
  color: var(--blue2);
  font-size: 25px;
}

.book-tab-pane blockquote p {
  margin: 0;
  color: #50617b;
  font-size: 13px;
  font-style: italic;
  line-height: 1.7;
}

.book-contents {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.book-contents li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8fb;
}

.book-contents li>span {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 9px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.book-contents li div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.book-contents strong {
  color: #46536a;
  font-size: 13px;
}

.book-contents small {
  flex: 0 0 auto;
  color: #8a95a7;
  font-size: 10px;
}

.book-authors {
  display: grid;
  gap: 9px;
}

.book-authors article {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8fb;
}

.book-authors article>span {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.book-authors h3 {
  margin: 0 0 3px;
  color: #435168;
  font-size: 14px;
}

.book-authors p {
  margin: 0;
  color: #788499;
  font-size: 11px;
}

.book-publication-data {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-publication-data>div {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.book-publication-data>div:last-child {
  border: 0;
}

.book-publication-data :is(dt, dd) {
  padding: 11px;
  margin: 0;
  font-size: 12px;
}

.book-publication-data dt {
  background: #f5f7fa;
  color: #6d798d;
  font-weight: 650;
}

.book-publication-data dd {
  color: #4d5a70;
}

.book-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.book-section-head>div:first-child {
  display: grid;
}

.book-section-head>div:first-child>span {
  color: var(--blue2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
}

.book-section-head h2 {
  margin: 3px 0 0;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.book-section-head>div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.book-section-head>div:last-child button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
}

.book-section-head>div:last-child button:disabled {
  opacity: .4;
}

.book-section-head>div:last-child span {
  color: #778397;
  font-size: 11px;
}

.book-section-head>div:last-child b {
  color: var(--blue);
}

.book-preview-pages {
  padding-top: 16px;
}

.book-preview-page {
  position: relative;
  display: none;
  min-height: 490px;
  padding: 35px 45px 42px;
  border: 1px solid #dce3ed;
  background:
    linear-gradient(90deg, transparent 38px, #ebeff4 39px, transparent 40px),
    #fff;
  box-shadow: 0 8px 25px rgba(23, 48, 88, .07);
}

.book-preview-page.active {
  display: block;
}

.book-preview-page>span {
  color: var(--blue2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

.book-preview-page>h3 {
  margin: 8px 0 18px;
  color: #2f3e56;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.4;
}

.book-preview-page>p,
.book-preview-page>ul {
  color: #505d70;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.9;
}

.book-preview-page .preview-page-number {
  position: absolute;
  right: 30px;
  bottom: 17px;
  color: #8994a6;
  font-size: 10px;
}

.preview-callout {
  display: grid;
  padding: 14px;
  border-left: 3px solid var(--blue);
  background: #f1f6ff;
}

.preview-callout strong {
  color: var(--blue);
  font-size: 13px;
}

.preview-callout span {
  color: #66748a;
  font-size: 11px;
}

.preview-table {
  margin-top: 18px;
  border: 1px solid #dbe3ee;
}

.preview-table>div {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  border-bottom: 1px solid #dbe3ee;
}

.preview-table>div:last-child {
  border: 0;
}

.preview-table :is(b, span) {
  padding: 9px;
  border-right: 1px solid #dbe3ee;
  font-size: 11px;
}

.preview-table :is(b, span):last-child {
  border: 0;
}

.preview-table>div:first-child {
  background: #f2f5f9;
}

.book-files {
  display: grid;
  gap: 9px;
  padding-top: 15px;
}

.book-files article {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-files article>i {
  color: #d53c45;
  font-size: 29px;
}

.book-files article:nth-child(2)>i {
  color: #365fbd;
}

.book-files h3 {
  margin: 0 0 4px;
  color: #3f4d63;
  font-size: 14px;
}

.book-files p {
  margin: 0;
  color: #7a8699;
  font-size: 11px;
}

.book-files button {
  height: 37px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
}

.book-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
}

.book-detail-actions :is(a, button) {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
}

.book-detail-actions>a:last-child {
  margin-left: auto;
}

.book-metrics-card {
  text-align: center;
}

.book-metrics-card>i {
  color: var(--blue2);
  font-size: 36px;
}

.book-metrics-card>span {
  display: block;
  margin: 4px 0 12px;
  color: #7b879a;
  font-size: 11px;
}

.book-metrics-card>div {
  display: inline-grid;
  min-width: 92px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
}

.book-metrics-card>div:last-child {
  border: 0;
}

.book-metrics-card strong {
  color: var(--blue);
  font-size: 17px;
}

.book-metrics-card small {
  color: #8792a5;
  font-size: 9px;
}

.book-info-card dl {
  margin: 0;
}

.book-info-card dl>div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.book-info-card dl>div:last-child {
  border: 0;
}

.book-info-card dt {
  color: #8490a3;
  font-size: 11px;
  font-weight: 500;
}

.book-info-card dd {
  max-width: 145px;
  margin: 0;
  color: #47546a;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.book-library-card {
  display: flex;
  gap: 11px;
  padding: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0a50bd, #06388f);
  color: #fff;
}

.book-library-card>i {
  font-size: 28px;
}

.book-library-card h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.book-library-card p {
  margin: 0 0 7px;
  font-size: 10px;
  line-height: 1.55;
  opacity: .82;
}

.book-library-card a {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

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

.related-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.related-book-head h2 {
  margin: 0;
  color: var(--blue);
  font-size: 21px;
  font-weight: 800;
}

.related-book-head a {
  color: var(--blue2);
  font-size: 13px;
}

.related-book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.related-book-grid article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.related-book-cover {
  display: grid;
  min-height: 138px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 9px;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

/* Bìa sách thật (thay cho icon+màu nền minh họa gốc) — lấp đầy đúng ô 92px cột trái. */
.related-book-cover img {
  width: 100%;
  height: 100%;
  min-height: 138px;
  object-fit: cover;
}

.related-digital {
  background: linear-gradient(155deg, #146bc4, #07397f);
}

.related-innovation {
  background: linear-gradient(155deg, #744ac0, #392276);
}

.related-ip {
  background: linear-gradient(155deg, #de8718, #8b4607);
}

.related-book-cover i {
  font-size: 25px;
}

.related-book-cover span {
  font-size: 7px;
  font-weight: 750;
}

.related-book-grid article>div:last-child {
  padding: 13px;
}

.related-book-grid article>div:last-child>span {
  color: var(--blue2);
  font-size: 9px;
  font-weight: 700;
}

.related-book-grid h3 {
  margin: 6px 0;
  color: #3f4d63;
  font-size: 12px;
  line-height: 1.55;
}

.related-book-grid p {
  margin: 0;
  color: #8190a3;
  font-size: 9px;
}

@media (max-width: 1199px) {
  .book-grid {
    grid-template-columns: 1fr 1fr;
  }

  .book-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .book-detail-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .related-book-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 991px) {
  .book-featured {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .book-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .book-layout,
  .book-detail-layout {
    grid-template-columns: 1fr;
  }

  .book-sidebar,
  .book-detail-sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .book-request,
  .book-library-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .book-hero,
  .book-detail-hero {
    padding: 16px 0 25px;
  }

  .book-hero-books {
    display: none;
  }

  .book-hero h1 {
    font-size: 25px;
  }

  .book-hero p {
    font-size: 14px;
  }

  .book-content.section,
  .book-detail-content.section {
    padding-top: 18px;
  }

  .book-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .book-stats article {
    gap: 8px;
    padding: 11px;
  }

  .book-stats i {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
    font-size: 17px;
  }

  .book-stats strong {
    font-size: 19px;
  }

  .book-stats span {
    font-size: 12px;
  }

  .book-featured {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .book-featured-cover {
    width: min(220px, 75%);
  }

  .book-featured-body dl {
    grid-template-columns: 1fr;
  }

  .book-featured-body dl>div,
  .book-featured-body dl>div:nth-child(2n),
  .book-featured-body dl>div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid #dbe4f0;
  }

  .book-featured-body dl>div:last-child {
    border-bottom: 0;
  }

  .book-toolbar {
    padding: 13px;
  }

  .book-search-box button {
    width: 46px;
    padding: 0;
    font-size: 0;
  }

  .book-search-box button::after {
    font-family: "bootstrap-icons";
    font-size: 15px;
    content: "\F52A";
  }

  .book-filter-grid {
    grid-template-columns: 1fr;
  }

  .book-result-head {
    display: grid;
    gap: 10px;
  }

  .book-result-head>div:last-child {
    justify-content: space-between;
  }

  .book-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .book-card-body {
    padding: 11px;
  }

  .book-card-body>h3 {
    font-size: 11px;
  }

  .book-author {
    font-size: 9px;
  }

  .book-card-footer {
    grid-template-columns: 1fr;
  }

  .book-card-footer>a {
    justify-self: start;
  }

  .book-grid.list-view .book-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .book-grid.list-view .book-card-body {
    padding: 13px;
  }

  .book-grid.list-view .book-card-body>h3 {
    font-size: 14px;
  }

  .book-sidebar,
  .book-detail-sidebar,
  .related-book-grid {
    grid-template-columns: 1fr;
  }

  .book-request,
  .book-library-card {
    grid-column: auto;
  }

  .book-showcase {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .book-detail-cover {
    width: min(230px, 75%);
    margin: 0 auto;
  }

  .book-showcase-body>h1 {
    font-size: 24px;
  }

  .book-showcase-meta {
    grid-template-columns: 1fr 1fr;
  }

  .book-showcase-meta>div {
    border-bottom: 1px solid #dce4ef;
  }

  .book-showcase-meta>div:nth-child(2n) {
    border-right: 0;
  }

  .book-showcase-meta>div:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .book-detail-tabs-section,
  .book-preview-section,
  .book-files-section {
    padding: 17px;
  }

  .book-contents li div {
    display: grid;
  }

  .book-publication-data>div {
    grid-template-columns: 1fr;
  }

  .book-publication-data dt {
    padding-bottom: 5px;
  }

  .book-publication-data dd {
    padding-top: 5px;
  }

  .book-preview-page {
    min-height: 520px;
    padding: 28px 22px 42px;
    background: #fff;
  }

  .book-preview-page>h3 {
    font-size: 20px;
  }

  .book-files article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .book-files button {
    grid-column: 2;
    width: max-content;
  }

  .book-detail-actions>a:last-child {
    width: 100%;
    margin-left: 0;
  }

  .related-book-head {
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .book-stats {
    grid-template-columns: 1fr;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card-body>h3 {
    font-size: 14px;
  }

  .book-card-footer {
    grid-template-columns: auto auto 1fr;
  }

  .book-card-footer>a {
    justify-self: end;
  }

  .book-grid.list-view .book-card {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .book-grid.list-view .book-card-footer {
    grid-template-columns: 1fr;
  }

  .book-grid.list-view .book-card-footer>a {
    justify-self: start;
  }

  .book-showcase-meta {
    grid-template-columns: 1fr;
  }

  .book-showcase-meta>div,
  .book-showcase-meta>div:nth-child(2n),
  .book-showcase-meta>div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid #dce4ef;
  }

  .book-showcase-meta>div:last-child {
    border-bottom: 0;
  }
}

@media print {
  header,
  footer,
  .page-loader,
  .smart-search,
  .book-showcase-actions,
  .book-detail-actions,
  .book-detail-sidebar,
  .related-books,
  .book-section-head>div:last-child {
    display: none !important;
  }

  .book-detail-layout {
    display: block;
  }
}
