@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

/* =========================================================
   Warm-editorial book-library theme
   Palette + display typography are the design foundation.
   Admin-overridable hues: --color-primary*, --color-accent*
   (set per-page in <style id="theme-vars"> from DB settings).
   ========================================================= */
:root {
  --color-primary:       #1d3c5c;   /* deep navy-blue — nav, buttons, headings */
  --color-primary-dark:  #142a40;
  --color-primary-light: #2f5d82;
  --color-accent:        #ef5a24;   /* warm orange */
  --color-accent-dark:   #d2461a;
  --color-accent-light:  #f6a079;
  --color-text:          #21303d;
  --color-text-muted:    #6c7c89;
  --color-bg:            #ffffff;   /* white canvas */
  --color-bg-light:      #dce8ef;   /* powder-blue section band */
  --color-surface:       #ffffff;
  --color-border:        #e2e9ef;
  --color-success:       #2f8f5b;
  --color-danger:        #d2401f;
  --font-primary:        'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display:        'Playfair Display', Georgia, 'Times New Roman', serif;
  --border-radius:       0.75rem;
  --shadow-sm:           0 1px 3px rgba(20,38,56,.06), 0 1px 2px rgba(20,38,56,.05);
  --shadow-md:           0 8px 24px rgba(20,38,56,.10), 0 2px 6px rgba(20,38,56,.05);
  --shadow-lg:           0 18px 44px rgba(20,38,56,.16), 0 6px 12px rgba(20,38,56,.07);
  --transition:          all .3s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

body {
  font-family:      var(--font-primary);
  color:            var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--color-primary);
}

a {
  color: var(--color-primary);
  transition: var(--transition);
  text-decoration: none;
}
a:hover { color: var(--color-accent); }

.text-accent { color: var(--color-accent) !important; }
.bg-band     { background: var(--color-bg-light); }
.serif       { font-family: var(--font-display); }

/* ----- Buttons ----- */
.btn {
  transition: var(--transition);
  font-weight: 600;
  letter-spacing: .015em;
  border-radius: 999px;
  padding: .55rem 1.4rem;
}
.btn-lg { padding: .8rem 1.9rem; font-size: 1rem; }
.btn-sm { padding: .4rem 1rem; }
.btn-primary {
  background-color: var(--color-primary);
  border-color:     var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(20,38,56,.22);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color:     var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20,38,56,.30);
}
.btn-accent {
  background-color: var(--color-accent);
  border-color:     var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,90,36,.32);
}
.btn-accent:hover {
  background-color: var(--color-accent-dark);
  border-color:     var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239,90,36,.42);
}
.btn-outline-accent {
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}
.btn-outline-accent:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}
.btn-outline-light:hover { transform: translateY(-2px); }

/* ----- Unified header: brand + primary nav + search + cart in one bar ----- */
.site-navbar {
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0;
}
/* Stretch alignment lets the menu items span the bar's full height, so their
   hover underline lands on its bottom edge and dropdowns hang flush below it. */
.site-navbar .container-fluid {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 68px;
}
.site-navbar .navbar-brand,
.site-navbar .site-search,
.site-navbar .header-user-link,
.site-navbar .header-cart-link,
.site-navbar .navbar-toggle { align-self: center; }

.site-navbar .navbar-brand,
.site-navbar .nav-link { color: #fff !important; }
.site-navbar .navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.7rem;
  padding: 0;
  margin-right: 1.5rem;
  flex-shrink: 0;
}
.site-navbar .navbar-brand .brand-dot { color: var(--color-accent-light); }
/* Flex centring centres the line box, not the letters. Playfair's ascent (1.1em)
   is much larger than its descent, so its cap block lands below that box's centre
   and the wordmark reads low against the logo and the all-caps nav. Lift it by
   ascent - fontHeight/2 - capHeight/2 = 1.1 - 0.675 - 0.354 = 0.071em.
   In em so it holds at every brand font-size; retune if --font-display changes. */
.site-navbar .navbar-brand .brand-name { position: relative; top: -0.071em; }

.site-navbar .site-search {
  display: flex;
  /* Fixed target width that shrinks on tighter viewports; the auto margin on
     .nav-row collects the leftover space so search + cart stay right-aligned. */
  flex: 0 1 560px;
  min-width: 150px;
  margin: 0 .75rem;
}
.site-navbar .form-control {
  border: none;
  border-radius: 999px 0 0 999px;
  padding-left: 1.1rem;
  box-shadow: none;
  background: rgba(255,255,255,.96);
}
.site-navbar .form-control:focus { box-shadow: 0 0 0 3px rgba(120,170,205,.35); }
.site-navbar .input-group .btn { border-radius: 0 999px 999px 0; padding: 0 1.25rem; }
.site-navbar .nav-link:hover { color: var(--color-accent-light) !important; }

/* ----- Primary nav (with dropdowns), inline in the header bar ----- */
.site-navbar .nav-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-right: auto;
}
.site-navbar .menu-item { position: relative; display: flex; align-items: stretch; }
.site-navbar .menu-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: rgba(255,255,255,.88);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 0 1.1rem;
  text-decoration: none;
  transition: var(--transition);
  /* The hover underline is a 2px bottom border; under border-box sizing it eats
     into the content box and centring would lift the label 1px off the bar's
     centre line. A transparent top border balances the box back out. */
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}
.site-navbar .menu-link:hover,
.site-navbar .menu-item:hover .menu-link {
  color: var(--color-accent-light);
  border-bottom-color: var(--color-accent);
  background: rgba(255,255,255,.05);
}
.site-navbar .menu-link .caret { font-size: .9rem; margin-left: .45rem; opacity: .8; }

