/* Feature 06 — Warm editorial redesign (web frontend) */

:root {
  --color-bg: #FAF7F2;
  --color-bg-alt: #F2EDE4;
  --color-bg-card: #FFFFFF;
  --color-surface: #EDE8DF;
  --color-ink: #1C1917;
  --color-ink-muted: #78716C;
  --color-ink-faint: #A8A29E;
  /* Matches mobile_app AppTheme seed Color(0xFF4B6FFF) */
  --color-accent: #4b6fff;
  --color-accent-hover: #3a5ce8;
  --color-accent-light: #e8edff;
  --color-border: #E7E0D5;
  --color-border-strong: #C4B9AC;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, sans-serif;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(28, 25, 23, 0.06), 0 4px 16px rgba(28, 25, 23, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(28, 25, 23, 0.10), 0 16px 40px rgba(28, 25, 23, 0.08);
  --shadow-subtle: 0 1px 2px rgba(28, 25, 23, 0.08);
  --editorial-nav-height: 57px;
}

/* --- Task 2 & 3: Base --- */
.editorial-theme {
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.editorial-theme h1,
.editorial-theme h2,
.editorial-theme h3,
.editorial-theme h4,
.editorial-theme .section-title,
.editorial-theme .hero-title {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-ink);
}

.editorial-theme button,
.editorial-theme input,
.editorial-theme select,
.editorial-theme label,
.editorial-theme nav,
.editorial-theme .badge,
.editorial-theme .tag,
.editorial-theme .btn,
.editorial-theme .form-control {
  font-family: var(--font-ui);
}

.editorial-theme html {
  scroll-behavior: smooth;
}

.editorial-theme a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.editorial-theme a:hover {
  color: var(--color-accent-hover);
}

.editorial-theme ::selection {
  background: var(--color-accent-light);
  color: var(--color-ink);
}

.editorial-theme ::-webkit-scrollbar {
  width: 6px;
}

.editorial-theme ::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

.editorial-theme ::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 3px;
}

.editorial-theme hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* Off-canvas sidebar: not used in editorial shell (hamburger removed; menu was empty) */
.editorial-theme .sidebar {
  display: none !important;
}

.editorial-theme .wrapper {
  padding-left: 0 !important;
}

.editorial-theme .wrapper.offcanvas {
  margin: 0 !important;
}

