/* ═══════════════════════════════════════════
   BOOK SHOP — Custom Styles
   ═══════════════════════════════════════════ */

:root {
  --theme: #4f9d5b;
  --theme-dark: #3f8049;
  --theme-soft: #a3cfa6;
  --ink: #1c1c1c;
  --paper: #ffffff;
  --muted: #7a7a7a;
  --bg-soft: #f5f5f5;
  --serif: 'Playfair Display', Georgia, serif;
  --round: 'Comfortaa', 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--round);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2, h3, .serif { font-family: var(--serif); }

a { text-decoration: none; color: inherit; transition: color .25s; }
a:hover { color: var(--theme); }

/* ── Buttons ─────────────────────────────── */
.btn-theme {
  background: var(--theme);
  color: #fff;
  border-radius: 4px;
  padding: .7rem 1.9rem;
  font-family: var(--round);
  font-weight: 600;
  letter-spacing: .4px;
  border: 2px solid var(--theme);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color .3s, box-shadow .3s;
}
.btn-theme::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s ease;
  z-index: -1;
}
.btn-theme:hover { color: #fff; border-color: var(--ink); box-shadow: var(--shadow); }
.btn-theme:hover::before { transform: scaleX(1); transform-origin: left; }

.btn-outline-theme {
  border: 2px solid var(--theme);
  color: var(--theme);
  font-weight: 600;
  padding: .55rem 1.6rem;
  border-radius: 4px;
  transition: all .3s;
}
.btn-outline-theme:hover { background: var(--theme); color: #fff; }

.btn-light-theme {
  background: #fff;
  color: var(--theme);
  font-weight: 700;
  padding: .7rem 2rem;
  border-radius: 4px;
  transition: all .3s;
}
.btn-light-theme:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }

/* ── Topbar ──────────────────────────────── */
.topbar {
  background: #000;
  color: #fff;
  font-size: .78rem;
  letter-spacing: 1.5px;
  padding: .65rem 0;
  transition: max-height .4s, padding .4s, opacity .4s;
  max-height: 60px;
  overflow: hidden;
}
.topbar.closed { max-height: 0; padding: 0; opacity: 0; }
.topbar-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  font-size: .7rem;
  opacity: .8;
}
.topbar-close:hover { opacity: 1; }

