:root {
  --color-navy: #1b2a41;
  --color-navy-2: #243b55;
  --color-orange: #ff7a18;
  --color-orange-2: #ff9f43;
  --color-bg: #f8fafc;
  --color-bg-soft: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-border: #e2e8f0;
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-pop: 0 14px 34px rgba(15, 23, 42, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: "Poppins", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: 50px 0; }
.section > .section-header,
.section > .books-grid,
.section > .genre-grid,
.section > .academic-container,
.section > .feedback-container {
  width: min(1200px, 92%);
  margin-inline: auto;
}
.section-alt { background: var(--color-bg-soft); }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}
.section-header h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.55rem, 2.7vw, 2rem);
  color: var(--color-navy);
  margin-bottom: 6px;
  font-weight: 600;
}
.section-header-top h2 { margin-bottom: 0; }
.section-header p { color: var(--color-muted); }
.section-see-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: #1b2a41;
  border-radius: 999px;
  padding: 5px 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.section-see-all:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(27, 42, 65, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
.nav-container {
  width: min(1260px, 94%);
  margin-inline: auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  isolation: isolate;
  flex-shrink: 0;
}
.logo-img {
  display: block;
  height: 54px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: invert(1) hue-rotate(180deg) brightness(1.08);
  mix-blend-mode: screen;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.logo:hover .logo-img {
  transform: translateY(-1px);
  opacity: 0.92;
}
@media (max-width: 1024px) {
  .logo-img { height: 64px; max-width: 220px; }
}
@media (max-width: 600px) {
  .logo-img { height: 58px; max-width: 190px; }
}
@media (max-width: 400px) {
  .logo-img { height: 50px; max-width: 160px; }
}
.footer-col h3 { isolation: isolate; }
.footer-logo-img {
  display: block;
  height: 100px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: invert(1) hue-rotate(180deg) brightness(1.08);
  mix-blend-mode: screen;
}
@media (max-width: 720px) {
  .footer-logo-img { height: 80px; max-width: 220px; }
}
.nav-menu { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; }
.nav-menu a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-menu a:hover,
.nav-menu a.active-link { color: var(--color-orange-2); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 11px;
}
.search-box input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 150px;
}
.search-box i { color: var(--color-navy); }
.hamburger { display: none; color: var(--color-orange); font-size: 1.2rem; cursor: pointer; }

.hero {
  min-height: min(72vh, 700px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 56px 20px;
  color: #fff;
  background: linear-gradient(130deg, var(--color-navy), var(--color-navy-2) 60%, #254e7a);
}
.hero-content { width: min(760px, 96%); }
.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 4.6vw, 2.8rem);
  margin-bottom: 10px;
}
.hero p { color: #dbe7f7; line-height: 1.6; margin-bottom: 18px; }
.hero-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 19px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-2));
  box-shadow: 0 12px 24px rgba(255, 122, 24, 0.28);
}
.btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: transparent;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.13); }
.typewriter { border-right: 3px solid var(--color-orange); white-space: nowrap; width: 0; overflow: hidden; animation: typing 3s steps(30, end) forwards, blink 0.8s infinite; }
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { 0%, 100% { border-color: var(--color-orange); } 50% { border-color: transparent; } }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.book-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}
.book-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-orange-2));
}
.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); }
.book-cover img, .book-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 12px;
}
.book-info h3, .book-card h3 { font-size: 0.96rem; margin-bottom: 5px; color: var(--color-navy); }
.author { font-size: 0.86rem; color: var(--color-muted); margin-bottom: 12px; }
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 600;
  font-size: 0.84rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-2));
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.genre-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: var(--color-navy);
  font-weight: 500;
  text-align: center;
  padding: 16px 12px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.genre-card:hover { transform: translateY(-4px); color: var(--color-orange); }