/* Tighten the nav so brand + nav + search + cart still fit on smaller desktops */
@media (min-width: 992px) and (max-width: 1299px) {
  .site-navbar .navbar-brand { margin-right: .75rem; }
  .site-navbar .navbar-brand .brand-name { display: none; }
  .site-navbar .menu-link { padding: 0 .7rem; font-size: .76rem; letter-spacing: .02em; }
  .site-navbar .site-search { margin: 0 .5rem; }
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-surface);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 1100;
}
/* Desktop only: reveal the flyout on hover/focus. On touch/mobile the
   category menu is a tap-to-open accordion (see the max-width:991px block),
   so this must NOT fire there or panels leak open. */
@media (min-width: 992px) {
  .menu-item:hover > .dropdown-panel,
  .menu-item:focus-within > .dropdown-panel {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
}
.dropdown-panel a {
  display: block;
  padding: .55rem 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: .875rem;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.dropdown-panel a:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
  border-left-color: var(--color-accent);
  padding-left: 1.4rem;
}
.dropdown-panel .panel-header {
  padding: .25rem 1.1rem .5rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: .25rem;
}

/* ----- Hero Slider ----- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-dark);
}
.hero-slider .carousel,
.hero-slider .carousel-inner,
.hero-slider .carousel-item { height: clamp(420px, 60vw, 680px); }
.hero-slider .hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.62) saturate(1.05) sepia(.12);
  transform: scale(1.04);
  transition: transform 9s ease;
}
.hero-slider .carousel-item.active .hero-img { transform: scale(1.13); }
.hero-slider .carousel-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(36,25,16,.82) 0%, rgba(36,25,16,.45) 45%, rgba(36,25,16,.12) 100%),
    linear-gradient(180deg, transparent 45%, rgba(36,25,16,.7) 100%);
  pointer-events: none;
}
.hero-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 8%;
  color: #fff;
  z-index: 2;
}
.hero-caption .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-accent-light);
  font-family: var(--font-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  animation: heroIn .8s ease-out;
}
.hero-caption .hero-eyebrow::before {
  content: '';
  width: 34px; height: 2px;
  background: var(--color-accent);
  display: inline-block;
}
.hero-caption h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.04;
  margin-bottom: 1rem;
  max-width: 760px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
  animation: heroIn .9s ease-out .12s backwards;
}
.hero-caption h1 em { font-style: italic; color: var(--color-accent-light); }
.hero-caption p {
  font-family: var(--font-primary);
  font-size: clamp(.98rem, 1.5vw, 1.25rem);
  max-width: 540px;
  margin-bottom: 1.8rem;
  opacity: .92;
  line-height: 1.6;
  animation: heroIn .9s ease-out .28s backwards;
}
.hero-caption .btn { animation: heroIn .9s ease-out .44s backwards; }
.hero-slider .carousel-indicators { margin-bottom: 1.8rem; }
.hero-slider .carousel-indicators [data-bs-target] {
  width: 30px; height: 4px;
  border-radius: 4px;
  background-color: rgba(255,255,255,.4);
  border: none; margin: 0 4px;
  transition: var(--transition);
}
.hero-slider .carousel-indicators .active { background-color: var(--color-accent); width: 48px; }
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next { width: 5%; opacity: .5; transition: var(--transition); }
.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover { opacity: 1; }
.hero-slider .carousel-control-prev-icon,
.hero-slider .carousel-control-next-icon {
  background-color: rgba(0,0,0,.3);
  border-radius: 50%; padding: 20px; background-size: 45%;
}
@media (max-width: 576px) {
  .hero-caption { padding: 0 1.5rem; }
  .hero-slider .carousel-control-prev,
  .hero-slider .carousel-control-next { display: none; }
}

/* ----- Section heading (editorial: eyebrow + serif title) ----- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-primary);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .5rem;
}
.section-eyebrow::before {
  content: '';
  width: 26px; height: 2px;
  background: var(--color-accent);
  display: inline-block;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--color-primary);
  letter-spacing: -.015em;
  margin-bottom: .35rem;
}
.section-title em { font-style: italic; color: var(--color-accent); }
.section-sub { color: var(--color-text-muted); font-size: .98rem; max-width: 640px; }

/* Legacy heading kept for inner pages */
.section-heading {
  font-family: var(--font-display);
  border-left: 4px solid var(--color-accent);
  padding-left: .85rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-size: 1.55rem;
  letter-spacing: -.01em;
}

/* ----- Product (book) card ----- */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-light);
  aspect-ratio: 1 / 0.72;
}
.product-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .img-wrap img { transform: scale(1.07); }
.product-card .img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(36,25,16,.28) 100%);
  opacity: 0; transition: var(--transition);
}
.product-card:hover .img-wrap::after { opacity: 1; }
.product-card .card-author {
  font-size: .72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.product-card .card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.25;
  color: var(--color-primary);
}
.product-card .price { color: var(--color-accent); font-weight: 700; font-size: 1.05rem; }
.product-card .mrp { color: var(--color-text-muted); text-decoration: line-through; font-size: .8rem; }
.product-card .discount-badge {
  background-color: var(--color-accent);
  color: #fff; font-size: .68rem; font-weight: 700;
  padding: .2rem .5rem; border-radius: 999px;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(239,90,36,.4);
}
.product-card .wish-btn {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92);
  color: var(--color-primary);
  border: none;
  opacity: 0; transform: translateY(-6px);
  transition: var(--transition);
  z-index: 2;
}
.product-card:hover .wish-btn { opacity: 1; transform: translateY(0); }
.product-card .wish-btn:hover { background: var(--color-accent); color: #fff; }
.product-card .btn-cart {
  background-color: transparent;
  color: var(--color-primary);
  font-size: .82rem; font-weight: 600;
  border: 1.5px solid var(--color-border);
  width: 100%; padding: .55rem;
  border-radius: 999px;
  transition: var(--transition);
  letter-spacing: .02em;
}
.product-card .btn-cart:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ----- Add-to-cart buttons ----- */
.product-card .add-to-cart-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px;
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  font-weight: 700;
  transition: var(--transition);
}
.product-card .add-to-cart-btn:hover:not(:disabled) {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}
.product-card .add-to-cart-btn:disabled { opacity: .4; cursor: not-allowed; }
.add-to-cart-btn.added {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  color: #fff !important;
}

