<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Book Detail | PakStudyHub</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--green: #1a7a4a;
--green-dk: #125e38;
--green-lt: #e8f6ee;
--accent: #f5a623;
--text: #1c2b1e;
--muted: #5a6e60;
--bg: #f4f9f6;
--card-bg: #ffffff;
--border: #d0e6d8;
--radius: 12px;
--shadow: 0 4px 20px rgba(26,122,74,.10);
}
body {
font-family: 'Inter', sans-serif;
background: var(--bg);
color: var(--text);
padding: 28px 16px 60px;
}
.page { max-width: 860px; margin: 0 auto; }
/* ── BACK LINK ── */
.back-link {
display: inline-flex; align-items: center; gap: 6px;
font-size: 13px; font-weight: 500;
color: var(--green); text-decoration: none;
margin-bottom: 22px; transition: gap .2s;
}
.back-link:hover { gap: 10px; }
/* ── MAIN CARD ── */
.card {
background: #fff;
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
margin-bottom: 30px;
}
/* ── COVER IMAGE ── */
.cover-wrap {
width: 100%; aspect-ratio: 16 / 7;
overflow: hidden; position: relative;
background: linear-gradient(135deg, var(--green-lt), #c2e8d0);
}
.cover-wrap img {
width: 100%; height: 100%;
object-fit: cover; object-position: center;
display: block;
}
.cover-placeholder {
width: 100%; height: 100%;
display: flex; flex-direction: column;
align-items: center; justify-content: center; gap: 8px;
}
.cover-placeholder .icon { font-size: 60px; }
.cover-placeholder p { font-size: 14px; color: var(--muted); }
.cover-badge {
position: absolute; top: 16px; right: 16px;
background: var(--green); color: #fff;
font-size: 12px; font-weight: 600;
padding: 4px 12px; border-radius: 20px;
}
/* ── CONTENT ── */
.content { padding: 28px 30px 32px; }
@media (max-width: 600px) { .content { padding: 18px 16px 24px; } }
/* ── BADGES ── */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
display: inline-flex; align-items: center;
font-size: 11px; font-weight: 600;
padding: 4px 12px; border-radius: 20px;
}
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-green { background: var(--green-lt); color: var(--green-dk); }
/* ── TITLE ── */
.book-title {
font-size: clamp(20px, 3.5vw, 28px);
font-weight: 700; color: var(--text);
line-height: 1.3; margin-bottom: 6px;
}
.book-author {
font-size: 14px; color: var(--muted); margin-bottom: 16px;
}
.book-author a { color: var(--green); font-weight: 600; text-decoration: none; }
/* ── RATING ROW ── */
.rating-row {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
padding-bottom: 18px; margin-bottom: 20px;
border-bottom: 1px solid var(--border);
}
.stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; }
.rating-val { font-size: 15px; font-weight: 700; color: var(--text); }
.rating-count { font-size: 13px; color: var(--muted); }
.divider { width: 1px; height: 16px; background: var(--border); }
.dl-count { font-size: 13px; color: var(--muted); }
.dl-count strong { color: var(--text); }
.free-badge { font-size: 13px; font-weight: 700; color: var(--green); }
/* ── STATS GRID ── */
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px; margin-bottom: 24px;
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
.stat-box {
background: var(--bg); border: 1px solid var(--border);
border-radius: 10px; padding: 12px 10px; text-align: center;
}
.stat-box .s-icon { font-size: 18px; margin-bottom: 4px; }
.stat-box .s-val { font-size: 17px; font-weight: 700; color: var(--text); }
.stat-box .s-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }
/* ── BUTTONS ── */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn-download {
display: inline-flex; align-items: center; gap: 8px;
background: var(--green); color: #fff;
font-size: 15px; font-weight: 700;
padding: 13px 28px; border-radius: 8px;
text-decoration: none;
box-shadow: 0 4px 14px rgba(26,122,74,.28);
transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-download:hover { background: var(--green-dk); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(26,122,74,.32); }
.btn-preview {
display: inline-flex; align-items: center; gap: 8px;
background: transparent; color: var(--green);
font-size: 14px; font-weight: 600;
padding: 12px 22px; border-radius: 8px;
border: 2px solid var(--green);
text-decoration: none; transition: background .2s;
}
.btn-preview:hover { background: var(--green-lt); }
/* ── DIVIDER ── */
hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
/* ── FILE DETAILS ── */
.file-detail-row {
display: flex; align-items: center;
justify-content: space-between;
padding: 9px 0; border-bottom: 1px solid var(--border);
font-size: 14px;
}
.file-detail-row:last-child { border-bottom: none; }
.file-detail-row .lbl { color: var(--muted); }
.file-detail-row .val { font-weight: 700; color: var(--text); }
/* ── SECTION HEADING ── */
.sec-title {
font-size: 15px; font-weight: 700; color: var(--green-dk);
border-left: 4px solid var(--accent);
padding-left: 10px; margin-bottom: 14px;
}
/* ── DESCRIPTION ── */
.desc-text { font-size: 14px; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
/* ── FEATURES ── */
.features-list { display: flex; flex-direction: column; gap: 8px; }
.feat-item {
display: flex; align-items: flex-start; gap: 10px;
font-size: 14px; color: var(--text);
background: var(--bg); border: 1px solid var(--border);
border-radius: 8px; padding: 10px 14px;
}
.feat-item .chk { color: var(--green); font-size: 15px; flex-shrink: 0; font-weight: 700; }
/* ── REVIEWS ── */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-card {
background: var(--bg); border: 1px solid var(--border);
border-radius: 10px; padding: 16px;
}
.review-top {
display: flex; align-items: center;
justify-content: space-between; margin-bottom: 10px;
}
.review-user { display: flex; align-items: center; gap: 10px; }
.review-avatar {
width: 36px; height: 36px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 14px; color: #fff; font-weight: 700; flex-shrink: 0;
}
.review-name { font-size: 14px; font-weight: 600; color: var(--text); }
.review-city { font-size: 12px; color: var(--muted); }
.review-text { font-size: 13px; color: var(--muted); line-height: 1.75; font-style: italic; }
/* ── RELATED GRID ── */
.related-title {
font-size: 17px; font-weight: 700; color: var(--green-dk);
border-left: 4px solid var(--accent);
padding-left: 12px; margin-bottom: 16px;
}
.related-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
gap: 14px;
}
.related-card {
background: #fff; border: 1px solid var(--border);
border-radius: 10px; overflow: hidden;
box-shadow: 0 2px 8px rgba(26,122,74,.07);
text-decoration: none; color: var(--text);
transition: transform .2s, box-shadow .2s; display: block;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(26,122,74,.14); }
.related-cover {
width: 100%; aspect-ratio: 3/4;
object-fit: cover; display: block;
background: var(--green-lt);
}
.related-cover-ph {
width: 100%; aspect-ratio: 3/4;
display: flex; align-items: center; justify-content: center;
font-size: 28px;
}
.related-body { padding: 8px 10px; }
.related-body h4 { font-size: 12px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.related-dl {
display: flex; align-items: center; justify-content: center;
width: 100%; padding: 6px; border: 1px solid var(--border);
border-radius: 6px; font-size: 11px; font-weight: 600;
color: var(--green); text-decoration: none; background: var(--bg);
transition: background .2s;
}
.related-dl:hover { background: var(--green-lt); }
@keyframes spin { to { transform: rotate(360deg); } }
</style>
</head>
<body>
<div class="page">
<a href="javascript:history.back()" class="back-link">← Back to Library</a>
<div class="card" id="book-card">
<!-- content injected by JS -->
<div style="text-align:center;padding:60px 20px;" id="loading">
<div style="width:46px;height:46px;border:5px solid #d0e6d8;border-top-color:#1a7a4a;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px;"></div>
<p style="color:#5a6e60;font-size:14px;">Loading book details…</p>
</div>
</div>
<!-- Related Books -->
<div id="related-section">
<h3 class="related-title">More Books</h3>
<div class="related-grid" id="related-grid">
<p style="grid-column:1/-1;color:#5a6e60;font-size:14px;padding:10px 0;">Loading…</p>
</div>
</div>
</div>
<script>
/* ╔══════════════════════════════════════════════════════════╗
║ ⚙️ ONLY CHANGE SETTINGS BELOW ║
╚══════════════════════════════════════════════════════════╝ */
var TITLE = 'MARKETING SMACKDOWN: Hiring In-House Talent VS Hiring A Marketing Agency';
var AUTHOR = 'PakStudyHub';
var COLLECTION = 'Bussiness';
var COVER_IMAGE = 'https://pakstudyhub.online/wp-content/uploads/2026/06/1efd8d46-472b-4ae0-9b5d-8f5476bc9d92.jpeg';
var FALLBACK_GRADIENT = 'linear-gradient(135deg, #e8f6ee, #c2e8d0)';
var DOWNLOAD_URL = 'https://drive.google.com/file/d/1pITfdoj7KnGvJvmMYQmTMQx5iPNx6QKe/view?usp=sharing';
var PREVIEW_URL = '';
var FORMAT = 'PDF';
var FILE_SIZE = '2.2 MB';
var PAGES = '1';
var LANGUAGE = 'English';
var EDITION = '2025 Edition';
var ISBN = '978-969-954-073-13';
var DOWNLOADS = '23K';
var RATING = '4.8';
var REVIEWS = '1,140';
var BADGE_1 = '⭐ Best Seller';
var BADGE_2 = '📂 Bussiness';
var BADGE_3 = '✅ Free Download';
var OVERVIEW_PARA_1 = 'FINAL _ DB x Forrester x Workday Webinar Buying Groups is a comprehensive, presentation-focused framework designed for strategic B2B marketers. It covers how modern buying groups operate, complex decision-making processes, and data-driven marketing alignment. The content is presentation-focused, executive-ready, and written in simple, clear language.';
var OVERVIEW_PARA_2 = 'The special feature of this slide deck is that it integrates Forrester’s industry research with Workday’s practical implementation insights. The layout is kept highly structured and professional, making it easy for enterprise teams to understand how to target and engage complete buying groups effectively.';
var FEATURES = [
'Complete breakdown of B2B buying group dynamics and decision-making roles',
'Strategic insights from Forrester on modern buyer behavior and industry shifts',
'Real-world operational examples and implementation strategies from Workday',
'Easy and executive-friendly slide layouts for better corporate alignment',
'Best practices for transitioning from traditional lead-based to group-based marketing',
'Actionable metrics and ROI framework explained in a simple and clear way'
];
var USER_REVIEWS = []; /* Reviews removed */
var LIBRARY_URL = 'https://pakstudyhub.online/library/';
/* ╚══════════════════════════════════════════════════════════╝
║ DO NOT CHANGE ANYTHING BELOW THIS LINE ║
╚══════════════════════════════════════════════════════════╝ */
function esc(s) { var d=document.createElement('div'); d.textContent=s||''; return d.innerHTML; }
function starsHtml(n) { var s=''; for(var i=1;i<=5;i++) s+=(i<=n)?'★':'☆'; return s; }
function buildCard() {
var cover = COVER_IMAGE
? '<img src="'+esc(COVER_IMAGE)+'" alt="'+esc(TITLE)+'" />'
: '<div class="cover-placeholder"><span class="icon">📖</span><p>No cover image</p></div>';
var badges = '';
if(BADGE_1) badges += '<span class="badge badge-yellow">'+esc(BADGE_1)+'</span>';
if(BADGE_2) badges += '<span class="badge badge-gray">'+esc(BADGE_2)+'</span>';
if(BADGE_3) badges += '<span class="badge badge-green">'+esc(BADGE_3)+'</span>';
var features = FEATURES.map(function(f){
return '<div class="feat-item"><span class="chk">✔</span> '+esc(f)+'</div>';
}).join('');
var reviews = USER_REVIEWS.map(function(r){
return '<div class="review-card">'+
'<div class="review-top">'+
'<div class="review-user">'+
'<div class="review-avatar" style="background:'+r.color+'">'+esc(r.initial)+'</div>'+
'<div><div class="review-name">'+esc(r.name)+'</div>'+
'<div class="review-city">'+esc(r.city)+' • Verified Download</div></div>'+
'</div>'+
'<div class="stars" style="font-size:13px;">'+starsHtml(r.stars)+'</div>'+
'</div>'+
'<p class="review-text">'+esc(r.text)+'</p>'+
'</div>';
}).join('');
var fileRows = [
['📄 Format', FORMAT],
['🗂 File Size', FILE_SIZE],
['📖 Pages', PAGES],
['🌐 Language', LANGUAGE],
['🗓 Edition', EDITION],
['🔢 ISBN', ISBN],
].filter(function(row){ return !!row[1]; })
.map(function(row){
return '<div class="file-detail-row"><span class="lbl">'+row[0]+'</span><span class="val">'+esc(row[1])+'</span></div>';
}).join('');
var card = document.getElementById('book-card');
card.innerHTML =
/* Cover */
'<div class="cover-wrap">'+cover+'<span class="cover-badge">📚 '+esc(COLLECTION)+'</span></div>'+
'<div class="content">'+
/* Badges */
(badges ? '<div class="badges">'+badges+'</div>' : '')+
/* Title & Author */
'<h1 class="book-title">'+esc(TITLE)+'</h1>'+
'<p class="book-author">by <a href="#">'+esc(AUTHOR)+'</a></p>'+
/* Rating row */
'<div class="rating-row">'+
'<span class="stars">'+starsHtml(Math.round(parseFloat(RATING)))+'</span>'+
'<span class="rating-val">'+esc(RATING)+'</span>'+
(REVIEWS ? '<span class="rating-count">('+esc(REVIEWS)+' reviews)</span>' : '')+
'<div class="divider"></div>'+
(DOWNLOADS ? '<span class="dl-count">⬇ <strong>'+esc(DOWNLOADS)+'</strong> downloads</span>' : '')+
'<div class="divider"></div>'+
'<span class="free-badge">Totally Free</span>'+
'</div>'+
/* Stats */
'<div class="stats-grid">'+
(DOWNLOADS ? '<div class="stat-box"><div class="s-icon">⬇</div><div class="s-val">'+esc(DOWNLOADS)+'</div><div class="s-lbl">Downloads</div></div>' : '')+
'<div class="stat-box"><div class="s-icon">⭐</div><div class="s-val">'+esc(RATING)+'</div><div class="s-lbl">Rating</div></div>'+
(PAGES ? '<div class="stat-box"><div class="s-icon">📄</div><div class="s-val">'+esc(PAGES)+'</div><div class="s-lbl">Pages</div></div>' : '')+
(LANGUAGE ? '<div class="stat-box"><div class="s-icon">🌐</div><div class="s-val">'+esc(LANGUAGE)+'</div><div class="s-lbl">Language</div></div>' : '')+
'</div>'+
/* Buttons */
'<div class="btn-row">'+
(DOWNLOAD_URL ? '<a href="'+esc(DOWNLOAD_URL)+'" target="_blank" class="btn-download">⬇ Free Download — PDF</a>' : '')+
(PREVIEW_URL ? '<a href="'+esc(PREVIEW_URL)+'" target="_blank" class="btn-preview">👁 Preview</a>' : '')+
'</div>'+
/* File Details */
'<p class="sec-title">📄 File Details</p>'+
fileRows+
'<hr />'+
/* About */
'<p class="sec-title">📖 About the Book</p>'+
(OVERVIEW_PARA_1 ? '<p class="desc-text">'+esc(OVERVIEW_PARA_1)+'</p>' : '')+
(OVERVIEW_PARA_2 ? '<p class="desc-text">'+esc(OVERVIEW_PARA_2)+'</p>' : '')+
/* Features */
(FEATURES.length ?
'<p class="sec-title" style="margin-top:22px;">✅ What You\'ll Get</p>'+
'<div class="features-list">'+features+'</div>'
: '')+
'<hr />'+
/* Reviews */
(USER_REVIEWS.length ?
'<p class="sec-title">⭐ Reviews</p>'+
'<div class="reviews-list">'+reviews+'</div>'
: '')+
'</div>';
document.title = TITLE + ' | PakStudyHub';
}
/* ── RELATED BOOKS from WordPress CPT book_library ── */
async function loadRelated() {
var WP = 'https://pakstudyhub.online';
var CPT = 'book_library';
var grid = document.getElementById('related-grid');
/* Try every known image size before giving up */
function coverSrc(p) {
try {
var media = p._embedded['wp:featuredmedia'];
if (!media || !media[0]) return null;
var m = media[0];
if (m.code) return null; // WP error object
var s = m.media_details && m.media_details.sizes;
if (s) {
return (s.medium_large && s.medium_large.source_url)
|| (s.large && s.large.source_url)
|| (s.medium && s.medium.source_url)
|| (s.thumbnail && s.thumbnail.source_url)
|| m.source_url || null;
}
return m.source_url || null;
} catch(e) { return null; }
}
function dlUrl(p) {
var m = p.meta || p.acf || {};
return m.download_url || m.file_url || m.pdf_url || p.link || '#';
}
var GRADIENTS = [
'linear-gradient(135deg,#e8f6ee,#c2e8d0)',
'linear-gradient(135deg,#dbeafe,#bfdbfe)',
'linear-gradient(135deg,#fef3c7,#fde68a)',
'linear-gradient(135deg,#fce7f3,#fbcfe8)',
'linear-gradient(135deg,#ede9fe,#ddd6fe)',
'linear-gradient(135deg,#ffedd5,#fed7aa)',
];
try {
var res = await fetch(
WP+'/wp-json/wp/v2/'+CPT+
'?per_page=6&_embed=1&status=publish&orderby=date&order=desc'
);
if (!res.ok) throw new Error('HTTP '+res.status);
var posts = await res.json();
if (!posts.length) {
grid.innerHTML = '<p style="grid-column:1/-1;color:#5a6e60;font-size:14px;padding:16px 0;">No books found in the library.</p>';
return;
}
grid.innerHTML = posts.map(function(p, i) {
var src = coverSrc(p);
var title = (p.title && p.title.rendered) || 'Untitled';
var dl = dlUrl(p);
var coverHtml = src
? '<img style="width:100%;height:100%;object-fit:cover;object-position:center;display:block;transition:transform .3s ease;" src="'+src+'" alt="'+title+'" loading="lazy" />'
: '<div style="width:100%;height:100%;background:'+GRADIENTS[i%GRADIENTS.length]+';display:flex;align-items:center;justify-content:center;font-size:38px;">📗</div>';
return '<div style="border:1px solid var(--border);border-radius:12px;overflow:hidden;background:#fff;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s;" onmouseover="this.style.transform=\'translateY(-4px)\';this.style.boxShadow=\'0 8px 24px rgba(26,122,74,.16)\'" onmouseout="this.style.transform=\'\';this.style.boxShadow=\'\'">'+
/* Cover image — book-style 3:4 ratio */
'<div style="width:100%;aspect-ratio:3/4;overflow:hidden;background:var(--green-lt);">'+
coverHtml+
'</div>'+
/* Info */
'<div style="padding:10px 12px;">'+
'<h4 style="font-size:12px;font-weight:700;color:var(--text);line-height:1.4;margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;">'+title+'</h4>'+
'<a href="'+dl+'" target="_blank" style="display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:7px;background:var(--green);color:#fff;border-radius:6px;font-size:11px;font-weight:700;text-decoration:none;box-sizing:border-box;">⬇ Download PDF</a>'+
'</div>'+
'</div>';
}).join('');
} catch(err) {
grid.innerHTML = '<p style="grid-column:1/-1;color:#5a6e60;font-size:14px;">Could not load books: '+err.message+'</p>';
}
}
buildCard();
loadRelated();
</script>
</body>
</html>