/* Pariay Book Showcase — house style: cream #FDF8EE, dark brown #3E2723,
   dusty coral/terracotta #C06B4A. Headings Cinzel. No external requests. */

/* Hide the theme's entry title on single book pages — the showcase
   renders its own H1. */
.single-pariay_book .entry-title {
	display: none;
}

.pbs-showcase {
	background: #FDF8EE;
	border: 1px solid #e7dcc4;
	border-radius: 4px;
	margin: 0 0 2em;
	font-size: 17px;
	line-height: 1.65;
	color: #33302e;
}

.pbs-showcase h1.pbs-book-title,
.pbs-showcase h2.pbs-book-title,
.pbs-showcase h3.pbs-book-title,
.pbs-showcase h3.pbs-panel-title,
.pbs-showcase h4.pbs-mc-title,
.pbs-grid .pbs-card-title {
	font-family: Cinzel, 'Cormorant Garamond', serif;
	color: #3E2723;
}

/* ---- Tabs ---- */

.pbs-tablist {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 2px solid #3E2723;
}

.pbs-tab {
	flex: 1 1 auto;
	appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	margin: 0;
	padding: 14px 18px;
	font-family: Cinzel, 'Cormorant Garamond', serif;
	font-size: 16px;
	letter-spacing: 0.04em;
	color: #3E2723;
	cursor: pointer;
	text-align: center;
}

.pbs-tab:hover {
	color: #C06B4A;
}

.pbs-tab:focus-visible {
	outline: 2px solid #C06B4A;
	outline-offset: -2px;
}

.pbs-tab[aria-selected="true"] {
	background: #3E2723;
	color: #FDF8EE;
	border-bottom-color: #C06B4A;
}

.pbs-panel {
	padding: 28px;
}

.pbs-panel[hidden] {
	display: none;
}

.pbs-panel-title {
	margin-top: 0;
}

.pbs-note {
	font-style: italic;
	color: #6b5d52;
}

/* ---- "The Book" panel ---- */

.pbs-book-title {
	margin-top: 0;
	margin-bottom: 0.25em;
}

.pbs-edition {
	font-family: Cinzel, 'Cormorant Garamond', serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #C06B4A;
	margin: 0 0 1.25em;
}

.pbs-book-top {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

.pbs-cover {
	flex: 0 0 220px;
}

.pbs-cover-img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 4px 14px rgba(62, 39, 35, 0.25);
}

.pbs-cover--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	background: #f3ead6;
	border: 1px dashed #c5b3b3;
	color: #6b5d52;
	font-style: italic;
	text-align: center;
	padding: 16px;
}

.pbs-overview {
	flex: 1 1 auto;
	min-width: 0;
}

.pbs-overview p:first-child {
	margin-top: 0;
}

.pbs-meta-label {
	font-family: Cinzel, 'Cormorant Garamond', serif;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #3E2723;
	margin: 1.5em 0 0.4em;
}

.pbs-lines {
	margin: 0 0 0.5em;
	padding-left: 1.25em;
}

/* ---- Classification (1.0.26) ---- */

/* The Book panel: the four standardized facets (Category, Audience,
   Subject, Language) below the ISBN block. The heading reuses
   .pbs-meta-label, so the block takes the same spacing as the
   Formats & prices / ISBN sections above it; the list itself is
   unbulleted, one facet per line, values comma-joined. */
.pbs-classification-list {
	list-style: none;
	margin: 0 0 0.5em;
	padding: 0;
	line-height: 1.65;
}

.pbs-classification-list strong {
	color: #3E2723;
}

/* Buy row: pinned to the bottom right of the panel. */
.pbs-buy-row {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 18px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #e7dcc4;
}

.pbs-amazon-link {
	color: #C06B4A;
	text-decoration: underline;
}

.pbs-amazon-link:hover {
	color: #3E2723;
}

.pbs-buy-btn,
.pbs-mc-btn,
.pbs-card-preview-btn {
	display: inline-block;
	background: #C06B4A;
	color: #ffffff;
	padding: 12px 30px;
	border-radius: 3px;
	text-decoration: none;
	font-family: Cinzel, 'Cormorant Garamond', serif;
	letter-spacing: 0.05em;
}

.pbs-buy-btn:hover,
.pbs-buy-btn:focus-visible,
.pbs-mc-btn:hover,
.pbs-mc-btn:focus-visible,
.pbs-card-preview-btn:hover,
.pbs-card-preview-btn:focus-visible {
	background: #3E2723;
	color: #ffffff;
	text-decoration: none;
}

