@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

: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);
    min-height: 100vh;
}

html, body {
    height: auto !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Modern Hero */
.modern-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark) 0%, #334155 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7 3.134-7 7 7zm0 2c-2.761 0-5 2.239-5 5s2.239 5 5 5 5-2.239 5-5-2.239-5-5-5zm-2 0c0-2.761 2.239-5 5-5s-2.239-5-5 5 2.239 5 5 5 2.239 5-5-2.239-5-5-5zm-6 0c0-2.761 2.239-5 5-5s-2.239-5-5 5 2.239 5 5 5 2.239 5-5-2.239-5-5-5z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 500px;
}

.hero-text {
    color: white;
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-stack {
    position: relative;
    display: flex;
    gap: 20px;
    transform: rotate(-10deg);
}

.book {
    width: 140px;
    height: 200px;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.book-1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: translateY(0);
}

.book-2 {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    transform: translateY(-30px);
}

.book-3 {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    transform: translateY(-60px);
}

.book:hover {
    transform: translateY(-10px) scale(1.05);
}

.book-1:hover {
    transform: translateY(-10px) scale(1.05);
}

.book-2:hover {
    transform: translateY(-40px) scale(1.05);
}

.book-3:hover {
    transform: translateY(-70px) scale(1.05);
}

/* Sections */
.featured-section,
.categories-section,
.new-arrivals-section,
.features-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    padding: 10px 24px;
    background: var(--primary-light);
    border-radius: 25px;
    transition: var(--transition);
}

.view-all:hover {
    background: var(--primary);
    color: white;
}

/* Products Slider */
.products-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Product Card Modern */
.product-card-modern {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 130%;
    background: var(--gray-100);
    overflow: hidden;
}

.product-link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition);
}

.product-card-modern:hover .product-image {
    transform: scale(1.05);
}

.no-image {
    font-size: 4rem;
    color: var(--gray-300);
}

.discount-badge,
.new-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.discount-badge {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.new-badge {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.product-info-modern {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.product-title-modern {
    margin: 0;
}

.product-title-modern a {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title-modern a:hover {
    color: var(--primary);
}

.product-author-modern {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

.product-rating-modern {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: -2px;
}

.product-price-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

.out-of-stock {
    color: var(--danger);
    font-weight: 600;
    font-size: 1rem;
}

.btn-add-cart {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* More Categories Section */
.more-categories-section {
    padding: 80px 0;
}

/* All Books Section */
.all-books-section {
    padding: 80px 0;
    background: var(--gray-100);
}

.tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    background: white;
    color: var(--dark);
    border: 2px solid var(--gray-200);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Grid Modern */
.categories-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.category-card-modern {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.category-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.category-icon-modern {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.category-title-modern {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.category-count-modern {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    background: var(--gray-100);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.feature-desc {
    color: var(--secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-text {
        align-items: center;
    }
    
    .hero-description {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .products-slider {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .modern-hero {
        min-height: auto;
        padding: 100px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    .book-stack {
        transform: rotate(0);
    }
    
    .book-1 {
        transform: translateY(0);
    }
    
    .book-2 {
        transform: translateY(0);
    }
    
    .book-3 {
        transform: translateY(0);
    }
    
    .products-slider,
    .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .categories-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .featured-section,
    .categories-section,
    .new-arrivals-section,
    .features-section {
        padding: 60px 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
    
    .products-slider,
    .products-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 30px 20px;
    }
    
    .product-info-modern {
        padding: 15px;
    }
    
    .category-card-modern {
        padding: 30px 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .view-all {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .book {
        width: 100px;
        height: 150px;
    }
    
    .product-image-wrapper {
        padding-top: 100%;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 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;
    }
}

/* Header */
/* Top Bar */
.top-bar {
    background: var(--dark);
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-right {
    display: flex;
    gap: 10px;
}

.top-bar-social {
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.top-bar-social:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.site-header {
    background: white;
    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: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.amazon-search {
    flex: 1;
    max-width: 700px;
    margin: 0 30px;
}

.search-form-amazon {
    width: 100%;
}

.search-wrapper {
    display: flex;
    align-items: stretch;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 44px;
}

.search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.category-select {
    flex-shrink: 0;
    min-width: 140px;
    padding: 0 16px;
    border: none;
    background: white;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: var(--transition);
    height: 100%;
    line-height: 42px;
}

.category-select:hover {
    background-color: var(--light);
}

.category-select:focus {
    outline: none;
    background-color: white;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0 16px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
    height: 100%;
    line-height: 42px;
}

.search-input::placeholder {
    color: var(--gray);
}

.search-input:focus {
    outline: none;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 20px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 1px solid var(--primary-dark);
    height: 100%;
}

.search-submit:hover {
    background: var(--primary-dark);
}

.search-submit svg {
    color: white;
}

.search-submit span {
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.cart-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.cart-link svg {
    color: inherit;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login,
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    color: var(--dark);
    cursor: pointer;
}

.btn-login:hover,
.btn-logout:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-login svg,
.btn-logout svg {
    color: inherit;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.mobile-menu-toggle svg {
    color: inherit;
}

@media (max-width: 600px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Responsive Header */
@media (max-width: 992px) {
    .amazon-search {
        margin: 0 15px;
    }
}

.btn-login,
.btn-register,
.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-login {
    background: var(--primary);
    color: white;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-register {
    background: var(--gray-100);
    color: var(--dark);
    border: 2px solid var(--gray-200);
}

.btn-register:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-logout {
    background: var(--danger);
    color: white;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    background: var(--primary-light);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: white;
}

.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: 8px;
    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;
}

/* Main */
main {
    min-height: calc(100vh - 200px);
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.site-footer .container p {
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Header */
@media (max-width: 992px) {
    .amazon-search {
        margin: 0 15px;
    }
    
    .category-select {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .amazon-search {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }

    .search-wrapper {
        height: 40px;
    }

    .category-select {
        min-width: 100px;
        padding: 0 12px;
    }

    .search-submit {
        padding: 0 15px;
    }

    .search-submit span {
        display: none;
    }

    .header-actions {
        order: 3;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }

    .site-header {
        padding: 10px 0;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .amazon-search {
        margin: 10px 0;
    }

    .category-select {
        min-width: 90px;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    .search-input {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .search-submit {
        padding: 0 12px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .cart-link {
        width: 40px;
        height: 40px;
    }

    .cart-link svg {
        width: 20px;
        height: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .amazon-search {
        margin: 8px 0;
    }

    .search-wrapper {
        height: 38px;
    }

    .category-select {
        min-width: 80px;
        padding: 0 8px;
    }

    .search-input {
        padding: 0 10px;
        font-size: 0.85rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
    }

    .cart-link {
        width: 36px;
        height: 36px;
    }

    .cart-link svg {
        width: 18px;
        height: 18px;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

