/* Millionaire Books, public book details page.
   Editorial luxe palette: ivory + ink + warm gold. Scoped under .mb-book-page
   so nothing leaks into the theme. Uses a proper centered max-width container
   (no full-bleed 100vw tricks), so the page renders cleanly inside any theme. */

/* Reset any theme spacing around our custom template's <main>, so the ivory
   background spans the full content area between header and footer. */
body.single-mb_book { background: #fbf8f2; }
body.single-mb_book .mb-book-main {
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: none;
	background: #fbf8f2;
}
/* Belt-and-braces: in case the active theme constrains all <main> children
   to a narrow column, force ours to span the full width. */
body.single-mb_book .mb-book-main > .mb-book-page {
	width: 100%;
	max-width: none;
	margin: 0;
}

.mb-book-page {
	/* Tokens */
	--mb-ivory: #fbf8f2;
	--mb-cream: #f5efe3;
	--mb-ink: #14181f;
	--mb-ink-2: #2a2f38;
	--mb-muted: #5e6470;
	--mb-line: #e8e2d6;
	--mb-line-soft: #efe9dd;
	--mb-surface: #ffffff;
	--mb-gold: #b8893a;
	--mb-gold-deep: #9a7028;
	--mb-gold-soft: rgba(184, 137, 58, .12);
	--mb-success: #3d7a4e;
	--mb-radius: 16px;
	--mb-radius-sm: 10px;

	--mb-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--mb-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	background: var(--mb-ivory);
	color: var(--mb-ink);
	font-family: var(--mb-font-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Centered container, used everywhere */
.mb-book-page .mb-bd-wrap {
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
}
.mb-book-page .mb-bd-wrap-narrow { max-width: 820px; }

/* ============================ HERO ============================ */
.mb-book-page .mb-bd-hero {
	padding-top: clamp(5rem, 6vw + 2rem, 9rem);
	padding-bottom: clamp(3rem, 3vw + 1rem, 5rem);
	background:
		radial-gradient(900px 360px at 85% -10%, var(--mb-gold-soft) 0%, transparent 65%),
		linear-gradient(180deg, var(--mb-ivory) 0%, var(--mb-cream) 100%);
	border-bottom: 1px solid var(--mb-line);
}

/* Breadcrumbs */
.mb-book-page .mb-bd-crumbs {
	margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
	font-size: .82rem;
	color: var(--mb-muted);
	letter-spacing: .01em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.mb-book-page .mb-bd-crumbs a {
	color: var(--mb-muted);
	text-decoration: none;
	transition: color .15s ease;
}
.mb-book-page .mb-bd-crumbs a:hover { color: var(--mb-gold); }
.mb-book-page .mb-bd-crumbs-sep { color: var(--mb-line); }
.mb-book-page .mb-bd-crumbs [aria-current="page"] {
	color: var(--mb-ink);
	font-weight: 500;
}

/* Two-column hero */
.mb-book-page .mb-bd-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
	gap: clamp(2rem, 1.5rem + 3vw, 4rem);
	align-items: center;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-hero-grid {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}
}

/* Cover */
.mb-book-page .mb-bd-cover-frame {
	margin: 0;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 2 / 3;
	border-radius: 6px;
	overflow: hidden;
	position: relative;
	background: linear-gradient(150deg, #eee7d6, #ddd2b8);
}
.mb-book-page .mb-bd-cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mb-book-page .mb-bd-cover-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mb-muted);
	font-size: .78rem;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.mb-book-page .mb-bd-owned-flag {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 6px 12px;
	background: rgba(20, 24, 31, .88);
	color: var(--mb-ivory);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	border-radius: 999px;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* Info column */
.mb-book-page .mb-bd-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}

/* Genre eyebrow (small caps, gold, separator dots) */
.mb-book-page .mb-bd-eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-eyebrow { justify-content: center; }
}
.mb-book-page .mb-bd-genre {
	color: var(--mb-gold);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .15s ease, color .15s ease;
}
.mb-book-page a.mb-bd-genre:hover {
	color: var(--mb-gold-deep);
	border-bottom-color: var(--mb-gold);
}
.mb-book-page .mb-bd-eyebrow-sep {
	color: var(--mb-line);
	font-size: .9rem;
	line-height: 1;
}

/* Title */
.mb-book-page .mb-bd-title {
	font-family: var(--mb-font-serif);
	font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -.015em;
	color: var(--mb-ink);
	margin: 0;
	text-wrap: balance;
}

/* Author */
.mb-book-page .mb-bd-author {
	margin: 0;
	color: var(--mb-muted);
	font-size: 1.05rem;
}
.mb-book-page .mb-bd-author span {
	color: var(--mb-ink);
	font-weight: 600;
}

/* Price */
.mb-book-page .mb-bd-price-block {
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
	padding-top: .35rem;
	border-top: 1px solid var(--mb-line);
	margin-top: .25rem;
	padding-top: 1.1rem;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-price-block { justify-content: center; }
}
.mb-book-page .mb-bd-price {
	font-family: var(--mb-font-serif);
	font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--mb-ink);
}
.mb-book-page .mb-bd-price-free { color: var(--mb-success); }
.mb-book-page .mb-bd-purchased {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	background: rgba(61, 122, 78, .12);
	color: var(--mb-success);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	border-radius: 999px;
}

/* Formats line ("Available in: PDF, EPUB, ...") */
.mb-book-page .mb-bd-formats-line {
	margin: 0;
	color: var(--mb-muted);
	font-size: .92rem;
}
.mb-book-page .mb-bd-formats-line strong {
	color: var(--mb-ink);
	font-weight: 600;
}

/* CTA row */
.mb-book-page .mb-bd-cta-row {
	margin-top: .4rem;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-cta-row { justify-content: center; width: 100%; }
}

/* Buttons (pill, dark ink) */
.mb-book-page .mb-bd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 220px;
	padding: 15px 32px;
	border: 0;
	border-radius: 999px;
	font-family: var(--mb-font-sans);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: .005em;
	text-decoration: none;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease, color .15s ease, border-color .15s ease;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-btn { width: 100%; }
}
.mb-book-page .mb-bd-btn-read,
.mb-book-page .mb-bd-btn-buy {
	background: var(--mb-ink);
	color: var(--mb-ivory);
}
.mb-book-page .mb-bd-btn-read:hover,
.mb-book-page .mb-bd-btn-buy:hover {
	background: #1f252f;
	transform: translateY(-2px);
}
.mb-book-page .mb-bd-btn-read:active,
.mb-book-page .mb-bd-btn-buy:active { transform: translateY(0); }

