﻿/* Reader Styles */
.reader-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.btn-outline i {
    margin-right: 6px;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #fff;
}

.book-actions-detail .btn:nth-child(2) {
    border-color: #28a745;
    color: #28a745;
}

    .book-actions-detail .btn:nth-child(2):hover {
        background-color: #28a745;
        color: white;
    }

.reader-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-container {
    width: 95%;
    height: 95%;
    background-color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.reader-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .reader-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

.reader-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-control {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

    .btn-control:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

.page-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 0 10px;
}

.reader-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f8f9fa;
}

.reader-page {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 200px);
}

.page-content {
    line-height: 1.8;
    font-size: 16px;
    color: var(--dark-color);
}

    .page-content h2 {
        color: var(--primary-color);
        margin-bottom: 20px;
        font-size: 28px;
        border-bottom: 2px solid var(--accent-color);
        padding-bottom: 10px;
    }

    .page-content h3 {
        color: var(--secondary-color);
        margin: 25px 0 15px 0;
        font-size: 22px;
    }

    .page-content h4 {
        color: var(--dark-color);
        margin: 20px 0 10px 0;
        font-size: 18px;
    }

    .page-content p {
        margin-bottom: 15px;
        text-align: justify;
    }

    .page-content ul {
        margin: 15px 0;
        padding-left: 25px;
    }

    .page-content li {
        margin-bottom: 8px;
    }

.reader-footer {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

.reader-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0.3%;
}

.progress-text {
    font-size: 14px;
    color: var(--gray-color);
    white-space: nowrap;
}

/* Product Page Styles */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

    .breadcrumb a {
        color: var(--primary-color);
        text-decoration: none;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

    .breadcrumb span {
        color: var(--gray-color);
    }

.product-section {
    padding: 40px 0;
    background-color: white;
}

.product-container {
    max-width: 1000px;
    margin: 0 auto;
}

.book-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 50px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.book-cover-large {
    position: relative;
}

.book-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.book-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

    .badge.new {
        background-color: #28a745;
        color: white;
    }

    .badge.popular {
        background-color: #ffc107;
        color: #212529;
    }

.book-info-detail {
    padding: 20px 20px;
}

.book-title-large {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.book-author-large {
    font-size: 18px;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.stars {
    color: #ffc107;
    font-size: 18px;
}

.rating-text {
    color: var(--gray-color);
    font-size: 14px;
}

.book-meta-detail {
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--gray-color);
}

    .meta-item i {
        color: var(--primary-color);
        width: 16px;
    }

.book-actions-detail {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
    min-width: 150px;
}

.book-description {
    margin-bottom: 50px;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

    .book-description h3 {
        color: var(--primary-color);
        margin-bottom: 20px;
        font-size: 24px;
        font-family: var(--serif-font);
    }

    .book-description h4 {
        color: var(--secondary-color);
        margin: 25px 0 15px 0;
        font-size: 20px;
    }

    .book-description p {
        margin-bottom: 15px;
        line-height: 1.7;
        text-align: justify;
    }

.book-contents {
    margin: 20px 0;
    padding-left: 20px;
}

    .book-contents li {
        margin-bottom: 8px;
        color: var(--dark-color);
    }

.related-books {
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

    .related-books h3 {
        color: var(--primary-color);
        margin-bottom: 25px;
        font-size: 24px;
        font-family: var(--serif-font);
    }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-book {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
}

    .related-book:hover {
        transform: translateY(-5px);
    }

.related-cover {
    height: 120px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 4px;
    color: var(--gray-color);
    font-size: 30px;
}

.related-book h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.related-book p {
    color: var(--gray-color);
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-details {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .book-cover-large {
        text-align: center;
    }

    .book-image {
        height: 300px;
        max-width: 250px;
    }

    .book-title-large {
        font-size: 24px;
    }

    .book-actions-detail {
        flex-direction: column;
    }

    .btn-large {
        min-width: auto;
        width: 100%;
    }

    .reader-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .reader-page {
        padding: 20px;
        min-height: auto;
    }

    .page-content {
        font-size: 14px;
    }

        .page-content h2 {
            font-size: 22px;
        }

        .page-content h3 {
            font-size: 18px;
        }

    .reader-controls {
        flex-wrap: wrap;
        gap: 5px;
    }

    .btn-control {
        padding: 6px 8px;
        font-size: 12px;
    }

    .page-info {
        margin: 0 5px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .book-details {
        padding: 15px;
    }

    .book-description,
    .related-books {
        padding: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .reader-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

        .reader-header h3 {
            font-size: 16px;
        }

    .reader-progress {
        flex-direction: column;
        gap: 10px;
    }
}
::before {
    margin-right: 10px;
}