/* ── Header ──────────────────────────────── */
.site-header { padding: 1.4rem 0; background: #fff; }

.logo {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #3d3d3d;
}
.logo span { color: var(--theme); }
.logo:hover { color: #3d3d3d; }
.logo-sm { font-size: 1.3rem; }
.logo-footer { font-size: 1.6rem; color: #fff; }
.logo-footer:hover { color: #fff; }

.header-icons { gap: 1.2rem; }
.header-icon {
  position: relative;
  font-size: 1.25rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  transition: transform .25s, color .25s;
}
.header-icon:hover { color: var(--theme); transform: translateY(-2px); }
.icon-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--theme);
  color: #fff;
  font-size: .6rem;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform .2s;
}
.icon-badge.pop { animation: badgePop .4s ease; }
@keyframes badgePop { 50% { transform: scale(1.6); } }

.btn-currency, .btn-lang {
  background: var(--theme);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 3px;
}
.btn-currency:hover, .btn-lang:hover { background: var(--theme-dark); color: #fff; }

/* ── Main nav ────────────────────────────── */
.main-nav {
  background: var(--theme);
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 4px 15px rgba(79, 157, 91, .3);
}
.main-nav .nav-link {
  color: #fff;
  font-weight: 500;
  letter-spacing: .5px;
  padding: 1rem 1.6rem;
  position: relative;
}
.main-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s, left .3s;
}
.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after { width: 55%; left: 22.5%; }
.main-nav .dropdown-menu {
  border: 0;
  border-radius: 0 0 6px 6px;
  box-shadow: var(--shadow-lg);
  margin-top: 0;
  animation: dropIn .25s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(10px); } }
.main-nav .dropdown-item { padding: .6rem 1.4rem; font-size: .9rem; }
.main-nav .dropdown-item:hover { background: var(--theme); color: #fff; padding-left: 1.8rem; transition: all .25s; }

.mobile-nav li a {
  display: block;
  padding: .9rem 0;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

/* ── Hero ────────────────────────────────── */
.hero-slide {
  min-height: 78vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-slide-1 { background: linear-gradient(120deg, #eef3f5 0%, #dfe9ec 45%, #f6efe9 100%); }
.hero-slide-2 { background: linear-gradient(120deg, #f7efe6 0%, #f0e2d2 50%, #e9d9c8 100%); }
.hero-slide-3 { background: linear-gradient(120deg, #e8eff0 0%, #f5ece4 55%, #fdf6ee 100%); }

.hero-slide::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.75), transparent 70%);
  top: -120px;
  right: -80px;
}

.hero-card {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(4px);
  max-width: 620px;
  padding: 3rem 3.2rem;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: .6rem;
}
.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  font-weight: 800;
  color: var(--theme);
  line-height: 1.15;
  margin-bottom: 1.1rem;
}
.hero-text { color: #555; font-size: .95rem; margin-bottom: 1.6rem; }

/* slide-in animation for active slide content */
.carousel-item .hero-eyebrow,
.carousel-item .hero-title,
.carousel-item .hero-text,
.carousel-item .btn-theme,
.carousel-item .book-stack {
  opacity: 0;
  transform: translateY(35px);
}
.carousel-item.active .hero-eyebrow { animation: riseIn .7s .15s ease forwards; }
.carousel-item.active .hero-title   { animation: riseIn .7s .3s ease forwards; }
.carousel-item.active .hero-text    { animation: riseIn .7s .45s ease forwards; }
.carousel-item.active .btn-theme    { animation: riseIn .7s .6s ease forwards; }
.carousel-item.active .book-stack   { animation: riseIn .9s .35s ease forwards; }
@keyframes riseIn { to { opacity: 1; transform: translateY(0); } }

.hero-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.carousel-control-prev:hover .hero-arrow,
.carousel-control-next:hover .hero-arrow { background: var(--theme); color: #fff; }
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme);
  border: 0;
}

/* decorative CSS book stack */
.hero-decor {
  position: absolute;
  right: 6%;
  bottom: 0;
  top: 0;
  display: flex;
  align-items: center;
  z-index: 1;
}
.book-stack { position: relative; width: 340px; height: 320px; animation: floaty 6s ease-in-out infinite; }
.book-stack.tilt { transform: rotate(-3deg); }
@keyframes floaty { 50% { translate: 0 -12px; } }

.stack-book {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  height: 46px;
  border-radius: 5px;
  box-shadow: 0 12px 25px rgba(0,0,0,.18);
}
.sb-1 { bottom: 0;    width: 300px; background: linear-gradient(90deg,#2e6f8e,#4b96b8); }
.sb-2 { bottom: 50px; width: 270px; background: linear-gradient(90deg,#d97b4f,#e89a6e); rotate: -2deg; }
.sb-3 { bottom: 100px; width: 285px; background: linear-gradient(90deg,#e5e0d5,#f4efe5); rotate: 1.5deg; }
.sb-4 { bottom: 150px; width: 250px; background: linear-gradient(90deg,#31556e,#3f6d8c); rotate: -1deg; }
.sb-5 { bottom: 0;    width: 300px; background: linear-gradient(90deg,#7d4a36,#a06046); }
.sb-6 { bottom: 50px; width: 265px; background: linear-gradient(90deg,#c8a97e,#dcc09a); rotate: 2deg; }
.sb-7 { bottom: 100px; width: 280px; background: linear-gradient(90deg,#54372c,#6e4a3a); rotate: -2deg; }
.sb-8 { bottom: 0;    width: 295px; background: linear-gradient(90deg,#3a7d6a,#4f9b85); }
.sb-9 { bottom: 50px; width: 260px; background: linear-gradient(90deg,#e2b33c,#eec95e); rotate: 2deg; }
.sb-10 { bottom: 100px; width: 280px; background: linear-gradient(90deg,#b8503f,#d4694f); rotate: -1.5deg; }
.sb-11 { bottom: 150px; width: 240px; background: linear-gradient(90deg,#40556e,#54708f); rotate: 1deg; }

.stack-glasses, .stack-plant, .stack-cup {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 196px;
  font-size: 4.2rem;
  color: #2b2b2b;
}
.stack-plant { color: #4c7a52; bottom: 146px; }
.stack-cup { color: #6e4a3a; bottom: 196px; }

/* ── Features ────────────────────────────── */
.features { background: var(--bg-soft); }
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.feature-item i {
  font-size: 2.3rem;
  color: var(--ink);
  transition: transform .4s, color .3s;
}
.feature-item:hover i { transform: translateX(6px) rotate(-8deg); color: var(--theme); }
.feature-item h6 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: .15rem;
}
.feature-item p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ── Sections ────────────────────────────── */
.section { padding: 5rem 0; }
.section-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: .9rem;
  position: relative;
  padding-bottom: 1.1rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: 70px;
  height: 3px;
  background: var(--theme);
}

/* ── Filter tabs ─────────────────────────── */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2.2rem 0 2.8rem;
}
.filter-tabs li {
  background: #fff;
  box-shadow: var(--shadow);
  padding: .8rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  user-select: none;
}
.filter-tabs li:hover { transform: translateY(-3px); color: var(--theme); }
.filter-tabs li.active {
  background: var(--theme);
  color: #fff;
  box-shadow: 0 10px 25px rgba(79,157,91,.35);
}

/* ── Product card ────────────────────────── */
.product-card {
  background: #fff;
  position: relative;
  transition: transform .35s, box-shadow .35s, opacity .4s;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.product-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover {
  width: 78%;
  height: 86%;
  border-radius: 4px 10px 10px 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  color: #fff;
  box-shadow: 8px 10px 24px rgba(0,0,0,.25), inset -4px 0 8px rgba(0,0,0,.15);
  transition: transform .5s ease;
}
.book-cover::before {              /* spine */
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.35);
}
.product-card:hover .book-cover { transform: scale(1.07) rotate(-1.5deg); }

.badge-corner {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--theme);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .35rem .7rem;
  z-index: 3;
}
.badge-corner.soldout { background: #b03a2e; }

.product-actions {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 3;
}
.product-actions button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(20px);
  transition: all .35s ease;
}
.product-actions button:nth-child(2) { transition-delay: .07s; }
.product-actions button:nth-child(3) { transition-delay: .14s; }
.product-card:hover .product-actions button { opacity: 1; transform: translateX(0); }
.product-actions button:hover { background: var(--theme); color: #fff; }

.product-info { padding: 1.1rem .5rem 1.4rem; text-align: center; }
.product-vendor {
  font-size: .68rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.product-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .45rem;
}
.product-title a:hover { color: var(--theme); }
.product-price { font-weight: 700; color: var(--theme); }
.product-price .old {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: .5rem;
  font-size: .85rem;
}

/* filter animation */
.product-col { transition: opacity .35s, transform .35s; }
.product-col.hide-it { opacity: 0; transform: scale(.85); pointer-events: none; position: absolute; visibility: hidden; }
.product-col.show-it { animation: cardIn .45s ease both; }
@keyframes cardIn { from { opacity: 0; transform: scale(.9) translateY(20px); } }

/* ── Collections ─────────────────────────── */
.collection-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: #fff;
  cursor: pointer;
  transition: transform .35s, box-shadow .35s;
}
.collection-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.collection-card i {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  font-size: 3.4rem;
  opacity: .28;
  transition: transform .45s, opacity .3s;
}
.collection-card:hover i { transform: scale(1.2) rotate(-10deg); opacity: .45; }
.collection-card h4 { font-weight: 700; margin-bottom: .2rem; }
.collection-card p { margin: 0; font-size: .82rem; opacity: .85; }
.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent 60%);
}
.collection-card > * { position: relative; z-index: 2; }

/* ── Festival banner ─────────────────────── */
.festival-banner {
  background: linear-gradient(rgba(20, 12, 10, .78), rgba(20, 12, 10, .78)),
              linear-gradient(120deg, #4a2c22, #2c1a14 60%, #40251c);
  padding: 6.5rem 0;
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.festival-eyebrow { letter-spacing: 6px; font-weight: 600; color: var(--theme-soft); margin-bottom: 1rem; }
.festival-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1.8rem;
}
.festival-books span {
  position: absolute;
  width: 46px;
  height: 64px;
  border-radius: 3px 6px 6px 3px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255,255,255,.12);
  animation: bookFloat 9s linear infinite;
  bottom: -80px;
}
.festival-books span:nth-child(1) { left: 6%;  animation-delay: 0s; }
.festival-books span:nth-child(2) { left: 20%; animation-delay: 1.8s; scale: .8; }
.festival-books span:nth-child(3) { left: 34%; animation-delay: 3.4s; }
.festival-books span:nth-child(4) { left: 52%; animation-delay: .9s; scale: 1.2; }
.festival-books span:nth-child(5) { left: 68%; animation-delay: 2.6s; }
.festival-books span:nth-child(6) { left: 82%; animation-delay: 4.4s; scale: .7; }
.festival-books span:nth-child(7) { left: 92%; animation-delay: 5.8s; }
@keyframes bookFloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-560px) rotate(25deg); opacity: 0; }
}

/* ── Author card ─────────────────────────── */
.author-card {
  background: var(--bg-soft);
  height: 100%;
  padding: 2.6rem 2.2rem;
  text-align: center;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.author-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #fff;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  transition: transform .4s;
}
.author-card:hover .author-avatar { transform: scale(1.06) rotate(3deg); }
.author-avatar svg { width: 100%; height: 100%; display: block; }
.author-socials { display: flex; gap: .7rem; margin-bottom: 1rem; }
.author-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.author-socials a:hover { background: var(--theme); color: #fff; transform: translateY(-4px); }
.author-name { font-family: var(--serif); font-weight: 700; }
.author-name small { color: var(--muted); font-family: var(--round); font-size: .75rem; }
.author-quote {
  color: #555;
  font-size: .92rem;
  font-style: italic;
  margin: 1rem 0 1.4rem;
  line-height: 1.7;
}

/* ── Offer banner ────────────────────────── */
.offer-banner {
  background: linear-gradient(120deg, #fdf1ec, #f8e3da);
  padding: 5.5rem 0;
  overflow: hidden;
}
.offer-eyebrow { color: var(--theme); font-weight: 700; letter-spacing: 2px; margin-bottom: .5rem; }
.offer-title {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.offer-text { color: #666; font-size: .95rem; margin-bottom: 1.6rem; max-width: 520px; }

.offer-visual { position: relative; height: 300px; }
.offer-book {
  position: absolute;
  width: 165px;
  height: 235px;
  border-radius: 4px 12px 12px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1px;
  box-shadow: 10px 14px 30px rgba(0,0,0,.22);
  transition: transform .4s;
}
.ob-1 { background: linear-gradient(160deg,#33587c,#24405c); left: 8%;  top: 30px; rotate: -8deg; z-index: 1; }
.ob-2 { background: linear-gradient(160deg,#4f9d5b,#356b3d); left: 33%; top: 8px;  z-index: 3; animation: floaty 5s ease-in-out infinite; }
.ob-3 { background: linear-gradient(160deg,#3a7d6a,#28584b); left: 58%; top: 34px; rotate: 8deg; z-index: 2; }
.offer-visual:hover .ob-1 { transform: translateX(-14px) rotate(-3deg); }
.offer-visual:hover .ob-3 { transform: translateX(14px) rotate(3deg); }

/* ── Countdown ───────────────────────────── */
.deal-countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 2.6rem;
  flex-wrap: wrap;
}
.cd-box {
  background: var(--ink);
  color: #fff;
  min-width: 86px;
  padding: .9rem .6rem;
  text-align: center;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.cd-box span {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.cd-box small { font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; opacity: .7; }
.cd-box:first-child { background: var(--theme); }

/* ── Gifts banner ────────────────────────── */
.gifts-banner {
  background: linear-gradient(rgba(40, 96, 52, .88), rgba(40, 96, 52, .88)),
              linear-gradient(120deg, #2f6437, #3f8049);
  color: #fff;
  text-align: center;
  padding: 5.5rem 0;
  position: relative;
  overflow: hidden;
}
.gift-icon { font-size: 3.4rem; display: inline-block; margin-bottom: .8rem; animation: swing 3s ease-in-out infinite; transform-origin: top center; }
@keyframes swing { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }
.gifts-sub { font-size: 1.05rem; opacity: .9; margin-bottom: 1.8rem; }

/* ── News ────────────────────────────────── */
.news-card {
  background: #fff;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform .35s, box-shadow .35s;
  overflow: hidden;
}
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.news-thumb {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-thumb i { font-size: 3.4rem; color: rgba(255,255,255,.9); transition: transform .45s; }
.news-card:hover .news-thumb i { transform: scale(1.2) rotate(-6deg); }
.news-body { padding: 1.5rem; }
.news-meta { font-size: .74rem; color: var(--muted); margin-bottom: .5rem; }
.news-meta strong { color: var(--theme); }
.news-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin-bottom: .6rem; }
.news-excerpt { font-size: .87rem; color: #666; margin-bottom: 1rem; }
.news-more { font-weight: 700; font-size: .85rem; color: var(--theme); position: relative; }
.news-more::after {
  content: "→";
  margin-left: .35rem;
  display: inline-block;
  transition: transform .3s;
}
.news-more:hover::after { transform: translateX(6px); }

/* ── Newsletter ──────────────────────────── */
.newsletter { background: var(--bg-soft); padding: 4.5rem 0; }
.newsletter-title { font-family: var(--serif); font-weight: 700; letter-spacing: 1.5px; margin-bottom: .8rem; }
.newsletter-text { color: var(--muted); max-width: 560px; margin: 0 auto 1.8rem; font-size: .92rem; }
.newsletter-form {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  gap: .6rem;
}
.newsletter-form .form-control {
  border-radius: 4px;
  border: 2px solid #e2e2e2;
  padding: .7rem 1.1rem;
  font-family: var(--round);
}
.newsletter-form .form-control:focus { border-color: var(--theme); box-shadow: none; }
.newsletter-success {
  color: #2e7d4f;
  font-weight: 600;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity .4s;
}
.newsletter-success.show { opacity: 1; }

/* ── Footer ──────────────────────────────── */
.site-footer { background: #171717; color: #cfcfcf; padding: 4.5rem 0 0; }
.footer-heading {
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: .7rem;
}
.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 2px;
  background: var(--theme);
}
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: #b5b5b5; font-size: .88rem; transition: all .25s; }
.footer-links a:hover { color: #fff; padding-left: 6px; }
.footer-contact li { margin-bottom: .7rem; font-size: .88rem; }
.footer-contact i { color: var(--theme); margin-right: .5rem; }
.footer-socials { display: flex; gap: .6rem; }
.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #262626;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd;
  transition: all .3s;
}
.footer-socials a:hover { background: var(--theme); color: #fff; transform: translateY(-4px); }
.footer-bottom {
  border-top: 1px solid #2b2b2b;
  margin-top: 3rem;
  padding: 1.4rem 0;
  font-size: .82rem;
}
.payment-methods i { font-size: 1.5rem; margin-left: .8rem; color: #9a9a9a; transition: color .25s; }
.payment-methods i:hover { color: #fff; }

/* ── Cart drawer ─────────────────────────── */
.cart-drawer { width: 440px; max-width: 92vw; }
.cart-drawer .offcanvas-header { border-bottom: 1px solid #eee; padding: 1.3rem 1.5rem; }
.cart-title { font-family: var(--serif); font-weight: 700; }
.cart-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item .ci-cover {
  width: 64px;
  height: 90px;
  border-radius: 3px 6px 6px 3px;
  flex-shrink: 0;
  box-shadow: 3px 4px 10px rgba(0,0,0,.2);
  display: block;
}
.cart-item .ci-body { flex: 1; }
.cart-item .ci-vendor {
  font-size: .62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .15rem;
}
.cart-item h6 { font-size: 1rem; margin: 0 0 .3rem; font-family: var(--serif); font-weight: 700; }
.cart-item h6 a:hover { color: var(--theme); }
.cart-item .ci-variant { font-size: .74rem; color: #777; line-height: 1.55; margin-bottom: .35rem; }
.cart-item .ci-variant strong { color: #444; font-weight: 600; }
.cart-item .ci-price { color: var(--theme); font-weight: 700; font-size: .95rem; margin-bottom: .5rem; }
.cart-item .ci-old {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  font-size: .8rem;
  margin-right: .5rem;
}
.cart-item .ci-controls { display: flex; align-items: center; gap: .9rem; }
.cart-item .ci-remove { border: 0; background: none; color: #999; font-size: 1.05rem; padding: .2rem; }
.cart-item .ci-remove:hover { color: var(--theme); }
.cart-footer { padding: 1.2rem 1.5rem; border-top: 1px solid #eee; }
.cart-instructions-toggle {
  border: 0;
  background: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  padding: 0 0 .8rem;
  color: var(--ink);
}
.cart-instructions-toggle i { font-size: .7rem; }
.cart-subtotal { font-family: var(--serif); font-size: 1.15rem; }
.cart-taxes { font-size: .8rem; color: var(--muted); margin: .3rem 0 1rem; }

/* ── Quantity stepper ────────────────────── */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #2b2b2b;
}
.qty-stepper button {
  border: 0;
  background: none;
  width: 44px;
  height: 46px;
  font-size: 1.2rem;
  line-height: 1;
  transition: background .2s;
}
.qty-stepper button:hover { background: var(--theme); color: #fff; }
.qty-stepper span {
  min-width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #2b2b2b;
  border-right: 1px solid #2b2b2b;
  font-weight: 600;
}
.qty-stepper.qty-sm button { width: 30px; height: 32px; font-size: 1rem; }
.qty-stepper.qty-sm span { min-width: 36px; font-size: .85rem; }

/* ── Page hero (breadcrumb) ──────────────── */
.page-hero {
  position: relative;
  padding: 5rem 0;
  background: linear-gradient(rgba(250, 246, 242, .82), rgba(250, 246, 242, .82)),
              linear-gradient(120deg, #e8ded2, #d9cbbc);
  overflow: hidden;
  text-align: center;
}
.page-hero-title {
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: .4rem;
}
.page-hero-crumb { color: #6a6a6a; letter-spacing: 1px; margin: 0; }
.page-hero-crumb a { color: var(--theme); font-weight: 600; }
.page-hero-shelf {
  position: absolute;
  inset: auto 0 0 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  opacity: .16;
  pointer-events: none;
}
.page-hero-shelf span {
  width: 34px;
  border-radius: 3px 5px 0 0;
  background: #7a5c46;
}
.page-hero-shelf span:nth-child(odd)  { height: 62%; background: #9d3c3c; }
.page-hero-shelf span:nth-child(3n)   { height: 78%; background: #39647d; }
.page-hero-shelf span:nth-child(4n)   { height: 52%; background: #4a6741; }
.page-hero-shelf span:nth-child(5n)   { height: 70%; background: #c98a2d; }

/* ── Product page ────────────────────────── */
.sidebar-widget {
  background: var(--bg-soft);
  padding: 1.6rem 1.4rem;
  border-radius: 6px;
}
.sidebar-filter {
  font-weight: 600;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e4e4e4;
}
.sidebar-heading {
  font-family: var(--serif);
  font-weight: 700;
  margin: 1.2rem 0 1rem;
}
.sidebar-product {
  display: flex;
  gap: .9rem;
  align-items: center;
  padding: .7rem 0;
  border-bottom: 1px solid #e8e8e8;
}
.sidebar-product:last-child { border-bottom: 0; }
.sidebar-product .sp-cover {
  width: 52px;
  height: 72px;
  border-radius: 3px 6px 6px 3px;
  flex-shrink: 0;
  box-shadow: 3px 4px 10px rgba(0,0,0,.2);
  display: block;
  transition: transform .3s;
}
.sidebar-product:hover .sp-cover { transform: scale(1.06) rotate(-2deg); }
.sidebar-product h6 { font-family: var(--serif); font-weight: 700; font-size: .92rem; margin-bottom: .2rem; }
.sidebar-product h6 a:hover { color: var(--theme); }
.sidebar-product p { margin: 0; color: var(--theme); font-weight: 700; font-size: .85rem; }

.product-gallery { position: sticky; top: 90px; }
.gallery-main {
  background: var(--bg-soft);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4rem;
  aspect-ratio: 4 / 5;
}
.book-cover-lg {
  width: min(320px, 82%);
  height: auto;
  aspect-ratio: 3 / 4.3;
  border-radius: 5px 14px 14px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.6rem 1.6rem;
  color: #fff;
  position: relative;
  box-shadow: 14px 18px 40px rgba(0,0,0,.3), inset -6px 0 12px rgba(0,0,0,.18);
}
.book-cover-lg::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.35);
}
.cover-swap { animation: coverSwap .45s ease; }
@keyframes coverSwap { from { opacity: 0; transform: scale(.94) rotate(-2deg); } }

.gallery-thumbs { display: flex; gap: .8rem; margin-top: 1rem; }
.gallery-thumb {
  width: 64px;
  height: 88px;
  border-radius: 3px 8px 8px 3px;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: all .25s;
}
.gallery-thumb:hover { transform: translateY(-3px); }
.gallery-thumb.active { border-color: var(--theme); box-shadow: 0 8px 18px rgba(79,157,91,.35); }

.pd-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: .5rem;
}
.pd-rating { color: #e8a821; font-size: .95rem; margin-bottom: 1rem; }
.pd-rating span { color: var(--muted); font-size: .8rem; font-family: var(--round); }
.pd-blurb { color: #666; font-size: .92rem; margin-bottom: 1.1rem; }
.pd-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--theme);
  font-family: var(--serif);
  margin-bottom: 1.2rem;
}
.pd-price .old {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 1.1rem;
  margin-right: .7rem;
}
.pd-meta {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: .9rem 0;
  margin-bottom: 1.3rem;
}
.pd-meta p { display: flex; margin: .25rem 0; font-size: .9rem; }
.pd-meta strong { width: 110px; font-family: var(--serif); }
.pd-option-label { font-weight: 700; font-size: .88rem; margin: 0 0 .55rem; }
.option-pills { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.1rem; }
.option-pill {
  border: 1px solid #d5d5d5;
  background: #fff;
  padding: .45rem 1.05rem;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 3px;
  transition: all .25s;
}
.option-pill:hover { border-color: var(--theme); color: var(--theme); }
.option-pill.active {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79,157,91,.3);
}
.pd-stock { color: #2e7d4f; font-weight: 600; font-size: .9rem; }
.pd-stock.out { color: var(--theme); }
.pd-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  margin-top: 1.3rem;
  padding: 1rem 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}
.pd-subtotal strong { color: var(--theme); font-size: 1.4rem; }
.pd-actions { display: flex; gap: .8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.btn-dark-theme {
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: .7rem 1.9rem;
  font-weight: 600;
  letter-spacing: .4px;
  transition: all .3s;
}
.btn-dark-theme:hover { background: var(--theme); border-color: var(--theme); color: #fff; }
.btn-dark-theme:disabled, .pd-actions .btn-theme:disabled { opacity: .55; }
.pd-delivery, .pd-viewers { font-size: .86rem; color: #666; margin-bottom: .4rem; }
.pd-delivery i, .pd-viewers i { color: var(--theme); margin-right: .4rem; }
.pd-share {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}
.pd-share span { font-family: var(--serif); font-weight: 700; margin-right: .3rem; }
.pd-share a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: all .3s;
}
.pd-share a:hover { background: var(--theme); color: #fff; transform: translateY(-3px); }

.pd-tabs { margin-top: 3.5rem; }
.pd-tabs .nav-tabs { border-bottom: 2px solid #eee; gap: .4rem; }
.pd-tabs .nav-link {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  border: 0;
  border-bottom: 3px solid transparent;
  padding: .8rem 1.4rem;
}
.pd-tabs .nav-link.active { color: var(--theme); border-bottom-color: var(--theme); background: none; }
.pd-tabs .tab-content { padding: 1.8rem .2rem; color: #555; font-size: .93rem; line-height: 1.8; }
.pd-tabs h5 { font-family: var(--serif); font-weight: 700; margin-bottom: .6rem; }
.pd-details-table { max-width: 560px; }
.pd-details-table th {
  font-family: var(--serif);
  width: 180px;
  font-weight: 700;
  color: var(--ink);
}
.pd-details-table td { color: #666; }

.pd-related { margin-top: 3rem; }
.pd-related .section-title { margin-bottom: 2.2rem; }

/* ── Wishlist ────────────────────────────── */
.btn-wish {
  border: 2px solid #d5d5d5;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all .3s;
}
.btn-wish:hover { border-color: var(--theme); color: var(--theme); }
.btn-wish.wished {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79,157,91,.3);
}
.product-actions button.wished {
  background: var(--theme);
  color: #fff;
  opacity: 1;
  transform: translateX(0);
}
.wishlist-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 1rem 1.4rem;
  margin-bottom: 2.2rem;
}
.wishlist-bar strong { font-family: var(--serif); font-size: 1.15rem; color: var(--theme); }
.btn-sm-pad { padding: .5rem 1.1rem; font-size: .85rem; }
.wishlist-empty { padding: 3rem 0 2rem; display: none; }
.wishlist-empty i.bi-heartbreak {
  font-size: 4rem;
  color: var(--theme-soft);
  display: inline-block;
  margin-bottom: 1rem;
  animation: floaty 4s ease-in-out infinite;
}
.wishlist-empty h3 { font-weight: 700; margin-bottom: .6rem; }
.wishlist-empty p { color: var(--muted); margin-bottom: 1.6rem; }

/* ── Search modal ────────────────────────── */
.search-modal .modal-content { border: 0; border-radius: 8px; }

/* ── Purchase toast ──────────────────────── */
.purchase-toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1080;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: 6px;
  padding: 1rem 2.4rem 1rem 1rem;
  display: flex;
  gap: .9rem;
  align-items: center;
  max-width: 340px;
  transform: translateY(140%);
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.2);
  overflow: hidden;
}
.purchase-toast.show { transform: translateY(0); }
.toast-cover {
  width: 54px;
  height: 74px;
  border-radius: 3px 6px 6px 3px;
  flex-shrink: 0;
  box-shadow: 3px 4px 10px rgba(0,0,0,.25);
}
.purchase-toast h6 { font-family: var(--serif); font-weight: 700; font-size: .92rem; margin-bottom: .15rem; }
.purchase-toast p { font-size: .78rem; color: #666; line-height: 1.4; }
.purchase-toast small { color: #aaa; font-size: .7rem; }
.toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  color: #999;
  font-size: .7rem;
}
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--theme);
  width: 100%;
  transform-origin: left;
  animation: none;
}
.purchase-toast.show .toast-progress { animation: toastBar 6s linear forwards; }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Back to top ─────────────────────────── */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--theme);
  color: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 1060;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all .35s;
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--ink); }

/* ── Scroll reveal ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease var(--d, 0s), transform .8s ease var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive tweaks ───────────────────── */
@media (max-width: 991.98px) {
  .hero-decor { display: none; }
  .hero-slide { min-height: 60vh; }
  .hero-card { padding: 2rem; margin: 0 auto; }
  .offer-visual { height: 260px; transform: scale(.85); }
}
@media (max-width: 575.98px) {
  .filter-tabs li { padding: .6rem 1.2rem; font-size: .85rem; }
  .cd-box { min-width: 70px; }
  .purchase-toast { max-width: calc(100vw - 90px); }
  .newsletter-form { flex-direction: column; }
}

/* ── Palette classes (server-rendered elements) ── */
[data-pal="0"]  { background: linear-gradient(155deg, #2e3f56, #1d2a3c); }
[data-pal="1"]  { background: linear-gradient(155deg, #b8503f, #8e3527); }
[data-pal="2"]  { background: linear-gradient(155deg, #3a7d6a, #265446); }
[data-pal="3"]  { background: linear-gradient(155deg, #5c4a72, #3f3050); }
[data-pal="4"]  { background: linear-gradient(155deg, #c98a2d, #9c6717); }
[data-pal="5"]  { background: linear-gradient(155deg, #39647d, #254a60); }
[data-pal="6"]  { background: linear-gradient(155deg, #7d4a36, #5a3223); }
[data-pal="7"]  { background: linear-gradient(155deg, #37474f, #232f36); }
[data-pal="8"]  { background: linear-gradient(155deg, #8e3b62, #672a47); }
[data-pal="9"]  { background: linear-gradient(155deg, #4a6741, #31462b); }
[data-pal="10"] { background: linear-gradient(155deg, #9d3c3c, #712727); }
[data-pal="11"] { background: linear-gradient(155deg, #2f6f8f, #1f4d66); }

/* image-based covers keep the book shape without the text overlay */
.book-cover-img { display: block; }

/* ── Blog post page ──────────────────────── */
.blog-post-hero {
  height: 260px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-post-hero i { font-size: 4.5rem; color: rgba(255,255,255,.9); }
.blog-post-body { color: #555; font-size: .98rem; line-height: 1.9; margin-top: 1rem; }
.news-thumb-sm { height: 120px; }
.news-thumb-sm i { font-size: 2.2rem; }

/* ── About page ──────────────────────────── */
.about-title {
  font-family: var(--serif);
  font-weight: 800;
  margin-bottom: 1rem;
}
.about-card { text-align: center; }
.about-stat {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 1.8rem 1rem;
  height: 100%;
}
.about-stat i { font-size: 2rem; color: var(--theme); }
.about-stat h3 { font-family: var(--serif); font-weight: 800; margin: .5rem 0 .2rem; }
.about-stat p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ── Contact page ────────────────────────── */
.contact-channels li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.contact-channels i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(79, 157, 91, .1);
  color: var(--theme);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.contact-channels strong { display: block; font-family: var(--serif); }
.contact-channels span { color: #666; font-size: .92rem; }
.contact-socials a { background: var(--bg-soft); color: var(--ink); }
.contact-form-card {
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 2rem;
}
.contact-form-card .form-control { border: 2px solid #e6e6e6; }
.contact-form-card .form-control:focus { border-color: var(--theme); box-shadow: none; }

/* header dropdowns must paint above the sticky red nav */
.site-header .dropdown-menu { z-index: 1050; }

/* ── Customer account ────────────────────── */
.account-avatar { font-size: 3.4rem; color: var(--theme); line-height: 1; }
.account-stats { border-top: 1px solid #eee; padding-top: 1rem; }
.account-stats li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid #f2f2f2; font-size: .92rem; }
.account-stats strong { font-family: var(--serif); color: var(--theme); }
.account-order { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 1.2rem 1.4rem; margin-bottom: 1.1rem; }
.account-order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; gap: .4rem; }
.account-order-head .badge { font-size: .62rem; margin-inline-start: .4rem; }
.account-order-items { margin: 0 0 .8rem; border-top: 1px dashed #eee; padding-top: .7rem; }
.account-order-items li { display: flex; justify-content: space-between; padding: .28rem 0; font-size: .88rem; color: #555; }
.account-order-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: .7rem; font-family: var(--serif); }
.account-order-total strong { color: var(--theme); font-size: 1.15rem; }

/* ── Customer addresses ──────────────────── */
.address-card { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; border-inline-start: 3px solid transparent; }
.address-card.is-default { border-inline-start-color: var(--theme); }
.address-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.address-head strong { font-family: var(--serif); }
.address-head .badge { font-size: .62rem; }
.address-body { color: #555; font-size: .9rem; line-height: 1.7; margin: 0 0 .8rem; }
.address-fee { display: block; color: var(--theme); font-weight: 600; font-size: .82rem; margin-top: .3rem; }
.address-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.address-actions form { margin: 0; }

/* ── Checkout delivery block ─────────────── */
.co-delivery { border-top: 1px solid #eee; margin-top: .5rem; padding-top: .8rem; }
.co-delivery label { font-weight: 600; font-size: .85rem; }
.co-line { display: flex; justify-content: space-between; font-size: .9rem; color: #555; padding: .2rem 0; }

/* ── Checkout promo code ─────────────────── */
.co-promo { border-top: 1px solid #eee; margin-top: .5rem; padding-top: .8rem; }
.co-promo label { font-weight: 600; font-size: .85rem; }
.co-promo-row { display: flex; gap: .5rem; }
.co-promo-row .form-control { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.co-promo-row .form-control:disabled { background: var(--theme-soft, #eef5ef); color: var(--theme); border-color: var(--theme); }
.co-promo-row .btn { flex: 0 0 auto; white-space: nowrap; }
.co-promo-msg { margin: .45rem 0 0; font-size: .82rem; }
.co-promo-msg.is-ok { color: var(--theme); }
.co-promo-msg.is-bad { color: #c0392b; }
#coPromoLine { color: var(--theme); font-weight: 600; }

/* ── Country picker with flag + name ─────── */
.btn-country {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 210px;
  white-space: nowrap;
}
.btn-country .country-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.country-flag { font-size: 1.05em; line-height: 1; }
.dropdown-item .country-flag { margin-inline-end: .3rem; }

/* ── Pagination (Bootstrap 5 views, themed) ── */
.pagination { margin-bottom: 0; gap: .3rem; }
.pagination .page-link {
  color: #333;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: .45rem .85rem;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: none;
}
.pagination .page-link:hover { background: var(--theme-soft, #eef5ef); color: var(--theme); border-color: var(--theme); }
.pagination .page-link:focus { box-shadow: 0 0 0 .2rem rgba(79, 157, 91, .2); }
.pagination .page-item.active .page-link { background: var(--theme); border-color: var(--theme); color: #fff; }
.pagination .page-item.disabled .page-link { color: #b3b3b3; background: #f7f7f7; border-color: #ececec; }

/* ── Compare ─────────────────────────────── */
/* the 4th action button needs its own stagger delay */
.product-actions button:nth-child(4) { transition-delay: .21s; }
.product-actions button.compared {
  background: var(--theme);
  color: #fff;
  opacity: 1;
  transform: translateX(0);
}

.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  text-align: center;
}
.compare-table th[scope="row"] {
  text-align: start;
  width: 150px;
  min-width: 130px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  background: #fafafa;
  white-space: nowrap;
}
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: 0; }

.cmp-cover {
  display: block;
  width: 110px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: 3px 7px 7px 3px;
  box-shadow: 4px 6px 18px rgba(0, 0, 0, .22);
}
.cmp-drop {
  margin-top: .6rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
  transition: color .2s;
}
.cmp-drop:hover { color: #c0392b; }

.cmp-title { font-family: var(--serif); font-weight: 700; color: var(--ink); }
.cmp-title:hover { color: var(--theme); }
.cmp-price { font-weight: 700; color: var(--theme); font-size: 1.05rem; }
.cmp-old { text-decoration: line-through; color: var(--muted); font-size: .85rem; margin-inline-start: .35rem; }
.cmp-save { background: rgba(79,157,91,.12); color: var(--theme); border-radius: 4px; padding: .1rem .4rem; font-size: .75rem; font-weight: 700; }
.cmp-in { color: var(--theme); font-weight: 600; }
.cmp-out { color: #c0392b; font-weight: 600; }

/* limit-reached toast */
.compare-note {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: .75rem 1.4rem;
  border-radius: 8px;
  font-size: .88rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 1080;
}
.compare-note.show { opacity: 1; transform: translate(-50%, 0); }
.btn-wish.compared { background: var(--theme); border-color: var(--theme); color: #fff; box-shadow: 0 6px 16px rgba(79,157,91,.3); }

/* ── Reader ──────────────────────────────── */
.reader-wrap { background: #1c1c1c; min-height: 100vh; display: flex; flex-direction: column; }
.reader-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.2rem; background: #141414; color: #eee; position: sticky; top: 0; z-index: 10;
}
.reader-back { color: #eee; display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; max-width: 45vw; }
.reader-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-back:hover { color: var(--theme-soft); }
.reader-pager { display: flex; align-items: center; gap: .8rem; color: #ddd; font-size: .9rem; }
.reader-pager button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: #2a2a2a; color: #fff; cursor: pointer;
}
.reader-pager button:hover:not(:disabled) { background: var(--theme); }
.reader-pager button:disabled { opacity: .35; cursor: default; }
.reader-badge { background: #2a2a2a; color: #bbb; border-radius: 20px; padding: .3rem .8rem; font-size: .78rem; white-space: nowrap; }
.reader-badge.is-owned { background: rgba(79,157,91,.2); color: var(--theme-soft); }

.reader-stage { position: relative; flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem; }
.reader-stage img {
  max-width: min(820px, 100%); width: 100%; height: auto; border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.reader-mark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,.13); font-size: clamp(1rem, 3vw, 2rem); font-weight: 700;
  transform: rotate(-28deg); pointer-events: none; letter-spacing: 2px; text-align: center;
}
.reader-shield { position: absolute; inset: 0; background: #1c1c1c; opacity: 0; transition: opacity .12s; pointer-events: none; }
.reader-shield.on { opacity: 1; }

.reader-paywall {
  background: #fff; border-radius: 10px; padding: 2rem; text-align: center;
  max-width: 460px; margin: 0 auto 2rem;
}
.reader-paywall i { font-size: 2.4rem; color: var(--theme); }
.reader-paywall h3 { font-family: var(--serif); margin: .6rem 0 .4rem; }
.reader-paywall p { color: var(--muted); }
.reader-paywall .btn { margin: .3rem .2rem 0; }

/* a printed page must not carry the book */
@media print { .reader-stage img, .reader-mark { display: none !important; } }

/* ── Audio player ────────────────────────── */
.player-card {
  display: flex; gap: 2rem; flex-wrap: wrap; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow); padding: 2rem; max-width: 860px; margin: 0 auto;
}
.player-cover { width: 180px; aspect-ratio: 3/4; border-radius: 4px 8px 8px 4px; box-shadow: 6px 8px 24px rgba(0,0,0,.25); flex-shrink: 0; }
.player-body { flex: 1; min-width: 260px; }
.player-author { color: var(--muted); letter-spacing: 2px; font-size: .78rem; text-transform: uppercase; }
.player-title { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; margin-bottom: .8rem; }
.player-note { color: var(--muted); font-size: .9rem; }
.player-note.is-owned { color: var(--theme); font-weight: 600; }
.player-audio { width: 100%; margin: 1rem 0; }
.player-paywall { border-top: 1px solid #eee; padding-top: 1rem; }
.player-paywall p { color: var(--muted); margin-bottom: .6rem; }
.player-paywall .btn { margin-inline-end: .4rem; }

/* ── Library shelf ───────────────────────── */
.lib-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.lib-cover { aspect-ratio: 16/10; background-color: #ddd; }
.lib-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.lib-author { color: var(--muted); font-size: .76rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .2rem; }
.lib-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.lib-formats { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lib-format-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--bg-soft); color: var(--ink); border-radius: 20px; padding: .3rem .7rem; font-size: .72rem; font-weight: 600; }
.lib-format-badge i { font-size: .78rem; color: var(--theme); }
.lib-actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.lib-physical-note { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .82rem; margin: 0; }

/* ── Publication date + voice sample ─────── */
.pd-pubdate { font-weight: 600; color: var(--ink); margin-bottom: 1rem; }
.voice-sample {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.2rem;
  border: 1px solid #eaeaea;
}
.voice-sample audio { width: 100%; }
.voice-locked { margin: 0; color: var(--muted); font-size: .9rem; }
.voice-locked a { color: var(--theme); font-weight: 700; }

/* ── Checkout payment options ────────────── */
.co-pay { border-top: 1px solid #eee; padding-top: .9rem; margin-bottom: 1rem; }
.pay-option {
  display: flex; align-items: center; gap: .7rem;
  border: 1px solid #e4e4e4; border-radius: 8px;
  padding: .7rem .85rem; margin-bottom: .5rem; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-option:hover { border-color: var(--theme); }
.pay-option:has(input:checked) { border-color: var(--theme); background: rgba(79,157,91,.06); }
.pay-option input { accent-color: var(--theme); width: 18px; height: 18px; flex-shrink: 0; }
.pay-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pay-name { font-weight: 600; font-size: .92rem; }
.pay-body small { color: var(--muted); font-size: .78rem; }
.pay-test {
  background: rgba(255,193,7,.22); color: #8a6400;
  border-radius: 20px; padding: .12rem .55rem; font-size: .68rem; font-weight: 700; white-space: nowrap;
}

/* ── Payment result page ─────────────────── */
.pay-result {
  max-width: 540px; margin: 0 auto; text-align: center;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 2.6rem 2rem;
}
.pay-result > i { font-size: 3.6rem; }
.pay-result.is-paid > i { color: var(--theme); }
.pay-result.is-failed > i { color: #c0392b; }
.pay-result h1 { font-family: var(--serif); font-size: 1.7rem; margin: .8rem 0 .4rem; }
.pay-lead { color: var(--muted); margin-bottom: 1.6rem; }
.pay-summary { border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: .9rem 0; margin-bottom: 1.6rem; }
.pay-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .92rem; }
.pay-row span { color: var(--muted); }
.pay-row code { font-size: .8rem; word-break: break-all; }
.pay-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

/* ── Not priced in this country: visible, struck through, never buyable ── */
.unpriced { text-decoration: line-through; color: var(--muted); opacity: .75; }
.product-col.is-unpriced .product-card { opacity: .82; }
.product-col.is-unpriced .product-cover { filter: grayscale(.35); }
.product-col.is-unpriced [data-add] { cursor: not-allowed; }
