@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Regular-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Regular.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Regular-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Regular-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Regular.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Bold-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Bold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Bold-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Bold-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Bold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display VH';
  src: url('../fonts/sf-pro-display/SF-Pro-Display-Bold-vietnamese.woff2') format('woff2'),
       url('../fonts/sf-pro-display/SF-Pro-Display-Bold.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-primary: 'SF Pro Display VH', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --primary: #121212;
  --bg-body: #18181b;
  --secondary: #f59e0b;
  --accent: #ea580c;
  --surface: #27272a;
  --surface-light: #3f3f46;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --success: #10B981;
  --premium: #f59e0b;
  --rose: #ef4444;
  --gradient-start: #18181b;
  --gradient-end: #27272a;
  --shadow: rgba(0,0,0,0.5);
  --glow: rgba(245,158,11,0.2);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-primary);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: var(--font-primary); font-weight: 700; line-height: 1.3; letter-spacing: 0; }

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* TOP BANNER */
.top-banner {
  background: linear-gradient(135deg, var(--secondary), #E8A87C);
  padding: 10px 0;
  text-align: center;
  position: relative;
  z-index: 100;
}
.top-banner p { font-size: 14px; font-weight: 600; color: var(--primary); }
.top-banner .cta-link {
  display: inline-block;
  background: var(--primary);
  color: var(--secondary);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 12px;
  transition: var(--transition);
}
.top-banner .cta-link:hover { transform: scale(1.05); }
.top-banner .close-banner {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  background: none; color: var(--primary); font-size: 18px; opacity: 0.7;
}
.top-banner .close-banner:hover { opacity: 1; }

/* Placeholder for dynamic header/footer injection – prevents CLS (layout shift) */
#site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  min-height: 73px;
  background: rgba(24,24,27,0.96);
  backdrop-filter: blur(20px);
}
#site-footer { min-height: 200px; }

/* HEADER – Single row: Logo | Nav | Search */
.main-header {
  position: sticky; top: 0;
  z-index: 300;
  background: rgba(24,24,27,0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.main-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner-row {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 0;
}
/* Disable old 2-row header */
.header-top { display: none; }
.header-nav { display: block; }
.header-nav .container { padding: 0 24px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  color: var(--bg-body); flex-shrink: 0;
}
.logo-icon svg { display: block; }
.logo-text { font-family: var(--font-primary); font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; }
.logo-text span { color: var(--secondary); }

.nav-menu {
  display: flex; gap: 4px; align-items: center;
  flex: 1;
  margin-left: 16px;
}
.nav-menu a {
  padding: 7px 14px; border-radius: 20px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  transition: var(--transition); white-space: nowrap;
  display: block;
}
.nav-menu a:hover { color: var(--text-primary); background: var(--surface); }
.nav-menu a.active { color: var(--primary); background: var(--secondary); }

.nav-search-row {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.header-search-inline {
  position: relative; width: 220px;
}
.header-search-inline input {
  width: 100%; padding: 8px 16px 8px 36px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 13px;
  transition: var(--transition);
  font-family: var(--font-primary);
}
.header-search-inline input:focus {
  border-color: var(--secondary); outline: none;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}
.header-search-inline .si {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-secondary); display: flex; align-items: center;
}
/* Mobile menu button */
.mobile-menu-btn {
  display: none; background: var(--surface); border: none;
  width: 40px; height: 40px; border-radius: var(--radius);
  align-items: center; justify-content: center;
  color: var(--text-primary); cursor: pointer;
}
@media (max-width: 1024px) {
  .mobile-menu-btn { display: flex; }
}

.btn { padding: 10px 24px; border-radius: 24px; font-size: 15px; font-weight: 600; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-outline { border: 1px solid var(--surface-light); color: var(--text-primary); background: transparent; }
.btn-outline:hover { background: var(--surface); border-color: var(--text-secondary); }
.btn-primary { background: var(--secondary); color: var(--primary); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--glow); background: var(--accent); }
.btn-ghost { color: var(--text-secondary); background: none; }
.btn-ghost:hover { color: var(--text-primary); }


/* HERO SECTION – Full-width bleed */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--primary);
}
.hero-carousel {
  position: relative; width: 100%; height: 520px;
  overflow: hidden;
  background: var(--surface);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.9s ease;
  display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; z-index: 10; }
.hero-slide .slide-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; width: 100%; height: 100%; padding: 0 8% 0 10%;
  position: relative; z-index: 2;
}
.hero-content { flex: 1; max-width: 560px; }
.hero-content .hero-badge {
  display: inline-block;
  background: rgba(245,158,11,0.15);
  color: var(--secondary);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: 52px; line-height: 1.1;
  margin-bottom: 18px;
  font-weight: 800;
}
.hero-content h1 span { color: var(--secondary); }
.hero-content p {
  font-size: 17px; color: var(--text-secondary);
  margin-bottom: 32px; line-height: 1.7;
  max-width: 460px;
}
.hero-actions { display: flex; gap: 14px; }
.hero-image {
  flex: 0 0 340px; position: relative;
  perspective: 1200px;
}
.hero-image img {
  width: 100%; border-radius: 12px;
  box-shadow: -20px 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero-slide.active .hero-image img {
  transform: rotateY(-3deg) rotateX(0deg) scale(1.03);
}
.hero-dots {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 8px; z-index: 15;
}
.hero-dots .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.25); transition: var(--transition);
  cursor: pointer;
}
.hero-dots .dot.active { background: var(--secondary); width: 28px; border-radius: 4px; }
.hero-bg-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(15,15,20,0.97) 0%, rgba(30,30,40,0.7) 60%, rgba(15,15,20,0.3) 100%);
  z-index: 0;
}
.hero-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 15; transition: var(--transition);
}
.hero-nav-btn:hover { background: var(--secondary); border-color: var(--secondary); color: var(--primary); }
.hero-nav-btn.prev { left: 20px; }
.hero-nav-btn.next { right: 20px; }

