/* Book Detail Page Styles */

/* Flowing Background */
body {
    background: linear-gradient(-45deg, #f8f9fa, #e9ecef, #dee2e6, #f8f9fa);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Navigation Bar Visibility Fix */
#header .navbar-nav .nav-link {
    color: #333 !important;
}

#header .navbar-nav .nav-link:hover,
#header .navbar-nav .nav-link.active {
    color: #fd7e14 !important;
}

#header .navbar-toggler {
    color: #333 !important;
}

/* Layout */
.container.book {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding-top: 120px;
    /* Space for fixed header */
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* Main Book Area (Article + New Info) */
.main-book {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 30px;
}

/* Article Wrapper (Left Column) */
.article-wrapper {
    flex: 1;
    min-width: 0;
}

/* Side Content (Right Column) */
.side-content {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Common Card Style */
article,
.new_info,
.related-products,
.sidebar>div {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* Article Styling */
article {
    padding: 40px;
    margin-bottom: 30px;
}

article h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

article section {
    margin-bottom: 30px;
}

article h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #fd7e14;
    /* Primary color */
}

article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #444;
    margin-top: 25px;
    margin-bottom: 15px;
}

article p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

article mark {
    background-color: rgba(253, 126, 20, 0.15);
    color: #e36a0b;
    padding: 0 4px;
    border-radius: 2px;
}

/* Article Image Styling */
article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

article img:hover {
    transform: scale(1.02);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 10px;
}

.pagination a {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    color: #555;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    border: 1px solid #eee;
}

.pagination a:hover {
    background: #fd7e14;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 126, 20, 0.25);
    border-color: #fd7e14;
}

/* Related Products (Top of Right Column) */
.related-products {
    padding: 25px;
}

.related-products h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid #333;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-item {
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    border: 1px solid #a0bfe0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(55, 125, 255, 0.15);
    border-color: #377dff;
}

.product-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e2022;
    margin-bottom: 8px;
}

.product-item p {
    font-size: 0.9rem;
    color: #677788;
    margin-bottom: 2px;
    line-height: 1.5;
}

.product-item .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff4d4f;
}

.product-item .price small {
    font-size: 0.8rem;
    color: #777;
    font-weight: 400;
    margin-left: 2px;
}

.product-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #e7eaf3;
    padding-top: 12px;
}


.btn-consult {
    display: inline-block;
    padding: 6px 18px;
    font-size: 0.9rem;
    color: #377dff;
    border: 1px solid #377dff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
}

.btn-consult:hover {
    background: #377dff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(55, 125, 255, 0.25);
    text-decoration: none;
}


/* New Info Styling (Bottom of Right Column) */
.new_info {
    padding: 25px;
}

.new_info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    position: relative;
}

.new_info h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #fd7e14;
}

#new_info {
    display: block;
    padding: 0;
    margin: 0;
    list-style: none;
}

#new_info li {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

#new_info li:last-child {
    margin-bottom: 0;
}

#new_info li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #fd7e14;
}

#new_info li a {
    display: block;
    padding: 15px;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

#new_info li a:hover {
    color: #fd7e14;
}

#new_info li a::before {
    content: '\f15c';
    /* File icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    color: #ddd;
    font-size: 1rem;
    transition: color 0.3s;
}

#new_info li:hover a::before {
    color: #fd7e14;
}

/* Sidebar Widgets (Generic - if needed) */
.sidebar>div {
    padding: 25px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 991px) {
    .container.book {
        flex-direction: column;
        padding-top: 100px;
    }

    .main-book {
        flex-direction: column;
    }

    .side-content {
        width: 100%;
    }

    article,
    .new_info,
    .related-products {
        padding: 25px;
    }

    article h1 {
        font-size: 1.6rem;
    }

    /* Restore grid for mobile New Info if needed, or keep list */
    #new_info {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    #new_info li {
        margin-bottom: 0;
    }

    /* Related products horizontal on mobile? */
    .product-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
}