.academic-container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.academic-text h2 { font-family: "Playfair Display", serif; font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--color-navy); margin-bottom: 12px; }
.academic-text p { color: #4b5563; line-height: 1.6; margin-bottom: 8px; }
.academic-text .btn { margin-top: 10px; }
.academic-illustration img {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  display: block;
  margin-left: auto;
}

.feedback-form { width: min(620px, 100%); margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.feedback-form input, .feedback-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
}
.feedback-form textarea { min-height: 130px; resize: vertical; }
.feedback-form input:focus, .feedback-form textarea:focus { outline: none; border-color: var(--color-orange); box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.16); }

.footer {
  background: var(--color-navy);
  color: #dbe3ec;
  margin-top: auto;
  padding: 54px 0 26px;
}
.footer-container {
  width: min(1200px, 92%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  margin-bottom: 24px;
}
.footer-col h3, .footer-col h4 { color: #fff; margin-bottom: 12px; }
.footer-col h3 { font-family: "Playfair Display", serif; }
.footer-col p, .footer-col a { color: #dbe3ec; font-size: 0.9rem; line-height: 1.7; text-decoration: none; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a:hover { color: var(--color-orange-2); }
.social-icons { display: flex; gap: 10px; margin-top: 10px; }
.social-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14);
}
.footer-bottom {
  width: min(1200px, 92%);
  margin-inline: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 18px;
  color: #b5c2d0;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-bottom .dev-link {
  color: #ffb57a;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 181, 122, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-bottom .dev-link:hover {
  color: #ffd4a8;
  border-bottom-color: #ffd4a8;
}

.state-message {
  text-align: center;
  color: var(--color-muted);
  grid-column: 1 / -1;
  background: #fff;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

@media (max-width: 1024px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    width: 100%;
    background: var(--color-navy);
    flex-direction: column;
    gap: 14px;
    padding: 18px 0;
  }
  .nav-menu.active { display: flex; }
  .hamburger { display: block; }
  .academic-container { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 600px) {
  .section-header-top {
    flex-direction: column;
    gap: 8px;
  }
  .section { padding: 38px 0; }
  .nav-container { min-height: 64px; }
  .search-box input { width: 110px; }
  .hero { min-height: auto; padding: 56px 14px; }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-buttons .btn {
    width: 75%;
    margin: 0 auto;
    text-align: center;
  }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section > .section-header,
  .section > .books-grid,
  .section > .genre-grid,
  .section > .academic-container,
  .section > .feedback-container { width: 94%; }
  .book-cover img, .book-card img { height: 170px; }
  .book-info h3, .book-card h3 { font-size: 0.82rem; line-height: 1.3; }
  .author { font-size: 0.74rem; }
  .download-btn { font-size: 0.75rem; padding: 7px 10px; }
  .footer {
    padding: 40px 20px 20px;
  }
  .footer-container {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .footer-col h3 { font-size: 15px; margin-bottom: 10px; }
  .footer-col h4 { font-size: 13px; margin-bottom: 10px; }
.footer-col p,
  .footer-col ul li a { font-size: 12px; line-height: 1.6; }
  .footer-bottom { flex-direction: column; text-align: center; font-size: 12px; }
  .typewriter { white-space: normal; width: 100% !important; border-right: none; animation: none; }
}

/* ================================================================
 * PAID NEW RELEASES - Checkout modal (UPI / Bank) + buy-button pill
 * All classes are pm-* to avoid collisions with existing styles.
 * ================================================================ */
.pm-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: pmFadeIn 0.25s ease;
  font-family: 'Poppins', sans-serif;
}
@keyframes pmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pm-card {
  background: #fff;
  width: 100%;
  max-width: 760px;
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.35);
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
  position: relative;
  max-height: calc(100vh - 40px);
  animation: pmSlideUp 0.28s ease;
}
@keyframes pmSlideUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.pm-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,0.88);
  color: #1B2A41;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.pm-close:hover { background: #fff; transform: scale(1.05); }

