/* Book pages — layout fixes & detail UI */

.book-breadcrumb {
    font-size: 0.95rem;
    margin-bottom: 1.5rem !important;
}

/* Prevent footer CTA from overlapping content on book pages */
.call-to-sction.cta-no-overlap {
    margin-top: 48px !important;
}

.book-page-content {
    padding-bottom: 80px;
    min-height: 50vh;
}

/* Detail page */
.book-detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eee;
}

.book-cover-wrap {
    background: #f4f6f8;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.book-cover-wrap img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.book-info-panel {
    padding: 32px 36px;
}

@media (max-width: 991px) {
    .book-info-panel {
        padding: 24px 20px;
    }
    .book-cover-wrap {
        min-height: 280px;
    }
}

.book-info-panel .book-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.25;
}

.book-info-panel .book-author {
    color: #6c757d;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.book-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.book-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f0f7e8;
    color: #578f1e;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
}

.book-meta-badge.price {
    background: #578f1e;
    color: #fff;
}

.book-description {
    color: #444;
    line-height: 1.7;
    margin-bottom: 24px;
}

.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.book-actions .rts-btn {
    min-width: 160px;
    text-align: center;
    justify-content: center;
}

.book-actions .rts-btn.btn-primary {
    padding: 14px 28px;
    font-weight: 600;
}

.book-guest-hint {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.book-protected-notice {
    background: #fff8e6;
    border: 1px solid #ffe08a;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.9rem;
    color: #664d03;
    margin-top: 8px;
}

/* Listing cards */
.book-grid-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.book-grid-card .book-thumb {
    height: 260px;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
}

.book-grid-card .book-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.book-grid-card .book-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-grid-card .book-card-body .title {
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-grid-card .book-card-actions {
    margin-top: auto;
    padding-top: 12px;
}

.book-grid-card .book-card-actions .rts-btn,
.book-grid-card .book-card-actions .rts-btn.btn-sm {
    font-size: 1rem !important;
    font-weight: 600;
    padding: 12px 22px !important;
    line-height: 1.25;
}

.book-price-panel {
    background: #f8faf5;
    border: 1px solid #e3ecd8;
    border-radius: 12px;
    padding: 16px 18px;
}

.book-price-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3d6b14;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-breakdown__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #444;
}

.price-breakdown__total {
    border-top: 1px solid #dee2e6;
    margin-top: 4px;
    padding-top: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #222;
}

.price-breakdown__total span:last-child {
    color: #578f1e;
}

.price-breakdown--compact .price-breakdown__row {
    font-size: 0.98rem;
}

.price-breakdown--compact .price-breakdown__total {
    font-size: 1.15rem;
}
