/* FlexNovels Gold Book Shelves 1.1.0
   Centered shelves + small titles beneath covers, without overlaying the books.
*/
.fngs-shelf-block,.book-grid-3x2,.book-carousel,.fn-grid,.book-grid{
  --fng-gold:#d4af37;--fng-gold2:#f2d36b;--fng-bg:#07090a;
  --fng-panel:#111416;--fng-text:#f8f7f2;--fng-muted:#92979a;
  max-width:1240px!important;
  margin:32px auto!important;
  padding:20px 24px!important;
  background:linear-gradient(180deg,#0a0c0d,#0e1012)!important;
  border:1px solid rgba(212,175,55,.16)!important;
  border-radius:20px!important;
  color:var(--fng-text)!important;
  box-sizing:border-box!important;
}

.fngs-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}
.fngs-head span{font-size:9px;font-weight:900;letter-spacing:2px;color:var(--fng-gold2)}
.fngs-head h2{margin:5px 0 0;color:#fff;font-size:25px;line-height:1.1;font-weight:900}

/* Center the book blocks instead of stretching them across the shelf. */
.book-grid-3x2,.fn-grid,.book-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(120px,150px))!important;
  justify-content:center!important;
  gap:18px!important;
  box-shadow:0 15px 40px rgba(0,0,0,.2);
}

/* Carousel remains centered and keeps each book at a consistent width. */
.book-carousel{position:relative!important;overflow:hidden!important}
.book-carousel .book-track{
  display:flex!important;
  justify-content:center!important;
  gap:18px!important;
  transition:transform .55s ease!important
}
.book-carousel .book-slide{
  flex:0 0 150px!important;
  min-width:150px!important
}

/* Book cards. */
.book-grid-3x2 .book-card,.fn-grid>a,.book-grid>a,.book-carousel .book-slide{
  min-width:0!important;
  background:#111416!important;
  border:1px solid rgba(255,255,255,.06)!important;
  border-radius:11px!important;
  overflow:hidden!important;
  padding:7px!important;
  box-shadow:0 8px 25px rgba(0,0,0,.24)!important;
  transition:transform .2s,border-color .2s,box-shadow .2s!important;
  position:relative!important;
  box-sizing:border-box!important;
}
.book-grid-3x2 .book-card:hover,.fn-grid>a:hover,.book-grid>a:hover,.book-carousel .book-slide:hover{
  transform:translateY(-4px)!important;
  border-color:rgba(212,175,55,.45)!important;
  box-shadow:0 14px 30px rgba(0,0,0,.4)!important
}

/* Covers never contain the title, so books remain cleanly stackable. */
.book-grid-3x2 img,.fn-grid img,.book-grid img,.book-carousel .book-slide img{
  width:100%!important;
  height:auto!important;
  aspect-ratio:2/3!important;
  object-fit:cover!important;
  border-radius:7px!important;
  display:block!important;
}