/* SECTION COMMON */
.section { padding: 60px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 { font-size: 26px; }
.section-header h2 .icon { margin-right: 10px; }
.view-all {
  font-size: 14px; font-weight: 600; color: var(--secondary);
  display: flex; align-items: center; gap: 4px;
}
.view-all:hover { gap: 8px; }

/* BOOK CARDS */
.books-scroll {
  display: flex; gap: 20px; overflow-x: auto;
  padding-bottom: 16px; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.books-scroll::-webkit-scrollbar { display: none; }

.book-card {
  flex: 0 0 190px; transition: var(--transition); position: relative; cursor: pointer;
}
/* Khi có popover hover: chỉ tăng z-index, không lift (tránh ảnh nhảy) */
.book-card:hover { z-index: 100; }
.book-card .book-cover {
  position: relative; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 2/3;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
/* Giữ nguyên kích thước ảnh gốc, không zoom/co */
.book-cover img {
  width: 100%; height: 100%; object-fit: cover;
}

.book-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0; transition: var(--transition);
}
.book-card:hover .book-cover::after { opacity: 1; }

.book-badge,
.content-badge-stack {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}
.content-badge-stack {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: calc(100% - 16px);
  pointer-events: none;
}
.content-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
}
.badge-access {
  color: #ecfdf5;
  background: linear-gradient(135deg, rgba(16,185,129,0.96), rgba(20,184,166,0.92));
  border: 1px solid rgba(236,253,245,0.36);
}
.badge-featured {
  color: #271800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 1px solid rgba(255,255,255,0.3);
}
.badge-premium { background: linear-gradient(135deg, var(--secondary), var(--premium)); color: var(--primary); }
.badge-free { background: var(--success); color: #fff; }
.badge-new { background: var(--rose); color: #fff; }
.badge-audio { background: var(--accent); color: var(--primary); }

.book-info { padding: 10px 2px 0; min-height: 56px; }
.book-title {
  font-family: var(--font-primary);
  font-size: 16px; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; line-height: 1.35;
  letter-spacing: 0;
}
.book-card-meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SCROLL ARROWS */
.scroll-container { position: relative; }
.scroll-arrow {
  position: absolute; top: 50%; transform: translateY(-70%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(26,35,50,0.9); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; z-index: 5; transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}
.scroll-arrow:hover { background: var(--secondary); color: var(--primary); }
.scroll-arrow.left { left: -24px; }
.scroll-arrow.right { right: -24px; }

/* TOP 10 BESTSELLERS */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.top10-card {
  position: relative; cursor: pointer; transition: var(--transition);
}
.top10-card:hover { transform: translateY(-8px); z-index: 100; }
.top10-rank {
  position: absolute; bottom: 80px; left: -18px; z-index: 3;
  font-family: var(--font-primary);
  font-size: 110px; font-weight: 900;
  color: var(--secondary);
  text-shadow: -4px 4px 0 rgba(0,0,0,0.6), 0 4px 20px rgba(0,0,0,0.6);
  -webkit-text-stroke: 3px rgba(0,0,0,0.3);
  line-height: 1;
}
.top10-card .book-cover { aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.top10-card .book-title {
  font-size: 17px;
  font-weight: 700;
  margin-top: 12px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}


/* AUTHORS - PREMIUM CARDS */
.authors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.author-card.premium-author {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
}
.author-card.premium-author:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.author-cover {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  filter: blur(2px) brightness(0.6);
  transition: filter 0.4s ease;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
.author-card.premium-author:hover .author-cover {
  filter: blur(0px) brightness(0.8);
}
.author-avatar-wrapper {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  margin-top: -55px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background: var(--background);
}
.author-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-info {
  text-align: center;
  margin-top: 16px;
  padding: 0 16px;
}
.author-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.author-info p {
  font-size: 14px;
  color: var(--text-secondary);
}
.author-books-preview {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 16px;
}
.author-books-preview img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}
.author-card.premium-author:hover .author-books-preview img {
  transform: translateY(-4px);
}
.author-card.premium-author:hover .author-books-preview img:nth-child(2) {
  transform: translateY(-8px);
}

/* COLLECTIONS - PREMIUM CARDS */
.collections-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.collection-card.premium-card {
  position: relative; 
  border-radius: var(--radius-lg); 
  overflow: hidden;
  height: 220px; 
  cursor: pointer; 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  text-decoration: none;
}
.collection-card.premium-card:hover { 
  transform: translateY(-6px) scale(1.02); 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2); 
}

.collection-info {
  flex: 1;
  max-width: 60%;
  z-index: 2;
}
.collection-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.collection-info h3 { 
  font-size: 22px; 
  font-weight: 800;
  margin-bottom: 8px; 
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.collection-info p { 
  font-size: 13px; 
  color: rgba(255,255,255,0.8); 
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-visual {
  width: 120px;
  height: 100%;
  position: relative;
  z-index: 1;
  perspective: 1000px;
}
.book-stack {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%) rotateY(-20deg) rotateX(10deg);
  width: 90px;
  height: 130px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}
.collection-card.premium-card:hover .book-stack {
  transform: translateY(-50%) rotateY(0deg) rotateX(0deg) scale(1.1);
}
.stack-book {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 4px;
  box-shadow: -5px 5px 15px rgba(0,0,0,0.5);
  object-fit: cover;
  transition: all 0.4s ease;
}
.stack-book.b1 { transform: translateZ(30px); z-index: 3; border: 1px solid rgba(255,255,255,0.2); }
.stack-book.b2 { transform: translateZ(15px) translateX(15px) translateY(-10px) scale(0.9); z-index: 2; opacity: 0.8; filter: brightness(0.8); }
.stack-book.b3 { transform: translateZ(0px) translateX(30px) translateY(-20px) scale(0.8); z-index: 1; opacity: 0.6; filter: brightness(0.6); }

.collection-card.premium-card:hover .stack-book.b2 {
  transform: translateZ(10px) translateX(20px) translateY(-5px) scale(0.95) rotate(5deg);
  opacity: 0.9; filter: brightness(0.9);
}
.collection-card.premium-card:hover .stack-book.b3 {
  transform: translateZ(0px) translateX(40px) translateY(-10px) scale(0.9) rotate(10deg);
  opacity: 0.8; filter: brightness(0.8);
}

/* CATEGORY TABS */
.category-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.category-tab {
  padding: 8px 20px; border-radius: 25px; font-size: 13px; font-weight: 600;
  background: var(--surface); color: var(--text-secondary); transition: var(--transition);
}
.category-tab:hover { color: var(--text-primary); background: var(--surface-light); }
.category-tab.active { background: var(--secondary); color: var(--primary); }

/* COMICS */
.comics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.comic-card { flex: 0 0 190px; transition: var(--transition); cursor: pointer; position: relative; }
.comic-card:hover { transform: translateY(-6px); z-index: 100; }
.comic-card .book-cover { aspect-ratio: 3/4; }
.comic-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: linear-gradient(135deg, rgba(16,185,129,0.96), rgba(20,184,166,0.92)); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

/* HOME COMICS */
.home-comics-section {
  background: linear-gradient(180deg, #141416 0%, #101012 100%);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.home-comics-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.home-comics-heading h2 {
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1.15;
}
.home-comics-heading h2 .icon {
  margin-right: 10px;
}
.home-comics-grid-wrap {
  margin-top: 20px;
  overflow: hidden;
}
.home-comics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  min-width: 0;
}
.comic-update-card {
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  transition: transform 0.2s, background 0.2s;
  padding: 8px;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}
.comic-update-card:hover {
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}
.comic-update-cover {
  width: 80px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.comic-update-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.comic-update-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.comic-update-time {
  font-size: 11px;
  color: #9ca3af;
}
.comic-update-title {
  font-size: 15px;
  font-weight: 700;
  color: #f3f4f6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin: 0;
  max-width: 100%;
}
.comic-update-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #9ca3af;
  min-width: 0;
}
.comic-update-meta > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comic-update-views {
  display: flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 1024px) {
  .home-comics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .home-comics-heading {
    align-items: center;
  }
  .home-comics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .comic-update-card {
    padding: 0;
    align-items: flex-start;
  }
  .comic-update-cover {
    width: 64px;
    height: 90px;
  }
  .comic-update-info {
    position: relative;
    padding-right: 75px;
    justify-content: flex-start;
    padding-top: 2px;
  }
  .comic-update-title {
    order: 1;
    font-size: 14px;
    font-weight: 700;
    color: #f3f4f6;
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .comic-update-time {
    position: absolute;
    top: 2px;
    right: 0;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
  }
  .comic-update-meta {
    display: none !important;
  }
}

/* STATS BAR */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 32px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item h3 { font-size: 36px; color: var(--secondary); margin-bottom: 4px; }
.stat-item p { font-size: 14px; color: var(--text-secondary); }

/* MEGA MENU */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.mega-menu {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 960px;
  max-width: calc(100vw - 32px);
  background: rgba(15, 27, 45, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.nav-item-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 20px;
}
/* Tablet: 3 columns mega grid */
@media (max-width: 1280px) {
  .mega-menu {
    width: 720px;
  }
  .mega-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.mega-column h4 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
}
.mega-column a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0;
  padding: 6px 0 !important;
  line-height: 1.4;
}
.mega-badges {
  flex-shrink: 0;
  padding: 2px 6px;
  background: #ef4444;
  color: #fff;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.mega-column a:hover {
  color: var(--secondary);
  background: transparent !important;
}
.mega-badges {
  display: inline-block;
  background: var(--rose);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.mega-explore {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
}
.mega-explore h4 {
  font-size: 14px;
  margin-bottom: 12px;
}
.mega-explore-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mega-explore-tags a {
  padding: 8px 16px !important;
  border-radius: 20px !important;
  background: var(--surface-light) !important;
  color: var(--text-primary) !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
}
.mega-explore-tags a:hover {
  background: var(--secondary) !important;
  color: var(--primary) !important;
}

/* BOOK HOVER POPOVER – Premium Glassmorphism */
.book-popover {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--cover-w, 160px) + 340px); /* Tự động rộng bằng ảnh bìa + 340px text */
  background: rgba(24, 24, 27, 0.75);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
  display: none;
  overflow: hidden;
  height: var(--cover-h, 240px); /* Tự động cao bằng ảnh bìa */
  gap: 0;
  padding: 0;
}
.book-card:hover .book-popover,
.catalog-card:hover .book-popover,
.top10-card:hover .book-popover,
.comic-card:hover .book-popover {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Flip to right→left when near right edge */
.popover-left {
  left: auto;
  right: 0;
}
.book-card:hover .popover-left,
.catalog-card:hover .popover-left,
.top10-card:hover .popover-left,
.comic-card:hover .popover-left {
  /* no transform needed, only opacity */
}
/* Cover — tự động khớp 100% với mọi bìa sách thông qua CSS Variables */
.popover-cover-wrap {
  flex: 0 0 var(--cover-w, 160px);
  align-self: stretch;
  overflow: hidden;
}
.popover-cover {
  width: var(--cover-w, 160px);
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

/* Body */
.popover-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.popover-info h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text-primary);
}
.popover-info .pop-author {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
/* Category badge */
.popover-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0;
  /* Flexbox truncation */
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popover-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0; /* Prevent buttons from shrinking/wrapping */
}
.popover-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.popover-badge.cat  { background: rgba(245,158,11,0.12); color: var(--secondary); border: 1px solid rgba(245,158,11,0.25); }
.popover-badge.free { background: rgba(16,185,129,0.12); color: #10B981; border: 1px solid rgba(16,185,129,0.25); }
.popover-badge.premium { background: rgba(245,158,11,0.12); color: var(--secondary); border: 1px solid rgba(245,158,11,0.25); }
.popover-badge.new  { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.popover-desc-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.popover-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 10; /* Hiển thị rất nhiều text do đã có nhiều không gian hơn */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pop-detail-link {
  font-size: 12px;
  color: var(--secondary);
  text-decoration: none;
  display: inline-block;
  margin-top: auto;
  margin-bottom: 4px;
  font-weight: 500;
}
.pop-detail-link:hover {
  text-decoration: underline;
}
.popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Nằm góc bên phải */
  gap: 10px;
}
.popover-btn-read {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 24px;
  background: #10B981;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
}
.popover-btn-read:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16,185,129,0.4);
}
.popover-btn-heart {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-light);
  border: none;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  flex-shrink: 0;
}
.popover-btn-heart:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.popover-btn-heart.active { color: #ef4444; background: rgba(239,68,68,0.15); }
.popover-btn-heart.active svg { fill: #ef4444; stroke: #ef4444; }

/* FOOTER */
.main-footer {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 60px 0 0;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 28px; margin-bottom: 40px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-light); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-secondary); transition: var(--transition);
}
.social-link:hover { background: var(--secondary); color: var(--primary); }

.footer-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); font-family: var(--font-primary); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 13px; color: var(--text-secondary); }
.footer-col ul a:hover { color: var(--secondary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }

/* BACK TO TOP */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--secondary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; z-index: 90; transition: var(--transition);
  opacity: 0; pointer-events: none; transform: translateY(20px);
  box-shadow: 0 4px 20px rgba(245,166,35,0.3);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* SEARCH OVERLAY */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,27,45,0.95); backdrop-filter: blur(20px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 120px;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.search-overlay.active { opacity: 1; pointer-events: auto; }
.search-box {
  width: 100%; max-width: 640px; position: relative;
}
.search-box input {
  width: 100%; padding: 18px 24px; padding-left: 52px;
  border-radius: 16px; border: 2px solid var(--surface-light);
  background: var(--surface); color: var(--text-primary);
  font-size: 18px; font-family: inherit; outline: none;
  transition: var(--transition);
}
.search-box input:focus { border-color: var(--secondary); }
.search-box .search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--text-secondary);
}
.search-close {
  position: absolute; top: -60px; right: 0;
  background: none; color: var(--text-secondary); font-size: 32px;
}

/* ANIMATIONS */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .top10-grid { grid-template-columns: repeat(3, 1fr); }
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .comics-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 0;
    padding-bottom: 28px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .footer-brand .logo { grid-column: 1; grid-row: 1; margin-bottom: 0 !important; }
  .footer-brand .social-links { grid-column: 2; grid-row: 1; align-self: center; }
  .footer-brand p { grid-column: 1 / -1; grid-row: 2; max-width: 540px; margin-bottom: 0 !important; }
  .app-cta { flex-direction: column; text-align: center; padding: 40px; }
  .app-content p { margin: 0 auto 24px; }
  .store-buttons { justify-content: center; }
  .app-image { flex: 0 0 auto; max-width: 250px; }
  .hero-slide .container { flex-direction: column; text-align: center; }
  .hero-image { flex: 0 0 280px; }
}

@media (max-width: 768px) {
  .hero-carousel { height: 380px; }
  .hero-content h1 { font-size: 28px; }
  .top10-grid { grid-template-columns: repeat(2, 1fr); }
  .collections-grid { grid-template-columns: 1fr; }
  .comics-grid { grid-template-columns: repeat(3, 1fr); }
  .home-comics-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .home-comics-heading h2 { font-size: 22px; }
  .home-comic-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .home-comic-tabs::-webkit-scrollbar { display: none; }
  .home-comics-scroll .comic-card { flex-basis: 142px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .book-card { flex: 0 0 150px; }
  .audio-section { margin: 0 12px; padding: 24px; }
  .app-cta { margin: 0 12px; }
  .section { padding: 40px 0; }
  /* Tablet small footer: brand full-width + 2 col links */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 28px; }
  .footer-brand {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 4px;
  }
  .footer-brand p { max-width: 100%; }
  .footer-brand .social-links { margin-left: 0; justify-content: center; }
}

