/* ===================================================================
   Rais Doultana Book House — Stylesheet (Premium Edition)
   Palette lifted from the shop's own emblem, refined into a premium
   navy + gold system: deep navy primary, warm gold secondary/accent,
   on a soft ivory background. Glass panels, gradient borders and
   gold-glow shadows carry the "luxury bookstore" feel throughout.
   Display face: "Playfair Display" (editorial, high-contrast serif)
   Body face:    "Inter" (clean, modern, reads well at small size)
   =================================================================== */

:root {
  --navy: #0B1F4D;
  --navy-deep: #08162E;
  --royal: #1B3A7A;
  --gold: #C9982D;
  --gold-soft: #E8B44C;
  --gold-deep: #9C7420;
  --teal: #0f6e6a;
  --maroon: #7c2434;
  --forest: #2d5f3e;
  --cream: #FAF8F2;
  --paper: #FFFDF9;
  --ink: #101a34;
  --ink-soft: #58607e;
  --line: #e8e1d2;

  --radius: 18px;
  --shadow: 0 10px 34px rgba(11, 31, 77, 0.12);
  --shadow-lg: 0 30px 70px rgba(11, 31, 77, 0.26);
  --glow-gold: 0 0 0 1px rgba(232, 180, 76, .35), 0 10px 30px rgba(201, 152, 45, .28);
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(232, 180, 76, 0.22);
  --gradient-gold: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  --gradient-navy: linear-gradient(150deg, var(--navy), var(--navy-deep));
  --ease-premium: cubic-bezier(.16,.84,.32,1);
}

::selection { background: var(--gold-soft); color: var(--navy-deep); }

/* Custom scrollbar — small premium touch */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gradient-gold); border-radius: 10px; border: 2px solid var(--cream); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.01em;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Thin gold rule — used as a signature divider under section titles */
.gold-rule {
  width: 64px; height: 3px; margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 3px;
}
.gold-rule.left { margin: 0 0 18px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 20px; height: 1px; background: var(--gold); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--ease-premium), box-shadow .3s ease, background .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }

/* Ripple effect — JS (premium.js) injects a .ripple span with click coords */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  transform: scale(0);
  animation: btn-ripple .6s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}
@keyframes btn-ripple { to { transform: scale(3); opacity: 0; } }

.btn-gold {
  background: var(--gradient-gold);
  color: var(--navy-deep);
  box-shadow: 0 10px 26px rgba(201, 152, 45, .38), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover { box-shadow: 0 16px 36px rgba(201, 152, 45, .55), inset 0 1px 0 rgba(255,255,255,.5); }

.btn-outline { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.55); color: #fff; backdrop-filter: blur(6px); }
.btn-outline:hover { background: rgba(255,255,255,.14); border-color: var(--gold-soft); box-shadow: 0 0 0 1px rgba(232,180,76,.3); }

.btn-whatsapp { background: linear-gradient(135deg, #33e07a, #1fb85c); color: #fff; box-shadow: 0 10px 26px rgba(31, 184, 92, .4); }
.btn-whatsapp:hover { box-shadow: 0 16px 34px rgba(31, 184, 92, .55); }

.btn-navy { background: var(--gradient-navy); color: #fff; box-shadow: 0 10px 24px rgba(11,31,77,.3); }
.btn-navy:hover { box-shadow: 0 16px 34px rgba(11,31,77,.42), 0 0 0 1px rgba(232,180,76,.25); }

/* ---------------- Top bar & header ---------------- */
.topbar {
  background: var(--navy-deep);
  color: #cdd6ef;
  font-size: .82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #cdd6ef; }
.topbar a:hover { color: var(--gold-soft); }
.topbar-links { display: flex; gap: 18px; flex-wrap: wrap; }

header.site-header {
  background: rgba(9, 22, 55, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(232,180,76,.28);
  transition: box-shadow .3s ease, background .3s ease;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy-deep);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--glow-gold), 0 0 0 3px var(--navy-deep);
  transition: box-shadow .3s ease, transform .3s ease;
}
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.04); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-text .name {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.1;
}
.brand-text .tagline {
  color: var(--gold-soft);
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
nav.main-nav > ul {
  display: flex;
  gap: 34px;
  align-items: center;
}
nav.main-nav > ul > li > a {
  position: relative;
  color: #e4e9fa;
  font-weight: 600;
  font-size: .95rem;
  padding-bottom: 6px;
  transition: color .2s;
}
nav.main-nav > ul > li > a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gradient-gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-premium);
}
nav.main-nav > ul > li > a:hover, nav.main-nav > ul > li > a.active { color: var(--gold-soft); }
nav.main-nav > ul > li > a:hover::after, nav.main-nav > ul > li > a.active::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  header.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav.main-nav { position: fixed; inset: 0 0 0 30%; background: var(--navy); transform: translateX(100%); transition: transform .3s ease; padding: 90px 26px; z-index: 60; overflow-y: auto; }
  nav.main-nav.open { transform: translateX(0); }
  nav.main-nav > ul { flex-direction: column; align-items: flex-start; gap: 22px; }
  .menu-toggle { display: block; }
  .nav-cta .btn span.long { display: none; }
}

/* ---------------- Categories mega menu ---------------- */
.nav-mega { position: relative; }
.nav-mega > .mega-trigger { display: flex; align-items: center; gap: 4px; }
.nav-mega > .mega-trigger::before { content: ''; } /* keep existing ::after underline working */

.mega-panel {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--navy-deep);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  z-index: 70;
  min-width: 240px;
}
.mega-col-main, .mega-col-sub, .mega-col-section {
  display: block;
  list-style: none; margin: 0; padding: 0;
  max-height: 60vh; overflow-y: auto;
}
.mega-col-main { width: 240px; }
.mega-col-main > li { position: relative; }
.mega-col-main > li > a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border-radius: 8px; color: #e4e9fa; font-weight: 600; font-size: .9rem;
  white-space: nowrap;
}
.mega-col-main > li > a:hover, .mega-col-main > li:hover > a { background: rgba(232,180,76,.12); color: var(--gold-soft); }
.mega-arrow { color: var(--gold-soft); font-size: .85rem; flex-shrink: 0; }

