/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Custom primary color */
:root {
    --bs-primary: #c90242;
    --bs-primary-rgb: 201, 2, 66;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #a80238;
    border-color: #a80238;
}

.btn-primary:focus {
    background-color: #a80238;
    border-color: #a80238;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.5);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.text-primary {
    color: var(--bs-primary) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.nav-link:hover,
.nav-link:focus {
    color: #ffffff;
}

.nav-link.active {
    color: #ffffff !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
}

/* Forms */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table th {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Badge styles */
.badge.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Alert styles */
.alert-primary {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* Pagination */
.page-link {
    color: var(--bs-primary);
}

.page-link:hover {
    color: #a80238;
}

.page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* Book card styles */
.book-card {
    height: 100%;
    transition: transform 0.2s;
    max-width: 280px;
    margin: 0 auto;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    height: 280px; /* Chiều cao cố định */
    overflow: hidden;
    background-color: #f8f9fa;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Đảm bảo ảnh không bị cắt */
    object-position: center;
    padding: 10px;
}

.book-info {
    padding: 1rem;
}

.book-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    height: 1.2em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.book-category {
    font-size: 0.8rem;
    color: #888;
}

/* Placeholder cho ảnh không có sẵn */
.no-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Banner styles */
.top-banner {
    background-color: #c90242;
    color: white;
    padding: 2px 0;
    font-size: 0.85rem;
    font-weight: 400;
}

.top-banner .container {
    text-align: left;
} 
/* Điều chỉnh menu - Thêm ngày 2025-05-03 */
.navbar-brand {
    margin-left: -40px;
}

.navbar-nav.me-auto {
    margin-left: -20px;
}

.navbar-nav:last-child {
    margin-right: -40px;
}

@media (max-width: 992px) {
    .navbar-brand, .navbar-nav.me-auto {
        margin-left: 0;
    }
    .navbar-nav:last-child {
        margin-right: 0;
    }
}

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Điều chỉnh phần hiển thị sách */
.book-card {
    height: 100%;
    transition: transform 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-cover-wrapper {
    height: 240px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.book-cover {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #6c757d;
}

.book-info {
    padding: 15px;
}

.book-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
}

.book-author {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-category {
    font-size: 0.8rem;
}

/* Điều chỉnh phần hiển thị tin tức */
.news-card {
    transition: transform 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* CSS để khôi phục giao diện - thêm mới 2025-05-03 */
.container {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.row {
    margin-left: -15px !important;
    margin-right: -15px !important;
    width: auto !important;
}

.col, .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-12, .col-sm-6 {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

/* Hiển thị đúng phần thống kê */
.counter-item {
    border-radius: 4px;
    background-color: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 100%;
}

/* Fix cho các thẻ sách */
.book-card {
    margin-bottom: 20px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    height: 100% !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.book-cover-wrapper {
    height: 200px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f8f9fa !important;
    overflow: hidden !important;
}

.book-cover {
    max-width: 100% !important;
    max-height: 200px !important;
    object-fit: contain !important;
}

/* Điều chỉnh kích thước phần tin tức */
.news-card {
    margin-bottom: 20px !important;
    height: 100% !important;
}

/* CSS để ẩn phần hiển thị giá tiền trong kết quả tìm kiếm - thêm mới 2025-05-03 */
.price, 
span.text-danger.fw-bold, 
.badge:contains('VNĐ'),
span.badge:contains('VNĐ') {
    display: none !important;
}

/* Ẩn các thẻ chứa giá tiền */
p:has(> span.text-danger.fw-bold),
div:has(> span.text-danger.fw-bold),
li:contains('Giá:'),
p:contains('Giá:') {
    display: none !important;
}
