/*
Theme Name: Devoti
Theme URI: https://example.com/prakashan
Author: Custom Build
Description: Devoti Bharat edition — a classic, elegant publication house theme with full WooCommerce support for physical books and eBooks. Inspired by international publishers — ink navy, paper white and gilt gold, with title-page rules and serif typography.
Version: 32.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prakashan
Tags: e-commerce, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================
   1. Tokens
   ========================================================== */
:root {
  --ink: #17233b;        /* deep ink navy — bindings, headers */
  --ink-soft: #22314f;
  --paper: #f7f5ef;      /* warm paper */
  --white: #ffffff;
  --gilt: #a8842c;       /* gold foil accent */
  --gilt-soft: #c9a95a;
  --ribbon: #8c2f39;     /* bookmark ribbon red */
  --text: #2b3242;
  --muted: #68707f;
  --line: #ddd8cc;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Jost", "Segoe UI", sans-serif;

  --w-content: 1160px;
  --w-narrow: 760px;
}

/* ==========================================================
   2. Base
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gilt-soft); text-underline-offset: 3px; }
a:hover { color: var(--ribbon); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gilt);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

.wrap { max-width: var(--w-content); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--w-narrow); margin: 0 auto; padding: 0 24px; }

/* Signature: title-page double rule */
.rule-double {
  border: 0;
  border-top: 1px solid var(--gilt);
  position: relative;
  margin: 0 auto 2.4rem;
  max-width: 220px;
}
.rule-double::after {
  content: "";
  position: absolute;
  top: 4px; left: 18%; right: 18%;
  border-top: 3px solid var(--gilt);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gilt);
  display: block;
  text-align: center;
  margin-bottom: 0.8rem;
}
.section-head { text-align: center; margin-bottom: 0.6rem; }

.btn, .woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 14px 30px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover {
  background: var(--ribbon);
  border-color: var(--ribbon);
  color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-gilt {
  background: var(--gilt);
  border-color: var(--gilt);
}

/* ==========================================================
   3. Header
   ========================================================== */
.site-top {
  background: var(--ink);
  color: #cfd6e4;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 16px;
}
.site-top a { color: var(--gilt-soft); }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  max-width: var(--w-content);
  margin: 0 auto;
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-brand .custom-logo { max-height: 52px; max-width: 220px; width: auto; height: auto; object-fit: contain; display: block; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.site-title .tail { color: var(--gilt); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.main-nav a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav .current-menu-item > a {
  color: var(--ink);
  border-bottom-color: var(--gilt);
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions a { text-decoration: none; font-family: var(--font-ui); font-size: 0.85rem; }
.cart-link { position: relative; }
.cart-count {
  background: var(--ribbon);
  color: var(--white);
  font-size: 0.7rem;
  border-radius: 50%;
  padding: 1px 6px;
  margin-left: 4px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-family: var(--font-ui);
  cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .header-inner { flex-wrap: wrap; }
}

/* ==========================================================
   4. Hero
   ========================================================== */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gilt);
}
.hero h1 { margin: 0.4em 0; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 1.6rem; flex-wrap: wrap; }

/* CSS book stack */
.hero-books { display: flex; gap: 18px; justify-content: center; align-items: flex-end; }
.hero-books .book {
  width: 150px;
  aspect-ratio: 2 / 3;
  background: var(--ink);
  color: var(--paper);
  border-left: 8px solid var(--gilt);
  box-shadow: 14px 18px 30px rgba(23, 35, 59, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  transform: rotate(-2deg);
  overflow: hidden;
}
.hero-books .book img { width: 100%; height: 100%; object-fit: cover; }
.hero-books .book:nth-child(2) { transform: rotate(1.5deg) translateY(-18px); background: var(--ribbon); }
.hero-books .book:nth-child(3) { transform: rotate(4deg); background: var(--ink-soft); }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-books { margin-top: 24px; }
  .hero-books .book { width: 110px; }
}

/* ==========================================================
   5. Sections & book grid
   ========================================================== */
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 34px;
  margin-top: 2.4rem;
}
.book-card { text-align: center; }
.book-card .cover {
  aspect-ratio: 2 / 3;
  background: var(--ink);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(23, 35, 59, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 0;
}
.book-card:hover .cover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(23, 35, 59, 0.26); }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.book-card h3 a { text-decoration: none; }
.book-card .price { font-family: var(--font-ui); color: var(--ribbon); font-size: 0.95rem; }
.book-card .format {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-cta { text-align: center; margin-top: 2.6rem; }

/* Category strip */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 2.4rem;
}
.cat-strip a {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 26px 16px;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cat-strip a:hover { border-color: var(--gilt); transform: translateY(-3px); }
.cat-strip small {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-top: 6px;
}

/* Author band */
.author-band { background: var(--ink); color: #dfe4ee; }
.author-band .eyebrow { color: var(--gilt-soft); }
.author-band h2 { color: var(--white); }
.author-band .rule-double, .author-band .rule-double::after { border-color: var(--gilt-soft); }
.author-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-style: italic;
  text-align: center;
  max-width: 30ch;
  margin: 0 auto 1rem;
  color: var(--paper);
}
.author-band .attribution {
  text-align: center;
  font-family: var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gilt-soft);
}

/* Manuscript CTA */
.manuscript {
  text-align: center;
}
.manuscript p { max-width: 56ch; margin: 0 auto 1.8rem; color: var(--muted); }

/* ==========================================================
   6. Content / blog
   ========================================================== */
.page-title-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 56px 24px;
}
.entry-content, .site-main { padding: 56px 0; }
.post-list article {
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}
.post-list h2 a { text-decoration: none; }
.post-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
}

/* ==========================================================
   7. WooCommerce polish
   ========================================================== */
