/* ============================================================
   FaneliaBooks — Premium Dark Design System
   OverDrive-inspired, modernized
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --accent-warm: #f59e0b;
  --dark-1: #0a0a0f;
  --dark-2: #111118;
  --dark-3: #1a1a24;
  --dark-4: #232330;
  --dark-5: #2d2d3d;
  --text: #e4e4ed;
  --text-muted: #8b8ba3;
  --text-dim: #5c5c72;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --gradient: linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.08));
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.nav-header.scrolled {
  background: rgba(10, 10, 15, 0.95);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  padding: 10px 0;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon { width: 32px; height: 32px; }

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* Search */
.nav-search-wrap { flex: 1; max-width: 420px; }

.nav-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  transition: var(--transition);
}

.nav-search:focus-within {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-search input,
.mobile-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  width: 100%;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--text-dim);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover { color: var(--white); }

.btn-cta {
  padding: 10px 22px;
  background: var(--gradient);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  background: var(--dark-2);
  border-top: 1px solid var(--glass-border);
}

.mobile-menu.open { display: flex; }

.mobile-menu a,
.mobile-nav-link {
  padding: 14px 0;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
}

.mobile-menu a:last-child { border-bottom: none; }

.mobile-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* ============================================================
   HERO — Featured Book Spotlight
   ============================================================ */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-orb-1 {
  width: 500px; height: 500px;
  background: rgba(99, 102, 241, 0.15);
  top: -100px; right: -100px;
  animation: orb-float 12s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px; height: 400px;
  background: rgba(34, 211, 238, 0.1);
  bottom: -80px; left: -80px;
  animation: orb-float 15s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 300px; height: 300px;
  background: rgba(245, 158, 11, 0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-float 18s ease-in-out infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--gradient-subtle);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}

.hero-title em {
  font-style: italic;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  background: var(--gradient);
  color: var(--white);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-stat { text-align: center; }

.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
}

/* Hero Book Preview */
.hero-books-preview {
  flex-shrink: 0;
  position: relative;
}

.preview-stack {
  position: relative;
  width: 260px;
  height: 360px;
  perspective: 800px;
}

.preview-book {
  position: absolute;
  width: 200px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-book-back {
  top: 20px; left: 0;
  transform: rotate(-6deg) scale(0.9);
  opacity: 0.6;
  z-index: 1;
}

.preview-book-mid {
  top: 10px; left: 30px;
  transform: rotate(-2deg) scale(0.95);
  opacity: 0.8;
  z-index: 2;
}

.preview-book-front {
  top: 0; left: 50px;
  transform: rotate(2deg);
  z-index: 3;
}

.preview-stack:hover .preview-book-back { transform: rotate(-10deg) scale(0.88) translateX(-15px); }
.preview-stack:hover .preview-book-mid { transform: rotate(0deg) scale(0.93); }
.preview-stack:hover .preview-book-front { transform: rotate(4deg) translateY(-8px) scale(1.02); }

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.categories-section {
  padding: 40px 0 20px;
  background: var(--dark-1);
  position: sticky;
  top: 58px;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.category-scroll::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 9px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.cat-tab:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
  color: var(--text);
}

.cat-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

/* ============================================================
   BOOK SHELVES — Themed Collection Rows
   ============================================================ */
.shelf-section {
  padding: 60px 0;
  position: relative;
}

.shelf-section:nth-child(even) { background: var(--dark-2); }
.shelf-section:nth-child(odd) { background: var(--dark-1); }

.shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 24px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.shelf-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.shelf-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.shelf-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}

.shelf-link:hover {
  color: var(--accent);
  gap: 8px;
}

/* Carousel Track */
.shelf-carousel-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.shelf-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0 16px;
  scroll-behavior: smooth;
}

.shelf-carousel::-webkit-scrollbar { display: none; }

/* Carousel Arrow Buttons */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(17, 17, 24, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
}

.shelf-carousel-wrap:hover .carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.carousel-arrow-left { left: 4px; }
.carousel-arrow-right { right: 4px; }

/* ============================================================
   BOOK CARDS
   ============================================================ */