.mega-col-sub {
  display: none;
  position: absolute; top: 0; left: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px; margin-left: 6px;
  width: 220px;
  max-height: 60vh; overflow-y: auto;
}
.mega-col-main > li:hover > .mega-col-sub,
.mega-col-main > li.mega-open > .mega-col-sub { display: block; }
.mega-col-sub > li { position: relative; }
.mega-col-sub > li > a {
  display: block;
  padding: 9px 14px; border-radius: 8px; color: #e4e9fa; font-weight: 600; font-size: .87rem;
  white-space: nowrap;
}
.mega-col-sub > li > a:hover, .mega-col-sub > li:hover > a { background: rgba(232,180,76,.12); color: var(--gold-soft); }

.mega-col-section {
  display: none;
  position: absolute; top: 0; left: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px; margin-left: 6px;
  width: 220px;
}
.mega-col-sub > li:hover > .mega-col-section,
.mega-col-sub > li.mega-open > .mega-col-section { display: block; }
.mega-col-section > li > a {
  display: block; padding: 9px 14px; border-radius: 8px; color: #e4e9fa; font-weight: 500; font-size: .85rem;
  white-space: nowrap;
}
.mega-col-section > li > a:hover { background: rgba(232,180,76,.12); color: var(--gold-soft); }

.nav-mega:hover > .mega-panel, .nav-mega.mega-open > .mega-panel { display: block; }

/* Custom slim scrollbar just for menu columns */
.mega-col-main::-webkit-scrollbar, .mega-col-sub::-webkit-scrollbar, .mega-col-section::-webkit-scrollbar { width: 7px; }
.mega-col-main::-webkit-scrollbar-thumb, .mega-col-sub::-webkit-scrollbar-thumb, .mega-col-section::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 8px; }

@media (max-width: 860px) {
  .mega-panel, .mega-col-sub, .mega-col-section { position: static; box-shadow: none; border: none; width: 100%; margin: 0; padding-left: 12px; background: transparent; }
  .mega-panel { display: none; padding: 6px 0 0; }
  .nav-mega.mega-open > .mega-panel { display: block; }
  .mega-col-main > li.mega-open > .mega-col-sub,
  .mega-col-sub > li.mega-open > .mega-col-section { display: block; }
  .mega-col-main, .mega-col-sub, .mega-col-section { max-height: none; overflow: visible; }
}

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(9, 64, 160, 0.977), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(29, 63, 174, 0.482), transparent 40%),
    linear-gradient(160deg, var(--gold-deep) 60%, var(--navy-deep) 68%, #112a76 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: .85;
}

