.bd-brand-thumbnails {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
    justify-content: space-between;
    margin: 0; /* Add margin reset if necessary */
}

.bd-brand-thumbnails .bd-brand-thumbnail-item {
    flex: 1 1 calc((100% - 2 * 2%) / 3);
    box-sizing: border-box;
    margin-bottom: 1.5%;
}

.bd-brand-thumbnails.columns-4 .bd-brand-thumbnail-item {
    flex: 1 1 calc((100% - 2 * 2%) / 5);
    box-sizing: border-box;
    margin-bottom: 1.5%;
    max-width: 314px;
}

.woocommerce ul.bd-brand-thumbnails li a h2 {
    margin: auto;
    margin-top: -10px;
    margin-bottom: 0;
    padding: 15px 20px;
    border-radius: 0px 0px 15px 15px;
    background-color: #fff;
    color: #000;
    text-transform: capitalize;
    font-family: var(--branding-semilight);
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    position: relative;
    z-index: 200;
    box-shadow: 2px 4px 12px #00000025;
}

.woocommerce ul.brand-thumbnails li a h2:hover {
    box-shadow: 2px 4px 12px #00000050;
}

.woocommerce ul.bd-brand-thumbnails li a img {
    position: relative;
    z-index: 99;
    margin-bottom: 0;
    border-radius: 15px 15px 0 0;
    box-shadow: 2px 4px 12px #00000025;
}

.woocommerce ul.brand-thumbnails li a img:hover {
    box-shadow: 2px 4px 12px #00000050;
}

@media screen and (max-width: 1024px) {
    .bd-brand-thumbnails .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 3);
    }
    .bd-brand-thumbnails.columns-4 .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 3);
        box-sizing: border-box;
        margin-bottom: 1.5%;
        max-width: 514px;
    }
}

@media screen and (max-width: 789px) {
    .bd-brand-thumbnails .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 2);
    }
    .bd-brand-thumbnails.columns-4 .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 2);
        box-sizing: border-box;
        margin-bottom: 1.5%;
        max-width: 314px;
    }
}
@media screen and (max-width: 460px) {

    .bd-brand-thumbnails .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 1);
    }
    .bd-brand-thumbnails.columns-4 .bd-brand-thumbnail-item {
        flex: 1 1 calc((100% - 2 * 2%) / 1);
        box-sizing: border-box;
        margin-bottom: 1.5%;
        max-width: 100%;
    }
}