/* ----- Header user + cart icons, and the cart count badge ----- */
.header-user-link,
.header-cart-link {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  margin-left: .15rem;
  color: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.header-user-link:hover,
.header-cart-link:hover { color: var(--color-accent-light); background: rgba(255,255,255,.08); }
#header-cart-count {
  position: absolute;
  top: -2px; right: -4px;
  display: none;
  align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--color-accent);
  color: #fff;
  font-size: .66rem; font-weight: 700; line-height: 1;
  border-radius: 999px;
}

/* ----- Category tiles ----- */
.category-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border) !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}
.category-tile:hover {
  border-color: var(--color-accent) !important;
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.category-tile .cat-ico {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-bg-light);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: .5rem;
  transition: var(--transition);
}
.category-tile:hover .cat-ico { background: var(--color-accent); transform: rotate(-6deg) scale(1.05); }

/* ----- Deal / highlight banner ----- */
.deal-banner {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--border-radius) * 1.5);
  background:
    radial-gradient(ellipse at 80% 20%, rgba(120,170,205,.22), transparent 55%),
    linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem);
}
.deal-banner h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.deal-banner h2 em { font-style: italic; color: var(--color-accent-light); }
.deal-banner::before {
  content: '';
  position: absolute; right: -60px; bottom: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
  border-radius: 50%;
}

/* ----- Feature strip ----- */
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.6rem 1.2rem;
  height: 100%;
  transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-accent); }
.feature-card .feat-ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--color-bg-light);
  color: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: .9rem;
}

.cart-badge {
  background-color: var(--color-accent);
  color: #fff; border-radius: 50%;
  font-size: .7rem; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; animation: pop .3s ease-out;
}

/* ----- CMS / rich content ----- */
.content-body { line-height: 1.8; font-size: 1.02rem; color: var(--color-text); }
.content-body h2, .content-body h3, .content-body h4 {
  font-family: var(--font-display); color: var(--color-primary); font-weight: 700;
}
.content-body h2 { font-size: 1.7rem; margin: 1.6em 0 .6em; }
.content-body h3 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
.content-body h4 { font-size: 1.12rem; margin: 1.2em 0 .4em; }
.content-body p { margin: 0 0 1em; }
.content-body ul, .content-body ol { margin: 0 0 1em; padding-left: 1.6em; }
.content-body li { margin-bottom: .35em; }
.content-body a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.content-body a:hover { color: var(--color-accent-dark); }
.content-body blockquote {
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-light);
  padding: 1em 1.2em; margin: 1.4em 0;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-display);
  font-style: italic; font-size: 1.1rem;
  color: var(--color-primary);
}
.content-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; }
.content-body th, .content-body td { padding: 10px 14px; border: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.content-body th { background: var(--color-bg-light); font-weight: 700; color: var(--color-primary); }
.content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; }
.content-body hr { border: none; border-top: 2px solid var(--color-border); margin: 2em 0; }
.content-body code { background: var(--color-bg-light); padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ----- Floating WhatsApp ----- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 2px 6px rgba(0,0,0,.15);
  z-index: 1100;
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,.6), 0 4px 10px rgba(0,0,0,.2); color: #fff; }
.wa-float::before {
  content: ''; position: absolute; inset: -6px;
  border-radius: 50%; border: 2px solid #25D366;
  opacity: .55; animation: wa-pulse 2s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(.95); opacity: .55; }
  70%  { transform: scale(1.3);  opacity: 0; }
  100% { transform: scale(1.3);  opacity: 0; }
}
.wa-float .wa-tooltip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: var(--color-surface); color: var(--color-text);
  font-size: .8rem; font-weight: 600;
  padding: .4rem .75rem; border-radius: 6px;
  box-shadow: var(--shadow-md); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateY(-50%) translateX(-4px); }

/* ----- Header cart pill ----- */
.header-cart-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); color: #fff;
  text-decoration: none; padding: 6px 12px;
  border-radius: 999px; font-size: .85rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,.18);
  transition: var(--transition);
}
.header-cart-pill:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-1px); }

