/* Single Book Template Styles */
.ab-single-book-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.ab-book-header {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.ab-book-cover-wrap {
    position: relative;
}

.ab-book-cover-wrap img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.ab-book-meta-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ab-book-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: #333;
}

.ab-book-series {
    font-size: 1.2rem;
    color: #666;
}

.ab-book-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.ab-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ab-meta-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.ab-meta-value {
    font-size: 1.1rem;
    color: #333;
}

.ab-book-description {
    margin: 2rem 0;
    line-height: 1.6;
}

.ab-book-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ab-buy-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--ab-secondary, #FF9900);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.ab-buy-button:hover {
    background: #E68A00;
    color: #fff;
}

/* Archive Template Styles */
.ab-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.ab-archive-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ab-archive-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.ab-archive-description {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: #666;
}

.ab-filter-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.ab-filter-section h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

.ab-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ab-filter-option {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ab-filter-option:hover,
.ab-filter-option.active {
    background: var(--ab-primary, #1a4e8c);
    border-color: var(--ab-primary, #1a4e8c);
    color: #fff;
}

.ab-sort-section {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.ab-sort-label {
    color: #666;
    font-size: 0.9rem;
}

.ab-sort-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

/* Related Books Section */
.ab-related-books {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.ab-related-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.ab-book-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Pagination */
.ab-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.ab-pagination a,
.ab-pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    transition: all 0.2s ease;
}

.ab-pagination a:hover,
.ab-pagination span.current {
    background: var(--ab-primary, #1a4e8c);
    border-color: var(--ab-primary, #1a4e8c);
    color: #fff;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .ab-book-header {
        grid-template-columns: 300px 1fr;
    }

    .ab-book-title {
        font-size: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .ab-book-header {
        grid-template-columns: 1fr;
    }

    .ab-book-cover-wrap {
        max-width: 300px;
        margin: 0 auto;
    }

    .ab-book-meta {
        grid-template-columns: 1fr;
    }

    .ab-archive-title {
        font-size: 2rem;
    }

    .ab-sort-section {
        flex-direction: column;
        align-items: stretch;
    }
}

@media screen and (max-width: 480px) {
    .ab-book-actions {
        flex-direction: column;
    }

    .ab-filter-options {
        flex-direction: column;
    }

    .ab-filter-option {
        text-align: center;
    }
}

/* RTL Support */
.rtl .ab-book-header {
    direction: rtl;
}

.rtl .ab-meta-item {
    text-align: right;
}

.rtl .ab-sort-section {
    flex-direction: row-reverse;
}

.rtl .ab-pagination {
    direction: rtl;
}