/* ========== Alphabet Grid ========== */
.book-alphabet-grid {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	justify-content: center;
	gap: 6px;
	padding: 6px 0;
	margin: 10px auto 20px;
}

.book-alphabet-grid a {
	background-color: #5e00b7;
	color: white;
	text-align: center;
	font-weight: bold;
	text-decoration: none;
	border-radius: 5px;
	width: 28px;
	height: 28px;
	line-height: 28px;
	font-size: 13px;
	display: inline-block;
	transition: background-color 0.2s ease;
}

.book-alphabet-grid a:hover {
	background-color: #7b1fa2;
}

.book-alphabet-grid a.active {
	background-color: #311b92;
	text-decoration: underline;
}

/* ========== Submenu Navigation ========== */
.book-submenu {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 25px 0;
	padding: 20px;
	background-color: #fff0f6;
	border: 1px solid #f9c5d5;
	border-radius: 16px;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(243, 182, 200, 0.25);
	font-size: 13px;
	white-space: nowrap;
	overflow-x: auto;
}

.book-submenu a {
	background-color: #ff69b4;
	color: #fff;
	padding: 10px 18px;
	border-radius: 24px;
	text-decoration: none;
	font-weight: bold;
	transition: all 0.2s ease;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.book-submenu a:hover {
	background-color: #d63384;
	transform: translateY(-3px);
}

/* ========== Container ========== */
.ff-books-container {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
	padding: 20px;
	margin: 30px auto;
	box-sizing: border-box;
	max-width: 1200px;
}

/* ========== Book Card ========== */
.ff-book-card {
	background-color: #fff9fc;
	border: 1px solid #f3c7d9;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(240, 170, 200, 0.15);
	padding: 20px;
	width: calc(25% - 20px);
	min-width: 160px;
	text-align: center;
	box-sizing: border-box;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	font-size: 15px;
}

.ff-book-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 8px 16px rgba(240, 170, 200, 0.3);
}

/* ========== Book Cover ========== */
.ff-book-card img, .ff-book-cover img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 1px;
    margin-top: 1px;
    margin-right: 1px;
}

/* ========== Book Title ========== */
.ff-book-title {
	font-weight: bold;
	font-size: 18px;
	color: #d63384;
	margin: 6px 0 10px;
	position: relative;
	padding-bottom: 6px;
}

.ff-book-title::after {
	content: "";
	display: block;
	width: 60%;
	margin: 6px auto 0;
	border-bottom: 2px solid #e06c80;
}

/* ========== Authors & Date ========== */
.ff-book-authors,
.ff-book-date {
	font-size: 15px;
	color: #343638ff;
	margin: 3px 0;
	font-style: italic;
	font-weight: 12px;
	font-weight: bold; /* or 600/700 */
}

/* ========== Genres ========== */
span.genres {
	display: block;
	font-size: 16px;
	font-weight: bold;
	color: #5e00b7;
	margin-top: 8px;
}

/* ========== Buy Links ========== */
.ff-book-links a {
	display: inline-block;
	background-color: #ce0f69;
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 14px;
	margin: 2px;
}

.ff-book-links a:hover {
	background-color: #e64980;
}

/* ========== Pagination ========== */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin: 30px 0;
	gap: 4px;
	text-align: center;
}

.pagination a,
.pagination span.ellipsis {
	padding: 6px 12px;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #444;
	background-color: #f8f8f8;
	font-weight: bold;
	font-size: 14px;
	margin: 0 4px;
}

.pagination a.active {
	background-color: #d5008f;
	color: white;
	border-color: #d5008f;
}

.pagination a:hover:not(.active) {
	background-color: #ffe6f2;
}

.pagination span.ellipsis {
	pointer-events: none;
	background: none;
	border: none;
	color: #aaa;
	font-weight: normal;
}

/* ========== Responsive Layout ========== */
@media (max-width: 1024px) {
	.ff-book-card {
		width: calc(33.33% - 20px); /* ✅ 3 columns on tablets */
	}
}

@media (max-width: 768px) {
	.ff-book-card {
		width: calc(50% - 20px); /* ✅ 2 columns on phones */
	}

	.ff-book-title {
		font-size: 20px;
	}

	.ff-book-authors,
	.ff-book-date,
	span.genres {
		font-size: 17px;
	}

	.ff-book-card img {
		max-height: 320px;
	}

	.ff-book-links a {
	display: inline-block;
	background-color: #ce0f69;
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 20px;
	margin: 2px;
}

.ff-book-links a:hover {
	background-color: #e64980;
}

.book-submenu a {
    background-color: #ff69b4;
    color: #fff;
    padding: 10px 18px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}
	

.book-submenu {
    display: flex
;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
    padding: 20px;
    background-color: #fff0f6;
    border: 1px solid #f9c5d5;
    border-radius: 16px;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(243, 182, 200, 0.25);
    font-size: 20px;
    white-space: nowrap;
    overflow-x: auto;
}
	
}


/* ========== Print Optimization ========== */
@media print and (max-width: 768px) {
	.ff-book-card {
		width: calc(33.33% - 20px) !important;
		page-break-inside: avoid;
	}
}

@media print {
	html, body {
		width: 100%;
		max-width: none !important;
		overflow: visible !important;
	}
}

html {
  scroll-behavior: smooth;
}