/* Disabled "Masterclass — Coming soon" button in the Masterclass tab
   (1.0.4): same coral button, slightly muted so it reads as not yet
   available. A <button> needs its own border/font-size reset — anchors
   inherit those from the page, buttons do not. */
.pbs-mc-btn--soon {
	border: 0;
	font-size: 16px;
}

.pbs-mc-btn--soon:disabled {
	opacity: 0.8;
	cursor: default;
}

.pbs-status-note {
	margin: 0;
	font-style: italic;
	color: #6b5d52;
}

/* ---- "About the Author" panel ---- */

.pbs-author {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

.pbs-author-photo {
	flex: 0 0 180px;
}

.pbs-author-photo-img {
	display: block;
	width: 100%;
	height: auto;
}

.pbs-author-bio {
	flex: 1 1 auto;
	min-width: 0;
}

.pbs-author-bio p:first-child {
	margin-top: 0;
}

/* ---- "Inside the Book" panel ---- */

.pbs-toc {
	margin-bottom: 1.5em;
}

.pbs-preview {
	border-left: 3px solid #C06B4A;
	padding-left: 18px;
	font-style: italic;
}

/* (1.0.25) Mobile-scroll fix: phone browsers (iOS Safari especially)
   cannot touch-scroll a PDF inside an iframe, so the viewer container
   scrolls vertically with momentum touch instead of clipping its
   content (overflow: hidden). */
.pbs-pdf-preview {
	margin: 1.5em 0 0;
	border: 1px solid #e7dcc4;
	border-radius: 4px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.pbs-pdf-preview iframe {
	display: block;
	width: 100%;
	height: 640px;
	border: 0;
}

/* (1.0.25) "View the preview full-screen" button below the embedded
   viewer — same coral button look as .pbs-card-preview-btn. */
.pbs-pdf-open {
	text-align: center;
	margin: 14px 0 0;
}

.pbs-pdf-open-btn {
	display: inline-block;
	background: #C06B4A;
	color: #ffffff;
	padding: 12px 30px;
	border-radius: 3px;
	text-decoration: none;
	font-family: Cinzel, 'Cormorant Garamond', serif;
	letter-spacing: 0.05em;
}

.pbs-pdf-open-btn:hover,
.pbs-pdf-open-btn:focus-visible {
	background: #3E2723;
	color: #ffffff;
	text-decoration: none;
}

/* ---- Book grid ---- */

.pbs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
	margin: 0 0 2em;
}

.pbs-card {
	background: #ffffff;
	border: 1px solid #e7dcc4;
	border-radius: 4px;
	overflow: hidden;
	/* (1.0.18) Flex column so the footer link line can be pinned to the
	   bottom of the card with margin-top: auto. */
	display: flex;
	flex-direction: column;
}

.pbs-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.pbs-card-link:hover .pbs-card-title {
	color: #C06B4A;
}

.pbs-card-cover img {
	display: block;
	width: 100%;
	height: auto;
}

.pbs-card-cover--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	background: #f3ead6;
	color: #6b5d52;
	font-style: italic;
	text-align: center;
	padding: 16px;
}

.pbs-card-title {
	margin: 14px 16px 4px;
	font-size: 19px;
	line-height: 1.35;
}

.pbs-card-edition {
	margin: 0 16px 16px;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #C06B4A;
}

/* ---- Listing filters (1.0.26) ---- */

/* Filter bar above the Our Publications and Upcoming grids: audience
   pill buttons (the "Coming soon" pill shape — coral outline on
   cream, filled coral when active) plus a subject dropdown. Cards
   the filters exclude carry the hidden attribute; .pbs-card is
   display:flex, which would beat the attribute's UA display:none,
   so the attribute gets its own rule — the same lesson as
   .pbs-panel[hidden] above. */
.pbs-card[hidden] {
	display: none;
}

.pbs-filters {
	text-align: center;
	margin: 0 0 1.5em;
}

.pbs-filter-group {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 8px 10px;
	vertical-align: middle;
}