@media (max-width: 480px) {
  .header-inner { padding: 10px 16px; }
  .comics-grid { grid-template-columns: repeat(2, 1fr); }
  .top10-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .main-footer { padding: 32px 0 0; margin-top: 32px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; margin-bottom: 20px; }
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .footer-brand p { font-size: 11px; margin-bottom: 8px !important; line-height: 1.6; }
  .footer-brand .social-links { justify-content: center; margin-left: 0; gap: 8px; }
  .footer-brand .social-link { width: 32px; height: 32px; font-size: 14px; }
  .footer-col h4 { font-size: 13px; margin-bottom: 8px; }
  .footer-col ul li { margin-bottom: 4px; }
  .footer-col ul a { font-size: 12px; }
  .footer-bottom { padding: 12px 0; }
  .store-buttons { flex-direction: column; }
}

/* ==========================================================================
   2. LAYOUT COMPONENTS
   ========================================================================== */

/* 3D CAROUSEL HERO */
.hero-3d-wrapper {
  background: var(--surface);
  padding: 30px 0 60px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 40px;
  overflow: hidden; /* Clip the 3D overflow from the right */
}

.hero-dynamic-bg {
  position: absolute;
  inset: -100px; /* Oversize to prevent blur edges */
  background: radial-gradient(circle at center, rgba(30,40,60,0.8) 0%, var(--surface) 100%);
  filter: blur(80px);
  opacity: 0.6;
  z-index: 1;
  transition: background 1s ease, filter 1s ease;
}

/* WAKA-STYLE BREADCRUMB */
.waka-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  font-size: 14px;
}
.waka-bc-label {
  color: var(--text-secondary);
  font-weight: 500;
}
a.waka-bc-label {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
a.waka-bc-label:hover {
  color: var(--secondary);
}
.waka-bc-sep {
  color: var(--text-muted);
}
.waka-bc-select {
  background: var(--surface-light);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: auto;
  min-width: 180px;
}
.waka-bc-select:hover {
  border-color: rgba(255,255,255,0.25);
}

/* BREADCRUMBS (book-detail page) */
.breadcrumbs {
  display: flex;
  align-items: center;
}
.bc-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}
.bc-left a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.bc-left a:hover { color: var(--secondary); }
.bc-left .separator { color: var(--text-secondary); opacity: 0.5; }
.bc-left .current { color: var(--text-primary); font-weight: 600; }

/* Hide login button (removed from site) */
.btn-login { display: none !important; }

/* HERO HEART BUTTON */
.btn-icon-hero {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-hero:hover {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose);
}
.hero-3d-grid {
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-3d-info {
  flex: 1;
}
.hero-3d-badge {
  display: inline-block;
  background: rgba(18, 185, 76, 0.2);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-3d-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  transition: opacity 0.4s ease;
}
.hero-3d-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: opacity 0.4s ease;
  margin-bottom: 30px;
  max-width: 500px;
}
.hero-3d-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.trending-keywords {
  transition: opacity 0.3s ease;
}
.trend-tag {
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
.trend-tag:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--secondary);
  color: var(--secondary);
}
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-read:hover {
  background: #10a342;
  transform: translateY(-2px);
}

/* 3D Carousel Stage */
.hero-3d-stage {
  flex: 0 0 500px;
  height: 400px;
  position: relative;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-3d {
  width: 200px;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-item {
  position: absolute;
  width: 200px;
  height: 300px;
  left: 0;
  top: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s;
  cursor: pointer;
  -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, rgba(0,0,0,0.2));
}
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.carousel-item picture {
  display: block;
  width: 100%;
  height: 100%;
}
.carousel-nav {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}
.c-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.c-nav-btn:hover {
  background: var(--secondary);
}

/* HORIZONTAL SCROLL SECTIONS */
.scroll-section {
  margin-bottom: 60px;
  max-width: 100%;
  overflow: visible;
}
.scroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.scroll-header h2 {
  font-size: 24px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.scroll-controls {
  display: flex;
  gap: 8px;
}
.scroll-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.scroll-btn:hover {
  background: var(--secondary);
  color: var(--primary);
}
.scroll-track-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 0 0 20px;
}
.scroll-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease;
  will-change: transform;
}
.scroll-track .catalog-card,
.scroll-track .book-card {
  flex: 0 0 190px; /* Fixed width for items to show 5-6 per view */
}

/* QUICK CATEGORY CHIPS – synced with .category-tabs */
.quick-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.quick-categories::-webkit-scrollbar {
  display: none;
}
.quick-chip {
  flex-shrink: 0;
  padding: 8px 20px;
  background: var(--surface);
  border-radius: 25px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  scroll-snap-align: start;
  text-decoration: none;
}
.quick-chip:hover { color: var(--text-primary); background: var(--surface-light); }
.quick-chip.active { background: var(--secondary); color: var(--primary); }

/* BANNER COLLECTION */
.collection-banner {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
  display: block;
  overflow: hidden;
  position: relative;
}
.collection-banner img {
  width: 100%;
  height: auto;
  transition: transform 0.5s;
}
.collection-banner:hover img {
  transform: scale(1.02);
}

/* BREADCRUMBS & DROPDOWNS */
.breadcrumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--secondary); }
.breadcrumbs .separator { margin: 0 8px; opacity: 0.5; }
.breadcrumbs .current { color: var(--text-primary); font-weight: 500; }