/* ----- Footer ----- */
.site-footer {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(239,90,36,.14), transparent 50%),
    linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: rgba(255,255,255,.78);
  margin-top: 4rem;
}
.site-footer h5, .site-footer h6 { color: #fff; font-family: var(--font-display); letter-spacing: -.01em; }
.site-footer a { color: rgba(255,255,255,.68); transition: var(--transition); text-decoration: none; }
.site-footer a:hover { color: var(--color-accent-light); padding-left: 4px; }
.site-footer hr { border-color: rgba(255,255,255,.1); }

/* ----- TipTap rich editor ----- */
.tiptap-editor { font-size: 14px; }
.tiptap-editor .ProseMirror { outline: none; min-height: 200px; padding: 12px; }
.tiptap-editor .ProseMirror p { margin: 0 0 .5em; }
.tiptap-editor .ProseMirror h2 { font-size: 1.4em; font-weight: 700; margin: 1em 0 .5em; }
.tiptap-editor .ProseMirror h3 { font-size: 1.15em; font-weight: 700; margin: 1em 0 .5em; }
.tiptap-editor .ProseMirror ul, .tiptap-editor .ProseMirror ol { padding-left: 1.5em; }
.tiptap-editor .ProseMirror blockquote {
  border-left: 3px solid var(--color-accent); padding-left: 1em;
  color: var(--color-text-muted); font-style: italic; margin: .8em 0;
}

/* ----- Forms ----- */
.form-control, .form-select {
  border-radius: .55rem;
  border-color: var(--color-border);
  background: var(--color-surface);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(239,90,36,.14);
}
.card { border-radius: var(--border-radius); border-color: var(--color-border); background: var(--color-surface); }
.badge { font-weight: 600; letter-spacing: .02em; }
.breadcrumb { font-size: .85rem; }
.page-link { color: var(--color-primary); border-color: var(--color-border); }
.page-item.active .page-link { background: var(--color-accent); border-color: var(--color-accent); }

/* ----- Animations ----- */
@keyframes heroIn  { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp{ from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop     { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes float   { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-26px,18px) rotate(180deg); } }

.fade-in    { animation: fadeIn .5s ease-out; }
.fade-in-up { animation: fadeInUp .6s ease-out backwards; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .2s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }
.stagger > *:nth-child(6) { animation-delay: .3s; }
.stagger > *:nth-child(7) { animation-delay: .35s; }
.stagger > *:nth-child(8) { animation-delay: .4s; }
.stagger > *:nth-child(n+9) { animation-delay: .45s; }

/* ----- Reveal on scroll (driven by /js/site.js) ----- */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* legacy .reveal kept working */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.4,0,.2,1); }
.reveal.visible, .reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-slider .hero-img { transition: none; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-light); }
::-webkit-scrollbar-thumb { background: var(--color-accent-light); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* (mobile category-nav behaviour is handled in the MOBILE NAV block below) */

/* =========================================================
   HOME 2 LAYOUT
   ========================================================= */

/* Full-width sections with a small responsive side gutter */
.section-fluid {
  padding-left: clamp(14px, 1.8vw, 30px);
  padding-right: clamp(14px, 1.8vw, 30px);
}

/* ----- Hero banner grid (center slideshow + 4 corner cards, admin-managed) ----- */
.hero-grid-wrap { padding-top: 1.2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-areas:
    "l1 main r1"
    "l2 main r2";
  gap: 14px;
}
.hero-grid--full {
  grid-template-columns: 1fr;
  grid-template-areas: "main";
}
.hero-grid-main { grid-area: main; min-width: 0; }
.hero-card--l1 { grid-area: l1; }
.hero-card--l2 { grid-area: l2; }
.hero-card--r1 { grid-area: r1; }
.hero-card--r2 { grid-area: r2; }

.hero-card,
.hero-slide {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.hero-card { aspect-ratio: 800 / 468; }
.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Shine sweep on hover */
.hero-card::after,
.hero-slide::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 45%; height: 100%;
  z-index: 2;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.38));
  transform: skewX(-25deg);
  pointer-events: none;
}
.hero-card:hover::after,
.hero-slide:hover::after { animation: heroShine .85s ease; }
@keyframes heroShine { to { left: 130%; } }

.hero-card-img,
.hero-slide-img {
  position: absolute; inset: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-card-img--empty,
.hero-slide-img--empty {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

/* Solid label chip centered at the bottom of the card image */
.hero-card-chip {
  position: absolute;
  left: 50%; bottom: .9rem;
  transform: translateX(-50%);
  z-index: 1;
  max-width: calc(100% - 1.8rem);
  padding: .45rem .95rem;
  background: rgba(8,12,18,.86);
  color: #fff;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  border-radius: 3px;
}

/* Center slideshow (Bootstrap carousel) */
.hero-carousel,
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item,
.hero-slide { height: 100%; }
.hero-carousel { border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.hero-slide { border-radius: 0; box-shadow: none; }
.hero-grid--full .hero-carousel,
.hero-grid--full .carousel-inner,
.hero-grid--full .carousel-item { height: auto; }
.hero-grid--full .hero-slide { height: auto; aspect-ratio: 1000 / 420; }

/* Display-only slide: no link, so suppress the hover shine that signals interactivity */
.hero-slide--static { cursor: default; }
.hero-slide--static:hover::after { animation: none; }

/* Editorial panel slide: the classic split hero scaled into the banner */
.hero-slide-panel {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.55), transparent 42%),
    linear-gradient(135deg, #e4edf3 0%, #d3e2ec 55%, #c7d9e6 100%);
}
.hero-slide-panel-text {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem;
  max-width: 58%;
  padding: 1.4rem 0 1.4rem clamp(1rem, 3vw, 2.2rem);
}
.hero-slide-eyebrow {
  font-family: var(--font-display);
  font-style: italic; font-weight: 600;
  font-size: clamp(.85rem, 1.4vw, 1.05rem);
  color: var(--color-accent);
}
.hero-slide-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  line-height: 1.08; letter-spacing: -.02em;
  color: var(--color-primary);
}
.hero-slide-heading em { font-style: italic; color: var(--color-accent); }
.hero-slide-panel-img {
  position: absolute;
  right: 0; bottom: 0;
  width: 52%;
  max-height: 92%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 10px 18px rgba(20,38,56,.18));
}