.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(242, 207, 126, .08);
  animation: float-blob 9s ease-in-out infinite;
}
.hero::before { width: 160px; height: 160px; top: 8%; right: 8%; }
.hero::after { width: 90px; height: 90px; bottom: 12%; left: 4%; animation-delay: 2s; background: rgba(29,63,174,.25); }
@keyframes float-blob {
  0%, 100% { transform: translateY(0) scale(3); }
  50% { transform: translateY(-18px) scale(2.9); }
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 20px;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 10px; padding-bottom: 20px; }
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); }
.hero h1 .hl { color: var(--navy-deep); }
.hero p.lead {
  color: #cdd4ee;
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 26px;
}

/* Hero search bar */
.hero-search {
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 26px;
  max-width: 560px;
  gap: 4px;
}
.hero-search select {
  border: none;
  background: #f3f0e6;
  border-radius: 999px;
  padding: 0 16px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  max-width: 130px;
}
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 10px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  min-width: 0;
}
.hero-search button {
  border: none;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.hero-search button:hover { background: var(--gold-deep); }
@media (max-width: 540px) {
  .hero-search { flex-wrap: wrap; border-radius: 20px; padding: 10px; }
  .hero-search select { width: 100%; max-width: 100%; padding: 10px 12px; order: 1; }
  .hero-search .cat-picker { width: 100%; order: 1; }
  .hero-search .cat-picker-btn { width: 100%; max-width: 100%; padding: 12px; }
  .hero-search input { width: 100%; flex: 1 1 100%; padding: 10px 12px; order: 2; }
  .hero-search button { width: 100%; justify-content: center; padding: 12px; order: 3; }
}

/* ---------------- Cat-picker: cascading category dropdown ----------------
   Used in the hero search bar and at the top of category.php. Click opens
   a panel that starts on the Main Categories list; picking one slides to
   that Main Category's Categories list (with a Back button), instead of
   dumping every category into one long flat list. */
.cat-picker { position: relative; flex-shrink: 0; }
.cat-picker-btn {
  border: none; background: #f3f0e6; border-radius: 999px; padding: 0 16px; height: 100%;
  font-family: inherit; font-size: .85rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: 6px; cursor: pointer; max-width: 170px;
}
.cat-picker-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-picker-btn .caret { flex-shrink: 0; font-size: .7rem; color: var(--gold-deep); }
.cat-picker-panel {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  width: 260px; max-height: 320px; overflow: hidden; z-index: 90;
}
.cat-picker.open .cat-picker-panel { display: block; }
.cat-picker-level { max-height: 320px; overflow-y: auto; padding: 8px; }
.cat-picker-level[hidden] { display: none; }
.cat-picker-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 12px; border-radius: 8px; font-size: .88rem; color: var(--ink); cursor: pointer;
  font-family: inherit; font-weight: 600;
}
.cat-picker-item:hover { background: rgba(201,152,45,.1); color: var(--gold-deep); }
.cat-picker-item.cat-picker-back { color: var(--ink-soft); font-weight: 700; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: 12px; }
.cat-picker-item.cat-picker-reset { color: var(--royal); }

/* Simple site-wide book search bar (category.php / part.php) */
.simple-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 44px; }
.simple-search input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 13px 20px;
  font-family: inherit; font-size: .95rem; color: var(--ink);
}
.simple-search input:focus { outline: none; border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(232,180,76,.15); }
.simple-search button {
  border: none; background: var(--navy); color: #fff; border-radius: 999px; padding: 0 26px;
  font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background .2s;
}
.simple-search button:hover { background: var(--gold-deep); }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.stat-row { display: flex; gap: 34px; flex-wrap: wrap; }