.mb-book-page .mb-bd-btn-login {
	background: transparent;
	color: var(--mb-ink);
	border: 1.5px solid var(--mb-ink);
}
.mb-book-page .mb-bd-btn-login:hover {
	background: var(--mb-ink);
	color: var(--mb-ivory);
	transform: translateY(-2px);
}
.mb-book-page .mb-bd-btn:focus-visible {
	outline: 3px solid rgba(184, 137, 58, .5);
	outline-offset: 3px;
}

/* Admin-only preview link (sits just below the main CTA) */
.mb-book-page .mb-bd-admin-preview {
	margin: -.4rem 0 0;
	font-size: .82rem;
}
.mb-book-page .mb-bd-admin-preview a {
	color: var(--mb-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--mb-line);
	transition: color .15s ease, text-decoration-color .15s ease;
}
.mb-book-page .mb-bd-admin-preview a:hover {
	color: var(--mb-gold-deep);
	text-decoration-color: var(--mb-gold);
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-admin-preview { text-align: center; }
}

/* Trust line */
.mb-book-page .mb-bd-trust {
	margin: .35rem 0 0;
	color: var(--mb-muted);
	font-size: .88rem;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
@media (max-width: 720px) {
	.mb-book-page .mb-bd-trust { justify-content: center; }
}
.mb-book-page .mb-bd-trust .mb-bd-ico {
	color: var(--mb-gold);
	flex: none;
}

/* ============================ SECTIONS ============================ */
.mb-book-page .mb-bd-section {
	padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.mb-book-page .mb-bd-section + .mb-bd-section {
	padding-top: 0;
}

.mb-book-page .mb-bd-h2 {
	font-family: var(--mb-font-serif);
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--mb-ink);
	margin: 0 0 1.4rem;
	padding-bottom: .85rem;
	position: relative;
}
.mb-book-page .mb-bd-h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 44px;
	height: 2px;
	background: var(--mb-gold);
	border-radius: 2px;
}

