/* Books Page Styles */
.books-header {
    background: linear-gradient(rgba(44, 85, 48, 0.9), rgba(44, 85, 48, 0.8)), url('../assets/images/books-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0 40px;
    text-align: center;
}

.books-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: white;
}

.books-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.9);
}

/* Book Filter */
.book-filter {
    padding: 40px 0;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--light-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 1px solid var(--light-gray);
    border-radius: 30px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

/* Books Grid */
.books-grid-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.book-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.book-cover {
    height: 250px;
    position: relative;
}

.true-heroes-cover {
    background-image: url('../images/books/covers/true-heroes.jpg');
    background-size: cover;
    background-position: center;
}

.true-heroes2-cover {
    background-image: url('../images/books/covers/true-heroes-2.jpg');
    background-size: cover;
    background-position: center;
}

.your-majesty-cover {
    background-image: url('../images/books/covers/your-majesty.jpg');
    background-size: cover;
    background-position: center;
}

.feathers-joy-cover {
    background-image: url('../images/books/covers/feathers-joy.jpg');
    background-size: cover;
    background-position: center;
}

.zoe-monster-cover {
    background-image: url('../images/books/covers/zoe-monster.jpg');
    background-size: cover;
    background-position: center;
}

.dazzling-melody-cover {
    background-image: url('../images/books/covers/dazzling-melody.jpg');
    background-size: cover;
    background-position: center;
}

.perfect-trick-cover {
    background-image: url('../images/books/covers/perfect-trick.jpg');
    background-size: cover;
    background-position: center;
}

.torn-fab-cover {
    background-image: url('../images/books/covers/torn-fab.jpg');
    background-size: cover;
    background-position: center;
}

.cool-kids-cover {
    background-image: url('../images/books/covers/cool-kids.jpg');
    background-size: cover;
    background-position: center;
}

.book-series {
    position: absolute;
    top: 15px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 0 3px 3px 0;
}

.book-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.award-badge {
    background-color: gold;
}

.book-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.book-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    color: var(--gray-color);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.book-meta i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.book-description {
    margin: 15px 0;
    flex: 1;
}

.book-details-toggle {
    margin: 15px 0;
}

.toggle-summary-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 10px;
}

.toggle-summary-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.toggle-summary-btn.active i {
    transform: rotate(180deg);
}

.book-summary {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.book-summary.active {
    max-height: 1000px;
}

.book-summary p {
    margin-bottom: 15px;
}

.book-features {
    margin-top: 15px;
    padding-left: 20px;
}

.book-features li {
    margin-bottom: 8px;
    list-style-type: none;
    position: relative;
}

.book-features li:before {
    content: '';
    position: absolute;
    left: -20px;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

.book-features i {
    color: var(--primary-color);
    margin-right: 8px;
}

.book-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-buy, .btn-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Series Section */
.series-section {
    padding: 80px 0;
    background-color: white;
}

.series-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.series-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.series-card:hover {
    transform: translateY(-10px);
}

.series-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.series-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
}

.series-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.series-books {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.series-book {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mini-cover {
    width: 80px;
    height: 100px;
    border-radius: 5px;
    margin-bottom: 8px;
}

.series-book span {
    font-size: 0.9rem;
    font-weight: 600;
}

.series-description {
    margin-bottom: 20px;
}

/* Buying Info */
.buying-info {
    padding: 60px 0;
    background-color: var(--light-color);
}

.info-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), #1e3a21);
    color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.info-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-right: 30px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-content h3 {
    color: white;
    margin-bottom: 15px;
}

.info-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--gray-color);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.preview-cover {
    flex: 0 0 200px;
    height: 300px;
    border-radius: var(--border-radius);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.preview-details {
    flex: 1;
}

.preview-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .books-header h1 {
        font-size: 2.5rem;
    }
    
    .books-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .series-container {
        grid-template-columns: 1fr;
    }
    
    .info-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .books-header {
        padding: 60px 0 30px;
    }
    
    .books-header h1 {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
    }
}