/* Category Hero */
.category-hero {
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}
.category-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  z-index: 0;
}
.category-hero .container { position: relative; z-index: 1; }
.category-hero h1 {
  font-size: 36px; font-weight: 700;
  margin-bottom: 8px; letter-spacing: -0.02em;
}
.category-hero h1 span { color: var(--secondary); }
.category-hero p { color: var(--text-secondary); font-size: 16px; max-width: 600px; }
.category-hero.audio-hero::before {
  background: linear-gradient(135deg, #1A2332, #2a1a32);
}
.category-hero.comic-hero::before {
  background: linear-gradient(135deg, #0F1B2D, #1a2a1a);
}

/* Filter Bar */
.filter-bar {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 32px;
}
.filter-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.filter-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-tag {
  padding: 8px 20px; border-radius: 25px;
  font-size: 13px; font-weight: 600;
  background: var(--surface); color: var(--text-secondary);
  transition: var(--transition); cursor: pointer; border: none;
  font-family: var(--font-primary);
}
.filter-tag:hover { color: var(--text-primary); background: var(--surface-light); }
.filter-tag.active { background: var(--secondary); color: var(--primary); }

.sort-select {
  display: flex; align-items: center; gap: 8px;
}
.sort-select label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.sort-select select {
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; font-family: var(--font-primary);
  cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238B95A5'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.sort-select select:focus { border-color: var(--secondary); }

/* Results Count */
.results-info {
  padding: 0 0 20px;
  font-size: 14px; color: var(--text-secondary);
}
.results-info strong { color: var(--text-primary); }

/* Catalog Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px 20px;
  padding-bottom: 40px;
}
.catalog-card {
  transition: var(--transition); cursor: pointer;
  position: relative;
}
.catalog-card:hover { transform: translateY(-8px); z-index: 200; }
.catalog-card .book-cover {
  position: relative; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 2/3;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  margin-bottom: 10px;
}
.catalog-card .book-cover img { width: 100%; height: 100%; object-fit: cover; }
.catalog-card .book-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0; transition: var(--transition);
}
.catalog-card:hover .book-cover::after { opacity: 1; }
.catalog-card .card-title {
  font-family: var(--font-primary);
  font-size: 16px; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; line-height: 1.35;
  letter-spacing: 0;
  min-height: 43px;
}
.catalog-card .card-meta { font-size: 11px; color: var(--accent); margin-top: 2px; }

/* Comic catalog variation */
.catalog-grid.comic-grid .catalog-card .book-cover { aspect-ratio: 3/4; }

/* Load More */
.load-more-section {
  text-align: center; padding: 20px 0 60px;
}
.load-more-btn {
  padding: 14px 48px; border-radius: 30px;
  font-size: 15px; font-weight: 600;
  background: transparent; color: var(--secondary);
  border: 2px solid var(--secondary);
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-primary);
}
.load-more-btn:hover {
  background: var(--secondary); color: var(--primary);
  box-shadow: 0 4px 20px var(--glow);
  transform: translateY(-2px);
}

/* Catalog Responsive */
@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .category-hero h1 { font-size: 28px; }
}
@media (max-width: 768px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .filter-bar-inner { flex-direction: column; align-items: flex-start; }
  .category-hero h1 { font-size: 24px; }
  .category-hero { padding: 32px 0; }
}
@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* SORT DROPDOWN */
.sort-dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 40px 12px 20px;
  font-size: 15px;
  font-family: var(--font-primary);
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23A0AEC0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}
.sort-dropdown:hover, .sort-dropdown:focus {
  border-color: rgba(99, 102, 241, 0.5); /* Primary color glow */
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.sort-dropdown option {
  background: var(--surface);
  color: var(--text-primary);
  padding: 10px;
}

/* ===== LIVE SEARCH DROPDOWN ===== */
.header-search-inline {
  transition: width 0.3s ease;
}
.header-search-inline:focus-within {
  width: 300px;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 400px;
  background: rgba(18, 20, 28, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  max-height: 420px;
  transition: max-height 0.3s ease;
  animation: searchSlideIn 0.18s cubic-bezier(0.4,0,0.2,1);
}
@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.search-dropdown::-webkit-scrollbar { width: 5px; }
.search-dropdown::-webkit-scrollbar-track { background: transparent; }
.search-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.search-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none;
}
.search-result-item:last-of-type { border-bottom: none; }
.search-result-item:hover,
.search-result-item.focused {
  background: rgba(245,158,11,0.09);
}
.search-result-cover {
  width: 38px;
  height: 56px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--surface-light);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.search-result-title mark {
  background: rgba(245,158,11,0.28);
  color: var(--secondary);
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}
.search-result-author {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-cat {
  font-size: 10px;
  font-weight: 700;
  background: rgba(245,158,11,0.12);
  color: var(--secondary);
  border: 1px solid rgba(245,158,11,0.25);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}
.search-empty strong { color: var(--text-primary); }
.search-see-all {
  display: block;
  padding: 11px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.search-see-all:hover { background: rgba(245,158,11,0.07); }
.search-header-label {
  padding: 10px 14px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}


/* --- PREMIUM FOOTER OVERRIDES --- */
.main-footer {
  background: linear-gradient(180deg, #18181b 0%, #000000 100%) !important;
  border-top: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 80px 0 0 !important;
  position: relative;
}
.main-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.8), transparent);
}

.social-link.fb:hover { background: #1877F2 !important; color: #fff !important; }
.social-link.yt:hover { background: #FF0000 !important; color: #fff !important; }
.social-link.ig:hover { background: #E1306C !important; color: #fff !important; }
.social-link.tk:hover { background: #000000 !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.2); }

.footer-col ul a {
  display: inline-block;
  transition: all 0.3s ease;
}
.footer-col ul a:hover {
  color: var(--secondary) !important;
  transform: translateX(4px);
}

/* ============================================================
   MOBILE RESPONSIVE OVERHAUL – Full UX/UI Fix
   ============================================================ */

/* 1. MOBILE DRAWER MENU */
.mobile-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0; transition: opacity 0.3s;
}
.mobile-drawer-overlay.open { opacity: 1; }

.mobile-drawer {
  position: fixed; top: 0; left: -280px; bottom: 0;
  width: 280px;
  background: #1c1c1f;
  border-right: 1px solid rgba(255,255,255,0.08);
  z-index: 9999;
  overflow-y: auto;
  transition: left 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex; flex-direction: column;
}
.mobile-drawer.open { left: 0; }

.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.mobile-drawer-close {
  background: var(--surface); border: none; color: var(--text-primary);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
}
.mobile-drawer-nav { padding: 12px 0; }
.mobile-drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s;
}
.mobile-drawer-nav a:hover, .mobile-drawer-nav a.active {
  background: rgba(245,158,11,0.08); color: var(--secondary);
}
.mobile-drawer-nav .drawer-section-label {
  padding: 16px 20px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}

/* 2. HEADER MOBILE FIXES */
@media (max-width: 1024px) {
  .header-search-inline { display: none; }
  .nav-search-row { gap: 8px; }
  .header-inner-row { padding: 12px 16px; }
}

/* 3. HERO FULL MOBILE FIX */
@media (max-width: 768px) {
  .hero-carousel { height: auto; min-height: 400px; }
  .hero-slide { position: relative; opacity: 1; }
  .hero-slide:not(.active) { display: none; }
  .hero-slide .slide-inner {
    flex-direction: column-reverse;
    padding: 32px 20px 48px;
    gap: 24px;
    text-align: center;
    height: auto;
  }
  .hero-content { max-width: 100%; }
  .hero-content h1 { font-size: 26px; line-height: 1.2; }
  .hero-content p { font-size: 14px; margin-bottom: 20px; max-width: 100%; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-image { flex: 0 0 auto; width: 130px; }
  .hero-nav-btn { display: none; }
}

/* 4. BOOK CARDS MOBILE */
@media (max-width: 768px) {
  .books-scroll { gap: 14px; padding: 0 16px 16px; }
  .book-card { flex: 0 0 130px; }
  .book-info { padding: 8px 2px 0; }
  .book-title,
  .top10-card .book-title,
  .catalog-card .card-title,
  .comic-card .book-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
    min-height: 36px;
    font-weight: 700;
    letter-spacing: 0;
  }
  .book-author { font-size: 11px; }
  .section { padding: 32px 0; }
  .section-header { margin-bottom: 18px; }
  .section-header h2 { font-size: 20px; }
  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .book-title,
  .top10-card .book-title,
  .catalog-card .card-title,
  .comic-card .book-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
}

/* 5. DETAIL PAGE MOBILE */
@media (max-width: 768px) {
  .detail-hero { flex-direction: column !important; gap: 20px !important; padding: 24px 16px !important; }
  .detail-cover-wrap { width: 140px !important; margin: 0 auto !important; }
  .detail-meta { padding: 0 !important; }
  .detail-title { font-size: 22px !important; }
  .detail-actions { flex-direction: column; width: 100%; }
  .detail-actions a, .detail-actions button { width: 100%; text-align: center; justify-content: center; }
  .review-tabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .review-tabs::-webkit-scrollbar { display: none; }
  .review-tab { flex-shrink: 0; }
  .waka-breadcrumb { font-size: 12px; }
}

/* 6. TOP10 GRID MOBILE */
@media (max-width: 480px) {
  .top10-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .comics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
  .footer-bottom p { font-size: 11px; line-height: 1.7; text-align: center; }
}

/* 7. POPOVER: DISABLE ON MOBILE (tránh bị chạm nhầm) */
@media (max-width: 1024px) {
  .book-popover { display: none !important; }
}

/* 8. FAV PANEL MOBILE */
@media (max-width: 480px) {
  .fav-panel { width: 100vw; right: -100vw; }
  .fav-panel.open { right: 0; }
}

/* 9. SAFE ANTI-OVERFLOW FULL LOCK */
html, body { max-width: 100%; overflow-x: clip; }

/* 10. BETTER TOUCH TARGETS */
button, a, .nav-menu a, .mobile-drawer-nav a {
  -webkit-tap-highlight-color: rgba(245,158,11,0.1);
}
.mobile-menu-btn, .mobile-drawer-close, .back-to-top,
#headerFavBtn { min-width: 44px; min-height: 44px; }

/* ============================================================
   BOOK OF THE WEEK BANNER – Fully Responsive
   ============================================================ */
.botw-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(30,41,59,0.9) 100%);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.botw-orb {
  position: absolute; width: 300px; height: 300px;
  background: rgba(245,158,11,0.15); filter: blur(80px);
  top: -100px; right: -100px; border-radius: 50%; pointer-events: none;
}
.botw-cover {
  flex-shrink: 0; width: 200px;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  transform: perspective(1000px) rotateY(5deg);
}
.botw-content { flex: 1; z-index: 2; }
.botw-labels { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.botw-badge {
  background: rgba(245,158,11,0.2); color: #f59e0b;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  border: 1px solid rgba(245,158,11,0.3);
}
.botw-sub { color: var(--text-secondary); font-size: 13px; }
.botw-title { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.2; }
.botw-quote {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 20px;
  font-style: italic;
  border-left: 4px solid #f59e0b; padding-left: 16px;
}
.botw-desc { color: #d1d5db; line-height: 1.6; margin-bottom: 28px; font-size: 15px; }
.botw-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.botw-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; padding: 13px 28px; border-radius: 30px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(245,158,11,0.3);
  transition: transform 0.3s;
}
.botw-btn:hover { transform: translateY(-2px); }
.botw-rating { color: #facc15; font-size: 17px; font-weight: 600; }
.botw-rating span { color: var(--text-secondary); font-size: 13px; font-weight: 400; }

/* Mobile banner */
@media (max-width: 768px) {
  .botw-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 20px;
  }
  .botw-cover { width: 120px; transform: none; margin: 0 auto; }
  .botw-title { font-size: 22px; }
  .botw-quote { font-size: 14px; }
  .botw-desc { font-size: 13px; margin-bottom: 18px; }
  .botw-btn { padding: 11px 22px; font-size: 14px; }
  .botw-actions { gap: 12px; }
}

/* ============================================================
   MOBILE SEARCH BAR (inside drawer)
   ============================================================ */
.mobile-drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-drawer-search input {
  width: 100%;
  padding: 10px 16px 10px 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  font-family: var(--font-primary);
}
.mobile-drawer-search { position: relative; }
.mobile-drawer-search .mds-icon {
  position: absolute; left: 28px; top: 50%;
  transform: translateY(-50%); color: var(--text-secondary);
  pointer-events: none;
}

/* Authors grid – max 2 cols on desktop for 2 authors */
.authors-grid { grid-template-columns: repeat(2, 1fr) !important; }
@media (max-width: 600px) {
  .authors-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   CRITICAL MOBILE FIXES v2
   ============================================================ */

/* 1. HEADER – Thêm icon tìm kiếm luôn hiển thị trên mobile */
.header-search-icon-btn {
  display: none;
  background: var(--surface);
  border: none;
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .header-search-icon-btn { display: flex; }
}

/* Mobile search overlay */
.mobile-search-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9997;
  padding: 80px 20px 20px;
  backdrop-filter: blur(8px);
}
.mobile-search-overlay.open { display: block; }
.mobile-search-overlay input {
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-primary);
}
.mobile-search-close {
  position: absolute; top: 24px; right: 20px;
  background: var(--surface); border: none;
  color: var(--text-primary); font-size: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* 2. HERO 3D – Fix overflow on mobile */
@media (max-width: 768px) {
  .hero-3d-wrapper { overflow: hidden !important; padding: 20px 0 40px !important; }
  .hero-3d-grid {
    flex-direction: column !important;
    gap: 24px !important;
    overflow: hidden;
  }
  .hero-3d-info { width: 100%; order: 2; }
  .hero-3d-title { font-size: 28px !important; }
  .hero-3d-desc { font-size: 14px !important; max-width: 100% !important; }
  .hero-3d-actions { flex-wrap: wrap; gap: 12px; }
  .hero-3d-stage {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 200px !important;
    order: 1;
    perspective: 600px;
    overflow: visible;
  }
  .carousel-3d { transform: scale(0.65) !important; }
  .hero-dynamic-bg { display: none; }
  .carousel-item { -webkit-box-reflect: none !important; }
  .trend-tag { font-size: 12px; padding: 4px 10px; }
}

/* 3. STATS – Fix overflow grid on mobile */
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  overflow: visible !important;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Fix stats section overflow */
.stats-bar { overflow: hidden !important; }
.stats-bar > * { max-width: 100%; }

/* ============================================================
   AUTHOR CARDS – Premium Redesign (Horizontal Scroll)
   ============================================================ */
/* Override grid → horizontal scroll */
.authors-grid {
  display: flex !important;
  gap: 20px !important;
  overflow-x: auto !important;
  padding: 8px 4px 20px !important;
  scrollbar-width: none;
  margin-bottom: 0 !important;
  grid-template-columns: unset !important;
}
.authors-grid::-webkit-scrollbar { display: none; }

.author-card.premium-author {
  flex: 0 0 220px !important;
  background: linear-gradient(145deg, #1e1e24, #27272a) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  text-decoration: none !important;
  transition: all 0.35s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding-bottom: 20px !important;
  position: relative !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}
.author-card.premium-author:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(245,158,11,0.3) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(245,158,11,0.15) !important;
}

/* Cover banner with gradient overlay */
.author-cover {
  width: 100% !important;
  height: 120px !important;
  background-size: cover !important;
  background-position: center !important;
  filter: brightness(0.55) saturate(1.2) !important;
  transition: filter 0.4s ease !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  position: relative !important;
}
.author-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(24,24,27,0.9));
}
.author-card.premium-author:hover .author-cover {
  filter: brightness(0.7) saturate(1.4) !important;
}

/* Avatar – golden ring on hover */
.author-avatar-wrapper {
  width: 100px !important; height: 100px !important;
  border-radius: 50% !important;
  border: 4px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
  margin-top: -50px !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 2 !important;
  background: #27272a !important;
  transition: border-color 0.3s !important;
}
.author-card.premium-author:hover .author-avatar-wrapper {
  border-color: rgba(245,158,11,0.6) !important;
}

/* Info */
.author-info { text-align: center; margin-top: 14px; padding: 0 12px; }
.author-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.author-info p {
  font-size: 13px; color: var(--text-secondary);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.15);
  color: #f59e0b;
  display: inline-block;
  padding: 2px 10px; border-radius: 20px;
  margin-top: 4px; font-weight: 600;
}