.editorial-theme.route-home .content-wrapper .container {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.editorial-theme.route-home .breadcrumb-wrapper,
.editorial-theme.route-home .breadcrumb,
.editorial-theme.route-home .editorial-breadcrumb {
  display: none;
}

/* Content alignment: match header container on inner pages */
.editorial-theme:not(.route-home) .content-wrapper .container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.editorial-theme.route-ebook-show .content-wrapper .container {
  padding-top: 0;
}

/* Breadcrumb */
.editorial-theme .editorial-breadcrumb {
  display: block;
  margin: 0 0 var(--space-lg);
  padding: var(--space-md) 0 0;
  background: transparent;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-item::after {
  content: "/";
  display: inline-block;
  margin: 0 10px;
  color: var(--color-ink-faint);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 13px;
  position: static;
  transform: none;
  top: auto;
  right: auto;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-item:last-child::after {
  content: none;
  margin: 0;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-link {
  color: var(--color-ink-muted);
  text-decoration: none;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.editorial-theme .editorial-breadcrumb .breadcrumb-link:hover {
  color: var(--color-accent);
}

.editorial-theme .editorial-breadcrumb .breadcrumb-home {
  font-size: 14px;
  color: var(--color-ink-muted);
}

.editorial-theme .editorial-breadcrumb .breadcrumb-home:hover {
  color: var(--color-accent);
}

.editorial-theme .editorial-breadcrumb .breadcrumb-item--active,
.editorial-theme .editorial-breadcrumb .breadcrumb-current {
  color: var(--color-ink);
  font-weight: 500;
  max-width: min(420px, 50vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-theme .editorial-breadcrumb li.active {
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
}

/* Shared shell — top bar + navbar share one column */
.editorial-theme .container.editorial-bar-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-xl) !important;
  padding-right: var(--space-xl) !important;
  box-sizing: border-box;
}

.editorial-theme .header-inner .editorial-bar-container {
  flex: 1;
}

/* Top bar */
.editorial-theme .top-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  gap: var(--space-xl);
}

.editorial-theme .top-nav-start,
.editorial-theme .top-nav-end {
  display: flex;
  align-items: center;
}

.editorial-theme .top-nav-end {
  margin-left: auto;
}

.editorial-theme .top-nav-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  list-style: none;
}

.editorial-theme .top-nav-account > li {
  margin: 0 !important;
  padding: 0;
}

.editorial-theme .top-nav-account > li > a {
  display: inline-block;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

/* Language switcher */
.editorial-theme .editorial-lang {
  display: block;
}

.editorial-theme .editorial-lang-track {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.editorial-theme .editorial-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--color-ink-muted);
  text-decoration: none !important;
  border-radius: 7px;
  transition: color 0.18s ease, background 0.18s ease;
}

.editorial-theme .editorial-lang-btn:hover {
  color: var(--color-ink);
  background: rgba(250, 247, 242, 0.9);
}

.editorial-theme .editorial-lang-btn.is-active {
  color: #fff !important;
  background: var(--color-accent);
}

.editorial-theme .editorial-lang-btn.is-active:hover {
  color: #fff !important;
  background: var(--color-accent-hover);
}

.editorial-theme .search-area {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  max-width: 560px;
  margin-left: auto;
}

.editorial-theme .search-area form {
  width: 100%;
}

/* Search toolbars: one visible per breakpoint */
.editorial-theme .editorial-search--desktop,
.editorial-theme .editorial-mobile-search {
  display: none !important;
}

@media (min-width: 992px) {
  .editorial-theme .editorial-search--desktop.search-box.editorial-search {
    display: flex !important;
  }
}

@media (max-width: 991px) {
  .editorial-theme .editorial-mobile-search {
    display: flex !important;
  }
}

/* Modern header search — overrides legacy .search-box from app.css */
.editorial-theme .search-box.editorial-search {
  display: flex;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 4px 0 0 !important;
  position: relative !important;
  border: 1px solid var(--color-border) !important;
  border-left: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: visible !important;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editorial-theme .search-box.editorial-search:focus-within {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px var(--color-accent-light) !important;
}

.editorial-theme .editorial-search__input-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding-left: 12px;
  gap: 8px;
}

.editorial-theme .editorial-search__input-icon {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--color-ink-faint);
  pointer-events: none;
}

.editorial-theme .search-box.editorial-search .search-box-input,
.editorial-theme .search-box.editorial-search .editorial-search__input {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 8px 0 0 !important;
  border: none !important;
  border-left: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: var(--color-ink) !important;
  box-shadow: none !important;
  float: none !important;
}

.editorial-theme .search-box.editorial-search .search-box-input::placeholder {
  color: var(--color-ink-faint) !important;
}

.editorial-theme .search-box.editorial-search .search-box-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.editorial-theme .editorial-search__divider {
  flex-shrink: 0;
  width: 1px;
  height: 22px;
  background: var(--color-border);
  margin: 0 4px;
}

.editorial-theme .editorial-search__category {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 42%;
}

.editorial-theme .search-box.editorial-search .search-box-select,
.editorial-theme .search-box.editorial-search .editorial-search__select {
  width: auto !important;
  min-width: 7.5rem !important;
  max-width: 11rem !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 26px 0 10px !important;
  border: none !important;
  border-left: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 40px !important;
  color: var(--color-ink-muted) !important;
  cursor: pointer;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  float: none !important;
}

.editorial-theme .search-box.editorial-search .search-box-select:focus {
  outline: none !important;
  color: var(--color-ink) !important;
}

.editorial-theme .editorial-search__chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 9px;
  color: var(--color-ink-faint);
}

.editorial-theme .search-box.editorial-search .editorial-search__submit,
.editorial-theme .search-box.editorial-search .search-box-btn.editorial-search__submit {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 3px 0 6px !important;
  padding: 0 !important;
  float: none !important;
  border: none !important;
  border-radius: 8px !important;
  background: var(--color-accent) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.editorial-theme .search-box.editorial-search .editorial-search__submit:hover {
  background: var(--color-accent-hover) !important;
  transform: scale(1.02);
}

.editorial-theme .search-box.editorial-search .editorial-search__submit i,
.editorial-theme .search-box.editorial-search .search-box-btn i {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.editorial-theme .search-box.editorial-search .search-box-button {
  display: none !important;
}

/* Mobile search dropdown */
.editorial-theme .editorial-search--mobile {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  padding: 8px !important;
  height: auto !important;
  border-radius: var(--radius-md) !important;
}

.editorial-theme .editorial-search--mobile .editorial-search__submit {
  margin: 0 !important;
}

/* Mobile header: stack logo and actions to prevent overlap */
@media (max-width: 991px) {
  .editorial-theme .header-wrapper {
    height: auto !important;
    margin-bottom: 0 !important;
  }

  .editorial-theme .header-inner {
    padding: 10px 0 !important;
  }

  .editorial-theme .header-inner > .container.editorial-bar-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding-left: var(--space-md) !important;
    padding-right: var(--space-md) !important;
  }

  .editorial-theme .website-logo {
    float: none !important;
    order: 1;
    flex: 1 1 auto;
    min-width: 0 !important;
    max-width: none;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }

  .editorial-theme .website-logo h2 {
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .editorial-theme .profile-icon {
    float: none !important;
    order: 2;
    flex: 0 0 auto;
    margin: 0 !important;
  }

  .editorial-theme .profile-icon .dropdown-toggle {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 26px !important;
    color: var(--color-ink-muted) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .editorial-theme .profile-icon .dropdown-toggle .caret {
    display: none;
  }

  .editorial-theme .search-area {
    float: none !important;
    order: 3;
    flex: 1 1 100%;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .editorial-theme .search-area form {
    width: 100%;
  }

  .editorial-theme .editorial-mobile-search__category {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
  }

  .editorial-theme .editorial-mobile-search__search {
    flex: 0 0 auto;
  }
}

@media (max-width: 991px) {
  .editorial-theme .top-nav {
    padding: 8px 0;
  }

  .editorial-theme .top-nav > .container.editorial-bar-container {
    padding-left: var(--space-md) !important;
    padding-right: var(--space-md) !important;
  }
}

@media (max-width: 768px) {
  .editorial-theme .search-area {
    max-width: none;
  }

  .editorial-theme .editorial-lang-btn {
    min-width: 32px;
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .editorial-theme .top-nav-wrapper {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .editorial-theme .top-nav-end {
    width: 100%;
    margin-left: 0;
  }

  .editorial-theme .top-nav-account {
    justify-content: flex-start;
    gap: 12px;
  }

  .editorial-theme .top-nav-account > li > a {
    font-size: 12px;
  }
}

/* Override legacy theme: keep top bar left/right aligned on tablet+ */
@media screen and (max-width: 700px) {
  .editorial-theme .top-nav-start,
  .editorial-theme .top-nav-end {
    float: none !important;
    text-align: left;
  }
}

.editorial-theme.route-home .megamenu-wrapper,
.editorial-theme.route-ebook-show .megamenu-wrapper {
  display: none;
}

/* --- Task 4 / Fix 2: Navbar / header (warm cream, override dark theme) --- */
.editorial-theme .top-nav {
  background: var(--color-bg-alt) !important;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.editorial-theme .top-nav > .container.editorial-bar-container {
  width: 100%;
  max-width: 1100px;
}

.editorial-theme .top-nav a:not(.editorial-lang-btn) {
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--color-ink-muted) !important;
  text-decoration: none;
}

.editorial-theme .top-nav a:not(.editorial-lang-btn):hover {
  color: var(--color-ink) !important;
}

.editorial-theme .header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto !important;
  background: rgba(250, 247, 242, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.editorial-theme .header-inner {
  display: flex;
  align-items: center;
  padding: 14px 0;
  background: rgba(250, 247, 242, 0.95) !important;
  box-shadow: none !important;
}

.editorial-theme .header-inner > .container.editorial-bar-container {
  width: 100%;
  max-width: 1100px;
}

/* Desktop header: logo | search | account */
@media (min-width: 992px) {
  .editorial-theme .header-inner > .container.editorial-bar-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
  }

  .editorial-theme .website-logo {
    float: none !important;
    order: 1;
    flex: 0 1 auto;
    min-width: 0 !important;
    max-width: 240px;
    height: auto !important;
    margin: 0 !important;
  }

  .editorial-theme .website-logo h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .editorial-theme .search-area {
    float: none !important;
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: 560px;
    margin: 0 0 0 auto !important;
  }

  .editorial-theme .search-area form {
    width: 100%;
  }

  .editorial-theme .profile-icon {
    float: none !important;
    order: 3;
    flex: 0 0 auto;
    margin: 0 0 0 8px !important;
  }

  .editorial-theme .profile-icon .dropdown-toggle {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 28px !important;
    color: var(--color-ink-muted) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .editorial-theme .profile-icon .dropdown-toggle .caret {
    display: none;
  }

  .editorial-theme .editorial-search__category {
    max-width: 38%;
  }
}

@media (min-width: 992px) and (max-width: 1100px) {
  .editorial-theme .search-box.editorial-search .search-box-select,
  .editorial-theme .search-box.editorial-search .editorial-search__select {
    min-width: 6rem !important;
    max-width: 9rem !important;
  }
}

.editorial-theme .header-inner.sticky {
  background: rgba(250, 247, 242, 0.98) !important;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06) !important;
}

.editorial-theme .website-logo h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-ink) !important;
  letter-spacing: -0.3px;
  margin: 0;
  text-shadow: none !important;
}

.editorial-theme .megamenu-wrapper,
.editorial-theme .megamenu-wrapper .navbar-default {
  background: var(--color-bg) !important;
  border-color: var(--color-border) !important;
}

.editorial-theme .megamenu-wrapper .navbar-nav > li > a {
  color: var(--color-ink-muted) !important;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}

.editorial-theme .megamenu-wrapper .navbar-nav > li > a:hover,
.editorial-theme .megamenu-wrapper .navbar-nav > li.active > a {
  color: var(--color-ink) !important;
}

/* Legacy .search-box rules only apply outside .editorial-search */

/* --- Buttons --- */
.editorial-theme .btn-primary,
.editorial-theme a.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-accent);
  color: #fff !important;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.editorial-theme .btn-primary:hover,
.editorial-theme a.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

/* --- Task 5: Book card --- */
.editorial-theme .book-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.editorial-theme .book-card .ebook-image,
.editorial-theme .book-card .book-card-cover-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.editorial-theme .book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: inherit;
}

.editorial-theme .book-card .ebook-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editorial-theme .book-card .ebook-image {
  position: relative;
  float: none;
  width: 100%;
}

.editorial-theme .book-card .image-holder,
.editorial-theme .book-card .image-placeholder,
.editorial-theme .book-card .ebook-cover-wrapper {
  position: relative;
  width: 100%;
  height: auto !important;
  aspect-ratio: 2 / 3;
  padding: 0 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--color-surface);
}

.editorial-theme .book-card .image-holder img,
.editorial-theme .book-card .ebook-cover-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
}

.editorial-theme .book-card .ebook-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.editorial-theme .book-card .ebook-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.editorial-theme .book-card .ebook-authors {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-ink-muted);
}