.pbs-filter-btn {
	appearance: none;
	background: #FDF8EE;
	border: 1px solid #C06B4A;
	border-radius: 20px;
	color: #3E2723;
	padding: 6px 16px;
	font-family: Cinzel, 'Cormorant Garamond', serif;
	font-size: 13px;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.pbs-filter-btn:hover,
.pbs-filter-btn:focus-visible {
	border-color: #3E2723;
	color: #C06B4A;
}

.pbs-filter-btn.is-active {
	background: #C06B4A;
	border-color: #C06B4A;
	color: #FDF8EE;
}

.pbs-filter-btn.is-active:hover,
.pbs-filter-btn.is-active:focus-visible {
	color: #FDF8EE;
}

.pbs-filter-subject-label {
	display: inline-block;
	margin: 0 8px 10px;
	font-family: Cinzel, 'Cormorant Garamond', serif;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: #3E2723;
	vertical-align: middle;
}

.pbs-filter-subject {
	background: #FDF8EE;
	border: 1px solid #C06B4A;
	border-radius: 20px;
	color: #3E2723;
	padding: 6px 12px;
	font-size: 14px;
}

/* ---- Seal placeholder (cover not yet available) ---- */

.pbs-cover--seal {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	background: #f7f1e3;
	border: 1px solid #e7dcc4;
	padding: 20px;
}

.pbs-seal-img {
	display: block;
	max-width: 180px;
	width: 100%;
	height: auto;
}

.pbs-card-cover .pbs-cover--seal {
	min-height: 300px;
}

.pbs-card-cover .pbs-seal-img {
	max-width: 150px;
}

/* ---- New card lists: featured / upcoming / masterclasses ---- */

.pbs-featured,
.pbs-upcoming,
.pbs-masterclasses {
	margin: 0 0 2em;
}

.pbs-card-overview,
.pbs-card-mc {
	margin: 0 16px 12px;
	font-size: 15px;
	line-height: 1.55;
	color: #4a3a34;
}

.pbs-card-linkline {
	margin: 0 16px 16px;
}

/* Preview button on masterclass cards (1.0.4): its own wrapper so the
   coral button is never caught by the .pbs-card-linkline a text-link
   rule above. */
.pbs-card-preview {
	margin: 0 16px 16px;
}

.pbs-card-linkline a {
	color: #C06B4A;
	font-weight: bold;
	text-decoration: none;
}

.pbs-card-linkline a:hover {
	color: #3E2723;
}

.pbs-card-soon {
	margin: 0 16px 16px;
}

.pbs-card-soon span {
	display: inline-block;
	border: 1px solid #C06B4A;
	color: #C06B4A;
	border-radius: 20px;
	padding: 5px 12px;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ---- Centred featured + masterclass cards (1.0.3) ---- */

/* Featured list only: centre the cards instead of stretching them from
   the left. Scoped to .pbs-featured, so the plain .pbs-grid used by
   [pariay_book_grid] on Our Publications keeps its left-aligned
   auto-fill layout. auto-fit collapses empty tracks, so two cards sit
   centred at their maximum instead of spreading across the row.
   (1.0.28) Columns narrowed at the owner's request: at 320px the
   featured thumbnails looked too big in the middle of the homepage.
   Cards — and their covers, which fill the card width — now render at
   most 230px wide (180px minimum), about 30% smaller. Only this rule
   changes; the base .pbs-grid and the masterclasses grid keep their
   220px-based columns. */
.pbs-featured .pbs-grid {
	grid-template-columns: repeat(auto-fit, minmax(180px, 230px));
	justify-content: center;
}

/* Masterclass list only: centred cards, same as featured above, with
   visibly curved edges. overflow: hidden on .pbs-card already clips the
   cover image to the curve. The card body (title, edition, masterclass
   line, preview button) is centred too (1.0.4), matching the approved
   homepage mockup — featured and upcoming cards keep their left-aligned
   text. */
.pbs-masterclasses .pbs-grid {
	grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
	justify-content: center;
}

.pbs-masterclasses .pbs-card {
	border-radius: 16px;
	text-align: center;
}

/* Direct centring on the card elements themselves (1.0.5): the inherited
   text-align from .pbs-masterclasses .pbs-card was not enough on its own
   — a theme heading rule can beat inheritance, so each element is
   centred explicitly. Applies to every masterclass card, published and
   upcoming alike, since they share the same card markup. */
.pbs-masterclasses .pbs-card-title,
.pbs-masterclasses .pbs-card-edition,
.pbs-masterclasses .pbs-card-mc,
.pbs-masterclasses .pbs-card-preview {
	text-align: center;
}

/* Direct centring on EVERY book card (1.0.6): the owner confirmed the
   masterclass titles are centred and asked for the same treatment on ALL
   publications — featured, upcoming and the plain grid. Same lesson as
   1.0.5: each element carries its own direct text-align: center rule so
   the centring never depends on inheritance (a theme heading rule can
   beat inheritance, and the card title is an h3). The plain grid
   ([pariay_book_grid]) has no wrapper of its own, so pbs_render_grid()
   now emits <div class="pbs-grid pbs-publications"> and the rules below
   scope to that class. The card-level rules mirror the masterclass
   treatment; the element rules are what actually guarantee the result. */
.pbs-featured .pbs-card {
	text-align: center;
}

.pbs-featured .pbs-card-title,
.pbs-featured .pbs-card-edition,
.pbs-featured .pbs-card-overview,
.pbs-featured .pbs-card-linkline {
	text-align: center;
}

.pbs-upcoming .pbs-card {
	text-align: center;
}

.pbs-upcoming .pbs-card-title,
.pbs-upcoming .pbs-card-edition,
.pbs-upcoming .pbs-card-overview,
.pbs-upcoming .pbs-card-soon {
	text-align: center;
}

.pbs-publications .pbs-card {
	text-align: center;
}

.pbs-publications .pbs-card-title,
.pbs-publications .pbs-card-edition,
.pbs-publications .pbs-card-overview,
.pbs-publications .pbs-card-linkline {
	text-align: center;
}

/* ---- Featured slider (4+ published books) ---- */

.pbs-featured--slider {
	position: relative;
}

.pbs-featured-track {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.pbs-featured-track::-webkit-scrollbar {
	display: none;
}

.pbs-featured-track .pbs-card {
	flex: 0 0 calc(33.333% - 16px);
	scroll-snap-align: start;
}

.pbs-slider-arrow {
	position: absolute;
	top: 38%;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 0;
	background: rgba(62, 39, 35, 0.85);
	color: #FDF8EE;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 3px;
}

.pbs-slider-arrow:hover,
.pbs-slider-arrow:focus-visible {
	background: #C06B4A;
}

.pbs-slider-prev {
	left: 8px;
}

.pbs-slider-next {
	right: 8px;
}

.pbs-slider-dots {
	text-align: center;
	margin-top: 14px;
}

.pbs-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	margin: 0 4px;
	background: #d8c9b8;
	cursor: pointer;
}

.pbs-slider-dot.is-active {
	background: #C06B4A;
}

@media (max-width: 900px) {
	.pbs-featured-track .pbs-card {
		flex-basis: calc(50% - 12px);
	}
}

@media (max-width: 600px) {
	.pbs-featured-track .pbs-card {
		flex-basis: 85%;
	}
}

/* ---- Accordion on small screens ---- */

@media (max-width: 768px) {
	.pbs-tablist {
		flex-direction: column;
		border-bottom: 0;
	}

	.pbs-tab {
		text-align: left;
		border-bottom: 1px solid #e7dcc4;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
	}

	.pbs-tab::after {
		content: "+";
		font-size: 22px;
		line-height: 1;
		color: #C06B4A;
	}

	.pbs-tab[aria-expanded="true"]::after {
		content: "\2013";
	}

	.pbs-tab[aria-selected="true"] {
		border-bottom-color: #C06B4A;
	}

	.pbs-panel {
		padding: 20px;
	}

	.pbs-pdf-preview iframe {
		height: 480px;
	}

	.pbs-book-top,
	.pbs-author {
		flex-direction: column;
	}

	.pbs-cover,
	.pbs-author-photo {
		flex: 0 0 auto;
		max-width: 240px;
	}

	.pbs-buy-row {
		flex-wrap: wrap;
	}
}

/* (1.0.25) On phones the embedded PDF viewer takes most of the screen
   height so the preview is usable. Placed after the ≤768px block above
   so it wins over that block's 480px rule at phone widths; the desktop
   height stays 640px. */
@media (max-width: 600px) {
	.pbs-pdf-preview iframe {
		height: 70vh;
	}
}

/* ---- Thumbnail cards (1.0.14) ---- */

/* Smaller, simpler cards — cover, title and edition only. (1.0.15)
   Featured Books and the plain Our Publications grid no longer use
   them (they are fuller cards again, like Upcoming), so the two
   150–190px grid overrides that shipped here are REMOVED — the featured
   grid falls back to its 220px/320px rule above and the publications
   grid to the base .pbs-grid rule, matching Upcoming's width. The
   .pbs-card--thumbnail element rules stay: a direct card call with the
   thumbnail option still renders a small card. */
.pbs-card--thumbnail {
	border-radius: 16px;
}

.pbs-card--thumbnail .pbs-card-title {
	margin: 12px 10px 2px;
	font-size: 15px;
}

.pbs-card--thumbnail .pbs-card-edition {
	margin: 0 10px 12px;
	font-size: 12px;
}

.pbs-card--thumbnail .pbs-card-cover--empty,
.pbs-card--thumbnail .pbs-cover--seal {
	min-height: 220px;
}

.pbs-card--thumbnail .pbs-seal-img {
	max-width: 110px;
}

/* Featured slider branch (4+ published books): four thumbnails across
   instead of three wide cards. Same specificity as the base slider rule
   above, later in the file, so this wins. */
.pbs-featured--slider .pbs-card--thumbnail {
	flex: 0 0 calc(25% - 18px);
}

/* ---- Related books on single book pages (1.0.16, strip in 1.0.17) ---- */

/* "More from Pariay Publishers" below the showcase — the book
   equivalent of the "Lifelong Learning Articles" section below a
   journal article. (1.0.17) The cards sit in ONE horizontal row that
   scrolls sideways — a flex strip, not a grid — so the section reads as
   a compact stripe of suggestions rather than a second copy of the
   main book sections. Cards are a fixed 180px wide and never shrink,
   so they stay in a single row; the arrows beside the track scroll by
   one card (see assets/js/showcase.js initRelatedStrip()). The
   .pbs-related centring rules mirror the 1.0.6 lesson: each element
   carries its own direct text-align rule, because the featured/upcoming
   centring rules are scoped to their own wrappers and do not reach
   cards rendered here. The thumbnail title/edition sizing comes from
   the unscoped .pbs-card--thumbnail rules above, which apply to any
   card with that class — no extra scoping needed. */
.pbs-related {
	margin-top: 48px;
}

.pbs-related .pbs-related-title {
	font-family: Cinzel, 'Cormorant Garamond', serif;
	color: #3E2723;
	text-align: center;
	margin: 0 0 24px;
}

.pbs-related-strip {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pbs-related-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	flex: 1 1 auto;
	min-width: 0;
	padding-bottom: 4px;
}

.pbs-related-track::-webkit-scrollbar {
	display: none;
}

.pbs-related-track .pbs-card {
	flex: 0 0 180px;
	scroll-snap-align: start;
}

/* Strip arrows: same house style as the featured slider arrows —
   dark brown circle, cream chevron, coral on hover. Hidden (JS) when
   the strip has nothing to scroll; disabled at each end. */
.pbs-related-arrow {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 0;
	background: rgba(62, 39, 35, 0.85);
	color: #FDF8EE;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 3px;
}

.pbs-related-arrow:hover,
.pbs-related-arrow:focus-visible {
	background: #C06B4A;
	color: #FDF8EE;
}

.pbs-related-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.pbs-related-arrow[hidden] {
	display: none;
}

.pbs-related .pbs-card {
	text-align: center;
}

.pbs-related .pbs-card-title,
.pbs-related .pbs-card-edition {
	text-align: center;
}

/* ---- "More →" link pinned bottom-right (1.0.18) ----
   The published cards' footer link ("More →", formerly "View the book
   →") sits at the bottom-right of the card box: the card is a flex
   column (see .pbs-card above) and the link line takes margin-top:
   auto, so it drops to the bottom even when cards in a row have
   different excerpt lengths. This block sits after the 1.0.6/1.0.15
   centred-elements lists and uses the same selectors, so at equal
   specificity it wins over their text-align: center on the link line
   only. Title, edition and overview stay centred; the "Coming soon"
   pill on upcoming cards is untouched (still centred). */
.pbs-featured .pbs-card-linkline,
.pbs-publications .pbs-card-linkline {
	text-align: right;
	margin-top: auto;
}

/* ---- Related strip centred when it fits (1.0.19) ----
   On a wide screen the strip sits left-aligned under its centred
   heading, which looks off. When the JS finds the track fits
   (scrollWidth <= clientWidth) it adds .pbs-related--centered to the
   section and the track centres its cards under the heading. The
   class is ONLY ever applied when nothing overflows: a centred flex
   row that overflows cannot be scrolled back to its start, so the
   default stays flex-start (no justify-content on the base track
   rule) and the JS removes the class as soon as the row overflows. */
.pbs-related--centered .pbs-related-track {
	justify-content: center;
}