.hero-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
  padding: 2.6rem 1.4rem 1.2rem;
  background: linear-gradient(to top, rgba(11,20,32,.85) 0%, rgba(11,20,32,.4) 55%, rgba(11,20,32,0) 100%);
  color: #fff;
}
.hero-slide-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
}
.hero-slide-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  font-weight: 700; line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-slide-btn { margin-top: .3rem; }

.hero-carousel .carousel-indicators { margin-bottom: .6rem; }
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: #fff;
  opacity: .55;
  transition: var(--transition);
}
.hero-carousel .carousel-indicators .active {
  width: 22px;
  border-radius: 999px;
  background: var(--color-accent);
  opacity: 1;
}
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { width: 46px; opacity: 0; transition: var(--transition); }
.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next { opacity: .85; }
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon { width: 1.6rem; height: 1.6rem; }

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "main main"
      "l1 l2"
      "r1 r2";
    gap: 10px;
  }
  .hero-grid--full { grid-template-columns: 1fr; grid-template-areas: "main"; }
  .hero-carousel,
  .hero-carousel .carousel-inner,
  .hero-carousel .carousel-item { height: auto; }
  .hero-slide { height: auto; aspect-ratio: 800 / 468; }
  .hero-slide-caption { padding: 1.8rem 1rem .8rem; }
  .hero-card-chip { padding: .3rem .6rem; font-size: .66rem; }
  .hero-slide-heading { font-size: 1.15rem; }
  .hero-slide-panel-text { max-width: 62%; padding-left: 1rem; }
}

/* ----- Promo banners (3 across) ----- */
.promo-card {
  position: relative; overflow: hidden;
  border-radius: var(--border-radius);
  min-height: 240px; padding: 1.8rem 1.9rem;
  display: flex; flex-direction: column; justify-content: center;
  color: #fff; height: 100%;
  background-color: var(--color-primary);
  background-size: cover; background-position: center;
  transition: var(--transition);
}
.promo-card::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(115deg, rgba(20,38,56,.93) 0%, rgba(29,60,92,.74) 52%, rgba(29,60,92,.32) 100%);
}
.promo-card > * { position: relative; z-index: 1; }
.promo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.promo-card .promo-off {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--color-accent-light); margin-bottom: .25rem;
}
.promo-card h5 { color: #fff; font-size: 1.3rem; margin: 0 0 1rem; max-width: 72%; line-height: 1.2; }
.promo-card .promo-btn {
  align-self: flex-start;
  background: #fff; color: var(--color-primary);
  font-size: .76rem; font-weight: 700;
  padding: .5rem 1.1rem; border-radius: 999px;
  transition: var(--transition);
}
.promo-card .promo-btn:hover { background: var(--color-accent); color: #fff; transform: translateX(3px); }

/* ----- Category cards (image tiles: fixed 201x201 desktop, scaled down on mobile) ----- */
.category-cards .item { display: flex; justify-content: center; }
.category-cards .item-image {
  position: relative;
  display: block;
  width: 100%;
  max-width: 201px;
  aspect-ratio: 1 / 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}
.category-cards .item-image:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-cards .img-responsive { display: block; width: 100%; height: 100%; object-fit: cover; }
.category-cards .item-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem .6rem .8rem;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: .85rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  text-align: center; line-height: 1.2;
}

/* ----- Horizontal book slider ----- */
.book-slider {
  display: flex; gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.book-slider > * { scroll-snap-align: start; flex: 0 0 auto; width: clamp(170px, 42vw, 220px); }
.book-slider--wide > * { width: clamp(290px, 86vw, 380px); }
/* exactly 3 cards in view (responsive down to 1). The cover-left/details-right
   card needs ~440px before its price row starts to crowd, so 3-up only below. */
.book-slider.book-slider--featured > * { width: calc((100% - 2 * 1rem) / 3); }
@media (max-width: 1399px) { .book-slider.book-slider--featured > * { width: calc((100% - 1rem) / 2); } }
@media (max-width: 991px)  { .book-slider.book-slider--featured > * { width: 100%; } }
.book-slider.book-slider--bestseller > * { width: clamp(340px, 90vw, 460px); }
.author-slider > * { width: clamp(210px, 44vw, 244px); }
/* exactly 5 cards in view (responsive down to 2) */
.book-slider.book-slider--five > * { width: calc((100% - 4 * 1rem) / 5); }
@media (max-width: 991px) { .book-slider.book-slider--five > * { width: calc((100% - 2 * 1rem) / 3); } }
@media (max-width: 575px) { .book-slider.book-slider--five > * { width: calc((100% - 1rem) / 2); } }
.book-slider::-webkit-scrollbar { height: 6px; }

/* ----- Best-seller compact row card ----- */
.bestseller-card {
  display: flex; gap: 1.25rem; align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.4rem; min-height: 224px; height: 100%;
  transition: var(--transition);
}
.bestseller-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.bestseller-card .bs-img { width: 128px; height: 176px; flex-shrink: 0; border-radius: .5rem; overflow: hidden; background: var(--color-bg-light); }
.bestseller-card .bs-img img { width: 100%; height: 100%; object-fit: cover; }
.bestseller-card .bs-title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; color: var(--color-primary); }
.bestseller-card .bs-author { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.bestseller-card .bs-price { color: var(--color-accent); font-weight: 700; }
.bestseller-rank { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--color-border); }

/* ----- Benefit row ----- */
.benefit-item { display: flex; align-items: center; gap: 1rem; }
.benefit-item .b-ico {
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-bg-light); color: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
  transition: var(--transition);
}
.benefit-item:hover .b-ico { background: var(--color-accent); color: #fff; }
.benefit-item h6 { margin: 0; font-family: var(--font-display); font-size: 1.02rem; }
.benefit-item p { margin: 0; font-size: .8rem; color: var(--color-text-muted); }

/* ----- Featured authors ----- */
.author-card {
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.1rem 1.6rem;
  transition: var(--transition);
}
.author-card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }
.author-medal {
  position: relative;
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: -36px;          /* let the plate tuck under the medal */
}
.author-medal::before {
  content: ''; position: absolute; inset: 0;
  background: url('/img/laurel.svg') center/contain no-repeat;
}
.author-medal .author-avatar {
  position: relative; z-index: 1;
  width: 116px; height: 116px;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
}
.author-medal .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-plate {
  border: 2px dashed var(--color-accent-light);
  border-radius: 8px;
  padding: 1rem .75rem .85rem;
  background: var(--color-surface);
  position: relative; z-index: 0;
}
.author-card .author-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--color-primary); }
.author-card .author-count { font-size: .82rem; color: var(--color-text-muted); margin-top: .25rem; }