.editorial-theme .book-card .book-card-body {
  overflow: visible;
  padding: 12px;
}

.editorial-theme .book-card .book-card-author {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-ink-muted);
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editorial-theme .book-card .book-card-body .book-tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.editorial-theme .book-card .more-details-wrapper,
.editorial-theme .book-card .book-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--color-bg-alt);
}

.editorial-theme .book-card .book-card-wishlist-form {
  margin: 0;
}

.editorial-theme .book-card .book-card-wishlist {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-ink-faint);
  line-height: 1;
}

.editorial-theme .book-card .book-card-wishlist:hover,
.editorial-theme .book-card .book-card-wishlist.active {
  color: var(--color-accent);
  background: transparent;
}

.editorial-theme .book-card .book-card-stars {
  display: flex;
  gap: 2px;
}

.editorial-theme .book-card .book-card-stars .ebook-rating i {
  font-size: 12px;
  color: #c5d4ff;
}

.editorial-theme .book-card .book-card-stars .ebook-rating .fa-star,
.editorial-theme .book-card .book-card-stars .ebook-rating .fa-star-half-o {
  color: var(--color-accent);
}

.editorial-theme .book-card .card-admin-actions {
  display: none;
}

.editorial-theme .book-card:hover .card-admin-actions {
  display: block;
}