/* Book preview strip */
.author-books-preview {
  display: flex !important; gap: 6px !important;
  margin-top: 16px !important; padding: 0 14px !important;
  justify-content: center !important;
}
.author-books-preview img {
  width: 38px !important; height: 56px !important;
  border-radius: 5px !important;
  object-fit: cover !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  transition: transform 0.3s !important;
}
.author-card.premium-author:hover .author-books-preview img {
  transform: translateY(-3px) !important;
}

/* ============================================================
   HEADER MOBILE – Menu left, Logo center, Icons right
   ============================================================ */
@media (max-width: 1024px) {
  .header-inner-row {
    display: grid !important;
    grid-template-columns: 44px 1fr auto !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 10px 14px !important;
  }
  /* Hamburger on the left */
  .mobile-menu-btn {
    order: 1 !important;
    background: none !important;
    border: none !important;
    width: 44px !important; height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
    color: var(--text-primary) !important;
  }
  /* Logo in center */
  .logo {
    order: 2 !important;
    justify-content: center !important;
  }
  /* Icons on right */
  .nav-search-row {
    order: 3 !important;
    gap: 4px !important;
    justify-content: flex-end !important;
  }
  /* Hide desktop search bar */
  .header-search-inline { display: none !important; }
  /* Show search icon */
  .header-search-icon-btn { display: flex !important; }
  /* Hide desktop nav */
  .nav-menu { display: none !important; }
  /* Make icon buttons consistent size */
  .header-search-icon-btn,
  #headerFavBtn {
    width: 40px !important; height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.05) !important;
    border: none !important;
    color: var(--text-primary) !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important;
  }
  #headerFavBtn:hover, .header-search-icon-btn:hover {
    background: rgba(245,158,11,0.15) !important;
    color: #f59e0b !important;
  }
}

/* ============================================================
   MOBILE DRAWER v2 – Premium Grid Style
   ============================================================ */
.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-drawer-close {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 50% !important;
  width: 34px !important; height: 34px !important;
  font-size: 14px !important;
}
.mobile-drawer-search {
  padding: 10px 16px 8px;
  position: relative;
}
.mobile-drawer-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 14px; outline: none;
  font-family: var(--font-primary);
  transition: border-color 0.2s;
}
.mobile-drawer-search input:focus { border-color: rgba(245,158,11,0.4); }
.mobile-drawer-search .mds-icon {
  position: absolute; left: 28px; top: 50%;
  transform: translateY(-50%); color: #9ca3af;
  pointer-events: none;
}

/* Drawer nav new structure */
.mobile-drawer-nav { padding: 8px 0 24px; }

.mdn-home {
  display: flex; align-items: center;
  padding: 13px 20px;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary) !important;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.2s;
}
.mdn-home:hover { color: var(--secondary) !important; }

.mdn-group { padding: 16px 16px 8px; }
.mdn-group-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 4px 10px;
}
.mdn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mdn-grid a {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--text-primary) !important;
  text-decoration: none;
  transition: all 0.2s;
}
.mdn-grid a:hover {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.25);
  color: #f59e0b !important;
}
.mdn-icon {
  font-size: 16px; line-height: 1; flex-shrink: 0;
}

.mdn-view-all {
  display: block;
  margin-top: 10px; padding: 10px 4px;
  font-size: 12px; font-weight: 700;
  color: var(--secondary) !important;
  text-decoration: none;
  text-align: right;
}
.mdn-view-all:hover { opacity: 0.7; }

.mdn-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 16px 12px;
}
.mdn-link {
  display: block;
  padding: 12px 20px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: color 0.2s;
}
.mdn-link:hover { color: var(--text-primary) !important; }

/* ============================================================
   DRAWER HEADER – Logo truly centered
   ============================================================ */