.woocommerce ul.products li.product { text-align: center; }
.woocommerce ul.products li.product a img {
  box-shadow: 0 10px 24px rgba(23, 35, 59, 0.16);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.woocommerce ul.products li.product .price { color: var(--ribbon); font-family: var(--font-ui); }
.woocommerce div.product p.price { color: var(--ribbon); font-size: 1.4rem; font-family: var(--font-ui); }
.woocommerce span.onsale {
  background: var(--ribbon);
  border-radius: 0;
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-bottom-color: var(--gilt);
}
.woocommerce .star-rating span { color: var(--gilt); }

/* ==========================================================
   8. Footer
   ========================================================== */
.newsletter-band {
  background: var(--gilt);
  color: var(--ink);
  padding: 48px 24px;
  text-align: center;
}
.newsletter-band h2 { color: var(--ink); margin-bottom: 0.3em; }
.newsletter-band form { display: flex; gap: 0; max-width: 480px; margin: 1.4rem auto 0; }
.newsletter-band input[type="email"] {
  flex: 1;
  border: 1px solid var(--ink);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
}
.site-footer {
  background: var(--ink);
  color: #b9c2d4;
  padding: 64px 0 0;
  font-size: 0.95rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.site-footer h3 {
  color: var(--white);
  font-size: 1.05rem;
  font-family: var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #b9c2d4; text-decoration: none; }
.site-footer a:hover { color: var(--gilt-soft); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 24px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
  .newsletter-band form { flex-direction: column; gap: 10px; }
}

/* ==========================================================
   9. Utilities
   ========================================================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }

/* ==========================================================
   10. Animated hero (v2)
   ========================================================== */
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(168, 132, 44, 0.10), transparent 65%),
    radial-gradient(ellipse 40% 40% at 10% 90%, rgba(140, 47, 57, 0.06), transparent 60%);
  pointer-events: none;
}
.hero-inner > div:first-child > * {
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-eyebrow { animation-delay: 0.05s !important; }
.hero h1 { animation-delay: 0.18s !important; }
.hero p.lead { animation-delay: 0.32s !important; }
.hero-actions { animation-delay: 0.46s !important; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-books .book {
  opacity: 0;
  animation: book-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, book-float 7s ease-in-out 1.2s infinite;
}
.hero-books .book:nth-child(1) { animation-delay: 0.35s, 1.2s; }
.hero-books .book:nth-child(2) { animation-delay: 0.5s, 1.6s; }
.hero-books .book:nth-child(3) { animation-delay: 0.65s, 2s; }
@keyframes book-in {
  from { opacity: 0; transform: translateY(46px) rotate(0deg); }
  to   { opacity: 1; }
}
@keyframes book-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}
/* gold shimmer on hero eyebrow underline feel */
.hero-eyebrow {
  background: linear-gradient(90deg, var(--gilt) 0%, var(--gilt-soft) 40%, var(--gilt) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-rise 0.9s cubic-bezier(0.2,0.7,0.2,1) forwards, gilt-shimmer 5s linear 1.4s infinite;
}
@keyframes gilt-shimmer {
  to { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-inner > div:first-child > *, .hero-books .book, .hero-eyebrow { opacity: 1; animation: none !important; }
}

/* ==========================================================
   11. Authors
   ========================================================== */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 34px;
}
.author-card {
  text-align: center;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.author-card:hover {
  transform: translateY(-5px);
  border-color: var(--gilt);
  box-shadow: 0 14px 28px rgba(23, 35, 59, 0.12);
}
.author-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--gilt);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-initial {
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--gilt-soft);
}
.author-card h3 { margin-bottom: 4px; }
.author-role {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt);
}
.author-profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.author-photo-lg { width: 260px; height: 260px; }
.author-socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.social-chip {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 7px 14px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-chip:hover { border-color: var(--gilt); background: var(--ink); color: var(--white); }
@media (max-width: 800px) {
  .author-profile-grid { grid-template-columns: 1fr; text-align: center; }
  .author-photo-lg { margin: 0 auto; }
  .author-socials { justify-content: center; }
}

/* ==========================================================
   12. Forms (Publish With Us / Contact)
   ========================================================== */
.dt-form { max-width: 680px; margin: 2rem auto 0; }
.dt-form label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}
.dt-form input[type="text"], .dt-form input[type="email"], .dt-form input[type="tel"],
.dt-form input[type="url"], .dt-form select, .dt-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
}
.dt-form input:focus, .dt-form select:focus, .dt-form textarea:focus {
  border-color: var(--gilt);
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 132, 44, 0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.dt-hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.form-notice {
  max-width: 680px;
  margin: 1.4rem auto;
  padding: 16px 20px;
  font-family: var(--font-ui);
  text-align: center;
}
.form-notice.success { background: #eaf3ea; border: 1px solid #7aa87a; color: #2c5230; }
.form-notice.error { background: #f7ecec; border: 1px solid #c98787; color: #7a2e2e; }

/* ==========================================================
   13. Book meta on product pages
   ========================================================== */
.book-author-line {
  font-family: var(--font-ui);
  font-size: 1rem;
  margin: 0 0 6px;
}
.book-author-line a { color: var(--ribbon); text-decoration: none; border-bottom: 1px solid var(--gilt-soft); }
.book-isbn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.book-isbn span { color: var(--gilt); text-transform: uppercase; }
.loop-book-author {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================
   14. About page (stylish)
   ========================================================== */
.about-hero {
  background: var(--ink);
  color: #dfe4ee;
  text-align: center;
  padding: 80px 24px 64px;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(168, 132, 44, 0.16), transparent 65%);
}
.about-hero > * { position: relative; }
.about-hero h1 { color: var(--white); }
.about-hero .eyebrow { color: var(--gilt-soft); }
.about-hero .rule-double, .about-hero .rule-double::after { border-color: var(--gilt-soft); }
.about-statement {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  color: var(--paper);
  max-width: 40ch;
  margin: 0 auto;
}
.about-content {
  font-size: 1.08rem;
}
.about-content p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  float: left;
  line-height: 0.85;
  padding: 4px 10px 0 0;
  color: var(--gilt);
}
.division-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 2.2rem;
}
.division-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gilt);
  padding: 34px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.division-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(23, 35, 59, 0.12); }
.division-mark {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gilt);
  display: block;
  margin-bottom: 8px;
}
.leader-card {
  display: flex;
  gap: 30px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px;
  margin-top: 2rem;
}
.leader-card .author-photo { margin: 0; flex-shrink: 0; }
.leader-card p { color: var(--muted); margin-bottom: 0; }
@media (max-width: 800px) {
  .division-grid { grid-template-columns: 1fr; }
  .leader-card { flex-direction: column; text-align: center; }
}

/* ==========================================================
   15. Book info table (product page)
   ========================================================== */
.book-info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}
.book-info-table th, .book-info-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
}
.book-info-table th {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
  width: 40%;
  font-weight: 500;
}

/* ==========================================================
   16. Mobile overhaul
   ========================================================== */
/* WooCommerce grids: proper responsive columns everywhere */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
}
.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

@media (max-width: 782px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .hero-inner { padding: 44px 20px; }
  .wrap, .wrap-narrow { padding: 0 18px; }
  .page-title-band { padding: 40px 18px; }
  .site-main, .entry-content { padding: 36px 0; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
  .woocommerce ul.products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
  .book-card h3, .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1rem; }
  .author-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
  .author-photo { width: 110px; height: 110px; }
  .entry-content table { display: block; overflow-x: auto; }
  .btn { padding: 13px 22px; }
}

@media (max-width: 600px) {
  .header-inner { padding: 12px 16px; gap: 12px; }
  .site-title { font-size: 1.35rem; }
  .site-brand .custom-logo { max-height: 40px; max-width: 150px; }
  .header-actions { gap: 12px; font-size: 0.9rem; }
  .site-top { font-size: 0.7rem; padding: 7px 10px; }
  .hero-books .book { width: 86px; font-size: 0.85rem; padding: 8px; border-left-width: 5px; }
  .hero-actions .btn { flex: 1; text-align: center; min-width: 140px; }
  .cat-strip { grid-template-columns: 1fr 1fr; }
  .division-card { padding: 26px 20px; }
  .leader-card { padding: 24px 18px; }
  .dt-form label { font-size: 0.78rem; }
  .newsletter-band { padding: 40px 18px; }
  .footer-cols { gap: 28px; padding-bottom: 36px; }
  .woocommerce div.product div.images, .woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
  }
  .about-hero { padding: 56px 18px 44px; }
}

