/* CSS for the publisher taxonomy custom page */
.taxonomy-publisher, .taxonomy-author {
    margin-top: 30px;
    text-align: center; /* Center the page title and search box */
}

.be-page-title {
    font-size: 14px; /* Increase font size for the page title */
    font-weight: bold; /* Add bold font weight for the page title */
    color: #111; /* Set a custom color for the title */
}

.taxonomy-search-form-container {
    display: flex;
    flex-direction: column; /* Stack the elements vertically */
    align-items: center; /* Center items horizontally */
    margin-bottom: 20px; /* Add space between the search form and cards */
}

.taxonomy-search-form {
    background-color: #f1f1f1; /* Background color for the search box */
    border-radius: 20px; /* Rounded corners for the search box */
    overflow: hidden; /* Hide the button overflow */
    transition: width 0.3s ease; /* Add smooth transition for the hover effect */
    width: 400px; /* Initial width of the search box */
    display: flex;
}

.taxonomy-search-form input[type="text"] {
    border: none; /* Remove the default input border */
    padding: 10px 20px; /* Add padding for the input */
    font-size: 14px;
    border-radius: 15px; /* Rounded corners for the input */
    width: 100%; /* Set input width to fill the search box */
    background-color: transparent; /* Transparent background for the input */
    outline: none; /* Remove the input outline on focus */
    margin: 10px;
    border: solid;
    border-width: 0.1px;
    border-color: #b9b2b2;
}

.taxonomy-search-form input[type="text"]::placeholder {
    color: #aaa; /* Set placeholder text color */
}

.taxonomy-search-form button {
    border: none; /* Remove the default button border */
    background-color: #007bff; /* Set a custom background color for the button */
    padding: 10px 20px; /* Add padding for the button */
    color: #fff; /* Set text color for the button */
    cursor: pointer; /* Change cursor to pointer on hover */
    border-radius: 15px; /* Rounded corners for the button */
    font-size: 12px; /* Set font size for the button text */
    margin-left: 5px; /* Add space between input and button */
}

.taxonomy-search-form button:hover {
    background-color: #0056b3; /* Change button background color on hover */
}

.taxonomy-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    flex: 0 0 calc(100% / 6); /* Show 6 cards per row on desktop */
    max-width: calc(100% / 6);
    margin: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    text-decoration: none; /* Remove underline for the link */
    color: #333; /* Set card text color */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center card content vertically */
    transition: all 0.3s ease; /* Add smooth transition for the hover effect */
}

/* Responsive CSS for mobile screens */
@media (max-width: 767px) {
    .taxonomy-grid {
        justify-content: center;
    }
    
    .card {
        flex: 0 0 calc(100% / 2); /* Show 2 cards per row on mobile */
        max-width: calc(100% / 2);
    }
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add box shadow on hover */
    transform: translateY(-5px); /* Move the card up slightly on hover */
}

.card-img-top {
    width: 80px; /* Set the size of the term image */
    height: 80px;
    object-fit: cover; /* Maintain aspect ratio of the image */
    border-radius: 50%; /* Round the image to make it more visually appealing */
    overflow: hidden; /* Hide any parts of the image that exceed the border-radius */
    margin-bottom: 10px; /* Add space between the image and card body */
    border: 2px solid #555252;
}

.card-body {
    flex: 1; /* Expand the card body to take remaining vertical space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 16px; /* Increase font size for better readability */
    margin-bottom: 5px; /* Add space between term name and product count */
}

.card-text {
    font-size: 14px; /* Set font size for product count */
}

/* CSS for the taxonomy pagination */
.taxonomy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.taxonomy-pagination .pagination-ellipsis {
    padding: 8px 12px;
}

.taxonomy-pagination .page-numbers {
    color: #007bff;
    text-decoration: none;
    padding: 8px 12px;
    margin: 2px;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.taxonomy-pagination .page-numbers:hover {
    background-color: #007bff;
    color: #fff;
}

.taxonomy-pagination .prev.page-numbers,
.taxonomy-pagination .next.page-numbers {
    padding: 8px 12px;
}

.taxonomy-pagination .prev.page-numbers {
    margin-right: 10px;
}

.taxonomy-pagination .next.page-numbers {
    margin-left: 10px;
}

.taxonomy-pagination .current.page-numbers {
    background-color: #007bff;
    color: #fff;
}

.taxonomy-pagination .disabled.page-numbers {
    opacity: 0.5;
    cursor: not-allowed;
}

.taxonomy-pagination .screen-reader-text {
    display: none;
}