/* ============================================
           EBOOKS PAGE - COMPLETE STYLING
        ============================================ */
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: #1f2937;
            background: #f9fafb;
            overflow-x: hidden;
        }
        
        /* Scroll Progress Bar */
        .scroll-progress-bar {
            position: fixed;
            top: 0;
            left: 0;
            width: 0%;
            height: 4px;
            background: linear-gradient(90deg, #1e40af 0%, #3b82f6 50%, #f97316 100%);
            z-index: 9999;
            transition: width 0.1s linear;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
        }
        
        /* Hero Section */
        .ebooks-hero {
            background: linear-gradient(180deg, #ffffff 0%, #fef3f2 30%, #fff7ed 60%, #fef3f2 100%);
            padding: 6rem 5% 4rem;
            color: #0f172a;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .ebooks-hero::before {
            content: '';
            position: absolute;
            width: 800px;
            height: 800px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            top: -300px;
            right: -200px;
            animation: float-blob 25s infinite ease-in-out;
        }
        
        .ebooks-hero::after {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
            bottom: -200px;
            left: -150px;
            animation: float-blob 20s infinite ease-in-out reverse;
        }
        
        @keyframes float-blob {
            0%, 100% {
                transform: translate(0, 0) scale(1);
            }
            33% {
                transform: translate(50px, -50px) scale(1.1);
            }
            66% {
                transform: translate(-30px, 30px) scale(0.95);
            }
        }
        
        .hero-content {
            max-width: 1600px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }
        
        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border: 2px solid #bfdbfe;
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            color: #1e40af;
            font-size: 0.95rem;
            font-weight: 700;
            margin-bottom: 2rem;
            box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
            animation: badge-bounce 3s infinite;
        }
        
        @keyframes badge-bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-8px);
            }
        }
        
        .hero-title {
            font-size: 3.5rem;
            font-weight: 900;
            margin-bottom: 1.5rem;
            line-height: 1.2;
            color: #0f172a;
            letter-spacing: -0.02em;
        }
        
        .hero-subtitle {
            font-size: 1.3rem;
            opacity: 0.95;
            line-height: 1.8;
            max-width: 700px;
            margin: 0 auto;
            color: #64748b;
        }
        
        /* Stats Section */
        .ebooks-stats {
            max-width: 1600px;
            margin: -2rem auto 0;
            padding: 0 5%;
            position: relative;
            z-index: 10;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
            background: white;
            padding: 2rem;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
        }
        
        .stat-item {
            text-align: center;
            padding: 1rem;
        }
        
        .stat-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
            display: block;
        }
        
        .stat-number {
            font-size: 2.2rem;
            font-weight: 900;
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
            display: block;
        }
        
        .stat-label {
            color: #6b7280;
            font-size: 0.95rem;
            font-weight: 600;
        }
        
        /* Main Container */
        .ebooks-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 6rem 5%;
        }
        
        /* Section Header */
        .section-header {
            text-align: center;
            margin-bottom: 4rem;
        }
        
        .section-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1e40af;
            padding: 0.6rem 1.8rem;
            border-radius: 50px;
            font-size: 0.95rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            border: 2px solid #93c5fd;
        }
        
        .section-title {
            font-size: 3rem;
            font-weight: 900;
            color: #1f2937;
            margin-bottom: 1rem;
        }
        
        .section-subtitle {
            font-size: 1.2rem;
            color: #6b7280;
            max-width: 700px;
            margin: 0 auto;
        }
        
        /* eBook Card */
        .ebook-card {
            display: grid;
            grid-template-columns: 380px 1fr;
            gap: 3rem;
            background: white;
            border-radius: 30px;
            padding: 3rem;
            margin-bottom: 3rem;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        
        .ebook-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, #3b82f6, #f97316, #3b82f6);
            background-size: 200% 100%;
            animation: gradient-shift 3s ease infinite;
        }
        
        @keyframes gradient-shift {
            0%, 100% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
        }
        
        .ebook-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
        }
        
        /* Price Sticker on Card */
        .ebook-price-sticker {
            position: absolute;
            top: 2rem;
            right: 2rem;
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            color: white;
            padding: 0.8rem 1.8rem;
            border-radius: 12px;
            font-size: 1.4rem;
            font-weight: 900;
            box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
            z-index: 10;
            transform: rotate(3deg);
            animation: sticker-bounce 3s ease-in-out infinite;
        }

        .ebook-price-sticker.paid {
            background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
            box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
        }

        @keyframes sticker-bounce {
            0%, 100% {
                transform: rotate(3deg) translateY(0);
            }
            50% {
                transform: rotate(3deg) translateY(-5px);
            }
        }

        .ebook-price-sticker::before {
            content: '';
            position: absolute;
            top: -4px;
            right: -4px;
            width: 20px;
            height: 20px;
            background: inherit;
            border-radius: 50%;
            opacity: 0.3;
        }

        .ebook-price-sticker::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: -4px;
            width: 15px;
            height: 15px;
            background: inherit;
            border-radius: 50%;
            opacity: 0.3;
        }
        
        /* Left Side - Book Cover */
        .ebook-cover {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .ebook-cover-wrapper {
            position: relative;
            width: 100%;
            max-width: 320px;
            transition: all 0.4s ease;
        }
        
        .ebook-card:hover .ebook-cover-wrapper {
            transform: scale(1.05) rotateY(5deg);
        }
        
        .ebook-cover-image {
            width: 100%;
            height: auto;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            display: block;
        }
        
        /* Right Side - Content */
        .ebook-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .ebook-meta {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .ebook-category {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            color: #1e40af;
            padding: 0.5rem 1.2rem;
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: 600;
            border: 2px solid #bfdbfe;
        }
        
        .ebook-year {
            color: #6b7280;
            font-weight: 600;
            font-size: 0.95rem;
        }
        
        .ebook-title {
            font-size: 2.2rem;
            font-weight: 900;
            color: #1f2937;
            margin-bottom: 1.5rem;
            line-height: 1.3;
        }
        
        .ebook-description {
            font-size: 1.05rem;
            color: #4b5563;
            line-height: 1.8;
            margin-bottom: 2rem;
        }
        
        /* Buttons */
        .ebook-buttons {
            display: flex;
            gap: 1.5rem;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 1.1rem 2.5rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 700;
            font-size: 1.05rem;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            border: none;
            position: relative;
            overflow: hidden;
        }
        
        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.6s ease;
        }
        
        .btn:hover::before {
            left: 100%;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            color: white;
            box-shadow: 0 8px 24px rgba(30, 64, 175, 0.3);
        }
        
        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 32px rgba(30, 64, 175, 0.4);
        }
        
        .btn-secondary {
            background: white;
            color: #1e40af;
            border: 2px solid #1e40af;
            box-shadow: 0 4px 16px rgba(30, 64, 175, 0.1);
        }
        
        .btn-secondary:hover {
            background: #1e40af;
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 8px 24px rgba(30, 64, 175, 0.3);
        }
        
        .btn-free {
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            color: white;
            box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
        }
        
        .btn-free:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
        }
        
        /* CTA Section */
        .ebooks-cta {
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            padding: 5rem 5%;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
            margin-top: 4rem;
        }
        
        .ebooks-cta::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
            background-size: 40px 40px;
            animation: drift 30s linear infinite;
        }
        
        @keyframes drift {
            0% {
                transform: translate(0, 0);
            }
            100% {
                transform: translate(40px, 40px);
            }
        }
        
        .cta-content {
            max-width: 1600px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }
        
        .cta-content h2 {
            font-size: 2.5rem;
            font-weight: 900;
            margin-bottom: 1.5rem;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .cta-content p {
            font-size: 1.2rem;
            opacity: 0.95;
            margin-bottom: 2.5rem;
            line-height: 1.8;
        }
        
        .cta-button {
            display: inline-flex;
            align-items: center;
            gap: 1rem;
            background: white;
            color: #1e40af;
            padding: 1.2rem 3rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 800;
            font-size: 1.1rem;
            transition: all 0.4s ease;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        }
        
        .cta-button:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        }
        
        /* ============================================
           PDF PREVIEW MODAL
        ============================================ */

        .pdf-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 99999;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }

        .pdf-modal.active {
            display: flex;
        }

        .pdf-modal__overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            z-index: 1;
        }

        .pdf-modal__container {
            position: relative;
            z-index: 2;
            background: white;
            border-radius: 24px;
            max-width: 1200px;
            width: 100%;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
            overflow: hidden;
        }

        .pdf-modal__close {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.05);
            border: none;
            font-size: 2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 10;
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .pdf-modal__close:hover {
            background: #ef4444;
            color: white;
            transform: rotate(90deg);
        }

        .pdf-modal__header {
            padding: 2rem 2.5rem 1.5rem;
            background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
            border-bottom: 2px solid #e5e7eb;
        }

        .pdf-modal__title {
            font-size: 1.8rem;
            font-weight: 900;
            color: #1f2937;
            margin-bottom: 0.5rem;
        }

        .pdf-modal__subtitle {
            font-size: 1rem;
            color: #6b7280;
            margin: 0;
        }

        .pdf-modal__content {
            flex: 1;
            padding: 0;
            background: #f3f4f6;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 500px;
            overflow: hidden;
        }

        .pdf-modal__iframe {
            width: 100%;
            height: 100%;
            min-height: 500px;
            border: none;
            background: white;
        }

        .pdf-modal__footer {
            padding: 1.5rem 2.5rem;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border-top: 2px solid #bfdbfe;
        }

        .pdf-modal__note {
            margin: 0;
            color: #1e40af;
            font-weight: 600;
            text-align: center;
            font-size: 0.95rem;
        }
        
        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 4rem 2rem;
            background: white;
            border-radius: 20px;
            margin: 2rem 0;
        }
        
        .empty-state-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
        }
        
        .empty-state-title {
            font-size: 1.8rem;
            font-weight: 800;
            margin-bottom: 1rem;
            color: #1f2937;
        }
        
        .empty-state-text {
            color: #6b7280;
            font-size: 1.1rem;
        }
        
        /* Responsive Design */
        @media (max-width: 968px) {
            .hero-title {
                font-size: 2.5rem;
            }
            
            .section-title {
                font-size: 2.2rem;
            }
            
            .ebook-card {
                grid-template-columns: 1fr;
                gap: 2rem;
            }
            
            .ebook-cover-wrapper {
                max-width: 280px;
                margin: 0 auto;
            }
            
            .ebook-title {
                font-size: 1.8rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .pdf-modal {
                padding: 1rem;
            }
            
            .pdf-modal__container {
                max-height: 95vh;
            }
            
            .pdf-modal__header {
                padding: 1.5rem 1.5rem 1rem;
            }
            
            .pdf-modal__title {
                font-size: 1.4rem;
            }
            
            .pdf-modal__content {
                min-height: 400px;
            }
            
            .pdf-modal__iframe {
                min-height: 400px;
            }
        }
        
        @media (max-width: 640px) {
            .ebooks-hero {
                padding: 4rem 5% 3rem;
            }
            
            .hero-title {
                font-size: 2rem;
            }
            
            .ebook-card {
                padding: 2rem 1.5rem;
            }
            
            .ebook-buttons {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
                justify-content: center;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .cta-content h2 {
                font-size: 1.8rem;
            }
            
            .pdf-modal__content {
                min-height: 300px;
            }
            
            .pdf-modal__iframe {
                min-height: 300px;
            }
            
            .ebook-price-sticker {
                top: 1rem;
                right: 1rem;
                font-size: 1.1rem;
                padding: 0.6rem 1.4rem;
            }
        }
/* ── Extra WordPress theme additions ── */
.ebooks-grid {
    display: block !important;
    padding: 2rem 5% 4rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .ebooks-grid { padding: 1rem; }
}

.ebook-cover-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    border-radius: 8px;
}

.ebook-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 600;
    margin-top: 4px;
}
.ebook-rating .rating-count { color: #6b7280; font-weight: 400; margin-left: 2px; }

.ebook-pages {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 100px;
}

.btn-free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-free:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.3); }