/* Tiny title directly below each cover. */
.book-grid-3x2 .book-card .book-title,
.book-grid-3x2 .book-card h3,
.fn-grid>a .book-title,.fn-grid>a h3,
.book-grid>a .book-title,.book-grid>a h3,
.book-carousel .book-slide .book-title,
.book-carousel .book-slide h3{
  display:block!important;
  margin:7px 2px 0!important;
  padding:0!important;
  min-height:26px!important;
  color:#fff!important;
  font-size:9px!important;
  line-height:1.25!important;
  font-weight:700!important;
  text-align:center!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
.book-grid-3x2 .book-card .book-title a,
.book-grid-3x2 .book-card h3 a,
.fn-grid>a .book-title a,.fn-grid>a h3 a,
.book-grid>a .book-title a,.book-grid>a h3 a,
.book-carousel .book-slide .book-title a,
.book-carousel .book-slide h3 a{
  color:#fff!important;text-decoration:none!important
}

/* Hide duplicate title elements that some themes put over the image. */
.book-grid-3x2 .book-card .book-overlay-title,
.fn-grid>a .book-overlay-title,
.book-grid>a .book-overlay-title,
.book-carousel .book-slide .book-overlay-title{
  position:static!important;
  background:transparent!important;
}

/* Existing shelf shortcode. */
.fngs-shelf-block{border:0!important;padding:0!important;background:transparent!important}
.fngs-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(120px,150px));
  justify-content:center;
  gap:18px
}
.fngs-card{
  background:#111416;border:1px solid rgba(255,255,255,.06);
  border-radius:11px;padding:7px;overflow:hidden;box-sizing:border-box
}
.fngs-cover{display:block;position:relative;aspect-ratio:2/3;overflow:hidden;border-radius:7px}
.fngs-cover img{width:100%;height:100%;object-fit:cover}
.fngs-cover span{
  position:absolute;right:7px;bottom:7px;background:var(--fng-gold);
  color:#090909;padding:5px 7px;border-radius:5px;font-size:8px;font-weight:900
}
.fngs-card h3{
  font-size:9px;line-height:1.25;margin:7px 2px 0;color:#fff;
  text-align:center;min-height:26px;overflow:hidden
}
.fngs-card h3 a{color:#fff!important;text-decoration:none}
.fngs-library{
  width:100%;border:1px solid rgba(212,175,55,.45);background:#17191a;
  color:var(--fng-gold2);border-radius:7px;padding:8px 6px;font-size:9px;
  font-weight:900;cursor:pointer;margin-top:7px
}
.fngs-library:hover,.fngs-library.is-saved{
  background:rgba(212,175,55,.13);border-color:var(--fng-gold)
}
.fngs-library:disabled{opacity:.55;cursor:wait}

/* Buttons injected under cards, never over the book/title. */
.fngs-injected{
  display:block!important;width:100%!important;margin-top:7px!important;
  padding:7px 5px!important;border:1px solid rgba(212,175,55,.45)!important;
  background:#17191a!important;color:#f2d36b!important;border-radius:7px!important;
  font-size:8px!important;font-weight:900!important;line-height:1.2!important;
  cursor:pointer!important;box-sizing:border-box!important
}
.fngs-injected.is-saved{background:rgba(212,175,55,.13)!important}
.fngs-injected:disabled{opacity:.55!important}
.carousel-btn{background:var(--fng-gold)!important;color:#090909!important;border:0!important}
.carousel-btn:hover{background:var(--fng-gold2)!important}

@media(max-width:1000px){
  .book-grid-3x2,.fn-grid,.book-grid{grid-template-columns:repeat(4,minmax(120px,150px))!important}
  .book-carousel .book-slide{flex-basis:150px!important;min-width:150px!important}
  .fngs-grid{grid-template-columns:repeat(4,minmax(120px,150px))}
}
@media(max-width:600px){
  .fngs-shelf-block,.book-grid-3x2,.book-carousel,.fn-grid,.book-grid{
    margin:22px 8px!important;padding:14px!important;border-radius:15px!important
  }
  .book-grid-3x2,.fn-grid,.book-grid{
    grid-template-columns:repeat(3,minmax(90px,120px))!important;
    gap:10px!important
  }
  .book-carousel .book-track{gap:10px!important}
  .book-carousel .book-slide{flex-basis:120px!important;min-width:120px!important}
  .fngs-grid{grid-template-columns:repeat(3,minmax(90px,120px));gap:10px}
  .fngs-head h2{font-size:20px}
  .book-grid-3x2 .book-card h3,.fn-grid>a h3,.book-grid>a h3,
  .book-carousel .book-slide h3,.fngs-card h3{font-size:8px!important;min-height:24px!important}
  .fngs-library,.fngs-injected{font-size:8px;padding:7px 3px}
}
@media(max-width:390px){
  .book-grid-3x2,.fn-grid,.book-grid{grid-template-columns:repeat(3,minmax(82px,105px))!important}
  .book-carousel .book-slide{flex-basis:105px!important;min-width:105px!important}
  .fngs-grid{grid-template-columns:repeat(3,minmax(82px,105px))}
}


/* =========================================================
   1.2.0 — CENTERED BOOK ROW + GOLD SECTION HEADERS
   ========================================================= */

/* The shelf itself and every common inner wrapper are centered. */
.fngs-shelf-block,
.book-grid-3x2,
.fn-grid,
.book-grid,
.book-carousel {
  width:100% !important;
  max-width:1240px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}

/* Explicitly center the actual collection, not just its parent. */
.book-grid-3x2,
.fn-grid,
.book-grid {
  display:grid !important;
  grid-template-columns:repeat(6, 150px) !important;
  justify-content:center !important;
  align-content:start !important;
  justify-items:stretch !important;
  align-items:start !important;
  margin-inline:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Prevent old float/flex rules from creating a right-side offset. */
.book-grid-3x2 > *,
.fn-grid > *,
.book-grid > * {
  float:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Carousel cards also sit in a genuinely centered track. */
.book-carousel .book-track {
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-start !important;
  margin:0 auto !important;
  padding:0 !important;
}

/* Beautiful gold section headers instead of plain separators. */
.fngs-section-header {
  width:100%;
  max-width:1240px;
  margin:42px auto 22px;
  text-align:center;
  position:relative;
  box-sizing:border-box;
}

.fngs-section-header .fngs-header-line {
  height:1px;
  width:100%;
  background:linear-gradient(
    90deg,
    transparent 0%,
    rgba(212,175,55,.12) 15%,
    rgba(212,175,55,.8) 35%,
    #f2d36b 50%,
    rgba(212,175,55,.8) 65%,
    rgba(212,175,55,.12) 85%,
    transparent 100%
  );
  position:absolute;
  top:50%;
  left:0;
  z-index:0;
}

.fngs-section-header .fngs-header-title {
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:8px 25px;
  background:#090b0c;
  border:1px solid rgba(212,175,55,.48);
  border-radius:999px;
  box-shadow:
    0 0 0 4px #090b0c,
    0 5px 24px rgba(212,175,55,.10);
  color:#f2d36b;
  font-size:13px;
  line-height:1;
  font-weight:900;
  letter-spacing:2.2px;
  text-transform:uppercase;
  white-space:nowrap;
}

.fngs-section-header .fngs-header-title::before,
.fngs-section-header .fngs-header-title::after {
  content:"✦";
  font-size:8px;
  color:#d4af37;
}

.fngs-section-header .fngs-header-subtitle {
  margin:10px 0 0;
  color:#8f9395;
  font-size:9px;
  letter-spacing:1.4px;
  text-transform:uppercase;
}

/* If the plugin currently uses ordinary separator headings, style them
   as the same gold pill automatically. */
.fngs-shelf-block > hr,
.book-grid-3x2 + hr,
.book-carousel + hr {
  border:0 !important;
  height:1px !important;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(212,175,55,.75),
    transparent
  ) !important;
  margin:34px auto !important;
}

@media(max-width:1000px){
  .book-grid-3x2,
  .fn-grid,
  .book-grid {
    grid-template-columns:repeat(4,150px) !important;
  }
}

@media(max-width:680px){
  .book-grid-3x2,
  .fn-grid,
  .book-grid {
    grid-template-columns:repeat(3,minmax(90px,120px)) !important;
    gap:10px !important;
  }

  .fngs-section-header {
    margin:30px auto 16px;
  }

  .fngs-section-header .fngs-header-title {
    font-size:10px;
    letter-spacing:1.6px;
    padding:7px 18px;
  }
}


/* =========================================================
   1.3.0 — CATEGORY LABEL AT THE HEAD OF EVERY BOOK CARD
   ========================================================= */
.fngs-card-category{
  min-height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0 0 7px;
  padding:4px 5px;
  border-bottom:1px solid rgba(212,175,55,.32);
  color:#f2d36b;
  font-size:7px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:1.1px;
  text-transform:uppercase;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-sizing:border-box;
}
.fngs-card-category span{
  color:#d4af37;
  font-size:6px;
  flex:0 0 auto;
}
.fngs-card-category + .fngs-cover{margin-top:0}

/* The old separator treatment is no longer needed for category grouping. */
.fngs-section-header{display:none!important}
.fngs-shelf-block > hr,
.book-grid-3x2 + hr,
.book-carousel + hr{display:none!important}

@media(max-width:680px){
  .fngs-card-category{
    min-height:21px;
    font-size:6px;
    letter-spacing:.8px;
    gap:4px;
    margin-bottom:5px;
    padding:3px 2px;
  }
  .fngs-card-category span{font-size:5px}
}


/* =========================================================
   1.4.0 — ORNATE PREMIUM GOLD SECTION HEADERS
   Added without removing or changing the existing shelf/card
   styling, library behavior, or responsive card layout.
   ========================================================= */

.fngs-shelf-block > .fngs-section-header {
  --fng-gold:#d4af37;
  --fng-gold-light:#f5d76e;
  width:100% !important;
  max-width:1240px !important;
  margin:8px auto 24px !important;
  padding:0 !important;
  min-height:68px;
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  background:transparent !important;
  border:0 !important;
  overflow:visible !important;
}

/* Long luminous gold line behind the plaque. */
.fngs-section-header .fngs-header-line {
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:50% !important;
  width:100% !important;
  height:1px !important;
  margin:0 !important;
  padding:0 !important;
  background:linear-gradient(
    90deg,
    transparent 0%,
    rgba(212,175,55,.08) 7%,
    rgba(212,175,55,.55) 22%,
    #f5d76e 42%,
    #d4af37 50%,
    #f5d76e 58%,
    rgba(212,175,55,.55) 78%,
    rgba(212,175,55,.08) 93%,
    transparent 100%
  ) !important;
  box-shadow:0 0 7px rgba(212,175,55,.32) !important;
  z-index:0 !important;
}

/* Decorative side flourishes, matching the reference's premium plaque. */
.fngs-section-header::before,
.fngs-section-header::after {
  content:"";
  position:absolute;
  top:50%;
  width:96px;
  height:30px;
  margin-top:-15px;
  z-index:1;
  pointer-events:none;
  opacity:.95;
}

.fngs-section-header::before {
  left:calc(50% - 250px);
  background:
    radial-gradient(circle at 18% 50%, #f5d76e 0 2px, transparent 2.5px),
    linear-gradient(150deg, transparent 42%, #d4af37 43% 46%, transparent 47%),
    linear-gradient(30deg, transparent 42%, #d4af37 43% 46%, transparent 47%);
  transform:scaleX(1);
}

.fngs-section-header::after {
  right:calc(50% - 250px);
  background:
    radial-gradient(circle at 82% 50%, #f5d76e 0 2px, transparent 2.5px),
    linear-gradient(30deg, transparent 42%, #d4af37 43% 46%, transparent 47%),
    linear-gradient(150deg, transparent 42%, #d4af37 43% 46%, transparent 47%);
}

/* The actual gold plaque. */
.fngs-section-header .fngs-header-title {
  position:relative !important;
  z-index:3 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  min-width:250px;
  min-height:52px;
  padding:0 30px !important;
  margin:0 !important;
  background:
    linear-gradient(180deg,#14110a 0%,#080808 55%,#12100a 100%) !important;
  border:1px solid var(--fng-gold) !important;
  border-radius:7px !important;
  box-shadow:
    0 0 0 2px rgba(212,175,55,.10),
    0 0 17px rgba(212,175,55,.20),
    inset 0 0 16px rgba(212,175,55,.07) !important;
  color:#f5d76e !important;
  box-sizing:border-box !important;
}

/* Tiny pointed extensions make the plaque feel ornamental rather than generic. */
.fngs-section-header .fngs-header-title::before,
.fngs-section-header .fngs-header-title::after {
  content:"◆" !important;
  position:absolute !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  color:#f5d76e !important;
  font-size:6px !important;
  line-height:1 !important;
  text-shadow:0 0 8px rgba(245,215,110,.7) !important;
}

.fngs-section-header .fngs-header-title::before { left:9px !important; }
.fngs-section-header .fngs-header-title::after { right:9px !important; }

.fngs-header-text {
  position:relative;
  z-index:2;
  font-family:Georgia,"Times New Roman",serif !important;
  font-size:18px !important;
  line-height:1 !important;
  font-weight:700 !important;
  letter-spacing:2px !important;
  text-transform:uppercase !important;
  color:#f5d76e !important;
  text-shadow:0 1px 0 #6e4e0b,0 0 9px rgba(245,215,110,.18) !important;
  white-space:nowrap !important;
}

.fngs-header-icon {
  position:absolute !important;
  left:50% !important;
  top:-16px !important;
  transform:translateX(-50%) !important;
  width:30px !important;
  height:30px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:50% !important;
  background:#0a0a08 !important;
  border:1px solid #d4af37 !important;
  color:#f5d76e !important;
  font-size:15px !important;
  line-height:1 !important;
  box-shadow:0 0 12px rgba(212,175,55,.28) !important;
  z-index:4 !important;
}

/* Icon variants chosen automatically from the section title. */
.fngs-section-header[data-fngs-title*="Trending" i] .fngs-header-icon::before { content:"♨"; }
.fngs-section-header[data-fngs-title*="Editor's" i] .fngs-header-icon::before { content:"★"; }
.fngs-section-header[data-fngs-title*="Editor" i] .fngs-header-icon::before { content:"★"; }
.fngs-section-header[data-fngs-title*="Completed" i] .fngs-header-icon::before { content:"♕"; }
.fngs-section-header[data-fngs-title*="Featured" i] .fngs-header-icon::before { content:"✦"; }
.fngs-section-header[data-fngs-title*="Just Released" i] .fngs-header-icon::before { content:"♛"; }
.fngs-section-header[data-fngs-title*="New" i] .fngs-header-icon::before { content:"♛"; }

.fngs-section-header .fngs-header-icon {
  font-size:0 !important;
}
.fngs-section-header .fngs-header-icon::before {
  font-size:15px !important;
  color:#f5d76e !important;
}

/* The shortcode grid sits immediately beneath the plaque. */
.fngs-shelf-block > .fngs-grid {
  margin-top:0 !important;
}

/* Preserve the header at smaller widths without allowing it to overflow. */
@media(max-width:680px){
  .fngs-shelf-block > .fngs-section-header {
    min-height:57px;
    margin:4px auto 16px !important;
  }

  .fngs-section-header .fngs-header-title {
    min-width:200px;
    min-height:44px;
    padding:0 22px !important;
  }

  .fngs-header-text {
    font-size:12px !important;
    letter-spacing:1.5px !important;
  }

  .fngs-header-icon {
    width:26px !important;
    height:26px !important;
    top:-13px !important;
  }

  .fngs-section-header::before {
    left:calc(50% - 185px);
    width:70px;
  }
  .fngs-section-header::after {
    right:calc(50% - 185px);
    width:70px;
  }
}

@media(max-width:390px){
  .fngs-section-header .fngs-header-title {
    min-width:175px;
    padding:0 17px !important;
  }

  .fngs-header-text {
    font-size:11px !important;
  }

  .fngs-section-header::before {
    left:calc(50% - 160px);
    width:55px;
  }
  .fngs-section-header::after {
    right:calc(50% - 160px);
    width:55px;
  }
}
