/* ==========================================================================
   Book Nook — custom overrides layered on top of Tailwind CSS (Play CDN).
   Kept intentionally small: only things the CDN's JIT scanner can't reach
   (raw markup from WordPress core and WooCommerce) or that need real CSS
   (line clamping, custom scrollbars, star-rating widths) live here.
   ========================================================================== */

html {
	scroll-padding-top: 6rem;
}

body {
	-webkit-font-smoothing: antialiased;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* WordPress core alignment classes */
.alignleft {
	float: left;
	margin: 0.4rem 1.5rem 1rem 0;
}
.alignright {
	float: right;
	margin: 0.4rem 0 1rem 1.5rem;
}
.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}
.wp-caption,
.wp-block-image figure {
	max-width: 100%;
}
.wp-caption-text,
figcaption {
	font-size: 0.8rem;
	color: #64748b;
	margin-top: 0.4rem;
}
.gallery {
	display: grid;
	grid-template-columns: repeat(var(--gallery-columns, 3), minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1.5rem 0;
}
.gallery img {
	border-radius: 0.75rem;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Entry content typography (Tailwind Typography plugin isn't available on
   the CDN build, so post/page body copy is styled manually here). */
.prose-content {
	color: #292524;
	line-height: 1.75;
	font-size: 1.05rem;
}
.prose-content > * + * {
	margin-top: 1.25em;
}
.prose-content h1,
.prose-content h2,
.prose-content h3,
.prose-content h4 {
	font-family: 'Fraunces', ui-serif, Georgia, serif;
	font-weight: 600;
	color: rgb(var(--bn-ink));
	line-height: 1.3;
	margin-top: 1.8em;
}
.prose-content h2 {
	font-size: 1.5em;
}
.prose-content h3 {
	font-size: 1.25em;
}
.prose-content a {
	color: rgb(var(--bn-brand-600));
	text-decoration: underline;
	text-underline-offset: 2px;
}
.prose-content a:hover {
	color: rgb(var(--bn-brand-700));
}
.prose-content ul,
.prose-content ol {
	padding-left: 1.4em;
}
.prose-content ul {
	list-style: disc;
}
.prose-content ol {
	list-style: decimal;
}
.prose-content blockquote {
	border-left: 3px solid rgb(var(--bn-brand-300));
	padding-left: 1.2em;
	font-style: italic;
	color: #57534e;
}
.prose-content img {
	border-radius: 1rem;
}
.prose-content code {
	background: #f5f5f4;
	padding: 0.15em 0.4em;
	border-radius: 0.3em;
	font-size: 0.9em;
}
.prose-content pre {
	background: rgb(var(--bn-ink));
	color: rgb(var(--bn-paper));
	padding: 1em;
	border-radius: 0.75em;
	overflow-x: auto;
}
.prose-content pre code {
	background: transparent;
	padding: 0;
}
.prose-content table {
	width: 100%;
	border-collapse: collapse;
}
.prose-content th,
.prose-content td {
	border: 1px solid #e7e5e4;
	padding: 0.5em 0.75em;
	text-align: left;
}

/* ==========================================================================
   Pagination — core's the_posts_pagination()/the_comments_pagination() wrap
   their links in a nested .nav-links div, so utility classes passed via the
   'class' arg (which land on the outer <nav>) can't reach the actual links.
   Targeted here instead, keyed off the 'book-nook-pagination' class we pass in.
   ========================================================================== */

nav.book-nook-pagination {
	margin-top: 2.5rem;
}
.book-nook-pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.book-nook-pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
.book-nook-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.9rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e7e5e4;
	font-size: 0.85rem;
	font-weight: 600;
	color: #44403c;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.book-nook-pagination a.page-numbers:hover {
	background: rgb(var(--bn-ink));
	color: #fff;
	border-color: rgb(var(--bn-ink));
}
.book-nook-pagination .page-numbers.current {
	background: rgb(var(--bn-brand-500));
	color: #fff;
	border-color: rgb(var(--bn-brand-500));
}
.book-nook-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: #a8a29e;
	min-width: auto;
	padding: 0 0.25rem;
}
.book-nook-pagination .page-numbers.prev,
.book-nook-pagination .page-numbers.next {
	padding: 0 1.1rem;
}

/* ==========================================================================
   WooCommerce — restyle plugin-rendered markup that Tailwind classes can't
   reach directly (forms, tables, notices, star ratings, tabs, quantity input).
   ========================================================================== */