.editorial-theme .book-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.editorial-theme .book-card-cover-skeleton,
.editorial-theme .book-card-skeleton::before {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(
    90deg,
    var(--color-surface) 25%,
    var(--color-bg-alt) 50%,
    var(--color-surface) 75%
  );
  background-size: 200% 100%;
  animation: editorial-shimmer 1.5s infinite;
}

@keyframes editorial-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.editorial-theme .book-card-skeleton {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.editorial-theme .book-card-skeleton::after {
  content: '';
  display: block;
  height: 60px;
  margin: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}

/* --- Task 6: Hero --- */
.editorial-theme .hero {
  background: var(--color-bg-alt);
  padding: var(--space-3xl) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  min-height: 480px;
}

.editorial-theme .hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.editorial-theme .hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.editorial-theme .hero-title em {
  font-style: italic;
  color: var(--color-accent);
}

.editorial-theme .hero-subtitle {
  font-size: 17px;
  color: var(--color-ink-muted);
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: var(--space-xl);
}

.editorial-theme .hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.editorial-theme .hero-books {
  position: relative;
  width: 200px;
  height: 280px;
}

.editorial-theme .hero-book {
  position: absolute;
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
}

.editorial-theme .hero-book--back {
  top: 40px;
  left: -40px;
  transform: rotate(-8deg);
  opacity: 0.6;
  z-index: 1;
}

.editorial-theme .hero-book--middle {
  top: 20px;
  left: 10px;
  transform: rotate(-3deg);
  opacity: 0.85;
  z-index: 2;
}

.editorial-theme .hero-book--front {
  top: 0;
  left: 50px;
  transform: rotate(4deg);
  z-index: 3;
  transition: transform 0.3s ease;
}

.editorial-theme .hero-book--front:hover {
  transform: rotate(0deg) scale(1.04);
}

/* --- Task 7: Categories strip --- */
.editorial-theme .categories-strip {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-xl);
  position: sticky;
  top: var(--editorial-nav-height);
  z-index: 90;
}

