
/* Book Detail Page Styling */

.book-detail-page {
    background-color: var(--navy);
    padding-top: 30px;
    padding-bottom: 60px;
}

/* Breadcrumb Navigation */
.breadcrumb-container {
    background-color: var(--light-navy);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--light-gray);
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb .active {
    color: var(--light-gray);
}


/* Main Book Detail Layout */
.book-detail {
    display: grid;
    grid-template-columns: 33% 1fr; /* Increased image section width to 33% */
    gap: 40px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.book-detail-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.book-detail-image img {
    max-width: 100%;
    height: auto;
    max-height: 450px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.bestseller-badge.large {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.book-detail-info {
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    line-height: 1.2;
    color: #333;
}

.book-author,
.book-author a {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-bottom: 15px; /* Reduced to make room for short description */
}

/* Short description styling */
.book-short-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

/* Book Details Section */
.book-details {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    color: #333;
}

/* Action Buttons - Updated to match /books/ styling */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.book-button {
    margin-top: auto;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    line-height: 1.7em;
    margin-top: 0px;
}

.book-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.book-button i {
    margin-right: 8px;
}

.amazon-button {
    background: #ff9900;
}

.amazon-button:hover {
    background: #e68a00;
}

.share-button {
    background-color: var(--light-navy);
}

.share-button:hover {
    background-color: var(--navy);
}

/* Book Content and Sidebar Layout */
.book-content-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.book-description-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 515px;
}

.book-description-container h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.book-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
    -webkit-line-clamp: none;
}

.book-description p {
    margin-bottom: 20px;
}

/* Sidebar */
.book-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Ad placeholder with equal height to description */
.ad-placeholder {
    background-color: var(--light-navy);
    border-radius: 8px;
    flex-grow: 1;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.related-books {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.related-books h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.related-books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.related-book-card {
    transition: transform 0.2s ease;
}

.related-book-card:hover {
    transform: translateY(-5px);
}

.related-book-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-book-image {
    margin-bottom: 8px;
}

.related-book-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-book-title {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.share-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.close-modal:hover {
    color: #333;
}

.share-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: #333;
    text-align: center;
}

.sharing-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Back to Books Button */
.back-to-books {
    margin-top: 40px;
    text-align: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #e0e0e0;
}

/* Copy message */
.copy-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.copy-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* Ad placeholder with equal height to description */
.ad-placeholder {
    background-color: var(--light-navy);
    border-radius: 8px;
    min-height: 300px; /* Base height */
    flex-grow: 1; /* Will grow to match description height */
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 30px;
}


/* Short description styling */
.book-short-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
    font-weight: normal;
}


.book-sidebar .ad-container .ad-image { 
    /* width: 378px;
    height: 515px; */
    margin-top: 35px;
    border-radius: 10px;
/* }

.book-thumbnail img { */
width: 100%;
height: 515px;
object-fit: cover;
transition: transform 0.3s;
}

/* .book-card:hover .book-thumbnail img */
.book-sidebar:hover .ad-container img.ad-image  {
transform: scale(1.05);
}


/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .book-content-sidebar {
        grid-template-columns: 1fr;
    }
    
    .book-sidebar {
        order: 1;
    }
    
    .related-books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ad-placeholder {
        min-height: 480px;
        background-color: transparent;
    }
}

@media screen and (max-width: 768px) {
    .book-detail {
        grid-template-columns: 1fr;
    }
    
    .book-detail-image {
        margin-bottom: 20px;
        max-width: 250px;
        margin: 0 auto 30px auto;
    }
    
    .related-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .book-title {
        font-size: 1.8rem;
    }
    
    .book-details {
        grid-template-columns: 1fr;
    }
    
    .sharing-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .ad-placeholder {
        min-height: 480px;
    }

}