/* ============================================================
   Art Book Center – Modern UI  (Inter + Violet palette)
   ============================================================ */

/* ── Fonts ───────────────────────────────────────────────────── */
body {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
p, .text-muted, small, .form-label, td, th {
  font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
}

/* ── Design tokens ───────────────────────────────────────────── */
:root {
  /* Brand — Maroon (matching sadbhavtrust palette) */
  --primary:       #9e2a3a;
  --primary-dark:  #7a1f2d;
  --primary-light: #c0392b;
  --primary-bg:    #fdf2f3;   /* very light maroon tint */

  /* Accent */
  --accent:        #ff9800;   /* orange */
  --accent-light:  #ffcc80;

  /* Surfaces */
  --bg:            #ffffff;
  --bg-soft:       #f8f9fa;
  --bg-section:    #fdf2f3;   /* light maroon tint for sections */

  /* Text */
  --text:          #333333;
  --text-muted:    #666666;

  /* UI chrome */
  --border:        #e0e0e0;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.06);
  --shadow:        0 5px 15px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.15);
  --radius:        8px;
  --radius-lg:     12px;
  --transition:    all .3s ease;

  /* Legacy aliases */
  --brown:         var(--primary);
  --brown-dark:    var(--primary-dark);
  --brown-light:   var(--primary-light);
  --warm-bg:       var(--bg-soft);
  --warm-bg-2:     var(--bg-section);
  --text-dark:     var(--text);
  --gold:          var(--accent);
  --border-color:  var(--border);
}

/* ── Accessibility — WCAG 2.0 Level AA ───────────────────────── */

/* Skip navigation link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  background: #000;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  padding: .75rem 1.5rem;
  text-decoration: none !important;
  border-bottom-right-radius: 6px;
  transition: top 0s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ff0;
  outline-offset: 0;
}

/* Visible focus ring on ALL interactive elements (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
  border-radius: 3px;
}
/* Remove default outline only when :focus-visible is supported */
:focus:not(:focus-visible) { outline: none; }

/* Buttons and links — consistent focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
  border-radius: 3px;
}

/* Reduced motion (WCAG 2.3.3 AAA / best practice) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img  { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--text); letter-spacing: -.3px; }
a    { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
body { background: var(--bg); color: var(--text); line-height: 1.7; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-brown {
  background: var(--primary); color: #fff;
  border: 2px solid var(--primary); border-radius: 8px; font-weight: 600;
}
.btn-brown:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-brown {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary); border-radius: 8px; font-weight: 600;
}
.btn-outline-brown:hover { background: var(--primary); color: #fff; }

/* ── Navbar ──────────────────────────────────────────────────── */
.site-navbar {
  background: #ffffff !important;
  padding: .75rem 0;
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(108,43,217,.06);
}
.site-navbar .site-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}
.site-navbar .site-tagline {
  font-size: .63rem;
  color: var(--text-muted);
  letter-spacing: .9px;
  text-transform: uppercase;
  margin-top: 1px;
}
.site-navbar .nav-link {
  color: var(--text) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .45rem .8rem !important;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.site-navbar .nav-link:hover {
  background: var(--primary-bg);
  color: var(--primary) !important;
}
.site-navbar .nav-link.active {
  background: var(--primary-bg);
  color: var(--primary) !important;
  font-weight: 600;
}
.navbar-toggler-icon { filter: none; }
.navbar-toggler      { border-color: var(--border) !important; }
.navbar-toggler:focus{ box-shadow: 0 0 0 2px rgba(108,43,217,.15); }

/* ── Fallback hero (no banners) ──────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-overlay    { position: relative; z-index: 1; padding: 90px 0; }

/* ── Hero carousel ───────────────────────────────────────────── */
.hero-slide {
  min-height: 78vh;
  background-size: cover; background-position: center;
  background-color: var(--primary-dark);
  position: relative; display: flex; align-items: center;
}
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(90,26,36,.52);
}
.hero-slide-content { position: relative; z-index: 1; padding: 90px 0; width: 100%; }
#heroCarousel .carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.45); margin: 0 5px; transition: background .3s;
}
#heroCarousel .carousel-indicators .active { background: var(--accent); }
#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon { filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }

/* ── Hero text ───────────────────────────────────────────────── */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900; color: #fff; line-height: 1.15; margin-bottom: 1.25rem; letter-spacing: -.5px;
}
.hero-subtitle {
  font-size: 1.15rem; color: rgba(255,255,255,.87);
  margin-bottom: 2rem; max-width: 600px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .btn { min-width: 155px; font-weight: 600; }
.min-vh-75 { min-height: 75vh; }

/* ── Section helpers ─────────────────────────────────────────── */
.section-label {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--primary); margin-bottom: .5rem;
}
.section-title   { font-size: clamp(1.5rem, 4vw, 2.3rem); margin-bottom: .5rem; }
.section-subtitle{ color: var(--text-muted); font-size: 1rem; }
.bg-light-warm   { background: var(--bg-soft) !important; }
.bg-brown-light  { background: var(--primary) !important; }

/* ── Page banner (inner pages) ───────────────────────────────── */
.page-banner {
  min-height: 260px; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background-color: var(--primary);
  background-size: cover; background-position: center;
}
.page-banner::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,
    rgba(90,26,36,.92) 0%,
    rgba(122,31,45,.78) 50%,
    rgba(158,42,58,.58) 100%);
}
.page-banner::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
}
.page-banner .container { position: relative; z-index: 3; }
.page-banner-overlay { /* compat stub */ }
.page-banner-title {
  font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900;
  color: #fff; text-align: center; margin-bottom: .6rem;
  letter-spacing: -.3px; text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.breadcrumb-item a         { color: rgba(255,255,255,.72); font-size: .87rem; }
.breadcrumb-item a:hover   { color: var(--accent-light); }
.breadcrumb-item.active    { color: rgba(255,255,255,.9); font-size: .87rem; }
.breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ── Book card ───────────────────────────────────────────────── */
.book-card {
  background: var(--bg); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.book-cover-wrap { position: relative; overflow: hidden; aspect-ratio: 3/4; background: var(--bg-soft); }
.book-cover      { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.book-card:hover .book-cover { transform: scale(1.05); }
.book-cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--primary-light); background: var(--bg-soft);
}
.book-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.book-category {
  font-size: .68rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--primary); margin-bottom: .35rem;
}
.book-title { font-size: .97rem; font-weight: 700; line-height: 1.4; margin-bottom: .35rem; flex: 1; }
.book-title a       { color: var(--text); }
.book-title a:hover { color: var(--primary); }
.book-author { font-size: .78rem; color: var(--text-muted); margin-bottom: .35rem; }
.book-price  { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.book-badge  {
  position: absolute; top: 10px; left: 10px;
  padding: .22rem .6rem; border-radius: 20px;
  font-size: .68rem; font-weight: 700; z-index: 2;
}
.badge-new      { background: #10B981; color: #fff; }
.badge-featured { background: var(--accent); color: var(--text); }
.badge-sold     { background: #6c757d; color: #fff; left: auto; right: 10px; }
.book-overlay {
  position: absolute; inset: 0; background: rgba(74,26,155,.65);
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; opacity: 0; transition: opacity var(--transition); z-index: 3;
}
.book-card:hover .book-overlay { opacity: 1; }

/* ── Book detail ─────────────────────────────────────────────── */
.book-detail-title  { font-size: clamp(1.5rem,4vw,2.4rem); margin-bottom: .5rem; }
.book-detail-price  { font-size: 2rem; font-weight: 800; color: var(--primary); }
.book-category-tag  {
  display: inline-block; background: var(--primary-bg); color: var(--primary);
  font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: .25rem .75rem; border-radius: 20px;
}
.spec-item   { background: var(--bg-soft); border-radius: 8px; padding: .75rem; }
.spec-label  { font-size: .73rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.spec-value  { font-weight: 700; }
.book-cover-placeholder-lg {
  aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); border-radius: var(--radius); color: var(--primary-light);
}

/* ── Testimonial card ────────────────────────────────────────── */
.testimonial-card {
  background: var(--bg); border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testimonial-quote { font-size: 3rem; line-height: 1; color: var(--primary); opacity: .15; margin-bottom: .5rem; }
.testimonial-text  { color: var(--text); font-style: italic; line-height: 1.8; flex: 1; }
.testimonial-author {
  display: flex; align-items: center; gap: .75rem;
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.testimonial-avatar,
.testimonial-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testimonial-avatar-placeholder {
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.testimonial-name { font-weight: 700; }
.testimonial-role { font-size: .8rem; color: var(--text-muted); }

/* ── Feature section ─────────────────────────────────────────── */
.feature-item { padding: 1.5rem; }
.feature-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; color: #fff;
}
.text-white-75 { color: rgba(255,255,255,.75); }

/* ── CTA section ─────────────────────────────────────────────── */
.cta-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

/* ── Contact info ────────────────────────────────────────────── */
.contact-info-card  { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item  { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-icon  {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.1rem; flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,.75); padding: 60px 0 0; }
.footer-heading {
  color: #fff; font-size: .95rem; font-weight: 700;
  margin-bottom: 1.25rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary-light); display: inline-block;
}
.footer-text { color: rgba(255,255,255,.58); font-size: .88rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.58); font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent-light); }
.footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.footer-contact li { color: rgba(255,255,255,.65); font-size: .88rem; display: flex; align-items: flex-start; gap: .5rem; }
.footer-contact a  { color: rgba(255,255,255,.65); }
.footer-contact a:hover { color: var(--accent-light); }
.social-links { display: flex; gap: .5rem; }
.social-link  {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.social-link:hover { background: var(--primary); color: #fff; }
.footer-bottom { background: rgba(0,0,0,.35); margin-top: 40px; padding: 1rem 0; }

/* ── Page content (unified rich text layout) ─────────────────── */
.page-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}

/* Headings */
.page-content h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--primary);
  margin: 2.25rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
  letter-spacing: -.2px;
}
.page-content h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 .6rem;
}
.page-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.4rem 0 .5rem;
}