.btn-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,158,11,0.3); }

.ebooks-cta {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    padding: 5rem 5%;
    text-align: center;
    color: white;
}
.ebooks-cta .cta-content { max-width: 700px; margin: 0 auto; }
.ebooks-cta h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.ebooks-cta p  { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; line-height: 1.8; }
.ebooks-cta .cta-button {
    display: inline-flex; align-items: center; gap: 10px;
    background: white; color: #1e40af; font-weight: 700; font-size: 1rem;
    padding: 1rem 2.5rem; border-radius: 100px; text-decoration: none;
    transition: all 0.3s ease;
}
.ebooks-cta .cta-button:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }

@media (max-width: 768px) {
    .ebooks-grid { grid-template-columns: 1fr; padding: 1rem; }
}

/* Force horizontal card layout - override WordPress theme */
.ebook-card {
    display: grid !important;
    grid-template-columns: 380px 1fr !important;
    gap: 3rem !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    flex: none !important;
}

/* Make sure the container isn't being turned into a grid/flex by the theme */
.ebooks-container {
    display: block !important;
}

/* Prevent theme from making cards float or flex-wrap into columns */
.ebooks-container > .ebook-card {
    clear: both !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Fix cover side */
.ebook-cover {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Fix content side */
.ebook-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Responsive fallback */
@media (max-width: 968px) {
    .ebook-card {
        grid-template-columns: 1fr !important;
    }
}

/* Fix grid placement explicitly */
.ebook-card {
    position: relative;
    display: grid !important;
    grid-template-columns: 380px 1fr !important;
    grid-template-areas:
        "badge  badge"
        "cover  content" !important;
    align-items: start;
}

.featured-badge {
    grid-area: badge;
    margin-bottom: 1rem;
}

.ebook-cover {
    grid-area: cover;
}

.ebook-content {
    grid-area: content;
}

/* Fix buttons row on desktop */
@media (min-width: 969px) {
    .ebook-buttons {
        flex-direction: row !important;
    }
}

/* Fix cover size */
.ebook-cover-wrapper {
    width: 100% !important;
    max-width: 380px !important;
}
/* ── COMPREHENSIVE MOBILE RESPONSIVE ADDITIONS ── */
@media (max-width: 480px) {
    .ebooks-hero,
    .ebooks-section { padding: 3rem 0 2rem; }
    .hero-title { font-size: 1.6rem; line-height: 1.3; }
    .hero-subtitle { font-size: 0.92rem; }
    .ebook-card {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "badge"
            "cover"
            "content" !important;
        gap: 1.2rem;
        padding: 1.2rem !important;
        border-radius: 18px;
    }
    .ebook-cover-wrapper {
        max-width: 200px !important;
        margin: 0 auto !important;
    }
    .ebook-title { font-size: 1.2rem; }
    .ebook-tagline { font-size: 0.9rem; }
    .ebook-buttons {
        flex-direction: column !important;
        gap: 0.7rem !important;
    }
    .ebook-buttons a,
    .ebook-buttons .btn { width: 100%; justify-content: center; }
    .ebook-meta-pills { flex-wrap: wrap; gap: 0.4rem; }
}

@media (max-width: 360px) {
    .hero-title { font-size: 1.4rem; }
}