@media (max-width: 400px) {
  .book-grid, .woocommerce ul.products { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cat-strip { grid-template-columns: 1fr; }
}

/* ==========================================================
   17. Built-in bookstore (no WooCommerce)
   ========================================================== */
.book-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-chip {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  padding: 8px 18px;
  transition: all 0.2s ease;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.single-book-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: start;
}
.single-book-cover img, .cover-placeholder {
  width: 100%;
  box-shadow: 18px 22px 44px rgba(23, 35, 59, 0.24);
}
.cover-placeholder {
  aspect-ratio: 2 / 3;
  background: var(--ink);
  color: var(--paper);
  border-left: 10px solid var(--gilt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 24px;
  text-align: center;
}
.single-book-info h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.book-buy { margin: 20px 0 8px; }
.book-price-display {
  font-family: var(--font-ui);
  font-size: 1.7rem;
  color: var(--ribbon);
  margin-bottom: 14px;
}
.format-select { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.format-option {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 18px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  min-width: 118px;
}
.format-option input { position: absolute; opacity: 0; }
.format-option .fmt-name {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.format-option .fmt-price {
  display: block;
  font-family: var(--font-ui);
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 3px;
}
.format-option.selected {
  border-color: var(--gilt);
  box-shadow: 0 0 0 2px var(--gilt);
  background: var(--paper);
}
.format-option.selected .fmt-price { color: var(--ribbon); }
.format-option:focus-within { outline: 2px solid var(--gilt); outline-offset: 2px; }
.book-order-btn { font-size: 0.95rem; padding: 15px 38px; }
@media (max-width: 860px) {
  .single-book-grid { grid-template-columns: 1fr; gap: 30px; }
  .single-book-cover { max-width: 300px; margin: 0 auto; }
}

/* ==========================================================
   18. Devoti 4 — HC-style hero carousel
   ========================================================== */
.hero-hc .hero-inner { grid-template-columns: 1fr 1fr; }
.hero-carousel {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-decoration: none;
  transform: translateX(100%);
  transition: none;
  pointer-events: none;
}
.hero-slide.is-prev { transform: translateX(-100%); transition: transform 0.7s cubic-bezier(0.45, 0.05, 0.15, 1); }
.hero-slide.active { transform: translateX(0); transition: transform 0.7s cubic-bezier(0.45, 0.05, 0.15, 1); pointer-events: auto; }
.hero-slide-cover {
  display: block;
  width: min(280px, 60vw);
  aspect-ratio: 2 / 3;
  box-shadow: 20px 26px 50px rgba(23, 35, 59, 0.28);
  overflow: hidden;
}
.hero-slide-cover img, .hero-slide-cover .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }
.hero-slide-caption { text-align: center; color: var(--ink); }
.hero-slide-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}
.hero-slide-caption em {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
}
.hero-next {
  position: absolute;
  right: 0;
  bottom: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.hero-next-arrow { font-size: 1.8rem; line-height: 1; transition: transform 0.25s ease; }
.hero-next:hover .hero-next-arrow { transform: translateX(8px); color: var(--ribbon); }
@media (max-width: 900px) {
  .hero-hc .hero-inner { grid-template-columns: 1fr; }
  .hero-carousel { min-height: 400px; margin-top: 12px; }
}

/* ==========================================================
   19. Discover tabs
   ========================================================== */
.discover-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 2rem;
}
.discover-head h2 { margin-bottom: 0.3em; }
.discover-head p { color: var(--muted); margin: 0; max-width: 52ch; }
.discover-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.tab-chip {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-chip:hover { border-color: var(--gilt); }
.tab-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  box-shadow: 0 6px 14px rgba(23, 35, 59, 0.2);
}
.tab-panel { display: none; animation: panel-in 0.45s ease; }
.tab-panel.active { display: grid; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 860px) {
  .discover-head { grid-template-columns: 1fr; text-align: center; }
  .discover-head p { margin: 0 auto; }
  .discover-tabs { justify-content: center; }
}

/* ==========================================================
   20. First Chapter box + audio
   ========================================================== */
.first-chapter { background: var(--ink); }
.first-chapter .eyebrow { color: var(--gilt-soft); }
.first-chapter h2, .first-chapter .fc-body { color: var(--paper); }
.first-chapter .book-author-line a { color: var(--gilt-soft); }
.fc-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.fc-cover img, .fc-cover .cover-placeholder {
  width: 100%;
  box-shadow: 18px 22px 44px rgba(0, 0, 0, 0.4);
}
.fc-reader {
  background: var(--paper);
  color: var(--text);
  padding: 28px 32px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 1.02rem;
  line-height: 1.85;
  margin: 18px 0;
  border-left: 4px solid var(--gilt);
}
.fc-reader p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em;
  float: left;
  line-height: 0.85;
  padding: 4px 8px 0 0;
  color: var(--ribbon);
}
.fc-audio {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.fc-audio-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt-soft);
}
.fc-audio audio { max-width: 100%; }
@media (max-width: 820px) {
  .fc-grid { grid-template-columns: 1fr; }
  .fc-cover { max-width: 240px; margin: 0 auto; }
}

/* ==========================================================
   21. HC-style single book
   ========================================================== */
.single-book-grid { grid-template-columns: 330px 1fr; gap: 60px; }
.single-book-cover { max-width: 330px; }
.hc-author a {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--gilt);
}
.book-excerpt { color: var(--muted); margin: 14px 0 4px; max-width: 60ch; }
.read-more-link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ribbon);
}
.hc-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin: 22px 0 6px; }
.hc-buy .book-price-display { margin: 0; font-size: 2rem; }
.hc-available { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hc-available-label, .hc-samples .hc-available-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.hc-buy .format-select { margin: 0; }
.hc-meta-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.98rem;
  margin: 16px 0;
}
.hc-meta-row strong { font-family: var(--font-ui); font-weight: 500; color: var(--gilt); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; }
.hc-samples { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 20px; }
.sample-chip {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 18px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.sample-chip:hover { border-color: var(--gilt); background: var(--white); }
.fc-single .fc-reader { max-height: 420px; }
.single-book .book-info-table { max-width: 480px; margin-top: 24px; }
@media (max-width: 860px) {
  .single-book-grid { grid-template-columns: 1fr; gap: 26px; }
  .single-book-cover { max-width: 240px; margin: 0 auto; }
  .hc-buy { gap: 16px; }
}

/* ==========================================================
   22. Search overlay
   ========================================================== */
.search-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
}
.search-toggle:hover { color: var(--ribbon); }
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 35, 59, 0.97);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-inner { width: min(640px, 90vw); text-align: center; }
.search-overlay .eyebrow { color: var(--gilt-soft); }
.search-overlay form { display: flex; gap: 0; margin-top: 14px; }
.search-overlay input[type="search"] {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--gilt);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  padding: 10px 6px;
}
.search-overlay input[type="search"]::placeholder { color: rgba(247, 245, 239, 0.4); }
.search-overlay input[type="search"]:focus { outline: none; border-bottom-color: var(--white); }
.search-hint {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(247, 245, 239, 0.55);
  margin-top: 16px;
}
.search-close {
  position: absolute;
  top: 22px;
  right: 30px;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}