/* Signature element: animated CSS bookshelf */
.shelf-art { position: relative; height: 320px; display: flex; align-items: flex-end; justify-content: center; }
.shelf-board {
  position: absolute; bottom: 18px; left: 4%; right: 4%; height: 14px;
  background: linear-gradient(180deg, #7a5230, #5b3c22);
  border-radius: 3px; box-shadow: 0 14px 24px rgba(0,0,0,.35);
}
.shelf-books { position: relative; display: flex; align-items: flex-end; gap: 6px; padding-bottom: 30px; z-index: 2; }
.spine {
  width: 26px; border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 16px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(30px); animation: rise .6s ease forwards; position: relative;
}
.spine::after { content: ''; position: absolute; top: 14px; left: 6px; right: 6px; height: 2px; background: rgba(255,255,255,.35); }
.spine:nth-child(1) { height: 190px; background: var(--maroon); animation-delay: .05s; }
.spine:nth-child(2) { height: 230px; background: var(--gold); animation-delay: .15s; }
.spine:nth-child(3) { height: 165px; background: var(--forest); animation-delay: .25s; }
.spine:nth-child(4) { height: 210px; background: var(--royal); animation-delay: .35s; }
.spine:nth-child(5) { height: 180px; background: var(--gold-soft); animation-delay: .45s; }
.spine:nth-child(6) { height: 245px; background: var(--teal); animation-delay: .55s; }
.spine:nth-child(7) { height: 155px; background: #3f7fa6; animation-delay: .65s; }
.spine:nth-child(8) { height: 200px; background: var(--gold); animation-delay: .75s; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .spine { animation: none; opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
  .hero::before, .hero::after { animation: none; }
}

/* Signature element: animated CSS bookshelf — navy/royal spines pop against the gold hero */
.shelf-art {
  position: relative; height: 320px; display: flex; align-items: flex-end; justify-content: center; z-index: 2;
  perspective: 900px;
  animation: shelf-sway 7s ease-in-out infinite;
}
@keyframes shelf-sway {
  0%, 100% { transform: rotateY(0deg) translateY(0); }
  50% { transform: rotateY(6deg) translateY(-8px); }
}
.shelf-board {
  position: absolute; bottom: 18px; left: 4%; right: 4%; height: 14px;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-radius: 3px; box-shadow: 0 14px 24px rgba(0,0,0,.35);
}
.shelf-books { position: relative; display: flex; align-items: flex-end; gap: 6px; padding-bottom: 30px; z-index: 2; }
.spine {
  width: 26px; border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 10px 16px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(30px); animation: rise .6s ease forwards; position: relative;
}
.spine::after { content: ''; position: absolute; top: 14px; left: 6px; right: 6px; height: 2px; background: rgba(255,255,255,.4); }
.spine:nth-child(1) { height: 190px; background: var(--navy-deep); animation-delay: .05s; }
.spine:nth-child(2) { height: 230px; background: var(--paper); animation-delay: .15s; }
.spine:nth-child(3) { height: 165px; background: var(--royal); animation-delay: .25s; }
.spine:nth-child(4) { height: 210px; background: var(--navy); animation-delay: .35s; }
.spine:nth-child(5) { height: 180px; background: var(--gold-deep); animation-delay: .45s; }
.spine:nth-child(6) { height: 245px; background: var(--navy-deep); animation-delay: .55s; }
.spine:nth-child(7) { height: 155px; background: var(--royal); animation-delay: .65s; }
.spine:nth-child(8) { height: 200px; background: var(--paper); animation-delay: .75s; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .spine { animation: none; opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
  .shelf-art { animation: none; }
  .reveal { transform: none; }
  .tile-card, .collection-card, .book-card { transition: none; }
}

/* ---------------- Marquee ---------------- */
.marquee-wrap { background: var(--gold); overflow: hidden; border-top: 1px solid rgba(0,0,0,.06); border-bottom: 1px solid rgba(0,0,0,.06); }
.marquee-track { display: flex; gap: 60px; white-space: nowrap; padding: 14px 0; animation: scroll-left 28s linear infinite; width: max-content; }
.marquee-track span { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--navy-deep); font-size: 1rem; letter-spacing: .02em; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- Sections ---------------- */
section { padding: 74px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--ink-soft); }

.grid { display: grid; gap: 26px; perspective: 1200px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------------- Colorful category tiles (restored per your own edit) ----------------
   3D-tilt ready: JS (main.js) applies a live rotateX/rotateY as the cursor
   moves over the card, and this transition smooths it back to flat on
   mouse-leave. */
.tile-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease-out, box-shadow .25s ease;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
  min-height: 210px;
  padding: 22px;
}
.tile-card:hover { box-shadow: var(--shadow-lg); }
.tile-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 100%, rgba(255,255,255,.16), transparent 55%);
  pointer-events: none;
}
.tile-card .tile-icon { font-size: 2rem; margin-bottom: auto; }
.tile-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 4px; position: relative; z-index: 2; }
.tile-card p { color: rgba(255,255,255,.82); font-size: .85rem; margin: 0 0 14px; position: relative; z-index: 2; }
.tile-card .btn { align-self: flex-start; position: relative; z-index: 2; padding: 8px 18px; font-size: .82rem; background: rgba(255,255,255,.18); color: #fff; }
.tile-card .btn:hover { background: rgba(255,255,255,.3); }

.tile-navy   { background: linear-gradient(150deg, #1d3fae, var(--navy-deep)); }
.tile-gold   { background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep)); }
.tile-teal   { background: linear-gradient(150deg, #16918c, var(--teal)); }
.tile-maroon { background: linear-gradient(150deg, #a63750, var(--maroon)); }
.tile-forest { background: linear-gradient(150deg, #3f8556, var(--forest)); }

/* ---------------- Collection cards (categories + parts) ----------------
   One consistent navy-and-gold card style used everywhere a "collection"
   is shown — no clashing rainbow tiles, just the brand's two colors,
   differentiated only by icon, exactly like the logo differentiates
   only through line-work, not color. */
.collection-card {
  background: linear-gradient(165deg, rgba(255,255,255,.06), rgba(255,255,255,.01)), var(--gradient-navy);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease-premium), box-shadow .35s ease, border-color .3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
  min-height: 220px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(2px);
}
.collection-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(232,180,76,.5), transparent 40%, transparent 60%, rgba(232,180,76,.3));
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.collection-card:hover {
  box-shadow: var(--shadow-lg), var(--glow-gold);
  border-color: var(--gold-soft);
}
.collection-card:hover::before { opacity: 1; }
.collection-icon {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(232,180,76,.14);
  border: 1.5px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px;
  transition: transform .3s var(--ease-premium);
}
.collection-card:hover .collection-icon { transform: scale(1.1) rotate(-6deg); }
.collection-card-media {
  width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  margin-bottom: 18px; border: 1.5px solid var(--gold-soft); background: rgba(232,180,76,.08);
}
.collection-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease-premium); }
.collection-card:hover .collection-card-media img { transform: scale(1.1); }
.collection-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.collection-card p { color: rgba(255,255,255,.72); font-size: .87rem; margin: 0 0 16px; flex: 1; }
.collection-card .btn {
  align-self: flex-start;
  padding: 9px 20px; font-size: .82rem;
  background: transparent; color: var(--gold-soft);
  border: 1.5px solid var(--gold-soft);
}
.collection-card .btn:hover { background: var(--gradient-gold); color: var(--navy-deep); border-color: transparent; }

/* Color variants — cycled per-card so a grid of sub-categories/sections
   doesn't read as one flat repeated block. Gold icon/border accents stay
   consistent across all of them so it still feels like one brand. */
.collection-card.theme-1 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--navy), var(--navy-deep)); }
.collection-card.theme-2 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--royal), #0d1c47); }
.collection-card.theme-3 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--teal), #073331); }
.collection-card.theme-4 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--maroon), #3d121e); }
.collection-card.theme-5 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--forest), #14291b); }
.collection-card.theme-6 { background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.01)), linear-gradient(150deg, var(--gold-deep), #4a3610); }

/* ---------------- Book card with hover "Order Now" + rating overlay ---------------- */
.book-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease-premium), box-shadow .35s ease, border-color .3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.book-card:hover { box-shadow: var(--shadow-lg), var(--glow-gold); border-color: var(--gold-soft); }
.book-thumb { position: relative; aspect-ratio: 3 / 4; background: #eee; overflow: hidden; }
.book-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-premium); }
.book-card:hover .book-thumb img { transform: scale(1.1); }

