/* ================= Pagination ================= */
.pagination-wrapper {
    margin-top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination {
    display: inline-flex;
    gap: 4px;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px !important;
    min-width: 28px;
    height: 28px;
    line-height: 1;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
}

.pagination .page-link:hover {
    background-color: #f2f4f6;
}

.pagination .page-item.active .page-link {
    background-color: #2b6d2c;
    border-color: #2b6d2c;
    color: #fff;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.pagination svg {
    width: 14px;
    height: 14px;
}

/* ================= Books Layout ================= */
.books-container {
    padding: 30px 40px;
}

.books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.books-header h2 {
    color: #2b6d2c;
}

.btn-add {
    background: #2b6d2c;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.btn-add:hover {
    background: #245b26;
}

/* ================= Grid ================= */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
}

/* ================= Card ================= */
.book-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease;
}

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

.book-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.book-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-info h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #333;
}

.book-info p {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.price {
    font-weight: 700;
    color: #2b6d2c;
}

/* ================= Actions ================= */
.actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.actions > a,
.actions > form {
    flex: 1;
}

.actions a,
.actions button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

/* Edit */
.btn-edit {
    background: #fff3cd;
    color: #856404;
}

.btn-edit:hover {
    background: #ffe69c;
}

/* Delete */
.btn-delete {
    background: #dc2626;
    color: #fff;
}

.btn-delete:hover {
    background: #b91c1c;
}

/* ================= Edit / Create Page ================= */
.edit-book-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.edit-book-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.edit-book-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #34495e;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.btn-save {
    background: #3498db;
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 15px;
}

.btn-save:hover {
    background: #2980b9;
}

.btn-cancel {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #dcdde1;
}

/* ================= Responsive ================= */
@media (max-width: 600px) {
    .edit-book-container {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
}