.search-close:hover { color: var(--gilt-soft); }

/* ==========================================================
   23. Blog / press cards + press single
   ========================================================== */
.post-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 34px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(23, 35, 59, 0.12); }
.post-card-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gilt-soft);
}
.post-card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 8px; }
.post-card-body h3 { font-size: 1.25rem; margin: 0; }
.post-card-body h3 a { text-decoration: none; }
.post-card-body p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.post-card-body .read-more-link { margin-top: 4px; text-decoration: none; }
.press-band { background: var(--ink); padding: 64px 0; }
.press-band .post-meta { color: var(--gilt-soft); }
.press-band h1 { color: var(--white); margin-top: 8px; }
.press-band-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}
.press-band-img img { width: 100%; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); }
@media (max-width: 820px) {
  .press-band-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   24. Contact cards
   ========================================================== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 2rem;
}
.contact-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--gilt);
  background: var(--white);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(23, 35, 59, 0.1); }
.contact-card-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 6px;
}
.contact-card strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; word-break: break-word; }

/* Footer social */
.footer-social { display: flex; gap: 12px; margin: 16px 0 8px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #b9c2d4;
  transition: all 0.2s ease;
}
.footer-social a:hover { background: var(--gilt); border-color: var(--gilt); color: var(--ink); }
.footer-email a { color: var(--gilt-soft); }

/* ==========================================================
   25. Safety: overlay can never render in page flow
   ========================================================== */
.search-overlay[hidden] { display: none !important; }

/* ==========================================================
   26. Devoti 6 — HC-style blog band & toolbar
   ========================================================== */
.blog-band { background: var(--white); border-bottom: 1px solid var(--line); }
.blog-band-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  min-height: 320px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.blog-band h1 { margin-bottom: 0.3em; }
.blog-band p { color: var(--muted); max-width: 46ch; font-size: 1.1rem; }
.blog-band-art { position: relative; height: 240px; }
.art-book {
  position: absolute;
  width: 120px;
  height: 180px;
  border-left: 7px solid var(--gilt);
  box-shadow: 12px 16px 30px rgba(23, 35, 59, 0.22);
  animation: art-float 7s ease-in-out infinite;
}
.art-book.b1 { background: var(--ink); left: 12%; top: 30px; transform: rotate(-6deg); }
.art-book.b2 { background: var(--ribbon); left: 40%; top: 0; transform: rotate(2deg); animation-delay: 0.8s; }
.art-book.b3 { background: var(--ink-soft); left: 66%; top: 44px; transform: rotate(7deg); animation-delay: 1.6s; }
@keyframes art-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -12px; }
}
.blog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.blog-tabs { display: flex; gap: 10px; }
.blog-tabs .tab-chip { text-decoration: none; }
.blog-search {
  display: flex;
  border: 1px solid var(--line);
  background: var(--white);
  min-width: min(340px, 100%);
}
.blog-search input {
  flex: 1;
  border: 0;
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  background: transparent;
}
.blog-search input:focus { outline: none; }
.blog-search button { background: none; border: 0; padding: 0 16px; cursor: pointer; }
.editors-pick {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px;
  margin-bottom: 44px;
}
.pick-thumb { display: block; aspect-ratio: 16 / 11; overflow: hidden; background: var(--ink); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-body h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.pick-body h2 a { text-decoration: none; }
.pick-body p { color: var(--muted); margin-bottom: 1.4rem; }
.blog-empty { text-align: center; padding: 70px 20px; }
@media (max-width: 820px) {
  .blog-band-grid { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .blog-band p { margin: 0 auto; }
  .blog-band-art { display: none; }
  .editors-pick { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
  .blog-toolbar { justify-content: center; }
}

/* ==========================================================
   27. Devoti 7 — hero dots
   ========================================================== */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gilt);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot.active { background: var(--gilt); transform: scale(1.25); }
.hero-slide-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================
   28. Devoti 8 — HC hero groups (3 books per slide)
   ========================================================== */
.hero-carousel-hc { min-height: 430px; }
.hero-carousel-hc .hero-slide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
  align-content: center;
}
.hs-item { text-decoration: none; text-align: center; }
.hs-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: 10px 14px 28px rgba(23, 35, 59, 0.24);
  transition: transform 0.25s ease;
  background: var(--ink);
}
.hs-item:hover .hs-cover { transform: translateY(-6px); }
.hs-cover img, .hs-cover .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }
.hs-cover .cover-placeholder { display: flex; align-items: center; justify-content: center; font-size: 1rem; padding: 10px; border-left-width: 6px; }
.hs-caption { display: block; margin-top: 12px; color: var(--ink); }
.hs-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}
.hs-caption em {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
}
.hero-carousel-hc .hero-dots { bottom: -8px; }
@media (max-width: 900px) {
  .hero-carousel-hc { min-height: 350px; }
  .hero-carousel-hc .hero-slide { gap: 12px; }
  .hs-caption strong { font-size: 0.9rem; }
}

/* ==========================================================
   29. PDF sample reader
   ========================================================== */
.pdf-frame {
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 10px solid var(--ink);
  box-shadow: 0 24px 48px rgba(23, 35, 59, 0.18);
  padding: 14px;
}
.pdf-frame iframe {
  width: 100%;
  height: min(75vh, 720px);
  border: 0;
  background: var(--paper);
}
@media (max-width: 640px) {
  .pdf-frame iframe { height: 62vh; }
}

/* ==========================================================
   30. Popup announcement — v2 (center + corner variants)
   ========================================================== */
.dt-popup { position: fixed; z-index: 300; opacity: 0; transition: opacity 0.3s ease; }
.dt-popup.open { opacity: 1; }
.dt-popup[hidden] { display: none !important; }
.dt-popup-box {
  position: relative;
  background: var(--paper);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  border-top: 4px solid var(--gilt);
}