.editorial-theme .categories-inner {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.editorial-theme .categories-inner::-webkit-scrollbar {
  display: none;
}

.editorial-theme .category-chip {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.editorial-theme .category-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.editorial-theme .category-chip.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.editorial-theme .category-chip--browse {
  cursor: pointer;
  font: inherit;
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.editorial-theme .category-chip--browse:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Mobile header toolbar */
.editorial-theme .editorial-mobile-search {
  align-items: center;
  gap: 8px;
  width: 100%;
}

.editorial-theme .editorial-mobile-search__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(52vw, 220px);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.editorial-theme .editorial-mobile-search__category-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-theme .editorial-mobile-search__category .fa-chevron-down {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--color-ink-faint);
}

.editorial-theme .editorial-mobile-search__search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
}

.editorial-theme .editorial-mobile-search__search .dropdown-menu {
  right: 0;
  left: auto;
  min-width: min(92vw, 320px);
  padding: 8px;
  border-radius: var(--radius-md);
}

/* Full-screen category picker (mobile-friendly) */
body.category-picker-open {
  overflow: hidden;
}

.category-picker {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}

.category-picker.is-open {
  pointer-events: auto;
  visibility: visible;
}

.category-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.category-picker.is-open .category-picker__backdrop {
  opacity: 1;
}

.category-picker__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(28, 25, 23, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.category-picker.is-open .category-picker__sheet {
  transform: translateY(0);
}

.category-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.category-picker__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-ink);
}

.category-picker__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-ink-muted);
  cursor: pointer;
}

.category-picker__search-wrap {
  position: relative;
  padding: 12px 16px;
  flex-shrink: 0;
}

.category-picker__search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--color-ink-faint);
  pointer-events: none;
}

.category-picker__search {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--color-ink);
  background: var(--color-bg);
}

.category-picker__search:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.category-picker__list {
  list-style: none;
  margin: 0;
  padding: 4px 12px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.category-picker__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-picker__link:hover,
.category-picker__link:focus {
  background: var(--color-accent-light);
  color: var(--color-accent);
  text-decoration: none;
}

.category-picker__link.is-active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

.category-picker__link span {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.category-picker__check {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--color-accent);
}

@media (min-width: 520px) {
  .category-picker {
    align-items: center;
    padding: 24px;
  }

  .category-picker__sheet {
    border-radius: 16px;
    max-height: min(80vh, 640px);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .category-picker.is-open .category-picker__sheet {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Task 8: Books grid --- */
.editorial-theme .books-section {
  padding: var(--space-2xl) var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.editorial-theme .books-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.editorial-theme .section-title {
  font-size: 28px;
  font-weight: 600;
}

.editorial-theme .books-count {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--color-ink-faint);
}

.editorial-theme .books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.editorial-theme .books-grid .grid-ebooks,
.editorial-theme .books-grid.row {
  display: contents;
}

.editorial-theme .books-grid > [class*="col-"] {
  padding: 0;
  width: auto;
  float: none;
}

/* --- Task 9: Empty state --- */
.editorial-theme .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-ink-muted);
}

.editorial-theme .empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.editorial-theme .empty-state h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}

.editorial-theme .empty-state p {
  font-size: 15px;
}

/* --- Task 10–11: Book detail --- */
.editorial-theme .book-detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.editorial-theme .book-detail-cover-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: 80px;
}