/* Paragraph */
.page-content p {
  color: #374151;
  margin-bottom: 1.1rem;
}
.page-content p:last-child { margin-bottom: 0; }

/* Lists */
.page-content ul,
.page-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.1rem;
}
.page-content ul { list-style: none; padding-left: 0; }
.page-content ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .4rem;
  color: #374151;
}
.page-content ul li::before {
  content: '';
  position: absolute;
  left: 0; top: .65em;
  width: 7px; height: 7px;
  background: var(--accent, #c9a84c);
  border-radius: 50%;
}
.page-content ol li {
  margin-bottom: .4rem;
  color: #374151;
}
.page-content ol li::marker { color: var(--primary); font-weight: 700; }

/* Links */
.page-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content a:hover { color: var(--primary-dark); }

/* Blockquote */
.page-content blockquote {
  border-left: 4px solid var(--accent, #c9a84c);
  background: #faf8f3;
  margin: 1.5rem 0;
  padding: 1rem 1.4rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4a4a5a;
}

/* Tables */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.page-content th {
  background: var(--primary);
  color: #fff;
  padding: .6rem 1rem;
  text-align: left;
  font-weight: 600;
}
.page-content td {
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--border);
  color: #374151;
}
.page-content tr:hover td { background: #faf8f3; }

/* Images */
.page-content img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
  margin: .75rem 0;
}

/* Horizontal rule */
.page-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

/* First h2 — no top margin */
.page-content > h2:first-child,
.page-content > h3:first-child { margin-top: 0; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp .6s ease both; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .30s; }

/* ── Filter form ─────────────────────────────────────────────── */
.filter-form .form-control,
.filter-form .form-select { border-radius: 8px; border-color: var(--border); padding: .6rem 1rem; }
.filter-form .form-control:focus,
.filter-form .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(108,43,217,.12);
}