/* Center variant — full modal, image + text side by side */
.dt-popup-center {
  inset: 0;
  background: rgba(23, 35, 59, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dt-popup-center .dt-popup-box {
  max-width: 700px;
  width: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.dt-popup-center.open .dt-popup-box { transform: none; }
.dt-popup-center .dt-popup-img { background: var(--ink); }
.dt-popup-center .dt-popup-img img { width: 100%; height: 100%; object-fit: cover; }

/* Corner variant — small toast card, bottom-right */
.dt-popup-corner {
  right: 20px;
  bottom: 20px;
  left: auto;
  top: auto;
}
.dt-popup-corner .dt-popup-box {
  width: min(340px, calc(100vw - 40px));
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.dt-popup-corner.open .dt-popup-box { transform: none; }
.dt-popup-corner .dt-popup-img { height: 140px; background: var(--ink); overflow: hidden; }
.dt-popup-corner .dt-popup-img img { width: 100%; height: 100%; object-fit: cover; }
.dt-popup-corner .dt-popup-body { padding: 20px 22px 22px; }
.dt-popup-corner .dt-popup-body h3 { font-size: 1.2rem; }

.dt-popup-img { background: var(--ink); }
.dt-popup-img img { width: 100%; height: 100%; object-fit: cover; }
.dt-popup-body { padding: 34px 30px; align-self: center; }
.dt-popup-body h3 { font-size: 1.6rem; margin-bottom: 8px; }
.dt-popup-body p { color: var(--muted); margin-bottom: 1.2rem; }
.dt-popup-dismiss {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}
.dt-popup-close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
}
.dt-popup-close:hover { color: var(--ribbon); }
@media (max-width: 620px) {
  .dt-popup-center .dt-popup-box { grid-template-columns: 1fr; max-width: 420px; }
  .dt-popup-center .dt-popup-img { max-height: 200px; overflow: hidden; }
  .dt-popup-corner { right: 12px; bottom: 12px; left: 12px; }
  .dt-popup-corner .dt-popup-box { width: 100%; }
}

/* Blog band photo (customizer image) */
.blog-band-photo { height: 100%; min-height: 260px; overflow: hidden; }
.blog-band-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================
   31. Devoti 10 — search button + book-page spacing
   ========================================================== */
.search-toggle {
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 16px 7px 12px !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-toggle:hover { border-color: var(--gilt); background: var(--paper); color: var(--ink); }
.search-toggle svg { flex-shrink: 0; }

/* Book page: clearer visual rhythm between sections */
.book-excerpt { padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.hc-buy { padding: 22px 0; border-bottom: 1px solid var(--line); margin-top: 0; }
.hc-meta-row { padding-bottom: 18px; }
.hc-samples { padding-bottom: 4px; }

/* ==========================================================
   32. Audiobooks — homepage band (HC style: photo + text, then list)
   ========================================================== */
.audiobook-band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ab-band-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  min-height: 0;
  border: 1px solid var(--line);
}
.ab-band-photo { position: relative; background: var(--ink); overflow: hidden; min-height: 170px; }
.ab-photo-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.ab-wave {
  width: 7px; height: 48px; background: var(--gilt-soft); border-radius: 4px;
  animation: ab-wave-anim 1.6s ease-in-out infinite;
}
.ab-wave:nth-child(2) { height: 80px; animation-delay: 0.2s; background: var(--gilt); }
.ab-wave:nth-child(3) { height: 34px; animation-delay: 0.4s; }
@keyframes ab-wave-anim {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.ab-band-text { padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.ab-band-text h2 { margin-bottom: 0.4em; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.12; }
.ab-band-text p { color: var(--muted); font-size: 1rem; line-height: 1.55; }
/* List: responsive grid so nothing gets cut off; light entrance animation. */
.ab-band-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: center;
  gap: 18px 26px;
  margin-top: 26px;
}
.ab-divider { display: none; }
.ab-band-item {
  display: flex; align-items: center; gap: 12px;
  animation: ab-fade-up 0.6s ease both;
}
@keyframes ab-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-band-item { animation: none; }
}
.ab-band-cover { display: block; width: 62px; aspect-ratio: 2/3; box-shadow: 6px 8px 16px rgba(23,35,59,0.18); flex-shrink: 0; transition: transform 0.25s ease; }
.ab-band-item:hover .ab-band-cover { transform: translateY(-4px); }
.ab-band-cover img, .ab-band-cover .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }
.ab-band-item h4 { font-size: 1rem; margin: 0 0 5px; line-height: 1.2; }
.ab-band-item h4 a { text-decoration: none; }
.ab-play-link {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ribbon);
  text-decoration: none;
}
.ab-band-more { align-self: center; }
.ab-band-more a {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px solid var(--gilt);
  padding-bottom: 3px;
}
@media (max-width: 860px) {
  .ab-band-grid { grid-template-columns: 1fr; }
  .ab-band-photo { height: 150px; min-height: 150px; }
  .ab-band-text { padding: 26px 22px; }
}
@media (max-width: 600px) {
  .ab-band-list { gap: 16px; }
  .ab-band-cover { width: 58px; }
}

/* ==========================================================
   33. Audiobooks — dedicated page grid
   ========================================================== */
.audiobook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}
.audiobook-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  padding: 20px;
  align-items: flex-start;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.audiobook-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(23,35,59,0.1); }
.ab-cover { display: block; width: 90px; aspect-ratio: 2/3; flex-shrink: 0; box-shadow: 6px 8px 16px rgba(23,35,59,0.16); }
.ab-cover img, .ab-cover .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }
.ab-body { flex: 1; min-width: 0; }
.ab-body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.ab-body h3 a { text-decoration: none; }
.ab-player { margin-top: 12px; }
.ab-player audio { width: 100%; max-width: 100%; }

/* ==========================================================
   34. Devoti 11 — GLOBAL MOBILE OVERFLOW FIX
   ========================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
* { min-width: 0; }
img, svg, iframe, video, audio { max-width: 100%; }
table { max-width: 100%; }

@media (max-width: 480px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .site-top { padding: 7px 12px; word-break: break-word; }
  .hero-inner { padding: 36px 16px; }
  .page-title-band { padding: 36px 16px; }
  h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); word-break: break-word; }
  .btn { padding: 12px 18px; font-size: 0.78rem; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { min-width: 0; flex: 1 1 auto; }
  .rule-double { max-width: 160px; }
  .book-grid, .woocommerce ul.products, .audiobook-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .book-card .cover { box-shadow: 0 6px 14px rgba(23,35,59,0.14); }
  .book-card h3 { font-size: 0.92rem; }
  .author-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .author-photo { width: 90px; height: 90px; }
  .cat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-strip a { padding: 18px 10px; font-size: 1rem; }
  .discover-tabs { justify-content: center; width: 100%; }
  .tab-chip { padding: 8px 14px; font-size: 0.72rem; }
  .single-book-grid { gap: 20px; }
  .single-book-cover { max-width: 190px; }
  .hc-buy { flex-direction: column; align-items: flex-start; gap: 14px; }
  .format-select { width: 100%; }
  .format-option { flex: 1 1 auto; min-width: 90px; padding: 10px 8px; }
  .hc-meta-row { gap: 14px; flex-direction: column; }
  .hc-samples { gap: 8px; }
  .sample-chip { font-size: 0.78rem; padding: 8px 12px; }
  .book-info-table { font-size: 0.85rem; }
  .book-info-table th, .book-info-table td { padding: 7px 8px; }
  .pdf-frame { padding: 8px; border-left-width: 6px; }
  .fc-reader { padding: 18px 16px; }
  .author-profile-grid { gap: 16px; }
  .author-photo-lg { width: 160px; height: 160px; }
  .division-grid { gap: 16px; }
  .leader-card { gap: 14px; }
  .contact-cards { grid-template-columns: 1fr; }
  .dt-form .form-row { gap: 12px; }
  .footer-cols { padding-bottom: 24px; gap: 22px; }
  .site-footer h3 { font-size: 0.92rem; }
  .newsletter-band { padding: 32px 16px; }
  .newsletter-band form { flex-direction: column; }
  .newsletter-band input[type="email"] { width: 100%; }
  .hero-carousel-hc .hero-slide { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .hs-caption strong { font-size: 0.8rem; }
  .hs-caption em { font-size: 0.62rem; }
  .hero-next { font-size: 0.68rem; }
  .search-overlay-inner { width: 92vw; }
  .search-overlay input[type="search"] { font-size: 1.2rem; }
  .dt-popup-box { max-width: 92vw; }
  .ab-band-text { padding: 24px 18px; }
  .ab-band-list { gap: 14px; }
  .post-card-grid { grid-template-columns: 1fr; }
  .editors-pick { padding: 16px; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-search { width: 100%; }
  .press-band { padding: 40px 0; }
}

/* Prevent any accidental horizontal overflow from wide inline content */
.entry-content, .fc-reader, .book-excerpt { overflow-wrap: break-word; word-break: break-word; }

