/* E-Book Detail Page Styles */
.ebook-detail-page {
    background-color: #F9FAFB;
    min-height: 100vh;
}

/* Breadcrumb Section (desktop) */
.ebook-breadcrumb {
    background-color: #F9FAFB;
    padding-top: 100px;
    padding-bottom: 15px;
    border-bottom: none;
}

/* Back Button Section (mobile) */
.ebook-back-mobile {
    background-color: #F9FAFB;
    padding-top: 80px;
    padding-bottom: 12px;
}

.ebook-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #2563EB;
    font-size: 0.875rem;
    font-weight: 600;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 50px;
    padding: 8px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ebook-back-btn:hover {
    background: #DBEAFE;
    color: #1D4ED8;
    transform: translateX(-2px);
}

.ebook-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.ebook-breadcrumb .breadcrumb::-webkit-scrollbar {
    display: none;
}

.ebook-breadcrumb .breadcrumb-item {
    display: inline-block;
}

.ebook-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 8px;
    color: #9CA3AF;
}

.ebook-breadcrumb .breadcrumb-item a {
    color: #6B7280;
    text-decoration: none;
}

.ebook-breadcrumb .breadcrumb-item a:hover {
    color: #2563EB;
}

.ebook-breadcrumb .breadcrumb-item.active {
    color: #111827;
    font-weight: 500;
}

/* Main Content */
.ebook-content-section {
    padding: 20px 0 40px 0;
}

/* Left Sidebar - Cover & Purchase */
.ebook-sidebar {
    position: sticky;
    top: 100px;
}

/* Right Sidebar - Purchase Card */
.ebook-purchase-sidebar {
    position: sticky;
    top: 100px;
}

.ebook-cover-card {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    max-width: 250px;
}

@media (max-width: 991px) {
    .ebook-cover-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 300px;
    }
}

.ebook-cover-card img {
    width: 100%;
    height: auto;
    display: block;
}

.ebook-cover-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 30px;
    min-height: 400px;
}

.ebook-cover-placeholder i {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
    margin-bottom: 20px;
}

.ebook-cover-placeholder h5 {
    color: white;
    font-weight: bold;
    margin-bottom: 10px;
}

.ebook-cover-placeholder p {
    color: white;
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Purchase Card */
.ebook-purchase-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ebook-price-section {
    text-center: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.ebook-price {
    font-size: 2rem;
    font-weight: bold;
    color: #2563EB;
    margin-bottom: 10px;
}

.ebook-price.free {
    color: #10B981;
}

.ebook-benefits-list {
    margin-bottom: 20px;
}

.ebook-benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ebook-benefit-item i {
    font-size: 1.1rem;
    margin-right: 12px;
    margin-top: 2px;
}

.ebook-benefit-item i.check {
    color: #10B981;
}

.ebook-benefit-item i.shield {
    color: #6B7280;
}

.ebook-benefit-item span {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ebook-cta-button {
    width: 100%;
    padding: 14px 20px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.ebook-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    background-color: #1D4ED8;
}

/* Quick Stats Card */
.ebook-stats-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ebook-stat-item {
    text-align: center;
    padding: 10px;
}

.ebook-stat-item i {
    font-size: 1.5rem;
    color: #2563EB;
    margin-bottom: 8px;
    display: block;
}

.ebook-stat-item.star i {
    color: #F59E0B;
}

.ebook-stat-label {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
}

/* Right Content Area */
.ebook-main-content {
    /* Will contain all right side content */
}

.ebook-category-badge {
    display: inline-block;
    background-color: #DBEAFE;
    color: #1E40AF;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.ebook-title {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 15px;
}

.ebook-author {
    font-size: 1rem;
    color: #2563EB;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Icon Stats Horizontal (like BacaBuku) */
.ebook-icon-stats {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 15px 0;
}

.ebook-icon-stats .stat-icon-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ebook-icon-stats .stat-icon-item i {
    font-size: 1.25rem;
    color: #6B7280;
}

.ebook-icon-stats .stat-icon-item span {
    font-size: 0.875rem;
    color: #374151;
}

/* Meta List Style (like BacaBuku) */
.ebook-meta-list {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
}

.ebook-meta-list .meta-list-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.ebook-meta-list .meta-list-item:last-child {
    margin-bottom: 0;
}

.ebook-meta-list .meta-list-label {
    min-width: 80px;
    color: #6B7280;
    font-weight: 500;
}

.ebook-meta-list .meta-list-separator {
    color: #6B7280;
}

.ebook-meta-list .meta-list-value {
    color: #111827;
    font-weight: 600;
    flex: 1;
}

/* Meta Info Horizontal Style (like BacaBuku) */
.ebook-meta-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

.ebook-meta-horizontal .meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ebook-meta-horizontal .meta-item i {
    font-size: 1.25rem;
    color: #2563EB;
    margin-top: 2px;
}

.ebook-meta-horizontal .meta-label {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 4px;
}

.ebook-meta-horizontal .meta-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 600;
}

/* Meta Info Card */
.ebook-meta-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    background-color: white;
    margin-bottom: 20px;
}

.ebook-meta-item {
    margin-bottom: 10px;
}

.ebook-meta-label {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 5px;
}

.ebook-meta-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 600;
}

.ebook-meta-value.primary {
    color: #2563EB;
}

/* Share Button */
.ebook-share-button {
    border: 1px solid #E5E7EB;
    background: white;
    color: #374151;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.ebook-share-button:hover {
    border-color: #2563EB;
    color: #2563EB;
    background: #F0F9FF;
}

/* Content Cards (Description, Author, etc) */
.ebook-section-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background: white;
}