/* ── Pagination ──────────────────────────────────────────────── */
.page-link { color: var(--primary); border-radius: 8px !important; border-color: var(--border); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:hover { background: var(--bg-soft); color: var(--primary-dark); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .hero-overlay       { padding: 55px 0; }
  .hero-title         { font-size: 1.9rem; }
  .hero-slide         { min-height: 58vh; }
  .hero-slide-content { padding: 60px 0; }
  .page-banner        { min-height: 180px; }
  .page-banner-title  { font-size: 1.7rem; }
  .book-body          { padding: .75rem; }
}

/* ── Inquiry list (select up to 10 books, one inquiry) ───────── */
.inq-toggle { border-radius: 20px; font-weight: 600; }
.inq-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.inq-toggle.inq-disabled { opacity: .55; }
.inq-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  background: var(--primary-dark); color: #fff; padding: .6rem 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}
.inq-bar-note { opacity: .75; }
body.has-inq-bar { padding-bottom: 4.2rem; }
.inq-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.2rem; z-index: 1050;
  background: #222; color: #fff; padding: .6rem 1rem; border-radius: 8px; max-width: min(92vw, 30rem);
  font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.inq-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.inq-list li { display: flex; align-items: center; gap: .9rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: var(--bg-soft); }
.inq-list img { width: 42px; height: 56px; object-fit: cover; border-radius: 4px; flex: none; }
.inq-list .inq-list-title { flex: 1; min-width: 0; }
.inq-list .inq-remove { flex: none; }
@media (max-width: 575.98px) { .inq-bar-note { display: none; } }

/* ── Testimonials: two lines in the card, full text in a centred popup ───── */
.testimonial-clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; flex: 0 0 auto; margin-bottom: .5rem;
}
.testimonial-more {
  align-self: flex-start; background: none; border: 0; padding: 0 0 .75rem; font-weight: 600; font-size: .9rem;
  color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.testimonial-more:hover, .testimonial-more:focus-visible { color: var(--primary-dark); }
.testimonial-card .testimonial-author { margin-top: auto; }
#testimonialModal .modal-body .testimonial-full { font-style: italic; line-height: 1.85; white-space: normal; font-size: 1.05rem; }
#testimonialModal .testimonial-quote-mark { font-size: 3rem; line-height: 1; color: var(--primary); opacity: .2; }

/* Books page: live search */
#bookResults { transition: opacity .15s ease; }
#bookResults[aria-busy="true"] { opacity: .45; pointer-events: none; }

/* ── Back to top (bottom right, appears on scroll) ───────────── */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease, bottom .2s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* keep it clear of the inquiry bar when books are selected */
body.has-inq-bar .back-to-top { bottom: 5rem; }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
@media print { .back-to-top { display: none; } }

/* ── Home: new arrivals as a sliding strip ───────────────────── */
.na-carousel { --na-gap: 1.25rem; --na-per: 1; position: relative; }
.na-track {
  display: flex; gap: var(--na-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; padding: .35rem .15rem 1rem; outline-offset: 4px;
}
.na-track::-webkit-scrollbar { display: none; }
.na-slide { flex: 0 0 calc((100% - (var(--na-per) - 1) * var(--na-gap)) / var(--na-per)); scroll-snap-align: start; min-width: 0; }
@media (min-width: 576px)  { .na-carousel { --na-per: 2; } }
@media (min-width: 992px)  { .na-carousel { --na-per: 3; } }
@media (min-width: 1200px) { .na-carousel { --na-per: 4; } }
.na-controls { position: absolute; inset: 0 0 auto 0; top: 42%; height: 0; z-index: 3; pointer-events: none; }
.na-btn {
  position: absolute; top: 0; transform: translateY(-50%); pointer-events: auto; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .94); color: var(--primary); font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s, opacity .2s;
}
.na-btn:hover { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 16px rgba(0, 0, 0, .22); }
.na-btn:focus-visible, .na-pause:focus-visible, .na-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.na-btn:disabled { opacity: .35; cursor: default; }
.na-prev { left: -.5rem; } .na-next { right: -.5rem; }
@media (min-width: 1300px) { .na-prev { left: -1.5rem; } .na-next { right: -1.5rem; } }
.na-foot { text-align: center; }
.na-pause { background: none; border: 1px solid var(--border); border-radius: 20px; padding: .25rem .9rem; color: var(--text-muted); font-size: .85rem; cursor: pointer; }
.na-pause:hover { color: var(--primary); border-color: var(--primary); }
.na-carousel.na-static .na-controls, .na-carousel.na-static .na-foot { display: none; }
@media (prefers-reduced-motion: reduce) { .na-track { scroll-behavior: auto; } }
/* testimonial strip: 1 / 2 / 3 cards across */
.na-carousel.na-per3 { --na-per: 1; }
@media (min-width: 768px)  { .na-carousel.na-per3 { --na-per: 2; } }
@media (min-width: 992px)  { .na-carousel.na-per3 { --na-per: 3; } }
.na-carousel.na-per3 .testimonial-card { height: 100%; }

/* ── Section heading: title · fading line · "View all" pill (home page) ───── */
.section-heading { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.75rem; }
.section-heading-title {
  margin: 0; flex: 0 1 auto; font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); line-height: 1.15;
  letter-spacing: -.01em; color: var(--primary);
}
.section-heading-line {
  flex: 1 1 2rem; min-width: 1rem; height: 1px;
  background: linear-gradient(to right, color-mix(in srgb, var(--primary) 38%, transparent), transparent);
}
.section-heading-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .4rem 1.05rem; border: 1px solid var(--primary); border-radius: 999px;
  color: var(--primary); background: transparent; font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: background .2s, color .2s;
}
.section-heading-link:hover, .section-heading-link:focus-visible { background: var(--primary); color: #fff; }
.section-heading-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 420px) { .section-heading-line { display: none; } .section-heading { justify-content: space-between; } }