/* ==========================================================
   35. Devoti 11 — Blog page polish
   ========================================================== */
.blog-pick-head { margin-top: 30px; }
.blog-more-head { margin-top: 56px; }
.editors-pick { position: relative; }
.editors-pick::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 46px; height: 3px;
  background: var(--gilt);
}
.pick-thumb { position: relative; }
.pick-thumb::after {
  content: "\2605";
  position: absolute;
  top: 12px; left: 12px;
  background: var(--ink);
  color: var(--gilt-soft);
  font-size: 0.7rem;
  padding: 5px 10px;
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
}
.post-card { position: relative; }
.post-card-body .post-meta { color: var(--gilt); }
.blog-tabs .tab-chip { text-decoration: none; display: inline-block; }
.blog-empty { position: relative; padding: 90px 20px; }
.blog-empty h2 { margin: 0.3em 0; }
.blog-empty p { color: var(--muted); max-width: 46ch; margin: 0 auto; }

@media (max-width: 480px) {
  .blog-band h1 { font-size: clamp(1.8rem, 8vw, 2.2rem); }
  .blog-pick-head, .blog-more-head { margin-top: 30px; }
  .pick-thumb::after { font-size: 0.62rem; padding: 4px 8px; }
}

/* ==========================================================
   36. Devoti 12 — Article (single post) editorial design
   ========================================================== */
.post-hero { background: var(--white); border-bottom: 1px solid var(--line); }
.post-hero-inner { text-align: center; padding: 60px 24px 36px; }
.post-hero-inner h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 22ch; margin: 0.3em auto; }
.post-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 1.4rem;
}
.byline-avatar img { border-radius: 50%; display: block; border: 2px solid var(--gilt-soft); }
.byline-text { text-align: left; font-family: var(--font-ui); font-size: 0.85rem; }
.byline-text strong { display: block; color: var(--ink); }
.byline-text span { color: var(--muted); font-size: 0.8rem; }
.post-hero-image {
  margin-top: 8px;
  padding-bottom: 48px;
}
.post-hero-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  box-shadow: 0 24px 48px rgba(23, 35, 59, 0.16);
}

.post-body-grid {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 32px;
  padding-top: 56px;
}
.post-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 100px;
  align-self: start;
}
.share-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt);
  writing-mode: vertical-rl;
  margin-bottom: 6px;
}
.post-share a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: all 0.2s ease;
}
.post-share a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.post-entry-content { font-size: 1.12rem; line-height: 1.9; }
.post-entry-content > *:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  float: left;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--gilt);
}
.post-entry-content h2 { margin-top: 2em; font-size: 1.6rem; }
.post-entry-content h3 { margin-top: 1.6em; font-size: 1.3rem; }
.post-entry-content p { margin-bottom: 1.4em; }
.post-entry-content blockquote {
  border-left: 4px solid var(--gilt);
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
}
.post-entry-content img { margin: 1.6em 0; box-shadow: 0 14px 28px rgba(23,35,59,0.14); }
.post-entry-content a { color: var(--ribbon); }

.post-author-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gilt);
  padding: 28px;
  margin-top: 56px;
}
.author-card-avatar img { border-radius: 50%; display: block; }
.post-author-card h3 { margin: 2px 0 8px; }
.post-author-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

@media (max-width: 760px) {
  .post-body-grid { grid-template-columns: 1fr; }
  .post-share {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 24px;
  }
  .share-label { writing-mode: horizontal-tb; margin-bottom: 0; }
  .post-hero-inner { padding: 44px 16px 28px; }
  .post-entry-content { font-size: 1.02rem; }
  .post-author-card { flex-direction: column; text-align: center; padding: 22px; }
}

/* ==========================================================
   37. Devoti 13 — Blog headline, spacing, contact, audiobooks
   ========================================================== */

/* Better blog/press headline treatment */
.blog-band h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  position: relative;
  display: inline-block;
}
.blog-band-grid > div:first-child { text-align: left; }
.blog-band h1::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  background: var(--gilt);
  margin-top: 14px;
}
.pick-body h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.2;
}
.post-card-body h3 {
  font-size: 1.3rem;
  line-height: 1.3;
}
.byline-centered { text-align: center; }
.post-hero-inner { padding-top: 64px; }

/* Publish With Us / Contact form: breathing room before Newsletter band */
.dt-form { margin-bottom: 4rem; }
.manuscript, .site-main > .wrap-narrow:last-child { margin-bottom: 1rem; }
main.site-main { padding-bottom: 24px; }
@media (max-width: 640px) {
  .dt-form { margin-bottom: 3rem; }
  main.site-main { padding-bottom: 40px; }
}

/* Contact page social icons */
.contact-social { text-align: center; margin: 2.5rem 0 1rem; }
.contact-social-icons { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.contact-social-icons a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: all 0.2s ease;
}
.contact-social-icons a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Audiobooks page — mobile polish */
@media (max-width: 640px) {
  .audiobook-grid { grid-template-columns: 1fr; gap: 16px; }
  .audiobook-card { flex-direction: row; padding: 16px; gap: 14px; }
  .ab-cover { width: 74px; }
  .ab-body h3 { font-size: 1rem; }
  .ab-player audio { height: 34px; }
  .page-title-band p { font-size: 0.92rem; }
}
@media (max-width: 400px) {
  .audiobook-card { flex-direction: column; align-items: center; text-align: center; }
  .ab-cover { width: 100px; }
}