.book-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: var(--gradient-gold); color: var(--navy-deep); font-size: .68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .03em;
  box-shadow: 0 4px 12px rgba(201,152,45,.4);
}

/* Color variants — a slim colored accent bar on top of each book card,
   cycled per-card so a grid of books doesn't look monotone. */
.book-card { border-top: 4px solid var(--line); }
.book-card.theme-1 { border-top-color: var(--navy); }
.book-card.theme-2 { border-top-color: var(--royal); }
.book-card.theme-3 { border-top-color: var(--teal); }
.book-card.theme-4 { border-top-color: var(--maroon); }
.book-card.theme-5 { border-top-color: var(--forest); }
.book-card.theme-6 { border-top-color: var(--gold-deep); }

/* The hover overlay: dark navy tint fades in, rating + Order Now button
   appear centered, exactly what was asked for. */
.book-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,18,49,.35), rgba(8,18,49,.86));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity .28s ease;
  z-index: 2;
  padding: 16px;
  text-align: center;
}
.book-card:hover .book-overlay { opacity: 1; }
.book-overlay .overlay-stars { color: var(--gold-soft); font-size: 1.3rem; letter-spacing: 3px; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.book-overlay .overlay-rating-text { color: #e7ecfa; font-size: .78rem; letter-spacing: .04em; }
.book-overlay .btn-whatsapp { padding: 10px 22px; font-size: .85rem; }

.book-info { padding: 14px 16px 18px; }
.book-info h4 { font-size: 1rem; margin-bottom: 2px; }
.book-info .pub { color: var(--ink-soft); font-size: .82rem; margin-bottom: 6px; }
.book-info .static-stars { color: var(--gold); font-size: .82rem; letter-spacing: 1px; margin-bottom: 10px; }
.book-info .price { color: var(--gold-deep); font-weight: 700; margin-bottom: 12px; }
.book-info .btn { width: 100%; justify-content: center; padding: 10px; font-size: .85rem; }

/* Wholesale banner */
.wholesale-banner {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy) 60%, var(--royal));
  color: #fff; border-radius: 24px; padding: 46px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}
.wholesale-banner::after {
  content: '% OFF'; position: absolute; right: -20px; bottom: -30px;
  font-family: 'Playfair Display', serif; font-size: 8rem; font-weight: 700; color: rgba(232,180,76,.09);
}
.wholesale-banner h2 { color: #fff; margin-bottom: 8px; }
.wholesale-banner p { color: #dbe2f4; max-width: 46ch; margin: 0; }

/* Breadcrumb */
.breadcrumb { padding: 20px 0 0; font-size: .85rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--royal); font-weight: 600; }
.breadcrumb span { margin: 0 6px; }

/* Page banner (category / part / search pages) */
.page-banner { background: linear-gradient(140deg, var(--navy-deep), var(--royal)); color: #fff; padding: 60px 0 70px; position: relative; overflow: hidden; }
.page-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(232,180,76,.14), transparent 55%); }
.page-banner h1 { color: #fff; margin-bottom: 8px; position: relative; }
.page-banner p { color: #cdd4ee; max-width: 60ch; position: relative; }
.page-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.page-banner-text { flex: 1 1 380px; position: relative; z-index: 1; }
.page-banner-media {
  flex: 0 0 460px; width: 460px; aspect-ratio: 4 / 3;
  border-radius: 22px; overflow: hidden;
  border: 2px solid var(--gold-soft);
  box-shadow: var(--shadow-lg), var(--glow-gold);
  position: relative; z-index: 1;
}
.page-banner-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 1100px) { .page-banner-media { flex-basis: 360px; width: 360px; } }
@media (max-width: 760px) { .page-banner-media { width: 100%; flex: 1 1 100%; aspect-ratio: 16 / 9; } }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--ink-soft);
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------------- Customer Reviews ---------------- */
.review-card {
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.72));
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform .3s var(--ease-premium), box-shadow .3s ease;
}
.review-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), var(--glow-gold); }
.review-stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 3px; margin-bottom: 10px; }
.review-stars span { display: inline-block; animation: star-pop .4s var(--ease-premium) backwards; }
.review-stars span:nth-child(1) { animation-delay: .05s; }
.review-stars span:nth-child(2) { animation-delay: .12s; }
.review-stars span:nth-child(3) { animation-delay: .19s; }
.review-stars span:nth-child(4) { animation-delay: .26s; }
.review-stars span:nth-child(5) { animation-delay: .33s; }
@keyframes star-pop { from { opacity: 0; transform: scale(.3) rotate(-40deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.review-quote { font-size: .95rem; color: var(--ink); margin-bottom: 18px; font-style: italic; }
.review-person { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 700; color: #fff; font-size: 1rem; flex-shrink: 0;
  background: var(--gradient-navy);
  border: 2px solid var(--gold-soft);
  box-shadow: 0 4px 12px rgba(11,31,77,.25);
}
.review-person .who b { display: block; font-size: .9rem; color: var(--navy); }
.review-person .who span { font-size: .78rem; color: var(--ink-soft); }

/* ---------------- Gallery ---------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item {
  aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); position: relative; border: 1px solid var(--line);
  cursor: pointer; transition: box-shadow .3s ease, transform .3s var(--ease-premium);
}
.gallery-item:hover { box-shadow: var(--shadow-lg), var(--glow-gold); transform: translateY(-4px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-premium); }
.gallery-item:hover img { transform: scale(1.12); }
.gallery-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--gold-soft);
  background: var(--gradient-navy);
}

/* Lightbox (JS-controlled) */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(8,22,46,.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
  padding: 30px;
}
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
  max-width: min(88vw, 900px); max-height: 85vh; border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); border: 2px solid var(--gold-soft);
  transform: scale(.9); transition: transform .35s var(--ease-premium);
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 24px; right: 30px; color: #fff; font-size: 2rem;
  background: rgba(255,255,255,.1); width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid rgba(232,180,76,.4); transition: background .2s, transform .2s;
}
.lightbox-close:hover { background: var(--gradient-gold); color: var(--navy-deep); transform: rotate(90deg); }

/* ---------------- Footer ---------------- */
footer.site-footer { background: var(--navy-deep); color: #b6c0e6; padding: 70px 0 28px; position: relative; }
footer.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-gold);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 18px; font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.footer-grid p, .footer-grid li { font-size: .89rem; margin-bottom: 11px; color: #9aa6d4; transition: color .2s, transform .2s; }
.footer-grid a:hover { color: var(--gold-soft); }
.footer-grid li:has(a):hover { transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid rgba(232,180,76,.14); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .8rem; color: #7885b8;
}

/* Floating WhatsApp button */
.float-whatsapp {
  position: fixed; bottom: 24px; right: 24px;
  background: linear-gradient(135deg, #33e07a, #1fb85c); color: #fff; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(31,184,92,.5), 0 0 0 1px rgba(255,255,255,.15); z-index: 80;
  animation: pulse 2.4s ease infinite;
  transition: transform .25s var(--ease-premium);
}
.float-whatsapp:hover { transform: scale(1.08) translateY(-2px); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(31,184,92,.5), 0 0 0 0 rgba(31,184,92,.35); }
  50% { box-shadow: 0 10px 32px rgba(31,184,92,.8), 0 0 0 10px rgba(31,184,92,.08); }
}

/* Reveal-on-scroll utility — subtle 3D flip-up entrance */
.reveal {
  opacity: 0;
  transform: translateY(20px) rotateX(-6deg);
  transform-origin: bottom center;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0) rotateX(0); }

/* Cursor glow — a soft gold light that follows the pointer (desktop only, JS-driven) */
.cursor-glow {
  position: fixed;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,180,76,.10), transparent 70%);
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  will-change: left, top;
  display: none;
}
@media (hover: hover) and (pointer: fine) { .cursor-glow { display: block; } }

