/* General styles for the grid */

.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}


/* Title below the image */

.category-title {
    color: #333;
    display: block;
    padding: 10px 12px;
    /* Adjust padding as needed */
    font-size: 12px;
    /* Adjust font size as needed */
    font-weight: 500;
    /* Assuming bold titles */
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width:500px) {
    .product-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    /* Title below the image */
    .category-title {
        padding: 10px 20px;
        /* Adjust padding as needed */
        font-size: 15px;
        /* Adjust font size as needed */
    }
}

.category-item>a {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* Styling each category item */

.category-item {
    text-align: center;
    background-color: rgba(63, 62, 67, 0.05);
    border-radius: 5px;
    transition: 0.2s;
    /* for a hover effect */
    padding: 2px;
}

.category-item:hover {
    background: var(--wp--preset--color--secondary-color);
    /*   transform: translateY(-2px); */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
}

.category-item:hover .category-title {
    color: #fff;
    /* Adjust title color as needed */
}


/* Styles for the image */

.category-item img {
    background-color: #fff;
    padding: 20px;
    width: 100%;
    border-radius: 5px;
    aspect-ratio: 1/1;
    display: block;
    /* remove space below images */
    object-fit: contain;
}

#toggleCategories {
    text-transform: uppercase;
    text-align: center;
    width: fit-content;
    margin: 0 auto;
    cursor: pointer;
    color: var(--wp--preset--color--secondary-color);
    border-bottom: 1px solid;
    font-weight: 600;
}