.ebook-section-header {
    padding: 25px;
    border-bottom: 1px solid #F3F4F6;
}

.ebook-section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

.ebook-section-title i {
    color: #2563EB;
    margin-right: 10px;
}

.ebook-section-body {
    padding: 25px;
}

.ebook-description {
    color: #374151;
    line-height: 1.8;
    font-size: 0.9375rem;
    white-space: pre-wrap;
}

/* Reader Section */
.ebook-reader-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.ebook-reader-header {
    background-color: #1E40AF;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ebook-reader-header h5 {
    margin: 0;
    font-weight: bold;
    font-size: 1.125rem;
}

.ebook-reader-body {
    height: 700px;
    background-color: #374151;
    padding: 0;
    position: relative;
}

.ebook-reader-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Preview Section */
.ebook-preview-header {
    background-color: #FEF3C7;
    border-bottom: 2px solid #F59E0B;
    padding: 15px 25px;
}

.ebook-preview-header h5 {
    margin: 0;
    font-weight: bold;
    color: #92400E;
}

/* Author Card */
.ebook-author-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #F9FAFB;
    border-radius: 12px;
}

.ebook-author-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ebook-author-name {
    font-weight: bold;
    color: #111827;
    margin-bottom: 5px;
}

.ebook-author-role {
    color: #2563EB;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 991px) {
    .ebook-sidebar, .ebook-purchase-sidebar {
        position: relative;
        top: 0;
    }
    
    .ebook-breadcrumb {
        padding-top: 100px;
    }
    
    .ebook-title {
        font-size: 1.5rem;
    }
    
    /* On mobile, show purchase card at top */
    .col-lg-3.order-2 {
        order: 1 !important;
    }
    
    .col-lg-6.order-1 {
        order: 2 !important;
    }
    
    .col-lg-3.order-3 {
        order: 3 !important;
    }
}

@media (max-width: 576px) {
    .ebook-price {
        font-size: 1.5rem;
    }
    
    .ebook-title {
        font-size: 1.25rem;
    }
}

/* Related E-Books Section - Use styles from main ebook listing page (ebooks.blade.php) */
/* Styles are already defined in that page's <style> block, no need to duplicate here */


/* Extracted from ebook-detail.blade.php inline styles */
/* Ebook card styles for related section - same as main listing page */
    .ebook-card {
        background: #ffffff;
        border: 1px solid #f3f4f6;
        border-radius: 12px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        transition: box-shadow 0.2s ease, transform 0.2s ease;
        height: 100%;
        padding: 16px;
    }

    .ebook-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        border-color: #e5e7eb;
    }

    .ebook-card-header {
        width: 100%;
        position: relative;
    }

    .ebook-cover-wrapper {
        width: 100%;
        height: 180px;
        margin: 0 auto;
        background-color: #f9fafb;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    .ebook-promo-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
        color: white;
        padding: 4px 10px;
        font-size: 9px;
        font-weight: 700;
        border-radius: 4px;
        letter-spacing: 0.5px;
        z-index: 10;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }

    .ebook-cover-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }

    .ebook-cover-placeholder {
        color: #cbd5e1;
        font-size: 40px;
    }

    .ebook-card-body {
        padding: 16px 0 0 0;
        display: flex;
        flex-direction: column;
        flex: 1;
        background-color: transparent;
    }

    .ebook-card .ebook-title {
        font-size: 14px;
        font-weight: 600;
        color: #111827;
        margin: 0 0 6px 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.8em;
    }

    .ebook-card .ebook-author {
        font-size: 12px;
        color: #6b7280;
        margin: 0 0 8px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ebook-card .ebook-price {
        margin-top: 0;
        font-size: 14px;
        font-weight: 700;
    }

    .ebook-card .ebook-price.paid {
        color: #0d6efd;
    }

    .ebook-card .ebook-price.paid.promo {
        color: #F97316;
    }

    .ebook-card .ebook-price.free {
        color: #10b981;
    }

    .ebook-original-price {
        font-size: 10px;
        color: #9ca3af;
        text-decoration: line-through;
        font-weight: normal;
        margin-top: 2px;
    }
