.woo-category-wrapper {
    width: 100%;
}

.woo-category-grid {
    display: grid;
    gap: 18px;
    width: 100%;
    align-items: start;

    grid-template-columns: repeat(var(--woo-cat-mobile, 4), minmax(0, 1fr));
}

/* TABLET */

@media(min-width:768px){

    .woo-category-grid{
        grid-template-columns: repeat(var(--woo-cat-tablet, 6), minmax(0, 1fr));
    }

}

/* DESKTOP */

@media(min-width:1200px){

    .woo-category-grid{
        grid-template-columns: repeat(var(--woo-cat-desktop, 7), minmax(0, 1fr));
    }
    .woo-category-image{
        width: 100px;
        height: 100px;
    }

    .woo-category-item span{
        font-size:15px;
        margin-top:12px;
    }

}
.woo-category-item {
    text-decoration: none;
    text-align: center;
    transition: .25s;
    min-width: 0;
    width: 100%;
}

.woo-category-item:hover {
    transform: translateY(-4px);
}

.woo-category-image {
    width: 72px;
    height: 72px;
    margin: auto;

    border-radius: 50%;
    overflow: hidden;

    background: #f5f5f5;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 15px rgba(0,0,0,.06);

    transition: .35s ease;
}

.woo-category-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    display: block;
}

.woo-category-item span {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #111;
    font-weight: 500;
}

/*
|----------------------------------------------------------
| MOBILE
| 4 × 2 = 8
|----------------------------------------------------------
*/

@media(max-width:768px){

    .woo-category-item:nth-child(n+9){
        display:none;
    }

    .woo-category-grid.show-all .woo-category-item{
        display:block;
    }

}

/*
|----------------------------------------------------------
| TABLET
| 6 × 2 = 12
|----------------------------------------------------------
*/

@media(min-width:768px) and (max-width:1199px){

    .woo-category-item{
        display:block;
    }

    .woo-category-item:nth-child(n+13){
        display:none;
    }

    .woo-category-grid.show-all .woo-category-item{
        display:block;
    }

}

/*
|----------------------------------------------------------
| DESKTOP
| 8 × 2 = 16
|----------------------------------------------------------
*/

@media(min-width:1200px){

    .woo-category-item{
        display:block;
    }

    .woo-category-item:nth-child(n+15){
        display:none;
    }

    .woo-category-grid.show-all .woo-category-item{
        display:block;
    }

}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/


@media(max-width:768px){

    .woo-category-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        align-items: start;
    }

    .woo-category-item {
        width: 100%;
        text-align: center;
        min-width: 0;
    }

    .woo-category-image {
        width: 60px;
        height: 60px;
        padding: 1px;
        margin: 0 auto;
    }

    .woo-category-item span {
        display: block;
        font-size: 11px;
        line-height: 1.25;
        margin-top: 6px;

        overflow: hidden;

        display: -webkit-box;
        -webkit-box-orient: vertical;

        min-height: 28px;
    }

}
.woo-category-item {
    min-width: 0;
}

.view-more-btn {
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: none;
    color: #111;

    padding: 2px 24px;
    border-radius: 999px;

    cursor: pointer;
    transition: .25s;

    font-size: 14px;
    font-weight: 500;
}

.view-more-btn i {
    font-size: 12px;
    transition: .25s;
}

.view-more-btn.active i {
    transform: rotate(180deg);
}

.view-more-btn:hover {
    transform: translateY(-2px);
}

.category-letter-icon {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    font-size: 32px;
    font-weight: 700;

    text-transform: uppercase;
}

.live-category-image{
    transition:
        opacity .35s ease,
        transform 6s ease;
}

/* LIGHT FLOAT */

.live-category-image{
    animation:liveFloat 5s ease-in-out infinite;
}

@keyframes liveFloat{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.06);
    }

    100%{
        transform:scale(1);
    }

}

/* Use the maximum safe image area available in every category grid cell. */
.woo-category-grid > .woo-category-item > .woo-category-image {
    width: min(100%, 170px);
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 0;
}

