/* Основные стили */
#books-container {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.promo-badge {
    position: absolute;
    background: red;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    top: 10px;
    left: 10px;
    border-radius: 4px;
    z-index: 10;
}
.book-card {
    position: relative;
}


.genre-section {
    margin-bottom: 30px;
    width:90%;
    margin:0 auto;
}

.genre-title {
    color: #01579b;
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4fc3f7;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.book-information {
    width:250px;
    height:100%;
}

.book-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #4fc2f7;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    -webkit-box-shadow: 2px 2px 8px 0px rgba(34, 60, 80, 0.2);
-moz-box-shadow: 2px 2px 8px 0px rgba(34, 60, 80, 0.2);
box-shadow: 2px 2px 8px 0px rgba(34, 60, 80, 0.2);
}

/* .book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
} */

.book-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
/*     background: #f8f9fa; */
    padding: 10px;
}







.list-group-item a {
    text-decoration: none;
    color: #212529;
    display: block;
    padding: 2px 0;
}

.list-group-item a:hover {
    color: #0d6efd;
}

.list-group-item a.fw-bold {
    color: #0d6efd;
}









.collapse-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.book-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #333;
}

.book-author {
    font-size: 12px;
    color: #666;
    margin: 0 0 5px 0;
}

.book-price {
    font-size: 14px;
    color: #e53935;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.book-buttons {
    display: flex;
    flex-direction:column;
    gap: 8px;
    margin-top: auto;
}

#book-title-link {
    text-decoration:none;
}

.book-btn {
    padding: 6px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #4fc2f7;
    border-radius: 4px;
    color: #4fc2f7;
    text-decoration: none;
    transition: all 0.3s;
}

.book-btn:hover {
    background: #4fc2f7;
    color: white;
}

/* Адаптация под разные экраны */
@media (min-width: 321px) and (max-width: 375px) {
    .books-grid {
        grid-template-columns: repeat(2, 2fr);
    }
 .genre-section {
    width:100%;
 }
}

@media (min-width: 376px) and (max-width: 480px) {
       .books-grid {
        grid-template-columns: repeat(2, 2fr);
    }
 .genre-section {
    width:100%;
 } 
}

@media (min-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .book-image {
        height: 240px;
    }
}

@media (min-width: 992px) {
    .books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .book-image {
        height: 280px;
    }
}

.error-message {
    padding: 20px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    text-align: center;
}