/* General Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-gray: #f3f4f6;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: #f8fafc;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color) !important;
}

/* Category Toggle */
.category-toggle-wrapper {
    z-index: 1020;
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 1rem;
}

/* Category Navigation */
.category-nav .nav-link {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Book Cards */
.book-card {
    transition: transform 0.3s ease;
    border: none;
    background: white;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-image-wrapper {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.book-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-title {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.request-btn {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    transition: background-color 0.3s ease;
}

.request-btn:hover {
    background-color: var(--secondary-color);
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Featured Image */
.featured-image {
    border-radius: 1rem;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid var(--light-gray);
}

.modal-footer {
    border-top: 1px solid var(--light-gray);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .featured-image img {
        height: 200px;
    }

    .book-grid {
        --bs-gutter-x: 0.5rem;
    }

    .book-card {
        margin-bottom: 0.5rem;
    }

    .request-btn {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .book-title {
        font-size: 0.8rem;
    }

    .book-author {
        font-size: 0.7rem;
    }

    .price {
        font-size: 0.8rem;
    }

    .book-rating {
        font-size: 0.7rem;
    }
}

/* Offcanvas Styles */
.offcanvas {
    max-width: 280px;
}

.offcanvas-header {
    background-color: var(--light-gray);
}