.woo-category-grid > .woo-category-item > .woo-category-image img,
.woo-category-grid > .woo-category-item > .woo-category-image .category-letter-icon {
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .woo-category-grid > .woo-category-item > .woo-category-image {
        width: min(100%, 118px);
    }
}

@media (min-width: 1200px) {
    .woo-category-grid {
        gap: 14px;
    }

    .woo-category-grid > .woo-category-item > .woo-category-image {
        width: calc(100% - 8px) !important;
        max-width: none !important;
        height: auto !important;
    }
}

@media (max-width: 767px) {
    .woo-category-grid {
        gap: 10px 8px;
    }

    .woo-category-grid > .woo-category-item > .woo-category-image {
        width: min(100%, 92px);
        height: auto;
        padding: 0;
    }
}

/* Optional shortcode mode: [woo_category_grid side_scroll="yes"] */
.woo-category-scroll-mode .woo-category-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.woo-category-scroll-mode {
    position: relative;
}

.woo-category-nav {
    opacity: .7;
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: #172033;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .18);
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-65%);
}

.woo-category-prev {
    left: 5px;
}

.woo-category-next {
    right: 5px;
}

.woo-category-nav:hover {
    border-color: #f97316;
    background: #f97316;
    color: #fff;
}

.woo-category-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.woo-category-scroll-mode .woo-category-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Shortcode column attributes must win over older responsive theme rules. */
.woo-category-wrapper.woo-category-grid-mode .woo-category-grid {
    grid-template-columns: repeat(var(--woo-cat-mobile, 4), minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
    .woo-category-wrapper.woo-category-grid-mode .woo-category-grid {
        grid-template-columns: repeat(var(--woo-cat-tablet, 6), minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1200px) {
    .woo-category-wrapper.woo-category-grid-mode .woo-category-grid {
        grid-template-columns: repeat(var(--woo-cat-desktop, 7), minmax(0, 1fr)) !important;
    }
}

.woo-category-wrapper.woo-category-scroll-mode .woo-category-item,
.woo-category-wrapper.woo-category-scroll-mode .woo-category-item:nth-child(n) {
    flex-basis: calc(var(--woo-cat-mobile-width, 25%) - 7px) !important;
}

@media (min-width: 768px) {
    .woo-category-wrapper.woo-category-scroll-mode .woo-category-item,
    .woo-category-wrapper.woo-category-scroll-mode .woo-category-item:nth-child(n) {
        flex-basis: calc(var(--woo-cat-tablet-width, 16.66667%) - 12px) !important;
    }
}

@media (min-width: 1200px) {
    .woo-category-wrapper.woo-category-scroll-mode .woo-category-item,
    .woo-category-wrapper.woo-category-scroll-mode .woo-category-item:nth-child(n) {
        flex-basis: calc(var(--woo-cat-desktop-width, 14.28571%) - 12px) !important;
    }
}

.woo-category-scroll-mode .woo-category-grid::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #d1d5db;
}

.woo-category-scroll-mode .woo-category-item,
.woo-category-scroll-mode .woo-category-item:nth-child(n) {
    display: block !important;
    flex: 0 0 calc(var(--woo-cat-desktop-width, 14.28571%) - 12px);
    scroll-snap-align: start;
}

.woo-category-scroll-mode .woo-category-image {
    width: calc(100% - 6px) !important;
    max-width: none !important;
    height: auto !important;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .woo-category-scroll-mode .woo-category-item,
    .woo-category-scroll-mode .woo-category-item:nth-child(n) {
        flex-basis: calc(var(--woo-cat-tablet-width, 16.66667%) - 12px);
    }
}

@media (max-width: 767px) {
    .woo-category-scroll-mode .woo-category-grid {
        gap: 9px;
    }

    .woo-category-scroll-mode .woo-category-item,
    .woo-category-scroll-mode .woo-category-item:nth-child(n) {
        flex-basis: calc(var(--woo-cat-mobile-width, 25%) - 7px);
    }

    .woo-category-nav {
    opacity: .7;
        width: 34px;
        height: 34px;
        font-size: 24px;
    }
}