/* ----- Slider wrapper + nav arrows ----- */
.slider-wrap { position: relative; }
.slider-nav {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  border: none; z-index: 5;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.slider-nav:hover { background: var(--color-accent); transform: translateY(-50%) scale(1.08); }
.slider-nav-prev { left: -10px; }
.slider-nav-next { right: -10px; }
@media (max-width: 575px) { .slider-nav { display: none; } }

/* ----- Journal / latest news ----- */
.journal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.journal-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.journal-card .j-img { aspect-ratio: 16 / 10; background: var(--color-bg-light); overflow: hidden; }
.journal-card .j-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.journal-card:hover .j-img img { transform: scale(1.06); }
.journal-card .j-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: .4rem;
}
.journal-card .j-title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; line-height: 1.3; color: var(--color-primary); }
.journal-card .j-meta { font-size: .76rem; color: var(--color-text-muted); }

/* ----- Product-card enrichments (category tag + author avatar) ----- */
.product-card .card-tag {
  display: inline-block;
  font-size: .64rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-bg-light);
  padding: .2rem .55rem; border-radius: 999px;
  margin-bottom: .5rem;
}
.product-card .card-byline { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; }
.author-avatar-xs {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff; font-size: .6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ----- Wide featured-book card (cover left / details right) ----- */
.book-wide {
  display: flex; gap: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  height: 334px;
  transition: var(--transition);
  overflow: hidden;
}
.book-wide:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.book-wide .bw-cover {
  /* Proportional, not fixed: at 3-up the card is ~450px instead of ~690px, and a
     rigid cover would starve .bw-body until the price and cart button spilled out. */
  width: 40%; max-width: 220px;
  flex-shrink: 0; border-radius: .5rem; overflow: hidden;
  background: var(--color-bg-light); position: relative; align-self: stretch;
}
.book-wide .bw-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-wide .bw-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.book-wide .bw-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.book-wide .bw-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--color-primary);
  padding: .25rem .65rem; border-radius: 6px;
}
.book-wide .bw-rating { color: var(--color-accent); font-size: 1rem; letter-spacing: 1px; white-space: nowrap; }
.book-wide .bw-rating .empty { color: var(--color-border); }
.book-wide .bw-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  line-height: 1.2; color: var(--color-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-wide .bw-author { display: flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--color-text-muted); margin-top: .7rem; }
.book-wide .bw-author .author-avatar-xs { width: 28px; height: 28px; font-size: .68rem; }
.book-wide .bw-buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; }
.book-wide .bw-buy-left { flex: 1; min-width: 0; }
/* min-width:0 above lets this shrink below its content, so on a narrow card the
   price row would clip rather than reflow. Let the MRP drop to its own line —
   the card has vertical slack for it. */