/* Summary side (dark navy) */
.pm-summary {
  background: linear-gradient(155deg, #1B2A41 0%, #243B55 100%);
  color: #fff;
  padding: 32px 24px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.pm-summary::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(255,122,24,0.18), transparent 60%),
    radial-gradient(320px 160px at 100% 100%, rgba(255,159,67,0.14), transparent 60%);
  pointer-events: none;
}
.pm-summary > * { position: relative; z-index: 1; }
.pm-cover-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-width: 160px;
  margin: 0 auto 18px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.pm-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FF9F43;
  padding: 4px 10px;
  border: 1px solid rgba(255,159,67,0.4);
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 10px;
}
.pm-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 4px;
  color: #fff;
}
.pm-author {
  font-size: 12px;
  color: #CBD5E1;
  margin: 0 0 16px;
}
.pm-price-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.pm-price-badge span { font-size: 11px; color: #CBD5E1; text-transform: uppercase; letter-spacing: 0.1em; }
.pm-price-badge strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #FFB347;
}
.pm-trust {
  list-style: none; padding: 0; margin: auto 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.pm-trust li {
  font-size: 12px; color: #CBD5E1;
  display: flex; align-items: center; gap: 8px;
}
.pm-trust i { color: #FF9F43; width: 16px; }

/* Right panel */
.pm-panel {
  padding: 28px 28px 24px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  background: #fff;
  color: #1B2A41;
}
.pm-head h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: #1B2A41;
}
.pm-head h4 span { color: #B45309; font-weight: 700; }
.pm-head p { font-size: 13px; color: #64748B; margin: 0 0 18px; line-height: 1.5; }
.pm-ref-shortcut {
  margin: -4px 0 14px;
  font-size: 12px;
  color: #64748B;
}
.pm-link-btn {
  border: none;
  background: transparent;
  color: #B45309;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pm-link-btn:hover { color: #92400E; }
.pm-back {
  border: none; background: transparent;
  color: #64748B; font-size: 13px; cursor: pointer;
  padding: 0; margin-bottom: 10px;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.pm-back:hover { color: #1B2A41; }

.pm-loading {
  padding: 40px 0; text-align: center;
  color: #94A3B8; font-size: 14px;
}

.pm-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.pm-tab {
  flex: 1; border: none; cursor: pointer;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: #64748B;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.pm-tab.active {
  background: #fff;
  color: #1B2A41;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.pm-pane { display: none; }
.pm-pane.active { display: block; animation: pmFadeIn 0.2s ease; }

/* UPI pane */
.pm-upi-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: start;
}
.pm-qr-wrap {
  background: #FAF6EF;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
}
.pm-qr {
  width: 100%;
  max-width: 240px;
  max-height: 260px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}
.pm-qr-download {
  align-self: stretch;
  justify-content: center;
}
.pm-qr-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #B45309; font-size: 12px; gap: 10px; text-align: center;
}
.pm-qr-placeholder i { font-size: 42px; }

.pm-upi-right { display: flex; flex-direction: column; gap: 8px; }
.pm-field-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-top: 4px;
}
.pm-plain {
  font-size: 14px; color: #1B2A41;
  padding: 4px 0;
}
.pm-amount {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #B45309;
  font-weight: 700;
}
.pm-upi-apps {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
}
.pm-upi-app {
  flex: 1; min-width: 72px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #1B2A41;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s;
}
.pm-upi-app:hover { border-color: #FF7A18; color: #B45309; background: #FFF7ED; }

.pm-hint {
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 10px 0 0;
}
.pm-empty, .pm-empty-inline {
  background: #FFF7ED;
  border: 1px dashed #FDBA74;
  color: #9A3412;
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  text-align: center;
}
.pm-empty i { margin-right: 6px; }

/* Bank pane */
.pm-bank-list { display: flex; flex-direction: column; gap: 8px; }
.pm-copy-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}
.pm-bank-field { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pm-bank-field .pm-field-label { margin: 0 0 2px; }
.pm-copy-value {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: #1B2A41;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-copy {
  border: none;
  background: #1B2A41;
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.pm-copy:hover { background: #FF7A18; }
.pm-copy.pm-copied { background: #059669; }

/* Footer CTA */
.pm-foot {
  margin-top: auto;
  padding-top: 14px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 24%, #fff 100%);
  border-top: 1px solid #E2E8F0;
}
.pm-primary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  padding: 13px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #FFB347 0%, #FF8C1A 100%);
  color: #1B2A41;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.45);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pm-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.55);
}
.pm-primary:disabled { opacity: 0.7; cursor: wait; transform: none; }

.pm-ghost {
  border: 1.5px solid #E2E8F0;
  background: #fff;
  color: #64748B;
  padding: 13px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-ghost:hover { border-color: #1B2A41; color: #1B2A41; }

/* Form */
.pm-form { display: flex; flex-direction: column; gap: 12px; }
.pm-field { display: flex; flex-direction: column; gap: 4px; }
.pm-field > span {
  font-size: 11px; font-weight: 600;
  color: #64748B;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pm-field > span i {
  color: #DC2626; margin-left: 2px; font-style: normal;
}
.pm-field input,
.pm-field select {
  padding: 11px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px; color: #1B2A41;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pm-field input:focus,
.pm-field select:focus {
  border-color: #FF7A18;
  box-shadow: 0 0 0 3px rgba(255,122,24,0.15);
}
.pm-form-error {
  color: #DC2626; font-size: 12.5px;
  min-height: 16px;
  margin: 2px 0 -4px;
}
.pm-error {
  text-align: center;
  color: #9A3412;
  background: #FFF7ED;
  border: 1px dashed #FDBA74;
  border-radius: 12px;
  padding: 24px;
}
.pm-error i { font-size: 28px; color: #FB923C; margin-bottom: 8px; display: block; }

/* Success */
.pm-success { text-align: center; padding: 10px 0; }
.pm-success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; font-size: 32px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}
.pm-success h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; color: #1B2A41;
  margin: 0 0 6px;
}
.pm-success p {
  color: #64748B; font-size: 13px;
  line-height: 1.55; margin: 0 0 18px;
}
.pm-success .pm-field-label { margin-top: 4px; text-align: center; }
.pm-access-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 6px 0 10px;
}
.pm-access-code {
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: #FF7A18;
  background: #FFF7ED;
  border: 1.5px dashed #FDBA74;
  padding: 10px 18px;
  border-radius: 10px;
}
.pm-success-cta {
  display: flex; gap: 10px; margin-top: 18px;
}
.pm-success-cta .pm-primary { flex: 2; }
.pm-success-cta .pm-ghost { flex: 1; }

/* Book card: BUY pill (replaces Download button when price > 0) */
.buy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.2px;
  color: #1B2A41;
  background: linear-gradient(135deg, #FFB347 0%, #FF8C1A 100%);
  box-shadow: 0 6px 14px rgba(255,122,24,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255,122,24,0.38), inset 0 1px 0 rgba(255,255,255,0.5);
  color: #1B2A41;
}
.buy-btn i { font-size: 0.78rem; }

.book-card.is-paid { position: relative; }
.paid-badge {
  position: absolute;
  top: 18px; left: 18px;
  background: linear-gradient(135deg, #FFB347, #FF8C1A);
  color: #1B2A41;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255,122,24,0.28);
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
}
.paid-badge i { font-size: 9px; }

/* Mobile: modal becomes a bottom sheet */
@media (max-width: 720px) {
  .pm-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .pm-card {
    grid-template-columns: 1fr;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    animation: pmSheetUp 0.28s ease;
    overflow: hidden;
  }
  @keyframes pmSheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  .pm-summary {
    padding: 16px 16px 12px;
  }
  .pm-cover-wrap { max-width: 86px; margin-bottom: 10px; }
  .pm-title { font-size: 1rem; }
  .pm-price-badge { margin-bottom: 10px; }
  .pm-trust { display: none; }
  .pm-panel {
    padding: 16px 16px 14px;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pm-upi-grid { grid-template-columns: 1fr; }
  .pm-qr-wrap { max-width: 240px; margin: 0 auto; min-height: 240px; }
  .pm-access-code { font-size: 1.3rem; letter-spacing: 3px; padding: 10px 14px; }
  .pm-success-cta { flex-direction: column; }
  .pm-foot {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}