.woocommerce-notices-wrapper:not(:empty) {
	display: block;
	margin-bottom: 1.5rem;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
	background: #fff;
	border: 1px solid #e7e5e4;
	border-left: 4px solid rgb(var(--bn-brand-500));
	border-radius: 0.75rem;
	padding: 0.9rem 1.2rem;
	margin: 0 0 1.5rem;
	font-size: 0.9rem;
	list-style: none;
}
.woocommerce-error {
	border-left-color: #dc2626;
}
.woocommerce-message .button,
.woocommerce-error .button {
	background: rgb(var(--bn-ink));
	color: #fff;
	border-radius: 999px;
	padding: 0.4rem 1rem;
	font-size: 0.8rem;
	text-decoration: none;
	margin-left: 0.75rem;
}

.woocommerce-Price-amount {
	font-weight: 600;
}
del .woocommerce-Price-amount {
	font-weight: 400;
	opacity: 0.55;
	margin-right: 0.4em;
}
ins {
	text-decoration: none;
}

.star-rating {
	overflow: hidden;
	position: relative;
	height: 1.1em;
	line-height: 1.1em;
	width: 5.4em;
	font-family: initial;
}
.star-rating::before {
	content: '\2605\2605\2605\2605\2605';
	color: #e7e5e4;
	float: left;
	top: 0;
	left: 0;
	position: absolute;
}
.star-rating span {
	overflow: hidden;
	float: left;
	top: 0;
	left: 0;
	position: absolute;
}
.star-rating span::before {
	content: '\2605\2605\2605\2605\2605';
	color: rgb(var(--bn-brand-500));
	top: 0;
	position: absolute;
	left: 0;
}

.woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.35rem 0;
	font-size: 0.8rem;
	color: #78716c;
}

/* Buttons rendered directly by WooCommerce (cart, checkout, quantity forms)
   that our PHP filters don't touch. */
.button,
button.button,
input.button,
#respond input#submit,
.wc-block-components-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgb(var(--bn-ink));
	color: #fff !important;
	font-weight: 600;
	font-size: 0.875rem;
	padding: 0.65rem 1.5rem;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
	text-decoration: none;
}
.button:hover,
button.button:hover,
input.button:hover {
	background: rgb(var(--bn-brand-600));
}
.button.loading {
	opacity: 0.6;
}
a.remove {
	color: #dc2626 !important;
	font-size: 1.1rem;
	text-decoration: none;
}

.quantity .qty {
	width: 4rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.6rem;
	padding: 0.5rem 0.6rem;
	font-size: 0.9rem;
}

table.shop_table,
table.woocommerce-checkout-review-order-table,
table.variations {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 1rem;
	overflow: hidden;
}
table.shop_table th,
table.shop_table td,
table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
	padding: 0.9rem 1rem;
	border-bottom: 1px solid #f1f5f9;
	text-align: left;
	font-size: 0.9rem;
}
table.shop_table thead th {
	background: rgb(var(--bn-paper));
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #78716c;
}
td.product-thumbnail img {
	width: 4.5rem;
	border-radius: 0.6rem;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-EditAccountForm input,
.woocommerce-form-login input,
.woocommerce-form-register input {
	width: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 0.7rem;
	padding: 0.65rem 0.9rem;
	font-size: 0.9rem;
	background: #fff;
}
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.select2-container--open .select2-selection {
	outline: 2px solid rgb(var(--bn-brand-300));
	outline-offset: 1px;
}
.woocommerce form .form-row label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #44403c;
	margin-bottom: 0.3rem;
	display: inline-block;
}

.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	border-bottom: 1px solid #e7e5e4;
	margin-bottom: 1.5rem;
}
.woocommerce-tabs ul.tabs li {
	margin: 0;
}
.woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #78716c;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}
.woocommerce-tabs ul.tabs li.active a {
	color: rgb(var(--bn-ink));
	border-bottom-color: rgb(var(--bn-brand-500));
}

.woocommerce-pagination ul.page-numbers {
	display: flex;
	gap: 0.4rem;
	list-style: none;
	padding: 0;
	justify-content: center;
	margin-top: 2rem;
}
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e7e5e4;
	font-size: 0.85rem;
	text-decoration: none;
	color: #44403c;
}
.woocommerce-pagination .page-numbers li span.current {
	background: rgb(var(--bn-ink));
	color: #fff;
	border-color: rgb(var(--bn-ink));
}

.woocommerce-result-count,
.woocommerce-ordering {
	font-size: 0.85rem;
	color: #78716c;
}
.woocommerce-ordering select {
	border: 1px solid #e2e8f0;
	border-radius: 0.6rem;
	padding: 0.4rem 0.8rem;
	background: #fff;
}
ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
@media (min-width: 768px) {
	ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 1024px) {
	ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.woocommerce-breadcrumb {
	display: none; /* replaced by book_nook_breadcrumbs() */
}

/* Line clamp fallback (Play CDN doesn't include the line-clamp plugin). */
.line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Skip link */
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