.book-wide .bw-buy-left > .d-flex { flex-wrap: wrap; }
.book-wide .bw-price { color: var(--color-primary); font-weight: 700; font-size: 1.5rem; }
.book-wide .bw-stock-bar { height: 6px; border-radius: 4px; background: var(--color-border); overflow: hidden; margin-top: .55rem; }
.book-wide .bw-stock-bar > span { display: block; height: 100%; background: var(--color-accent); border-radius: 4px; }
.book-wide .bw-stock-txt { font-size: .8rem; color: var(--color-text-muted); margin-top: .35rem; }
.book-wide .bw-cart {
  width: 52px; height: 52px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--color-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.book-wide .bw-cart:hover { background: var(--color-accent); transform: scale(1.08); }
@media (max-width: 575px) {
  /* On the 1-up card the price column is ~104px; a 4-digit price at 1.5rem has
     no space to break on, so it clips rather than wraps. */
  .book-wide .bw-price { font-size: 1.15rem; }
}

/* =========================================================
   MOBILE NAV (hamburger toggle)
   ========================================================= */
.navbar-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 8px;
  width: 44px; height: 40px;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.navbar-toggle:hover { background: rgba(255,255,255,.12); border-color: var(--color-accent); }

@media (max-width: 991px) {
  /* one bar, three rows: brand + user + cart + toggle, then search, then the menu */
  .site-navbar .container-fluid {
    flex-wrap: wrap; row-gap: .6rem; align-items: center;
    min-height: 0; padding-top: .55rem; padding-bottom: .55rem;
  }
  .site-navbar .navbar-brand { order: 1; font-size: 1.45rem; margin-right: 0; }
  /* the user icon now carries the auto margin that pushes this group right */
  .site-navbar .header-user-link { order: 2; margin-left: auto; }
  .site-navbar .header-cart-link { order: 3; margin-left: .15rem; }
  .navbar-toggle { display: inline-flex; order: 4; }
  .site-navbar .site-search { order: 5; flex: 0 0 100%; max-width: 100%; margin: 0; }

  /* the nav becomes a collapsible vertical menu, full-bleed under the bar */
  .site-navbar .nav-row {
    order: 5;
    display: none; flex-direction: column; padding: .25rem 0;
    /* full-bleed: 100% is the container's content box, so add back both gutters
       and pull them off with negative margins, or the panel falls a gutter short */
    flex: 0 0 auto;
    width: calc(100% + 2 * clamp(14px, 1.8vw, 30px));
    background: var(--color-primary-dark);
    margin: 0 calc(-1 * clamp(14px, 1.8vw, 30px)) -.55rem;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }
  .site-navbar .nav-row.open { display: flex; animation: fadeIn .25s ease-out; }
  .site-navbar .menu-item { width: 100%; display: block; }
  .site-navbar .menu-link {
    display: block; width: 100%;
    text-transform: none;
    font-size: .95rem; letter-spacing: normal;
    padding: .7rem 1.1rem;
    /* stacked rows: the border is a divider here, not a centred-label underline */
    border-top: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .site-navbar .menu-link:hover,
  .site-navbar .menu-item:hover .menu-link { border-bottom-color: rgba(255,255,255,.08); }
  .site-navbar .menu-link .caret { float: right; font-size: 1.25rem; line-height: 1.2; opacity: .9; transition: transform .25s ease; }
  .site-navbar .menu-item.open > .menu-link .caret { transform: rotate(180deg); }

  /* sub-category panels collapse into an accordion (tap parent to open) */
  .site-navbar .dropdown-panel {
    position: static; box-shadow: none; transform: none;
    border-radius: 0; background: rgba(0,0,0,.22);
    overflow: hidden;
    max-height: 0; opacity: 0; visibility: hidden; padding: 0;
    transition: max-height .35s ease, opacity .25s ease, padding .25s ease;
  }
  .site-navbar .menu-item.open > .dropdown-panel {
    max-height: 80vh; opacity: 1; visibility: visible;
    padding: .25rem 0 .5rem;
  }
  .site-navbar .dropdown-panel a { color: rgba(255,255,255,.85); }
  .site-navbar .dropdown-panel a:hover { background: rgba(255,255,255,.06); }
  .site-navbar .dropdown-panel .panel-header { color: rgba(255,255,255,.55); border-bottom-color: rgba(255,255,255,.1); }
}

/* ============================================================
   Product-detail image gallery + zoom lightbox (.pd-*)
   Recovered after the theme swap so the lightbox controls are
   hidden until opened and styled correctly.
   ============================================================ */
.pd-main-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius, 10px);
}
.pd-main-img {
  max-height: 400px;
  width: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform .5s ease;
}
.pd-main-wrap:hover .pd-main-img { transform: scale(1.03); }
.pd-zoom-hint {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(15,27,48,.78);
  color: #fff;
  font-size: .72rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  letter-spacing: .03em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.pd-main-wrap:hover .pd-zoom-hint { opacity: 1; transform: translateY(0); }

.pd-thumb {
  transition: outline-color .2s ease, transform .2s ease;
  outline: 2px solid transparent;
  outline-offset: 1px;
}
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.active { outline-color: var(--color-accent, #f59e0b); }

.pd-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, .92);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn .25s ease-out;
}
.pd-lightbox.open { display: flex; }
.pd-lb-stage {
  position: relative;
  width: 90vw;
  height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#pd-lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  user-select: none;
  -webkit-user-drag: none;
}
.pd-lb-close,
.pd-lb-nav,
.pd-lb-tools button {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.pd-lb-close:hover,
.pd-lb-nav:hover,
.pd-lb-tools button:hover { background: rgba(255,255,255,.22); transform: scale(1.05); }
.pd-lb-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 44px; height: 44px;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 2;
}
.pd-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 1.3rem;
  z-index: 2;
}
.pd-lb-prev { left: 22px; }
.pd-lb-next { right: 22px; }
.pd-lb-tools {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: .35rem .5rem;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.pd-lb-tools button {
  width: 38px; height: 38px;
  font-size: 1rem;
  border-radius: 999px;
}
.pd-lb-tools button:last-child { width: auto; padding: 0 .9rem; font-size: .8rem; }
#pd-lb-zlabel {
  color: #fff;
  font-size: .8rem;
  min-width: 48px;
  text-align: center;
}
@media (max-width: 576px) {
  .pd-lb-nav { width: 38px; height: 38px; }
  .pd-lb-prev { left: 8px; } .pd-lb-next { right: 8px; }
  .pd-lb-close { top: 10px; right: 12px; }
}

/* ----- Cart quantity stepper ----- */
.qty-stepper { flex-wrap: nowrap; }
.qty-stepper .form-control {
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
  padding-left: .25rem;
  padding-right: .25rem;
}
.qty-stepper .form-control::-webkit-outer-spin-button,
.qty-stepper .form-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-stepper .btn {
  width: 32px;
  flex: 0 0 auto;
  font-weight: 600;
}

/* ============================================================
   Account / profile page
   ============================================================ */
.account-page { max-width: 1280px; }