/* ==========================================================
   38. Devoti 14 — First Chapter box: clearly separated panels
   ========================================================== */
.fc-panel {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.fc-panel-info { border-top: 0; padding-top: 0; }
.fc-panel-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gilt-soft);
  margin-bottom: 10px;
}
.fc-panel-reading .fc-reader { margin: 0 0 14px; }
.fc-panel-audio { display: flex; flex-direction: column; gap: 8px; }
.fc-panel-audio .fc-audio-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--paper);
}
.fc-panel-audio audio { width: 100%; max-width: 420px; }
.first-chapter .btn.btn-gilt { margin-top: 20px; }

/* ==========================================================
   39. Devoti 17 — Flipbook reader (page-turn, no-download feel)
   ========================================================== */
.devoti-flipbook {
  max-width: 720px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}
.flipbook-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 640px;
  margin: 0 auto;
  perspective: 1800px;
  background: var(--ink);
  box-shadow: 0 30px 60px rgba(23, 35, 59, 0.3);
}
.flipbook-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotateY(0deg);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1), opacity 0.1s linear 0.25s;
  backface-visibility: hidden;
  pointer-events: none;
}
.flipbook-page.is-current {
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.flipbook-page.is-leaving {
  transform: rotateY(-140deg);
  opacity: 1;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.flipbook-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
  pointer-events: none;
}
.flipbook-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(23, 35, 59, 0.55);
  color: var(--paper);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 5;
  transition: background 0.2s ease;
}
.flipbook-arrow:hover { background: var(--gilt); color: var(--ink); }
.flipbook-prev { left: 10px; }
.flipbook-next { right: 10px; }
.flipbook-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
}
.flipbook-fs {
  background: none;
  border: 1px solid var(--line);
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.flipbook-fs:hover { border-color: var(--gilt); }
.devoti-flipbook:fullscreen .flipbook-stage,
.devoti-flipbook:-webkit-full-screen .flipbook-stage {
  max-height: 92vh;
  height: 92vh;
}
@media (max-width: 600px) {
  .flipbook-stage { max-height: 480px; }
  .flipbook-arrow { width: 36px; height: 36px; font-size: 0.95rem; }
}

/* ==========================================================
   40. Devoti 17 — Upcoming / Special Promotion band
   ========================================================== */
.upcoming-band {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  position: relative;
  overflow: hidden;
}
.upcoming-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 20% 30%, rgba(168, 132, 44, 0.14), transparent 65%);
}
.upcoming-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.upcoming-cover { position: relative; display: flex; justify-content: center; }
.upcoming-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ribbon);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 18px;
  z-index: 3;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.upcoming-cover-frame {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 2 / 3;
  animation: upcoming-float 6s ease-in-out infinite;
}
@keyframes upcoming-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.upcoming-cover-frame img, .upcoming-cover-frame .cover-placeholder {
  width: 100%; height: 100%; object-fit: cover;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  position: relative; z-index: 2;
}
.upcoming-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(168, 132, 44, 0.35), transparent 70%);
  z-index: 1;
  filter: blur(10px);
}
.upcoming-text { color: var(--paper); }
.upcoming-text h2 { color: var(--white); font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.upcoming-text .book-author-line a { color: var(--gilt-soft); }
.upcoming-desc { color: #cfd6e4; max-width: 56ch; margin: 1rem 0 1.6rem; font-size: 1.05rem; }
@media (max-width: 860px) {
  .upcoming-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .upcoming-text { text-align: center; }
  .upcoming-text .eyebrow { text-align: center !important; }
  .upcoming-desc { margin-left: auto; margin-right: auto; }
}

/* ==========================================================
   41. Devoti 19 — first-chapter description + PDF flipbook (real)
   ========================================================== */
.fc-desc { color: #cfd6e4; max-width: 52ch; margin: 0.6rem 0 0; }

.devoti-pdf-flipbook {
  max-width: 780px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}
.pdfb-stage {
  position: relative;
  background: var(--ink);
  box-shadow: 0 30px 60px rgba(23, 35, 59, 0.3);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
.pdfb-spread {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}
.pdfb-canvas {
  max-width: 48%;
  height: auto;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.pdfb-canvas.pdfb-left { border-radius: 2px 0 0 2px; }
.pdfb-canvas.pdfb-right { border-radius: 0 2px 2px 0; }
.pdfb-loading {
  position: absolute;
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  display: none;
}
.pdfb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(23, 35, 59, 0.6);
  color: var(--paper);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  z-index: 5;
  transition: background 0.2s ease;
}
.pdfb-arrow:hover { background: var(--gilt); color: var(--ink); }
.pdfb-prev { left: 10px; }
.pdfb-next { right: 10px; }
.pdfb-thumbs {
  position: absolute;
  inset: 0;
  background: rgba(23, 35, 59, 0.95);
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  align-content: flex-start;
  z-index: 10;
}
.pdfb-thumb {
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.pdfb-thumb:hover { transform: scale(1.06); }
.pdfb-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
}
.pdfb-btn {
  background: none;
  border: 1px solid var(--line);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.pdfb-btn:hover { border-color: var(--gilt); }
.pdfb-count { min-width: 60px; text-align: center; }
@media (max-width: 640px) {
  .pdfb-stage { min-height: 260px; padding: 10px; }
  .pdfb-arrow { width: 34px; height: 34px; font-size: 0.85rem; }
}

/* ==========================================================
   42. Devoti 20 — final mobile pass for newer components
   ========================================================== */
@media (max-width: 640px) {
  .devoti-pdf-flipbook { max-width: 100%; }
  .pdfb-bar { flex-wrap: wrap; gap: 10px; }
  .pdfb-count { min-width: 46px; font-size: 0.8rem; }
  .pdfb-btn { width: 30px; height: 30px; font-size: 0.85rem; }
  .pdfb-canvas { max-width: 46%; }
  .pdfb-thumbs { padding: 12px; gap: 8px; }
}
@media (max-width: 400px) {
  .pdfb-stage { min-height: 200px; padding: 6px; }
  .pdfb-arrow { width: 28px; height: 28px; font-size: 0.72rem; }
  .pdfb-canvas { max-width: 44%; }
}

@media (max-width: 860px) {
  .hero-carousel { min-height: 380px; }
  .hero-track { inset: 0; }
}
@media (max-width: 480px) {
  .hero-carousel { min-height: 340px; }
  .upcoming-cover-frame { width: min(220px, 60vw); }
  .dt-popup-box { grid-template-columns: 1fr; }
}

/* ==========================================================
   43. Devoti 23 — Reading Desk (new simple PDF reader, no CDN)
   ========================================================== */
.reading-desk {
  max-width: 780px;
  margin: 0 auto;
  background: #f3ead9;
  border: 1px solid #d8c9a3;
  box-shadow: 0 20px 44px rgba(23, 35, 59, 0.16);
  padding: 0;
}
.reading-desk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  padding: 12px 20px;
}
.reading-desk-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gilt-soft);
}
.reading-desk-expand {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  border: 1px solid rgba(247, 245, 239, 0.35);
  padding: 5px 12px;
  transition: all 0.2s ease;
}
.reading-desk-expand:hover { background: var(--gilt); color: var(--ink); border-color: var(--gilt); }
.reading-desk-frame {
  background: #fff;
  padding: 6px;
}
.reading-desk-frame iframe {
  width: 100%;
  height: min(78vh, 760px);
  border: 0;
  display: block;
  background: #fff;
}
.reading-desk-hint {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 10px 16px 16px;
  margin: 0;
}
.reading-desk:fullscreen .reading-desk-frame iframe,
.reading-desk:-webkit-full-screen .reading-desk-frame iframe {
  height: 90vh;
}
@media (max-width: 640px) {
  .reading-desk-frame iframe { height: 70vh; }
  .reading-desk-top { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .reading-desk-label { font-size: 0.72rem; }
  .reading-desk-expand { font-size: 0.7rem; padding: 4px 10px; }
}

/* ==========================================================
   44. Devoti 24 — version marker + reading-desk fallback link
   ========================================================== */
.theme-ver { opacity: 0.55; font-size: 0.72rem; }
.reading-desk-fallback {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  padding: 0 16px 16px;
  margin: 0;
}
.reading-desk-fallback a { color: var(--ribbon); text-decoration: underline; }

/* ==========================================================
   45. Devoti 25 — Editor's Pick (HarperCollins-style carousel)
   ========================================================== */
.editor-pick { background: var(--white); padding: 52px 0 24px; }
.ep-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  text-align: left;
  margin: 0 0 22px;
  color: var(--ink);
}
.ep-carousel { position: relative; }
.ep-track { position: relative; }
/* Cream panel, cover left / text right — HarperCollins layout, compact. */
.ep-slide {
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
  background: var(--paper);
  padding: clamp(24px, 3vw, 40px);
  /* Inactive slides stack absolutely + hidden; active slide is in-flow
     so the panel auto-sizes to it — koi clipping/cropping nahi. */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.ep-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Cover sits on cream with a soft float shadow — no hard frame, full cover. */
.ep-thumb {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}
/* Light idle float — book slide/arrive hone ke baad bhi halka animate. */
@keyframes epFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.ep-slide.active .ep-thumb { animation: epFloat 4.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .ep-slide.active .ep-thumb { animation: none; }
}
.ep-thumb-mat {
  display: block;
}
.ep-thumb-mat img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  box-shadow: 0 26px 50px rgba(23, 35, 59, 0.22);
}
.ep-thumb-mat .cover-placeholder {
  aspect-ratio: 2 / 3;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-family: var(--font-display);
  box-shadow: 0 26px 50px rgba(23, 35, 59, 0.22);
}
.ep-body { max-width: 46ch; }
.ep-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.14;
  margin: 0 0 16px;
  color: var(--ink);
}
.ep-body h3 a { text-decoration: none; color: inherit; }
.ep-desc {
  color: var(--text);
  font-size: clamp(0.98rem, 1vw, 1.05rem);
  line-height: 1.65;
  margin: 0 0 20px;
}
/* "CONTINUE READING" — uppercase, spaced, underlined (HC). */
.ep-continue {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ep-continue:hover { color: var(--gilt); border-color: var(--gilt); }
/* Dots sit BELOW the panel, in normal flow, clearly visible. */
.ep-carousel .hero-dots {
  position: static;
  transform: none;
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.ep-carousel .hero-dot { background: rgba(168, 132, 44, 0.28); }
.ep-carousel .hero-dot.active { background: var(--gilt); }
@media (max-width: 860px) {
  .ep-slide { grid-template-columns: 1fr; text-align: center; gap: 26px; }
  .ep-thumb { max-width: 220px; }
  .ep-body { max-width: none; }
  .ep-heading { text-align: center; }
  .ep-continue { margin: 0 auto; }
}
@media (max-width: 480px) {
  .ep-thumb { max-width: 180px; }
}

/* ==========================================================
   46. Devoti 29 — Book Series (label + archive + more-in-series)
   ========================================================== */
/* Series label above the book title (card + single). */
.book-series-label,
.single-series-label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt);
  text-decoration: none;
}
.book-card .book-series-label { margin: 12px 0 2px; }
.book-card .book-series-label:hover { color: var(--ink); }
.single-series-label { margin-bottom: 8px; }
.single-series-label:hover { color: var(--ink); }
/* Series archive intro + "More in this series" block. */
.series-intro {
  max-width: var(--w-narrow);
  margin: 14px auto 0;
  color: var(--muted);
  text-align: center;
}
.series-more { margin-top: 8px; }
.series-more .book-grid { margin-top: 8px; }

/* ---- Homepage Book Series Showcase (compact ink card, coming-soon jaisa) ---- */
.series-showcase { background: var(--paper); padding: 16px 0 48px; }
.ss-box {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  border: 1px solid var(--ink-soft);
  border-radius: 10px;
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 22px 52px rgba(23, 35, 59, 0.24);
}
.ss-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 20% 18%, rgba(168, 132, 44, 0.18), transparent 65%);
  pointer-events: none;
}
.ss-head, .ss-books, .ss-offer { position: relative; z-index: 1; }
.ss-box .eyebrow { color: var(--gilt-soft); }
.ss-head { text-align: center; margin-bottom: 26px; }
.ss-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  color: var(--white);
  margin: 4px 0 0;
}
.ss-books {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
}
.ss-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 148px;
  max-width: 40vw;
}
.ss-book-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gilt-soft);
  margin-bottom: 10px;
}
.ss-book-cover {
  display: block;
  width: 100%;
  transition: transform 0.25s ease;
}
.ss-book:hover .ss-book-cover { transform: translateY(-5px); }
.ss-book-cover img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.ss-book-cover .cover-placeholder {
  aspect-ratio: 2 / 3;
  width: 100%;
  background: var(--ink-soft);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.ss-book-title {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #cfd6e4;
  line-height: 1.28;
}
.ss-book:hover .ss-book-title { color: var(--gilt-soft); }
/* Offer panel — compact white highlight on the dark box, toggleable. */
.ss-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 30px auto 0;
  padding: 16px 20px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.ss-offer-info { display: flex; flex-direction: column; gap: 4px; }
.ss-offer-text {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ss-offer-prices { display: flex; align-items: baseline; gap: 12px; }
.ss-offer-was {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--muted);
  text-decoration: line-through;
}
.ss-offer-now {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  color: var(--ribbon);
}
.ss-offer-btn { flex-shrink: 0; }
@media (max-width: 700px) {
  .ss-book-num { margin-bottom: 8px; }
  .ss-offer { flex-direction: column; align-items: stretch; text-align: center; }
  .ss-offer-info { align-items: center; }
  .ss-offer-btn { width: 100%; text-align: center; }
}