.book-card {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.book-card:hover { transform: translateY(-6px); }
.book-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius-sm); }

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--dark-4);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.book-card:hover .book-cover {
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.book-card:hover .book-cover-img {
  transform: scale(1.04);
}

/* Cover badge */
.book-cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
  z-index: 2;
}

/* View hover overlay */
.book-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.book-card:hover .book-overlay { opacity: 1; }

.book-overlay-btn {
  padding: 10px 22px;
  background: var(--gradient);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Card info */
.book-info {
  padding: 12px 4px 4px;
}

.book-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-excerpt {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-price {
  font-size: 0.95rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.book-format {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 2px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
}

/* ============================================================
   ALL BOOKS GRID (Filtered View)
   ============================================================ */
.books-section {
  padding: 60px 0 80px;
  background: var(--dark-1);
  display: none;
}

.books-section.grid-active { display: block; }

.books-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.books-title {
  font-size: 1.4rem;
  font-weight: 800;
}

.books-count {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1rem;
}

.sort-wrap { display: flex; align-items: center; gap: 8px; }

.sort-select {
  padding: 8px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select option { background: var(--dark-3); }

.sort-select:focus {
  border-color: rgba(99, 102, 241, 0.4);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 24px;
}

.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ============================================================
   SHELVES CONTAINER (wraps all shelf sections)
   ============================================================ */
#shelves-container {
  /* shown when browsing by shelf */
}

#shelves-container.hidden { display: none; }

/* ============================================================
   TRUST SECTION
   ============================================================ */
.trust-section {
  padding: 70px 0;
  background: var(--dark-3);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.trust-item {
  text-align: center;
  padding: 28px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.trust-item:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.trust-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.trust-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.trust-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark-2);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 260px;
}

.footer-tagline {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-cols {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-bottom a:hover { color: var(--white); }

/* ============================================================
   MODAL — Book Detail
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-bg-in 0.25s ease;
}

@keyframes modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 10;
  transition: var(--transition);
}

.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--glass-hover); color: var(--white); }

.modal-inner {
  display: flex;
  gap: 32px;
  padding: 40px;
}

.modal-cover-wrap {
  flex: 0 0 220px;
  position: relative;
}

.modal-cover {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.modal-cover-glow {
  position: absolute;
  inset: -20px;
  background: var(--gradient-subtle);
  filter: blur(40px);
  z-index: -1;
  border-radius: 50%;
  opacity: 0.5;
}

.modal-content { flex: 1; }

.modal-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.modal-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.perk {
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-buy {
  width: 100%;
  padding: 16px;
  background: var(--gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-buy.loading {
  opacity: 0.7;
  pointer-events: none;
}

.modal-guarantee {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 12px;
}

.wallet-divider {
  text-align: center;
  position: relative;
  margin: 12px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.wallet-divider span {
  background: var(--dark-3);
  padding: 0 12px;
  position: relative;
  z-index: 1;
}

.wallet-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-border);
}

/* ============================================================
   AD UNITS
   ============================================================ */
.ad-unit {
  display: block;
  text-align: center;
  margin: 0 auto;
  overflow: hidden;
}

.ad-banner-wrap {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
  .preview-stack { width: 220px; height: 310px; }
  .preview-book { width: 170px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-search-wrap { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 100px 0 60px; min-height: auto; }
  .hero-inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero-subtitle { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-books-preview { order: -1; }
  .preview-stack { width: 200px; height: 280px; margin: 0 auto; }
  .preview-book { width: 150px; }

  .categories-section { top: 52px; }
  .category-scroll { justify-content: flex-start; flex-wrap: nowrap; }

  .shelf-header { flex-direction: column; gap: 6px; }

  .book-card { width: 150px; }

  .modal-inner { flex-direction: column; padding: 28px; }
  .modal-cover-wrap { flex: none; max-width: 200px; margin: 0 auto; }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-cols { flex-direction: column; gap: 28px; }

  .books-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }

  .book-card { width: 130px; }
  .shelf-carousel { gap: 14px; }

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

  .modal-inner { padding: 20px; }
  .modal-title { font-size: 1.2rem; }
}