/* About */
.mb-book-page .mb-bd-prose {
	font-size: 1.05rem;
	line-height: 1.75;
	color: var(--mb-ink-2);
}
.mb-book-page .mb-bd-prose > :first-child { margin-top: 0; }
.mb-book-page .mb-bd-prose > :last-child { margin-bottom: 0; }
.mb-book-page .mb-bd-prose p { margin: 0 0 1.1em; }
.mb-book-page .mb-bd-prose strong { color: var(--mb-ink); }
.mb-book-page .mb-bd-prose a {
	color: var(--mb-gold-deep);
	text-decoration-color: var(--mb-gold);
	text-underline-offset: 3px;
}
.mb-book-page .mb-bd-prose a:hover { color: var(--mb-ink); }

/* What's included */
.mb-book-page .mb-bd-included-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}
.mb-book-page .mb-bd-included-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 20px 22px;
	background: var(--mb-surface);
	border: 1px solid var(--mb-line);
	border-radius: var(--mb-radius);
	transition: border-color .2s ease, transform .2s ease;
}
.mb-book-page .mb-bd-included-item:hover {
	border-color: rgba(184, 137, 58, .45);
	transform: translateY(-2px);
}
.mb-book-page .mb-bd-included-ico {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--mb-cream), #eadfc8);
	color: var(--mb-gold-deep);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.mb-book-page .mb-bd-included-ico .mb-bd-ico { width: 22px; height: 22px; }
.mb-book-page .mb-bd-included-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.mb-book-page .mb-bd-included-text strong {
	font-family: var(--mb-font-sans);
	font-size: 1rem;
	font-weight: 700;
	color: var(--mb-ink);
}
.mb-book-page .mb-bd-included-text span {
	color: var(--mb-muted);
	font-size: .9rem;
	line-height: 1.55;
}

/* ============================ FINAL CTA ============================ */
.mb-book-page .mb-bd-final-card {
	background: var(--mb-surface);
	border: 1px solid var(--mb-line);
	border-radius: var(--mb-radius);
	padding: clamp(2rem, 1.5rem + 2vw, 3rem);
	text-align: center;
	position: relative;
	overflow: hidden;
}
.mb-book-page .mb-bd-final-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(700px 220px at 50% -40%, var(--mb-gold-soft), transparent 70%),
		radial-gradient(600px 180px at 50% 130%, rgba(20, 24, 31, .04), transparent 70%);
	pointer-events: none;
}
.mb-book-page .mb-bd-final-title {
	font-family: var(--mb-font-serif);
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--mb-ink);
	margin: 0 0 .75rem;
	position: relative;
	text-wrap: balance;
}
.mb-book-page .mb-bd-final-title em {
	font-style: italic;
	color: var(--mb-gold-deep);
}
.mb-book-page .mb-bd-final-sub {
	margin: 0 0 1.6rem;
	color: var(--mb-muted);
	font-size: 1rem;
	position: relative;
}
.mb-book-page .mb-bd-final-cta {
	position: relative;
	display: inline-flex;
	justify-content: center;
}
.mb-book-page .mb-bd-final-cta .mb-bd-btn {
	min-width: 240px;
}

/* ============================ SMALL SCREENS ============================ */
@media (max-width: 480px) {
	.mb-book-page { font-size: 16px; }
	.mb-book-page .mb-bd-crumbs { font-size: .78rem; }
	.mb-book-page .mb-bd-included-item { padding: 18px; }
}
