/* ===========================
   BOOK DETAIL PAGE
=========================== */

/* Scoped panel for book detail page to avoid conflicts with global `.panel` */
.book-detail-panel {
	padding: 24px 24px;
	margin-bottom: 20px;
}

.book-detail-page h1 {
	font-family: 'Poppins', sans-serif;
	font-size: 2rem;
	margin-bottom: 1.5rem;
	color: #0f172a;
}

/* Page-level container for book detail pages: keep content centered and readable */
.book-detail-page {
	max-width: var(--max-width, 1100px);
	margin: 0 auto;
	padding: 28px 20px 40px;
	box-sizing: border-box;
}

.book-detail-page .book-detail-grid {
	margin-top: 8px;
}

/* GRID LAYOUT */
.book-detail-grid {
	display: grid;
    /* keep main content flexible and sidebar a readable max-width */
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2rem;
    align-items: flex-start;
}

/* ===========================
   BOOK VISUAL SECTION
=========================== */

.book-visual {
	display: flex;
	gap: 1.5rem;
	background: #ffffff;
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.book-visual img {
	width: 220px;
	max-width: 100%;
	height: auto; /* let image scale responsively */
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* prevent grid children from forcing overflow on small containers */
.book-detail-grid > *,
.book-visual,
.book-description,
.reviews-panel { min-width: 0; }

/* DESCRIPTION */
.book-description {
	flex: 1;
}

.book-description h2 {
	font-family: 'Poppins', sans-serif;
	font-size: 1.6rem;
	margin-bottom: 0.5rem;
	color: #020617;
}

.book-description .book-desc {
    margin-top: 0.5rem;
    color: #334155;
    line-height: 1.6;
    font-size: 0.98rem;
}

.book-details {
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
	color: #475569;
	font-size: 0.95rem;
}
.book-details div { padding: 2px 0; }

.book-meta {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	font-size: 0.9rem;
	color: #475569;
}

.book-price {
	font-weight: 700;
	color: #0f766e;
}

/* ACTION BUTTONS */
.book-actions {
	margin-top: 1.2rem;
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.book-actions .btn {
	padding: 0.6rem 1.1rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: all 0.25s ease;
}

.btn-primary {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(37,99,235,0.35);
}

.btn-teal {
	background: linear-gradient(135deg, #0f766e, #115e59);
	color: #fff;
}

.btn-teal:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(15,118,110,0.35);
}

/* ===========================
   REVIEWS PANEL
=========================== */

.reviews-panel {
	background: #ffffff;
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

.rating-number {
	font-size: 3rem;
	font-weight: 800;
	text-align: center;
	color: #0f172a;
}

.rating-stars {
	text-align: center;
	margin-bottom: 1rem;
}

.star-filled {
	color: #f59e0b;
}

.star-empty {
	color: #cbd5f5;
}

/* REVIEW FORM */
.review-form textarea {
	width: 100%;
	min-height: 90px;
	padding: 0.75rem;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	resize: vertical;
	font-family: 'Roboto', sans-serif;
	font-size: 0.9rem;
}

.review-form textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.rating-select {
	display: flex;
	justify-content: center;
	margin-bottom: 0.75rem;
}

/* ===========================
   REVIEWS LIST
=========================== */

.reviews-list {
	margin-top: 1.2rem;
}

.review-item {
	display: flex;
	gap: 0.75rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #e5e7eb;
}

.review-item:last-child {
	border-bottom: none;
}

.review-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
}

.review-author {
	font-weight: 600;
	font-size: 0.9rem;
	color: #0f172a;
}

.review-text {
	font-size: 0.85rem;
	color: #475569;
	margin-top: 0.25rem;
}

.small-muted {
	font-size: 0.8rem;
	color: #64748b;
}

/* ===========================
   NOT FOUND
=========================== */

.book-not-found {
	background: #ffffff;
	padding: 2rem;
	border-radius: 16px;
	text-align: center;
	box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 900px) {
	.book-detail-grid {
		grid-template-columns: 1fr;
	}

	.book-visual {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.book-visual img {
		width: 200px;
		height: auto;
	}

	.book-meta {
		justify-content: center;
		gap: 0.75rem;
	}

	.book-actions {
		justify-content: center;
	}
}