/* ----- Identity banner ----- */
.account-hero {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.account-avatar {
  flex: 0 0 auto;
  width: 68px; height: 68px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 700; line-height: 1;
  letter-spacing: .02em;
}
.account-identity { flex: 1 1 auto; min-width: 0; }
.account-name {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: #fff;
  margin: 0 0 .3rem;
  letter-spacing: -.01em;
  /* wrap rather than truncate: a clipped name reads as a rendering bug */
  overflow-wrap: anywhere;
}
.account-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  font-size: .875rem;
  color: rgba(255,255,255,.82);
}
.account-meta-item { overflow-wrap: anywhere; }
.account-meta-sep { color: rgba(255,255,255,.4); }
.account-hero-action { flex: 0 0 auto; align-self: flex-start; }

.account-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .6rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .01em;
}
.account-badge.is-verified { background: rgba(47,143,91,.22); color: #a9e6c3; }
.account-badge.is-pending  { background: rgba(239,90,36,.2);  color: var(--color-accent-light); }

/* ----- Shell: sidebar rail + page ----- */
.account-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);  /* minmax stops long rows widening the grid */
  gap: 1.25rem;
  margin-top: .9rem;
  align-items: start;
}
.account-content { min-width: 0; }

.account-nav {
  display: flex; flex-direction: column; gap: .25rem;
  padding: .5rem;
  background: var(--color-bg-light);
  border-radius: var(--border-radius);
  position: sticky; top: 1rem;
}
.account-nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: 44px;                      /* touch floor */
  padding: .55rem .8rem;
  border-radius: .5rem;
  border-left: 3px solid transparent;
  color: var(--color-text);
  font-size: .9rem; font-weight: 600;
  transition: var(--transition);
}
.account-nav-link:hover { background: rgba(255,255,255,.7); color: var(--color-primary); }
/* current page: colour AND a weight/border shift, so it reads without hue */
.account-nav-link.is-current {
  background: var(--color-surface);
  border-left-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.account-nav-label { min-width: 0; overflow-wrap: anywhere; }
.account-nav-count {
  flex: 0 0 auto;
  min-width: 22px; padding: .1rem .4rem;
  border-radius: 999px;
  background: rgba(29,60,92,.1);
  color: var(--color-primary);
  font-size: .72rem; font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums;
}
.account-nav-link.is-current .account-nav-count { background: var(--color-accent); color: #fff; }

.account-page-title { margin-bottom: .75rem; font-size: 1.25rem; }
.account-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1.1rem;
}

/* ----- Order / enquiry rows ----- */
.account-list { display: flex; flex-direction: column; gap: .5rem; }
.account-row {
  display: flex; align-items: center; gap: .9rem;
  padding: .6rem 1rem;
  min-height: 52px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  color: var(--color-text);
  transition: var(--transition);
}
a.account-row:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
.row-id {
  flex: 0 0 auto;
  font-weight: 700; font-size: .82rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; font-size: .92rem; }
.row-sub { font-size: .78rem; color: var(--color-text-muted); }
.row-amount {
  flex: 0 0 auto;
  font-weight: 700; font-size: .95rem;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;   /* keeps ₹ columns from jittering */
}

.status-pill {
  flex: 0 0 auto;
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  text-transform: capitalize; letter-spacing: .02em;
  white-space: nowrap;
}
.status-pending, .status-new        { background: #dbe7f2; color: #1d3c5c; }
.status-contacted                   { background: #fdebd8; color: #8a4416; }
.status-confirmed, .status-delivered, .status-closed { background: #d6efe0; color: #1d6340; }
.status-cancelled                   { background: #e9edf1; color: #58687a; }

/* ----- Empty states ----- */
.account-empty {
  padding: 1.75rem 1rem;
  text-align: center;
  background: var(--color-bg-light);
  border-radius: var(--border-radius);
}

/* ----- Form fields ----- */
/* 46px keeps every control clear of the 44px touch floor, and stops iOS
   zooming into the field on focus (which needs >=16px text). */
.account-page .form-control { min-height: 46px; font-size: 1rem; }

/* Read-only must not look merely disabled or, worse, editable. */
.account-page .form-control[readonly] {
  background: var(--color-bg-light);
  border-style: dashed;
  color: var(--color-text-muted);
  cursor: default;
}

/* ----- Password reveal ----- */
.pw-field { position: relative; }
.pw-field .form-control { padding-right: 4.5rem; }
.pw-toggle {
  position: absolute; top: 50%; right: .25rem;
  transform: translateY(-50%);
  min-width: 52px; min-height: 44px;   /* full touch target, not just the label */
  padding: 0 .6rem;
  border: 0; border-radius: .45rem;
  background: transparent;
  color: var(--color-primary);
  font-size: .78rem; font-weight: 600;
}
.pw-toggle:hover { background: var(--color-bg-light); }

/* Under lg the rail would push the page a screen down, so it becomes a
   horizontal tab strip that scrolls if the labels don't fit. */
@media (max-width: 991.98px) {
  .account-shell { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .account-nav {
    position: static;
    flex-direction: row;
    gap: .35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav-link {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: .5rem .5rem 0 0;
    white-space: nowrap;
  }
  .account-nav-link.is-current { border-left-color: transparent; border-bottom-color: var(--color-accent); }
}

@media (max-width: 575.98px) {
  .account-hero { flex-wrap: wrap; gap: .9rem; padding: 1.15rem; }
  .account-avatar { width: 54px; height: 54px; font-size: 1.2rem; }
  .account-name { font-size: 1.3rem; }
  .account-hero-action { order: 3; width: 100%; }
  .account-hero-action .btn { width: 100%; }

  /* the amount and status drop under the title rather than squeezing to shreds */
  .account-row { flex-wrap: wrap; gap: .35rem .7rem; }
  .row-main { flex: 1 1 60%; }
  .row-amount { margin-left: auto; }
  .status-pill { flex: 0 0 auto; }
}