.editorial-theme .book-detail-cover-col {
  max-width: 280px;
}

.editorial-theme .book-detail-cover-wrap {
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.15), 0 2px 6px rgba(28, 25, 23, 0.1);
  background: var(--color-surface);
}

.editorial-theme .book-detail-cover {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.editorial-theme .book-detail-cta {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 15px;
}

.editorial-theme .book-detail-back {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-md);
  transition: color 0.15s;
}

.editorial-theme .book-detail-back:hover {
  color: var(--color-ink);
}

.editorial-theme .book-detail-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin: var(--space-sm) 0 var(--space-xs);
}

.editorial-theme .book-detail-author {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-lg);
}

.editorial-theme .book-detail-author a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.editorial-theme .book-detail-author a:hover {
  color: var(--color-accent-hover);
}

.editorial-theme .book-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.editorial-theme .meta-item {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-ink-muted);
}

.editorial-theme .meta-label {
  font-weight: 600;
  color: var(--color-ink);
  margin-right: 4px;
}

.editorial-theme .meta-divider {
  width: 1px;
  height: 14px;
  background: var(--color-border);
}

.editorial-theme .book-detail-section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  margin-bottom: var(--space-sm);
}

.editorial-theme .book-detail-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-ink-muted);
}

.editorial-theme .book-detail-description p {
  margin-bottom: var(--space-md);
}

.editorial-theme .book-detail-actions {
  margin-top: var(--space-lg);
}

.editorial-theme .related-books {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
}

.editorial-theme .book-detail-reader {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-2xl);
}

.editorial-theme .book-detail-tabs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-2xl);
}