.mobile-drawer-header {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.mobile-drawer-header .logo {
  margin: 0 auto !important;
  justify-content: center !important;
}
.mobile-drawer-header .mobile-drawer-close {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Drawer search results */
#drawerSearchResults {
  background: rgba(20,20,26,0.98);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin: 0 8px 6px !important;
  overflow: hidden;
}

/* ============================================================
   BREADCRUMB – Optimized v2 (Premium, single-line, mobile-safe)
   ============================================================ */

/* Override old wrapping rule */
.bc-left {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap !important;
  gap: 0 !important;
  align-items: center !important;
  font-size: 13px !important;
}

/* Container */
.breadcrumbs {
  padding: 10px 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Links */
.bc-left a {
  color: #9ca3af !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  transition: color 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.bc-left a:hover { color: #f59e0b !important; }

/* Home icon on first item */
.bc-left a:first-child::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Separator – chevron SVG instead of text */
.bc-left .separator {
  color: #4b5563 !important;
  opacity: 1 !important;
  margin: 0 5px !important;
  flex-shrink: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  user-select: none !important;
}

/* Current page */
.bc-left .current {
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

/* Tablet: moderate truncation */
@media (max-width: 768px) {
  .bc-left a { overflow: hidden !important; text-overflow: ellipsis !important; max-width: 140px !important; }
  .bc-left .current { overflow: hidden !important; text-overflow: ellipsis !important; max-width: 180px !important; }
}
/* Mobile: tighter */
@media (max-width: 480px) {
  .bc-left a { max-width: 72px !important; font-size: 12px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .bc-left .current { max-width: 120px !important; font-size: 12px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .bc-left .separator { margin: 0 3px !important; }
  .bc-left a:not(:first-child):not(:last-of-type) { max-width: 80px !important; }
}

/* SEO: second .breadcrumbs variant */
.breadcrumbs a { color: var(--text-secondary) !important; }
.breadcrumbs a:hover { color: var(--secondary) !important; }
.breadcrumbs .separator { margin: 0 5px !important; color: #4b5563 !important; opacity: 1 !important; }
.breadcrumbs .current { color: #fff !important; font-weight: 600 !important; }

/* ============================================================
   BREADCRUMB – Full override for waka-breadcrumb (mobile-first)
   ============================================================ */
.waka-breadcrumb {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  gap: 0 !important;
  margin-bottom: 20px !important;
  padding: 8px 14px !important;
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 30px !important;
  width: fit-content !important;
  max-width: 100% !important;
  font-size: 13px !important;
}

/* Links */
a.waka-bc-label {
  color: #9ca3af !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: none !important;
  transition: color 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
a.waka-bc-label:first-child::before {
  content: '';
  display: inline-block;
  width: 13px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center/contain;
  flex-shrink: 0;
}
a.waka-bc-label:hover { color: #f59e0b !important; }

/* Current/active label */
span.waka-bc-label { white-space: nowrap !important; max-width: none !important; }

/* Separator */
.waka-bc-sep {
  color: #4b5563 !important;
  margin: 0 5px !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  user-select: none !important;
}

/* Dropdown select – compact on mobile, matching localhost original */
.waka-bc-select {
  background: rgba(245,158,11,0.08) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245,158,11,0.25) !important;
  padding: 6px 10px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  min-width: unset !important;
  max-width: none !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  flex-shrink: 0 !important;
}
.waka-bc-select:hover {
  border-color: rgba(245,158,11,0.5) !important;
  background-color: rgba(245,158,11,0.12) !important;
}
.waka-bc-select option {
  background: #1e1b2e !important;
  color: #fff !important;
  font-weight: 500 !important;
}

@media (max-width: 480px) {
  .waka-breadcrumb { font-size: 12px !important; padding: 6px 12px !important; }
  a.waka-bc-label { max-width: none !important; }
  span.waka-bc-label { white-space: nowrap !important; max-width: none !important; }
  .waka-bc-select { max-width: none !important; font-size: 12px !important; padding: 5px 8px !important; }
  .waka-bc-sep { margin: 0 3px !important; }
}

/* Inject BreadcrumbList schema if not exists – done via JS in header-component */

/* ============================================================
   BREADCRUMB FIX – Remove icon overlap, clean text
   ============================================================ */
/* Remove the broken home icon (::before blocks text) */
a.waka-bc-label:first-child::before { display: none !important; }

/* Give "Trang chủ" enough room, no ellipsis on mobile */
a.waka-bc-label {
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: unset !important;
}
/* But hide text on very small, show only first + current */
@media (max-width: 400px) {
  a.waka-bc-label:first-child { white-space: nowrap !important; max-width: none !important; }
  span.waka-bc-label { white-space: nowrap !important; max-width: none !important; }
}

/* ============================================================
   SORT DROPDOWN – Mobile compact pill to match breadcrumb style
   ============================================================ */
.sort-dropdown {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: none !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  background-image: none !important;
  min-width: 120px !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.sort-dropdown:hover, .sort-dropdown:focus {
  border-color: rgba(245,158,11,0.4) !important;
  background: rgba(245,158,11,0.06) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Section header on mobile – don't let sort overflow */
@media (max-width: 600px) {
  .section-header {
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: center !important;
  }
  .section-header h2 {
    font-size: 18px !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .sort-dropdown {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 7px 12px !important;
    min-width: 100px !important;
  }
}

/* ============================================================
   MOBILE BOOK SECTIONS – Max 2 books visible, clean layout
   ============================================================ */

/* horizontal scroll section – 2 full + peek of 3rd */
@media (max-width: 768px) {
  /* books-scroll: show 2 per viewport with small peek */
  .books-scroll {
    gap: 12px !important;
    padding: 0 16px 16px !important;
    scroll-snap-type: x mandatory !important;
  }
  .book-card {
    flex: 0 0 calc(50% - 10px) !important;
    scroll-snap-align: start !important;
    max-width: 160px !important;
  }

  /* catalog-grid on sach-dien-tu: 2 col */
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* quick-categories chips: smaller, horizontally scrollable */
  .quick-chip {
    padding: 9px 16px !important;
    font-size: 13px !important;
  }
  .quick-categories {
    margin-bottom: 20px !important;
    padding-bottom: 6px !important;
    gap: 8px !important;
  }
}

/* card text: don't clip on 2-col grid */
@media (max-width: 768px) {
  .catalog-card .book-title,
  .catalog-card h3 {
    font-size: 13px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .catalog-card .book-author,
  .catalog-card .author {
    font-size: 11px !important;
  }
  .catalog-card .rating,
  .catalog-card .book-rating {
    font-size: 11px !important;
  }

  /* section-header title + sort tidy */
  .section-header {
    margin-bottom: 16px !important;
    align-items: center !important;
  }
}

/* Extra small: 390px iPhones */
@media (max-width: 390px) {
  .book-card { flex: 0 0 calc(50% - 8px) !important; }
  .catalog-grid { gap: 10px !important; }
}

/* ============================================================
   SCROLL CONTROLS – Premium Redesign (Mobile-optimized)
   ============================================================ */
.scroll-controls {
  display: flex !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  align-items: center !important;
}

.scroll-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  color: var(--text-secondary) !important;
  font-size: 0 !important; /* hide raw ❮❯ text */
  position: relative !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

/* Replace ❮❯ text with SVG via pseudo-elements */
.scroll-btn.scroll-prev::after {
  content: '';
  display: block;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") no-repeat center/contain;
}
.scroll-btn.scroll-next::after {
  content: '';
  display: block;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") no-repeat center/contain;
}

.scroll-btn:hover {
  background: rgba(245,158,11,0.15) !important;
  border-color: rgba(245,158,11,0.35) !important;
  transform: scale(1.08) !important;
}
.scroll-btn:hover.scroll-prev::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}
.scroll-btn:hover.scroll-next::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}

.scroll-btn:active {
  transform: scale(0.95) !important;
  background: rgba(245,158,11,0.2) !important;
}

/* Disabled state */
.scroll-btn.disabled,
.scroll-btn[disabled] {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Mobile: refined scroll buttons */
@media (max-width: 768px) {
  .scroll-btn {
    width: 34px !important;
    height: 34px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  }
  .scroll-btn.scroll-prev::after,
  .scroll-btn.scroll-next::after {
    width: 15px !important;
    height: 15px !important;
  }
}

/* scroll-header alignment */
.scroll-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
}

/* ============================================================
   SCROLL-ARROW (homepage) – Fix màu nền đen sang transparent
   ============================================================ */
.scroll-arrow {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #d1d5db !important;
  font-size: 0 !important; /* ẩn ký tự ◂▸ */
  width: 40px !important;
  height: 40px !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
.scroll-arrow::after {
  content: '';
  display: block;
  width: 18px; height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.scroll-arrow.left::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}
.scroll-arrow.right::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}
.scroll-arrow:hover {
  background: rgba(245,158,11,0.15) !important;
  border-color: rgba(245,158,11,0.35) !important;
}
.scroll-arrow:hover.left::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}
.scroll-arrow:hover.right::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}
.scroll-arrow:active { transform: translateY(-70%) scale(0.94) !important; }

/* ── Scroll Arrow Mobile Fix ── */
@media (max-width: 768px) {
  .scroll-container {
    overflow: visible !important;
  }
  .scroll-arrow {
    width: 34px !important;
    height: 34px !important;
    background: rgba(24, 24, 27, 0.85) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
    z-index: 10 !important;
  }
  .scroll-arrow.left {
    left: 4px !important;
  }
  .scroll-arrow.right {
    right: 4px !important;
  }
  .scroll-arrow::after {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 480px) {
  .scroll-arrow {
    width: 30px !important;
    height: 30px !important;
  }
  .scroll-arrow.left {
    left: 2px !important;
  }
  .scroll-arrow.right {
    right: 2px !important;
  }
  .scroll-arrow::after {
    width: 12px !important;
    height: 12px !important;
  }
}

/* ============================================================
   CATEGORY-TABS (homepage) – Single-line horizontal scroll
   ============================================================ */
.category-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
  padding-bottom: 6px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x mandatory !important;
}
.category-tabs::-webkit-scrollbar { display: none !important; }

.category-tab {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  scroll-snap-align: start !important;
}

@media (max-width: 768px) {
  .category-tab {
    padding: 9px 16px !important;
    font-size: 13px !important;
    border-radius: 24px !important;
  }
}

/* ============================================================
   BOOK DETAIL PAGE – Full Mobile Optimization
   ============================================================ */

/* ── Layout grid ── */
@media (max-width: 900px) {
  .detail-grid {
    flex-direction: column !important;
    gap: 28px !important;
    align-items: center !important;
  }
  .detail-left {
    width: 100% !important;
    max-width: 260px !important;
    position: relative !important; /* Fix badge-free-top */
    flex: unset !important;
  }
  .detail-right { width: 100% !important; }
}

/* ── Title ── */
@media (max-width: 768px) {
  .detail-title {
    font-size: 26px !important;
    margin-bottom: 10px !important;
  }
  .detail-rating-row {
    font-size: 14px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* ── Meta grid: 2 col on mobile ── */
@media (max-width: 600px) {
  .meta-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 12px !important;
  }
  .meta-label { font-size: 12px !important; }
  .meta-value { font-size: 14px !important; }
}

/* ── Format options: wrap nicely ── */
@media (max-width: 480px) {
  .format-options {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .format-label {
    width: auto !important;
    font-size: 13px !important;
  }
  .format-btn {
    font-size: 13px !important;
    padding: 7px 14px !important;
  }
}

/* ── Action buttons ── */
@media (max-width: 600px) {
  .detail-actions {
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
  }
  .btn-read {
    flex: 1 1 auto !important;
    justify-content: center !important;
    font-size: 15px !important;
    padding: 13px 24px !important;
    min-width: 140px !important;
  }
  .btn-download {
    flex: 1 1 auto !important;
    justify-content: center !important;
    font-size: 14px !important;
    padding: 12px 18px !important;
    min-width: 120px !important;
  }
}

/* ── Review tabs: scrollable ── */
@media (max-width: 600px) {
  .review-tabs {
    gap: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding-bottom: 0 !important;
    flex-wrap: nowrap !important;
  }
  .review-tabs::-webkit-scrollbar { display: none !important; }
  .review-tab {
    font-size: 13px !important;
    padding: 10px 14px 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .review-title { font-size: 18px !important; }
}

/* ── Rating summary box ── */
@media (max-width: 600px) {
  /* The rating box uses inline styles, target via parent */
  #tab-reviews > div:first-child {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  #tab-reviews > div:first-child > div:last-child {
    justify-content: center !important;
    min-width: unset !important;
  }
  #tab-reviews > div:first-child > div:first-child div:first-child {
    font-size: 48px !important;
  }
}

/* ── description content ── */
@media (max-width: 768px) {
  .detail-desc-content {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }
  .detail-desc-content h2 { font-size: 22px !important; }
  .detail-desc-content h3 { font-size: 18px !important; }
}

/* ── share dropdown: keep inside viewport ── */
@media (max-width: 480px) {
  .share-dropdown {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    min-width: 220px !important;
  }
  .share-dropdown.open {
    transform: translateX(-50%) translateY(0) !important;
  }
}

/* ── book-detail-hero section padding ── */
@media (max-width: 768px) {
  .book-detail-hero .container {
    padding-top: 10px !important;
  }
}

/* ============================================================
   BOOK DETAIL – Breadcrumb, Button & Toast Fix
   ============================================================ */

/* ── 1. Breadcrumb: current page truncate properly ── */
.bc-left .current,
#dynamicBreadcrumb .current {
  max-width: 140px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
@media (max-width: 480px) {
  .bc-left .current,
  #dynamicBreadcrumb .current {
    max-width: none !important;
  }
}

/* ── 2. Detail actions – buttons layout ── */
@media (max-width: 768px) {
  .detail-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    align-items: center !important;
    margin-top: 20px !important;
    margin-bottom: 28px !important;
  }
  /* Row 1: Đọc sách full width */
  .btn-read {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 14px !important;
    border-radius: 30px !important;
  }
  /* Row 2: Tải xuống full width */
  .btn-download {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-content: center !important;
    font-size: 15px !important;
    padding: 13px !important;
    border-radius: 30px !important;
  }
  /* Row 3: circle buttons side by side, small */
  .btn-circle {
    grid-column: unset !important;
    width: 48px !important;
    height: 48px !important;
    flex: unset !important;
    border-radius: 50% !important;
    justify-self: center !important;
  }
  .share-wrapper {
    justify-self: center !important;
  }
  /* Center the circle buttons row */
  .detail-actions > .btn-circle,
  .detail-actions > .share-wrapper {
    grid-column: unset !important;
  }
}

/* Grid: [Đọc sách span 2] / [Tải xuống span 2] / [❤ col1] [Share col2] */
@media (max-width: 768px) {
  .detail-actions {
    grid-template-columns: auto auto !important;
    justify-content: start !important;
  }
  .btn-read     { grid-column: 1 / 3 !important; }
  .btn-download { grid-column: 1 / 3 !important; }
  .btn-circle,
  .share-wrapper {
    grid-column: unset !important;
    width: 48px !important;
    height: 48px !important;
  }
}

/* ── 3. Toast notification – always visible, above everything ── */
.toast-msg {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  background: rgba(16,185,129,0.95) !important;
  color: #fff !important;
  padding: 12px 24px !important;
  border-radius: 30px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  z-index: 99999 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
  white-space: nowrap !important;
  max-width: 90vw !important;
  text-align: center !important;
}
.toast-msg.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Toast warning variant */
.toast-msg.warn {
  background: rgba(245,158,11,0.95) !important;
}

/* ============================================================
   BREADCRUMB (detail page .bc-left) – Match waka-breadcrumb pill
   ============================================================ */
.breadcrumbs {
  padding: 12px 0 4px !important;
}
.bc-left {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap !important;
  gap: 0 !important;
  padding: 7px 14px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 30px !important;
  max-width: 100% !important;
  font-size: 13px !important;
}
.bc-left a {
  color: #9ca3af !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  transition: color 0.2s !important;
  display: inline !important;
}
.bc-left a:hover { color: #f59e0b !important; }
.bc-left .separator {
  color: #4b5563 !important;
  margin: 0 5px !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  font-size: 13px !important;
}
.bc-left .current {
  color: #fff !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
/* Tablet: moderate truncation */
@media (max-width: 768px) {
  .bc-left a { overflow: hidden !important; text-overflow: ellipsis !important; max-width: 140px !important; }
  .bc-left .current { overflow: hidden !important; text-overflow: ellipsis !important; max-width: 180px !important; }
}
/* Mobile: balanced truncation */
@media (max-width: 480px) {
  .bc-left { font-size: 12px !important; padding: 6px 11px !important; }
  .bc-left a { max-width: 80px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .bc-left .current { max-width: 120px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .bc-left .separator { margin: 0 3px !important; }
}

/* ============================================================
   DETAIL ACTION BUTTONS – Premium mobile layout
   ============================================================ */

/* Desktop: keep in a row */
.detail-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 20px !important;
  margin-bottom: 32px !important;
}

/* Mobile: Đọc sách full width, rest in a row below */
@media (max-width: 600px) {
  .detail-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
  }

  /* Đọc sách: full width, row 1 */
  .btn-read {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 14px !important;
    border-radius: 30px !important;
  }

  /* Tải xuống: half width, row 2 col 1 */
  .btn-download {
    grid-column: 1 !important;
    justify-content: center !important;
    font-size: 14px !important;
    padding: 12px !important;
    border-radius: 30px !important;
    text-align: center !important;
  }

  /* Heart + Share: group in row 2 col 2 */
  .btn-circle {
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0 !important;
  }
  /* share-wrapper goes in the same column as icons */
  .share-wrapper { grid-column: auto !important; }

  /* Put heart + share wrapper in a flex sub-row */
  .detail-actions::after {
    content: none !important;
  }
  /* Reflow: heart & share sit in col 2 of row 2 together */
  .heart-btn, .share-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* btn-read enhancement */
.btn-read {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 4px 15px rgba(16,185,129,0.25) !important;
  transition: all 0.25s ease !important;
}
.btn-read:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16,185,129,0.35) !important;
}
.btn-read:active { transform: scale(0.97) !important; }

/* btn-download enhancement */
.btn-download {
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.25s ease !important;
}
.btn-download:hover {
  border-color: rgba(245,158,11,0.4) !important;
  background: rgba(245,158,11,0.06) !important;
  color: #f59e0b !important;
  transform: translateY(-2px) !important;
}

/* Circle buttons */
.btn-circle {
  background: rgba(255,255,255,0.06) !important;
  border: 1.5px solid rgba(255,255,255,0.12) !important;
  transition: all 0.2s ease !important;
}
.btn-circle:hover {
  background: rgba(255,255,255,0.12) !important;
  transform: scale(1.08) !important;
}
.btn-circle:active { transform: scale(0.94) !important; }

/* ============================================================
   BREADCRUMB – Universal clean style (no home icon)
   Đồng bộ toàn bộ site
   ============================================================ */

/* 1. Remove home icon on ALL breadcrumb variants */
a.waka-bc-label:first-child::before,
.bc-left a:first-child::before {
  display: none !important;
  content: none !important;
}

/* 2. Unified pill style for .bc-left (detail pages) */
.breadcrumbs {
  padding: 8px 0 0 !important;
  margin: 0 !important;
}
.bc-left {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap !important;
  gap: 0 !important;
  padding: 7px 16px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  max-width: 100% !important;
  backdrop-filter: blur(6px) !important;
}
.bc-left a {
  color: #9ca3af !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  transition: color 0.2s !important;
}
.bc-left a:hover { color: #f59e0b !important; }
.bc-left .separator {
  color: #6b7280 !important;
  margin: 0 6px !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  font-size: 12px !important;
  user-select: none !important;
}
.bc-left .current {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

/* 3. Unified pill for .waka-breadcrumb (category pages) */
.waka-breadcrumb {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  gap: 0 !important;
  padding: 7px 16px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  max-width: 100% !important;
  backdrop-filter: blur(6px) !important;
  margin-bottom: 36px !important;
}
a.waka-bc-label {
  color: #9ca3af !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  transition: color 0.2s !important;
  display: inline !important;
}
a.waka-bc-label:hover { color: #f59e0b !important; }
span.waka-bc-label { white-space: nowrap !important; max-width: none !important; }
.waka-bc-sep {
  color: #6b7280 !important;
  margin: 0 6px !important;
  flex-shrink: 0 !important;
  font-size: 12px !important;
  opacity: 1 !important;
  user-select: none !important;
}

/* 4. Remove huge gap between breadcrumb & book content */
.book-detail-hero {
  padding-top: 12px !important;
  padding-bottom: 40px !important;
}
.book-detail-hero .container { padding-top: 0 !important; }

/* Fix inline padding-top on the nav element */
nav.breadcrumbs[style*="padding-top"] {
  padding-top: 8px !important;
}

/* Tablet: moderate truncation for breadcrumbs */
@media (max-width: 768px) {
  a.waka-bc-label { overflow: hidden !important; text-overflow: ellipsis !important; max-width: 130px !important; }
}
/* Mobile: balanced truncation */
@media (max-width: 480px) {
  .bc-left, .waka-breadcrumb {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
  a.waka-bc-label { max-width: 80px !important; overflow: hidden !important; text-overflow: ellipsis !important; font-size: 12px !important; }
  span.waka-bc-label { white-space: nowrap !important; font-size: 12px !important; }
  .bc-left .separator, .waka-bc-sep { margin: 0 4px !important; }
}

/* ============================================================
   DETAIL PAGE – Fix cover/title overlap + button layout
   ============================================================ */

/* Fix sticky causing overlap on mobile */
@media (max-width: 900px) {
  .detail-left {
    position: relative !important;
    top: auto !important;
    flex: unset !important;
    width: 100% !important;
    max-width: 240px !important;
    margin: 0 auto !important;
  }
  .detail-grid {
    flex-direction: column !important;
    gap: 20px !important;
    align-items: center !important;
  }
  .detail-right {
    width: 100% !important;
  }
  .detail-title {
    font-size: 24px !important;
    text-align: left !important;
  }
}

/* ── Action buttons: clean UX layout ──────────────────────── */
/* Row 1: Đọc sách (full width)
   Row 2: Tải xuống (flex:1) | ♥ | Share (same row) */
@media (max-width: 700px) {
  .detail-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
  }

  /* Đọc sách → full row */
  .detail-actions .btn-read {
    flex: 0 0 100% !important;
    width: 100% !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 14px !important;
  }

  /* Tải xuống → full row */
  .detail-actions .btn-download {
    flex: 0 0 100% !important;
    justify-content: center !important;
    font-size: 15px !important;
    padding: 14px !important;
    min-width: 0 !important;
  }

  /* Heart + share → 50% each row 3 */
  .detail-actions .heart-btn,
  .detail-actions .share-wrapper {
    flex: 1 1 0% !important;
  }
  .detail-actions .btn-circle {
    width: 100% !important;
    border-radius: 30px !important;
    padding: 12px !important;
    height: auto !important;
  }
  
  /* Add text to icons to balance layout */
  .detail-actions .heart-btn::after {
    content: 'Yêu thích' !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
  }
  .detail-actions .share-btn::after {
    content: 'Chia sẻ' !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
  }

  /* Share dropdown: open upward to avoid viewport cut */
  .share-dropdown {
    bottom: calc(100% + 8px) !important;
    top: auto !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
  .share-dropdown.open {
    transform: none !important;
  }
}

/* ============================================================
   HERO ACTIONS – Unified layout for Homepage & Sach-dien-tu
   ============================================================ */
.hero-3d-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 16px !important; /* Fixed gap */
}

/* Đọc sách in hero: expand but keep nice width */
.hero-3d-actions .btn-read {
  flex: 1 1 auto !important;
  justify-content: center !important;
  max-width: 320px !important;
}

/* Khám phá kho sách button */
.hero-3d-actions .btn-outline {
  flex: 1 1 auto !important;
  justify-content: center !important;
  max-width: 320px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
}

/* Hide Heart btn completely from Hero */
.hero-3d-actions .btn-icon-hero {
  display: none !important;
}

@media (max-width: 768px) {
  .hero-3d-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .hero-3d-actions .btn-read,
  .hero-3d-actions .btn-outline {
    font-size: 16px !important;
    padding: 14px 20px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ============================================================
   CATEGORY HERO – Reduce top spacing above breadcrumb
   ============================================================ */
.subcat-hero {
  padding-top: 30px !important;
  padding-bottom: 60px !important;
  border-radius: 0 !important;
  margin-bottom: 40px !important;
}
.subcat-hero .waka-breadcrumb {
  margin-bottom: 30px !important;
}
@media (max-width: 768px) {
  .subcat-hero {
    padding-top: 20px !important;
    padding-bottom: 40px !important;
  }
}

/* WordPress: breadcrumb is server-rendered, always show it immediately.
   Anti-flash only applies to JS-populated content below. */
.subcat-hero .waka-breadcrumb {
  opacity: 1 !important;
  visibility: visible !important;
}
/* Anti-flash: hide JS-populated content until ready */
.subcat-hero ~ main .scroll-section,
.subcat-hero ~ main .category-tabs,
.subcat-hero ~ main .scroll-container,
.subcat-hero ~ main .catalog-grid,
.subcat-hero ~ main .load-more-section {
  opacity: 0;
  visibility: hidden;
}
body.subcat-ready .scroll-section,
body.subcat-ready .category-tabs,
body.subcat-ready .scroll-container,
body.subcat-ready .catalog-grid,
body.subcat-ready .load-more-section {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* Breadcrumb auto-fit: readable on desktop, compact single-line on mobile. */
.breadcrumbs,
.waka-breadcrumb {
  max-width: 100% !important;
}
.bc-left {
  max-width: min(100%, 1100px) !important;
  width: fit-content !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
}
.bc-left::-webkit-scrollbar,
.waka-breadcrumb::-webkit-scrollbar {
  display: none !important;
}
.bc-left a,
.bc-left .current,
a.waka-bc-label,
span.waka-bc-label {
  flex: 0 1 auto !important;
  min-width: 0 !important;
}
.bc-left .current {
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}
.waka-breadcrumb {
  width: fit-content !important;
  max-width: min(100%, 1100px) !important;
  box-sizing: border-box !important;
}
.waka-breadcrumb span.waka-bc-label:last-child,
.waka-breadcrumb .waka-bc-current {
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}

@media (max-width: 768px) {
  .bc-left,
  .waka-breadcrumb {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden !important;
    white-space: nowrap !important;
  }
  .bc-left a,
  a.waka-bc-label {
    max-width: clamp(54px, 21vw, 116px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .bc-left .separator,
  .waka-bc-sep {
    margin: 0 3px !important;
  }
  .bc-left .current,
  .waka-breadcrumb span.waka-bc-label:last-child,
  .waka-breadcrumb .waka-bc-current {
    max-width: clamp(70px, 28vw, 150px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* ============================================================
   AUTO TOC FOR DETAIL CONTENT
   ============================================================ */
.auto-toc-container {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
  clear: both;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.auto-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.auto-toc-title {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.3;
}
.auto-toc-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: var(--transition);
}
.auto-toc-toggle:hover {
  color: var(--secondary);
  background: rgba(245,158,11,0.12);
}
.auto-toc-toggle svg {
  transition: transform 0.25s ease;
}
.auto-toc-list-wrap {
  overflow: hidden;
  max-height: 1400px;
  opacity: 1;
  margin-top: 14px;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.2s ease;
}
.auto-toc-container.is-collapsed .auto-toc-list-wrap {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
.auto-toc-container.is-collapsed .auto-toc-toggle svg {
  transform: rotate(-90deg);
}
.auto-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auto-toc-list li {
  margin: 0;
}
.auto-toc-list a {
  display: block;
  color: var(--secondary);
  text-decoration: none;
  padding: 6px 0;
  line-height: 1.45;
  transition: color 0.2s ease, transform 0.2s ease;
}
.auto-toc-list a:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}
.auto-toc-level-3 { padding-left: 18px; }
.auto-toc-level-4 { padding-left: 36px; }
@media (max-width: 640px) {
  .auto-toc-container {
    padding: 16px;
    margin: 22px 0;
  }
  .auto-toc-title { font-size: 16px; }
  .auto-toc-level-3 { padding-left: 12px; }
  .auto-toc-level-4 { padding-left: 24px; }
}

/* ============================================================
   HEADER FAV BTN ACTIVE STATE
   ============================================================ */
#headerFavBtn.has-favs svg {
  fill: #ef4444 !important;
  stroke: #ef4444 !important;
}

/* Tối ưu fade-up cho mobile: nhanh hơn, mượt hơn, đỡ bị nhảy */
@media (max-width: 768px) {
  .fade-up {
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
}


/* ============================================================
   BOOK OF THE WEEK BANNER (Cuốn Sách Của Tuần)
   ============================================================ */
.bow-container {
  background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(30,41,59,0.9) 100%);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.bow-glow {
  position: absolute; width: 300px; height: 300px;
  background: rgba(245,158,11,0.15); filter: blur(80px);
  top: -100px; right: -100px; border-radius: 50%;
}
.bow-cover {
  flex-shrink: 0; width: 220px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  transform: perspective(1000px) rotateY(5deg);
}
.bow-cover img { width: 100%; height: auto; display: block; }
.bow-content { flex: 1; z-index: 2; }
.bow-badges { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.bow-badge-primary {
  background: rgba(245,158,11,0.2); color: #f59e0b; padding: 6px 14px;
  border-radius: 20px; font-size: 13px; font-weight: 700; border: 1px solid rgba(245,158,11,0.3);
}
.bow-badge-secondary { color: var(--text-muted); font-size: 14px; }
.bow-title { font-size: 42px; font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.2; }
.bow-quote {
  font-size: 18px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 24px; font-style: italic; border-left: 4px solid #f59e0b; padding-left: 16px;
}
.bow-desc { color: #d1d5db; line-height: 1.6; margin-bottom: 30px; font-size: 16px; max-width: 600px; }
.bow-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.bow-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff !important;
  padding: 14px 32px; border-radius: 30px; font-weight: 700; font-size: 16px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(245,158,11,0.3); transition: transform 0.3s;
}
.bow-btn:hover { transform: translateY(-2px); }
.bow-rating { color: #facc15; font-size: 18px; font-weight: 600; letter-spacing: 2px; }
.bow-rating span { color: var(--text-muted); font-size: 14px; font-weight: 400; letter-spacing: normal; }

/* Mobile optimization for Book of the Week */
@media (max-width: 768px) {
  .bow-container { flex-direction: column; padding: 24px; gap: 24px; text-align: left; }
  .bow-cover { width: 160px; margin: 0 auto; transform: none; }
  .bow-badges { flex-direction: column; align-items: flex-start; gap: 8px; }
  .bow-title { font-size: 28px; }
  .bow-quote { font-size: 15px; }
  .bow-desc { font-size: 14px; margin-bottom: 24px; }
  .bow-actions { flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }
  .bow-btn { width: 100%; }
}

/* ─── Favorites Drawer ───────────────────────────────────────────────── */
.fav-drawer-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.5); display: none;
  opacity: 0; transition: opacity 0.3s;
}
.fav-drawer-overlay.open { opacity: 1; }
.fav-drawer {
  position: fixed; top: 0; right: -360px; width: 360px; height: 100%;
  background: var(--surface); z-index: 999;
  transition: right 0.3s ease; overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.fav-drawer.open { right: 0; }
.fav-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fav-drawer-header h3 { font-size: 18px; font-weight: 700; margin: 0; }
.fav-drawer-header button {
  background: none; border: none; color: var(--text-secondary);
  font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.fav-drawer-header button:hover { color: #fff; }
.fav-drawer-list { flex: 1; padding: 12px; }
.fav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: rgba(255,255,255,0.03); margin-bottom: 8px;
  cursor: pointer; transition: background 0.2s;
}
.fav-item:hover { background: rgba(255,255,255,0.08); }
.fav-item img {
  width: 48px; height: 72px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
}
.fav-info { flex: 1; min-width: 0; }
.fav-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.fav-author { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.fav-remove {
  background: none; border: none; color: var(--text-secondary);
  font-size: 14px; cursor: pointer; padding: 4px 8px; flex-shrink: 0;
}
.fav-remove:hover { color: #ef4444; }

/* Favorites header button */
#headerFavBtn {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; position: relative; padding: 6px;
  display: flex; align-items: center;
}
#headerFavBtn:hover { color: #ef4444; }
#favBadge {
  position: absolute; top: -2px; right: -6px;
  background: #ef4444; color: #fff; font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

@media (max-width: 480px) {
  .fav-drawer { width: 100%; right: -100%; }
}

/* ============================================================
   MEGA MENU - Exact localhost header-component.js behavior
   ============================================================ */
.nav-item-dropdown {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}
.nav-item-dropdown > .mega-menu + .mega-menu,
.mega-menu .mega-explore,
.mega-column h4 {
  display: none !important;
}
.mega-menu {
  position: fixed !important;
  top: 64px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(10px) !important;
  width: 960px !important;
  max-width: calc(100vw - 32px) !important;
  background: rgba(15, 27, 45, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: var(--radius-lg) !important;
  padding: 28px 24px !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: var(--transition) !important;
  z-index: 400 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  max-height: calc(100vh - 80px) !important;
  overflow-y: auto !important;
}
.nav-item-dropdown:hover .mega-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}
.mega-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px 20px !important;
}
.mega-column a {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0 !important;
  padding: 6px 0 !important;
  line-height: 1.4 !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.mega-column a:hover {
  color: var(--secondary) !important;
  background: transparent !important;
}
.mega-badges {
  display: inline-block !important;
  flex-shrink: 0 !important;
  background: var(--rose) !important;
  color: #fff !important;
  font-size: 9px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  margin-left: 6px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  vertical-align: middle !important;
}
@media (max-width: 1280px) {
  .mega-menu { width: 720px !important; }
  .mega-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
.comic-mega {
  width: 960px !important;
  max-width: calc(100vw - 32px) !important;
  min-height: 0 !important;
  padding: 24px !important;
  background: rgba(15, 27, 45, 0.98) !important;
  border-radius: var(--radius-lg) !important;
}
.comic-mega .mega-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px 20px !important;
}
.comic-mega .mega-column {
  min-width: 0 !important;
}
.comic-mega .mega-column a {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  padding: 5px 0 !important;
  min-height: 28px !important;
  overflow-wrap: anywhere !important;
}
.comic-mega .mega-column a:hover {
  color: var(--secondary) !important;
}
@media (max-width: 1280px) {
  .comic-mega {
    width: 720px !important;
    padding: 22px !important;
  }
  .comic-mega .mega-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px 18px !important;
  }
  .comic-mega .mega-column a { font-size: 13px !important; }
}
@media (max-width: 900px) {
  .comic-mega .mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ============================================================
   ADSENSE SLOTS - render only when admin code exists
   ============================================================ */
.hs-ad-slot {
  width: min(100% - 32px, 1120px);
  margin: 28px auto;
  padding: 0;
  text-align: center;
  clear: both;
}
.hs-ad-inline {
  width: 100%;
  margin: 28px 0 34px;
}
.hs-ad-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hs-ad-content {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hs-ad-content ins.adsbygoogle {
  display: block !important;
  max-width: 100%;
}
.hs-ad-inline .hs-ad-content,
.hs-ad-slot-single_after_meta .hs-ad-content {
  min-height: 250px;
}
.hs-ad-slot-home_after_hero .hs-ad-content,
.hs-ad-slot-archive_top .hs-ad-content,
.hs-ad-slot-category_top .hs-ad-content {
  min-height: 120px;
}
.hs-ad-footer .hs-ad-content {
  min-height: 100px;
}
.hs-ad-home-after-hero,
.hs-ad-archive-top,
.hs-ad-category-top {
  margin-top: 18px;
}
.hs-ad-footer {
  margin-top: 44px;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  .hs-ad-slot {
    width: calc(100% - 24px);
    margin: 22px auto;
  }
  .hs-ad-inline {
    width: 100%;
    margin: 22px 0 28px;
  }
  .hs-ad-content,
  .hs-ad-slot-home_after_hero .hs-ad-content,
  .hs-ad-slot-archive_top .hs-ad-content,
  .hs-ad-slot-category_top .hs-ad-content,
  .hs-ad-footer .hs-ad-content {
    min-height: 100px;
  }
  .hs-ad-inline .hs-ad-content,
  .hs-ad-slot-single_after_meta .hs-ad-content {
    min-height: 250px;
  }
}

/* Keep detail breadcrumbs semantically identical on mobile and desktop. */
@media (max-width: 768px) {
  .breadcrumbs .bc-left {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }
  .breadcrumbs .bc-left::-webkit-scrollbar {
    display: none !important;
  }
  .breadcrumbs .bc-left a,
  .breadcrumbs .bc-left .current {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }
  .breadcrumbs .bc-left .separator {
    display: inline !important;
    flex: 0 0 auto !important;
  }
}

/* ============================================================
   Card typography, mobile spacing, and native horizontal swipe
   ============================================================ */
.book-title,
.catalog-card .card-title,
.catalog-card .book-title,
.top10-card .book-title,
.comic-card .book-title {
  font-size: 17px;
  line-height: 1.34;
  font-weight: 800;
}

.book-info {
  padding-top: 12px;
  min-height: 60px;
}

.scroll-header h2,
.section-header h2 {
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.22;
  font-weight: 800;
}

.scroll-track-wrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: none !important;
  touch-action: pan-x !important;
}

.scroll-track-wrapper::-webkit-scrollbar {
  display: none !important;
}

.scroll-track {
  width: max-content;
  min-width: 100%;
  transform: none !important;
  transition: none !important;
}

.scroll-track .book-card,
.scroll-track .catalog-card,
.scroll-track .comic-card {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.catalog-grid {
  align-items: start;
}

@media (max-width: 768px) {
  .scroll-section {
    margin-bottom: 44px !important;
  }

  .scroll-header {
    margin-bottom: 18px !important;
    gap: 14px !important;
  }

  .scroll-header h2,
  .section-header h2 {
    font-size: 23px !important;
    line-height: 1.25 !important;
  }

  .books-scroll {
    gap: 14px !important;
    padding: 0 4px 16px !important;
  }

  .book-card {
    flex: 0 0 clamp(148px, 42vw, 176px) !important;
    max-width: none !important;
  }

  .scroll-track {
    gap: 14px !important;
    padding-bottom: 18px !important;
  }

  .scroll-track .book-card,
  .scroll-track .catalog-card,
  .scroll-track .comic-card {
    flex: 0 0 clamp(148px, 42vw, 176px) !important;
    max-width: none !important;
  }

  .book-title,
  .top10-card .book-title,
  .catalog-card .card-title,
  .catalog-card .book-title,
  .comic-card .book-title {
    font-size: 15px !important;
    line-height: 1.36 !important;
    min-height: 41px !important;
    font-weight: 800 !important;
  }

  .book-info {
    padding: 10px 2px 0 !important;
    min-height: 58px !important;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)) !important;
    gap: 22px 14px !important;
  }

  .catalog-card .book-cover {
    margin-bottom: 12px !important;
  }
}

@media (max-width: 420px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 12px !important;
  }

  .book-card,
  .scroll-track .book-card,
  .scroll-track .catalog-card,
  .scroll-track .comic-card {
    flex-basis: clamp(142px, 43vw, 164px) !important;
  }

  .book-title,
  .top10-card .book-title,
  .catalog-card .card-title,
  .catalog-card .book-title,
  .comic-card .book-title {
    font-size: 14.5px !important;
  }
}