/* Magnetic buttons — JS (premium.js) sets a small translate on mousemove;
   this transition eases it back to (0,0) on mouse-leave. */
.magnetic { transition: transform .35s var(--ease-premium); }

/* Animated counters — no visual change needed, JS rewrites the number */
.stat-row .stat b { display: block; font-family: 'Playfair Display', serif; font-size: 1.9rem; background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-row .stat span { font-size: .78rem; color: #a9b4e0; letter-spacing: .04em; text-transform: uppercase; }

 /*---------------- Admin: searchable dropdown ----------------*/
 /*  Progressive enhancement for <select class="searchable-select">*/
 /*  (see assets/js/admin-search-select.js). Original select is kept*/
 /*  in the DOM, just visually hidden, so the form still works even if*/
 /*  JS fails to load. */
.ss-wrap { position: relative; }
.ss-hidden-select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.ss-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .92rem; background: #fff;
}
.ss-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,152,45,.15); }
.ss-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto;
  z-index: -99; display: none;
}
.ss-list.open { display: block; }
.ss-item { padding: 10px 14px; font-size: .9rem; cursor: pointer; color: var(--ink); }
.ss-item:hover, .ss-item.active { background: var(--cream); color: var(--navy); }
.ss-empty { padding: 10px 14px; font-size: .87rem; color: var(--ink-soft); font-style: italic; }