/* Modern All Books Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #ffffff;
    --gray: #64748b;
    --gray-light: #f1f5f9;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-dark);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-light);
    border-radius: 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.cart-link:hover {
    background: var(--primary);
    color: white;
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Main */
main {
    min-height: calc(100vh - 400px);
}

/* All Books Header */
.all-books-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #334155 100%);
    padding: 60px 0;
    margin-bottom: 0;
}

.page-title-wrapper {
    text-align: center;
    color: white;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.search-filters-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.search-bar-wrapper {
    display: flex;
    max-width: 500px;
    width: 100%;
}

.search-input-modern {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-family: inherit;
}

.search-input-modern:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-btn-modern {
    padding: 14px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-btn-modern:hover {
    background: var(--warning);
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--dark);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Category Filter */
.categories-filter-section {
    background: var(--gray-100);
    padding: 20px 0;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-cat-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cat-count {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 5px;
}

/* All Books Content */
.all-books-content {
    padding: 60px 0;
    min-height: 400px;
}

/* Modern Books Grid */
.books-grid-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.book-item-modern {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.book-item-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.book-cover-modern {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.book-cover-link-modern {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.book-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-item-modern:hover .book-image-modern {
    transform: scale(1.05);
}

.no-cover-modern {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--gray-100);
    color: var(--gray-300);
}

.badge-discount-modern {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 2;
}

.book-info-modern {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.book-category-modern {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag {
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.book-title-modern {
    margin: 0;
    line-height: 1.3;
}

.book-title-modern a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}

.book-title-modern a:hover {
    color: var(--primary);
}

.book-meta-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.author-modern {
    color: var(--secondary);
    font-size: 0.9rem;
}

.separator-modern {
    color: var(--gray-200);
}

.pages-modern {
    color: var(--gray);
    font-size: 0.85rem;
}

.book-rating-modern {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars-modern {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: -2px;
}

.rating-count {
    color: var(--gray);
    font-size: 0.85rem;
}

.book-price-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.price-current-modern {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old-modern {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

.discount-percent-modern {
    padding: 4px 8px;
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
}

.price-status-modern {
    font-size: 0.95rem;
    font-weight: 600;
}

.price-status-modern.out-of-stock {
    color: var(--gray);
}

.book-actions-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-add-cart-modern,
.btn-view-modern {
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-cart-modern {
    background: var(--primary);
    color: white;
}

.btn-add-cart-modern:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-view-modern {
    background: var(--gray-100);
    color: var(--dark);
}

.btn-view-modern:hover {
    background: var(--gray-200);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-size: 0.85rem;
}

/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.empty-state-modern h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0 0 10px;
}

.empty-state-modern p {
    color: var(--gray);
    font-size: 1rem;
}

/* Modern Pagination */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.page-btn-modern {
    width: 45px;
    height: 45px;
    background: white;
    color: var(--dark);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.page-btn-modern:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link-modern {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--gray-200);
    background: white;
    color: var(--dark);
}

.page-link-modern:hover,
.page-link-modern.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link-modern.active {
    font-size: 1.1rem;
}

.pagination-info {
    text-align: center;
    color: var(--gray);
    font-size: 0.95rem;
    padding: 15px;
}

.pagination-info strong {
    color: var(--dark);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Modern Footer */
.site-footer-modern {
    background: var(--dark);
    color: white;
    padding: 60px 0 0;
    margin-top: 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 20px;
    color: white;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 0.95rem;
}

.social-links-footer {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link-footer {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link-footer:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.footer-category-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.footer-category-link:hover {
    color: white;
    text-decoration: underline;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-footer {
    margin-top: 20px;
}

.newsletter-text {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--warning);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

.footer-bottom .copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Notification */
.notification-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive All Books */
@media (max-width: 1200px) {
    .books-grid-modern {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .books-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .all-books-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .search-filters-wrapper {
        flex-direction: column;
    }
    
    .search-bar-wrapper {
        width: 100%;
    }
    
    .btn-filter {
        width: 100%;
        justify-content: center;
    }
    
    .books-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .book-title-modern a {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .books-grid-modern {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-categories {
        gap: 8px;
    }
    
    .filter-cat-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .book-actions-modern {
        grid-template-columns: 1fr;
    }
    
    .book-title-modern a {
        font-size: 0.95rem;
    }
    
    .book-meta-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .pagination-modern {
        gap: 5px;
    }
    
    .page-btn-modern,
    .page-link-modern {
        width: 38px;
        height: 38px;
    }
    
    .footer-bottom-links {
        font-size: 0.8rem;
    }
}