.editorial-theme.route-ebook-show .ebook-slider-wrapper .ebook-slider {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.editorial-theme.route-ebook-show .ebook-slider-wrapper .slick-list,
.editorial-theme.route-ebook-show .ebook-slider-wrapper .slick-track {
  display: contents !important;
  transform: none !important;
  width: 100% !important;
}

.editorial-theme.route-ebook-show .ebook-slider-wrapper .slick-slide {
  width: auto !important;
  float: none;
}

.editorial-theme.route-ebook-show .ebook-slider-wrapper .slick-arrow {
  display: none !important;
}

/* Reviews tab styling on book detail */
.editorial-theme.route-ebook-show .ebook-tab .tab-content {
  padding-top: var(--space-md);
}

/* --- Task 12: Page enter --- */
@keyframes editorial-pageReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editorial-theme .page-enter {
  animation: editorial-pageReveal 0.4s ease forwards;
}

.editorial-theme .page-enter .book-detail-cover-col {
  animation: editorial-pageReveal 0.4s ease 0.05s forwards;
  opacity: 0;
}

.editorial-theme .page-enter .book-detail-info-col {
  animation: editorial-pageReveal 0.4s ease 0.1s forwards;
  opacity: 0;
}

/* Catalog list inherits grid */
.editorial-theme .ebook-list .grid-ebooks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.editorial-theme .ebook-list .grid-ebooks > [class*="col-"] {
  width: 100%;
  padding: 0;
}

/* Footer subtle */
.editorial-theme .footer-wrapper {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

@media (max-width: 768px) {
  .editorial-theme .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
  }

  .editorial-theme .hero-visual {
    display: none;
  }

  .editorial-theme .hero-subtitle {
    max-width: 100%;
  }

  .editorial-theme .book-detail-page {
    grid-template-columns: 1fr;
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-xl);
  }

  .editorial-theme .book-detail-cover-col {
    position: static;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .editorial-theme .book-detail-cover-wrap {
    width: 120px;
    flex-shrink: 0;
  }

  .editorial-theme .book-detail-cta {
    width: auto;
    flex: 1;
    align-self: flex-end;
  }

  .editorial-theme .related-books,
  .editorial-theme .book-detail-reader,
  .editorial-theme .book-detail-tabs {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

/* Mobile: denser book grid and smaller covers */
@media (max-width: 768px) {
  .editorial-theme .books-section {
    padding: var(--space-xl) var(--space-md);
  }

  .editorial-theme .books-section-header {
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
  }

  .editorial-theme .section-title {
    font-size: 24px;
  }

  .editorial-theme .books-count {
    font-size: 13px;
  }

  .editorial-theme .categories-strip {
    padding: var(--space-sm) var(--space-md);
  }

  .editorial-theme .categories-inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .editorial-theme .category-chip {
    font-size: 13px;
    min-height: 40px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
  }

  .editorial-theme .category-chip--browse {
    order: -1;
    flex: 1 1 100%;
    justify-content: center;
    min-height: 44px;
  }

  .editorial-theme .books-grid,
  .editorial-theme .ebook-list .grid-ebooks,
  .editorial-theme .ebook-list-result .grid-ebooks {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .editorial-theme .grid-ebooks .ebook-card,
  .editorial-theme .grid-ebooks .book-card {
    margin-top: 0 !important;
    padding: 0 !important;
  }

  .editorial-theme .book-card .image-holder,
  .editorial-theme .book-card .image-placeholder,
  .editorial-theme .book-card .ebook-cover-wrapper,
  .editorial-theme .ebook-card.book-card .image-holder,
  .editorial-theme .ebook-card.book-card .image-placeholder,
  .editorial-theme .ebook-card.book-card .ebook-cover-wrapper {
    aspect-ratio: 3 / 4;
    height: auto !important;
    max-height: none;
  }

  .editorial-theme .book-card .ebook-content,
  .editorial-theme .book-card .book-card-body {
    padding: 8px;
  }

  .editorial-theme .book-card .ebook-name {
    font-size: 12px;
    line-height: 1.25;
  }

  .editorial-theme .book-card .book-card-author {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .editorial-theme .book-card .book-card-body .book-tag {
    font-size: 9px;
    padding: 2px 6px;
    letter-spacing: 0.04em;
  }

  .editorial-theme .book-card .more-details-wrapper,
  .editorial-theme .book-card .book-card-meta {
    padding: 4px 8px 8px;
  }

  .editorial-theme .book-card .book-card-wishlist {
    font-size: 14px;
  }

  .editorial-theme .book-card:hover {
    transform: none;
  }

  .editorial-theme.route-ebook-show .ebook-slider-wrapper .ebook-slider {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .editorial-theme .ebook-list-header {
    margin-bottom: var(--space-md);
  }

  .editorial-theme .ebook-list-header .search-result-title h3 {
    font-size: 22px;
  }

  .editorial-theme .ebook-card-list .image-holder,
  .editorial-theme .ebook-card-list .image-placeholder {
    width: 88px !important;
    height: 132px !important;
  }

  .editorial-theme .ebook-card-list .ebook-image {
    float: left;
    margin-right: 12px;
  }
}

@media (max-width: 400px) {
  .editorial-theme .books-grid,
  .editorial-theme .ebook-list .grid-ebooks,
  .editorial-theme .ebook-list-result .grid-ebooks {
    gap: 8px;
  }

  .editorial-theme .book-card .ebook-name {
    font-size: 11px;
  }

  .editorial-theme .book-card .book-card-author {
    font-size: 10px;
  }
}

/* ========== Feature 06b — UI fixes ========== */

/* Fix 1: Ghost progress bar above navbar */
.editorial-theme #nprogress,
.editorial-theme #nprogress .bar,
.editorial-theme .pace,
.editorial-theme .pace-progress,
.editorial-theme .pace-progress-inner,
.editorial-theme [class*="loading-bar"],
.editorial-theme [class*="router-progress"] {
  display: none !important;
}

.editorial-theme .nprogress-bar {
  top: 64px !important;
  z-index: 99 !important;
}

/* Book detail action buttons (favorite, edit, delete, share, etc.) */
.editorial-theme .book-detail-actions .ebook-action {
  margin: 0;
}

.editorial-theme .book-detail-actions .book-detail-actions-row,
.editorial-theme .book-detail-actions .ebook-details-compact .pull-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  float: none !important;
}

.editorial-theme .book-detail-actions .book-detail-actions-row > span {
  float: none !important;
  margin: 0 !important;
}

.editorial-theme .book-detail-actions .book-detail-actions-row form {
  display: inline-flex;
  margin: 0;
}

.editorial-theme .book-detail-actions .btn.btn-sm.btn-icon,
.editorial-theme .book-detail-actions a.btn.btn-sm.btn-icon,
.editorial-theme .book-detail-actions .btn.btn-sm.btn-right-actions {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--color-border-strong) !important;
  background: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  line-height: 1 !important;
  color: var(--color-ink-muted) !important;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.editorial-theme .book-detail-actions .btn.btn-sm.btn-icon i,
.editorial-theme .book-detail-actions a.btn.btn-sm.btn-icon i {
  font-size: 16px !important;
  color: var(--color-ink-muted) !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.editorial-theme .book-detail-actions .btn-wishlist:hover,
.editorial-theme .book-detail-actions .btn.btn-sm.btn-icon:hover {
  border-color: var(--color-accent) !important;
  background: var(--color-accent-light) !important;
  color: var(--color-accent) !important;
}

.editorial-theme .book-detail-actions .btn-wishlist:hover i,
.editorial-theme .book-detail-actions .btn.btn-sm.btn-icon:hover i {
  color: var(--color-accent) !important;
}

.editorial-theme .book-detail-actions .btn-wishlist.active,
.editorial-theme .book-detail-actions .btn-wishlist.active:hover {
  border-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: #fff !important;
}

.editorial-theme .book-detail-actions .btn-wishlist.active i,
.editorial-theme .book-detail-actions .btn-wishlist.active:hover i {
  color: #fff !important;
}

.editorial-theme .book-detail-actions .btn-edit,
.editorial-theme .book-detail-actions .btn-edit i {
  color: var(--color-ink-muted) !important;
}

.editorial-theme .book-detail-actions .btn-edit:hover {
  border-color: var(--color-accent) !important;
  background: var(--color-accent-light) !important;
}

.editorial-theme .book-detail-actions .btn-edit:hover i {
  color: var(--color-accent) !important;
}

.editorial-theme .book-detail-actions .btn-delete {
  border-color: #FCA5A5 !important;
  background: #fff !important;
  color: #DC2626 !important;
}

.editorial-theme .book-detail-actions .btn-delete i {
  color: #DC2626 !important;
}

.editorial-theme .book-detail-actions .btn-delete:hover {
  border-color: #DC2626 !important;
  background: #FEE2E2 !important;
  color: #DC2626 !important;
}

.editorial-theme .book-detail-actions .btn-delete:hover i {
  color: #DC2626 !important;
}

.editorial-theme .book-reader-section {
  margin-top: var(--space-xl);
}

.editorial-theme .book-reader-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  margin-bottom: 12px;
}

.editorial-theme .book-reader-section .reader-container,
.editorial-theme .book-reader-embed {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.editorial-theme .book-file-path-admin {
  display: none;
}

.editorial-theme.auth-admin .book-file-path-admin {
  display: block;
  font-size: 11px;
  color: var(--color-ink-faint);
  margin-top: 4px;
}

.editorial-theme .book-reader-embed .panel-heading {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
}

.editorial-theme .book-reader-embed .book-reader-toggle {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-ink);
}

.editorial-theme .book-reader-embed .panel-body {
  padding: 0;
  background: var(--color-bg-card);
}

.editorial-theme .book-reader-embed iframe {
  width: 100%;
  min-height: 500px;
  border: none;
  display: block;
}

.editorial-theme .book-detail-description-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-ink-muted);
}

/* Book detail: share row */
.editorial-theme .book-detail-share {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.editorial-theme .book-detail-share-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editorial-theme .book-detail-share-list > li {
  padding: 0;
  margin: 0;
}

.editorial-theme .book-detail-share-list a,
.editorial-theme .book-detail-share-list .book-detail-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--color-ink-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.editorial-theme .book-detail-share-list .book-detail-share-btn {
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.editorial-theme .book-detail-share-list a:hover,
.editorial-theme .book-detail-share-list .book-detail-share-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.editorial-theme .book-detail-share-list i {
  font-size: 20px;
  line-height: 1;
}

.editorial-theme .book-detail-share-x-mark {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
}