/* ── Modern footer ───────────────────────────────────────────── */
.site-footer.footer-modern {
  --ft-accent: var(--accent, #ff9800);
  position: relative; padding: 0; margin-top: 4.5rem; color: rgba(255,255,255,.74);
  background: radial-gradient(900px 380px at 85% -10%, rgba(255,152,0,.10), transparent 60%),
              linear-gradient(165deg, #2a0f15 0%, #3d1520 52%, #26090f 100%);
}
.footer-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
  margin: -2.6rem 0 3rem; padding: 1.6rem 2rem; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, var(--primary) 0%, #c0392b 100%); box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.footer-cta-title { font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); font-weight: 800; margin: 0 0 .2rem; color: #fff; }
.footer-cta p { color: rgba(255,255,255,.88); }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer-cta-actions .btn { border-radius: 999px; padding: .55rem 1.3rem; }
.footer-cols { padding-bottom: 3rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.35rem; text-decoration: none; margin-bottom: .9rem; }
.footer-brand .bi { color: var(--ft-accent); font-size: 1.6rem; }
.footer-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: .55rem .9rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.footer-logo img { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.footer-tagline { color: rgba(255,255,255,.66); font-size: .93rem; line-height: 1.65; max-width: 28rem; margin-bottom: 1.2rem; }
.footer-modern .social-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.footer-modern .social-link {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); font-size: 1.05rem; text-decoration: none;
  transition: background .2s, transform .2s, border-color .2s;
}
.footer-modern .social-link:hover, .footer-modern .social-link:focus-visible { background: var(--ft-accent); border-color: var(--ft-accent); color: #2a0f15; transform: translateY(-3px); }
.footer-modern .footer-heading {
  position: relative; margin: 0 0 1.15rem; padding-bottom: .65rem; color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.footer-modern .footer-heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; border-radius: 3px; background: var(--ft-accent); }
.footer-modern .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-modern .footer-links li { margin: 0 0 .5rem; }
.footer-modern .footer-links a { position: relative; display: inline-block; color: rgba(255,255,255,.7); font-size: .93rem; text-decoration: none; transition: color .2s, transform .2s; }
.footer-modern .footer-links a:hover, .footer-modern .footer-links a:focus-visible { color: #fff; transform: translateX(4px); }
.footer-modern .footer-more { color: var(--ft-accent); font-weight: 600; }
.footer-modern .footer-more:hover { color: #ffc266; }
.footer-modern .footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .95rem; }
.footer-modern .footer-contact li { display: flex; align-items: flex-start; gap: .8rem; color: rgba(255,255,255,.76); font-size: .93rem; line-height: 1.55; }
.footer-modern .fc-icon {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.09); color: var(--ft-accent); font-size: 1rem;
}
.footer-modern .footer-contact a { color: rgba(255,255,255,.88); text-decoration: none; }
.footer-modern .footer-contact a:hover, .footer-modern .footer-contact a:focus-visible { color: var(--ft-accent); }
.footer-modern .fc-phones { display: flex; flex-direction: column; gap: .15rem; padding-top: .3rem; }
.footer-modern .fc-phones small { color: rgba(255,255,255,.5); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-right: .2rem; }
.footer-modern .footer-bottom { margin: 0; padding: 1.05rem 0; background: rgba(0,0,0,.28); border-top: 1px solid rgba(255,255,255,.08); font-size: .86rem; color: rgba(255,255,255,.58); }
.footer-modern .footer-bottom p { color: rgba(255,255,255,.58); }
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; padding: 0; margin: 0; }
.footer-legal a { color: rgba(255,255,255,.58); text-decoration: none; }
.footer-legal a:hover, .footer-legal a:focus-visible { color: #fff; text-decoration: underline; }
.footer-modern a:focus-visible { outline: 2px solid var(--ft-accent); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 767.98px) {
  .site-footer.footer-modern { margin-top: 3.5rem; }
  .footer-cta { padding: 1.3rem 1.2rem; margin-bottom: 2.2rem; border-radius: 16px; }
  .footer-cta-actions { width: 100%; } .footer-cta-actions .btn { flex: 1 1 auto; }
  .footer-cols { padding-bottom: 2rem; }
  .footer-modern .footer-bottom .container { justify-content: center !important; text-align: center; }
}
@media print { .site-footer.footer-modern { display: none; } }
/* ── Phones and small screens ─────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }                       /* nothing may push the page sideways */
img, iframe, video, svg { max-width: 100%; }
table { max-width: 100%; }
.page-content, .page-content * { max-width: 100%; overflow-wrap: anywhere; }
.page-content table { display: block; overflow-x: auto; }
.page-content img { height: auto; }
.book-title, .book-title a, .testimonial-text, .section-heading-title { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .container { padding-left: .9rem; padding-right: .9rem; }
  .row.g-4 { --bs-gutter-x: .85rem; --bs-gutter-y: .85rem; }          /* tighter gaps between the 2 columns of books */
  .book-card .book-body { padding: .6rem .65rem .75rem; }
  .book-card .book-title { font-size: .86rem; line-height: 1.3; margin-bottom: .35rem; }
  .book-card .book-category { font-size: .66rem; letter-spacing: .02em; }
  .book-card .inq-toggle { font-size: .72rem; padding: .32rem .35rem; line-height: 1.2; }
  .book-card .inq-toggle .bi { display: none; }
  .book-badge { font-size: .6rem; padding: .16rem .45rem; top: 6px; left: 6px; }
  .badge-sold { right: 6px; }
  .filter-form .btn { width: 100%; }
  .filter-form .col-auto { width: 100%; display: flex; gap: .5rem; }
  .page-banner-title { font-size: 1.55rem; }
  .section-heading { gap: .7rem; margin-bottom: 1.25rem; }
  .section-heading-link { padding: .3rem .8rem; font-size: .85rem; }
  .na-btn { width: 2.4rem; height: 2.4rem; font-size: 1rem; }
  .na-prev { left: -.25rem; } .na-next { right: -.25rem; }
  .footer-modern .footer-heading { margin-bottom: .9rem; }
  .btn-lg { padding: .6rem 1.1rem; font-size: 1rem; }
  .hero-actions .btn { min-width: 0; flex: 1 1 100%; }
  .cta-section .btn-lg { width: 100%; }
}
/* big tap targets for fingers, on any screen that has no mouse */
@media (hover: none) and (pointer: coarse) {
  .page-link, .btn-sm { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .book-overlay { display: none; }                /* the hover buttons cannot be used by touch: the card links and the inquiry button remain */
}
/* "Looking for a particular book?" sits above the quote strip as its own block (no longer overlapping the footer) */
.inquiry-cta-section { padding: 3.25rem 0 0; }
.inquiry-cta-section .footer-cta { margin: 0; }
.site-footer.footer-modern { margin-top: 0; padding-top: 3.25rem; }
@media (max-width: 767.98px) {
  .inquiry-cta-section { padding-top: 2.25rem; }
  .site-footer.footer-modern { margin-top: 0; padding-top: 2.5rem; }
}
/* ── Grid / List switch and list rows ─────────────────────────── */
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.view-btn { border: 0; background: transparent; color: var(--text-muted); width: 2.6rem; height: 2.4rem; font-size: 1.1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn:hover { background: var(--bg-soft); color: var(--primary); }
.view-btn.active { background: var(--primary); color: #fff; }
.view-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.book-list { display: flex; flex-direction: column; gap: .9rem; }
.book-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1.1rem 1.25rem; align-items: center;
  padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.book-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.book-row-cover { display: block; width: 96px; aspect-ratio: 3 / 4; background: var(--bg-soft); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.book-row-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.book-row-body { min-width: 0; }
.book-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .2rem; }
.book-row .book-category { margin: 0; }
.badge-new-inline { background: #10B981; color: #fff; font-size: .66rem; padding: .22rem .5rem; border-radius: 20px; }
.book-row .book-title { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.35; }
.book-row-meta { margin: 0 0 .3rem; color: var(--text-muted); font-size: .88rem; }
.book-row-desc { margin: 0; color: var(--text); font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.book-row-actions { display: flex; flex-direction: column; gap: .4rem; min-width: 11.5rem; }
.book-row-actions .btn { width: 100%; margin: 0; }
@media (max-width: 767.98px) {
  .book-row { grid-template-columns: 72px 1fr; padding: .75rem; gap: .75rem; }
  .book-row-cover { width: 72px; }
  .book-row-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .book-row-actions .btn { width: auto; flex: 1 1 auto; }
  .book-row .book-title { font-size: .98rem; }
}
/* ── Videos (home page + Videos page) ─────────────────────────── */
.bg-light-warm { background: var(--bg-soft, #faf6f2); }
.video-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #1d1d1d; cursor: pointer; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-thumb-blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8134af 75%, #515bd4); }
.video-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; transition: background .2s, transform .2s; }
.video-thumb:hover .video-play, .video-thumb:focus-visible .video-play { background: var(--primary); transform: scale(1.08); }
.video-thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.video-platform { position: absolute; left: .7rem; top: .7rem; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; font-weight: 600; padding: .22rem .6rem; border-radius: 20px; }
.video-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.video-title { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.35; }
.video-caption { margin: 0; color: var(--text-muted); font-size: .9rem; }
.video-open { margin-top: auto; font-size: .85rem; }
.video-dialog { width: min(92vw, 880px); max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: #000; overflow: hidden; }
.video-dialog::backdrop { background: rgba(0,0,0,.7); }
.video-dialog.is-reel { width: min(92vw, 420px); }
.video-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .9rem; background: #111; color: #fff; font-size: .9rem; }
.video-dialog-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.video-dialog-close { border: 0; background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; padding: .2rem .5rem; cursor: pointer; border-radius: 6px; }
.video-dialog-close:hover { background: rgba(255,255,255,.18); }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-dialog.is-reel .video-frame { aspect-ratio: 9 / 15; max-height: 78vh; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* ── Our Story: heading on top, text + video side by side ─────── */
.home-about-head { margin-bottom: 2rem; }
.home-about-head .home-about-heading { margin-bottom: 1rem; }
.story-video { border-radius: 14px; box-shadow: var(--shadow); }
.story-video-caption { margin: .6rem 0 0; font-size: .9rem; color: var(--text-muted); text-align: center; }
/* home page videos: picture + title only */
.video-card-simple { height: auto; }
.video-title-simple { padding: .85rem 1.1rem 1rem; font-size: 1rem; }
/* ── Accessibility bar and high-contrast mode ─────────────────── */
.a11y-bar { background: #f3eee8; border-bottom: 1px solid var(--border); font-size: .8rem; padding: .25rem 0; }
.a11y-label { color: var(--text-muted); }
.a11y-group { display: inline-flex; gap: .2rem; }
.a11y-btn { border: 1px solid #b9ada0; background: #fff; color: #1e1e2e; border-radius: 6px; padding: .12rem .55rem; font-size: .8rem; font-weight: 600; line-height: 1.5; cursor: pointer; }
.a11y-btn:hover { background: #ece4da; }
.a11y-btn:focus-visible, .a11y-link:focus-visible { outline: 3px solid #1a56db; outline-offset: 2px; }
.a11y-btn[aria-pressed="true"] { background: #1e1e2e; color: #fff; border-color: #1e1e2e; }
.a11y-link { color: #1e1e2e; text-decoration: underline; }
html.hc, html.hc body { background: #000 !important; color: #fff !important; }
html.hc *:not(img):not(svg):not(path):not(i):not(iframe):not(.video-play):not(.video-thumb-blank) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important; }
html.hc a, html.hc a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.hc .btn, html.hc button { border: 2px solid #fff !important; }
html.hc .a11y-btn[aria-pressed="true"] { background: #ffeb3b !important; color: #000 !important; }
html.hc :focus-visible { outline: 3px solid #ffeb3b !important; outline-offset: 2px !important; }
html.hc img { filter: none; }
@media print { .a11y-bar { display: none; } }
/* ── No sideways scrolling on phones ──────────────────────────────
   The carousels scroll sideways inside their own box. Bootstrap's .visually-hidden text is position:absolute, and an absolute
   box is only clipped by a scroller that is itself positioned, so the slides' hidden text pushed the whole page out to thousands
   of pixels wide. Positioning the carousel boxes fixes it at the root; html is clipped as a safety net. */
.na-carousel, .na-track { position: relative; }
.na-track { max-width: 100%; }
html { overflow-x: hidden; max-width: 100%; }
img, video, iframe, svg { max-width: 100%; }
