/*============================================================================================
   Start Category Area
   Layout and card look come from Website Design Settings > Shop by Category Section
   (--cat-* variables on the section); the second value of each var() is this style's default.
=============================================================================================*/

.category-section-head {
    margin-bottom: 32px;
    text-align: center;
}
.category-section-head h3 {
    font-weight: 500;
    font-size: 22px;
    margin-bottom: 12px;
}
.category-section-head p {
    text-align: center;
    margin: 0;
}

.category.style-1 {
    padding: var(--cat-section-padding, 40px) 0;
}
.category.style-1 .category-section-head {
    margin-bottom: var(--cat-heading-margin, 32px);
}
.category.style-1 .category-subtitle {
    margin: -6px 0 0;
    font-size: 15px;
    color: var(--paragraph-color);
}
.category.style-1 .category-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--primary-color);
}
.category.style-1 .category-view-all:hover {
    text-decoration: underline;
}
/* Heading left, "view all" on the right */
.category.style-1 .category-section-head.is-left {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    text-align: left;
}
.category.style-1 .category-section-head.is-left h3,
.category.style-1 .category-section-head.is-left p {
    text-align: left;
}
.category.style-1 .category-section-head.is-left h3 {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}
.category.style-1 .category-section-head.is-left .category-view-all {
    margin: 0 0 2px;
}

.category.style-1 .category-wrapper {
    display: grid;
    grid-template-columns: repeat(var(--cat-cols-desktop, 8), minmax(0, 1fr));
    gap: var(--cat-gap, 16px);
}
.category.style-1 .category-card {
    margin: auto;
}
.category.style-1 .category-card:focus-visible {
    outline: 2px solid var(--cat-card-hover, var(--primary-color));
    outline-offset: 3px;
    border-radius: 12px;
}
.category.style-1 .category-img {
    width: var(--cat-icon-size, 132px) !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 20px;
}
.category.style-1 .category-img img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 20px;
    overflow: hidden;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.category.style-1 .category-img {
    overflow: hidden;
    transition: all 0.3s ease;
}
.category.style-1 .category-card:hover .category-img img {
    transform: scale(1.04);
}
/* Full names on up to two lines */
.category.style-1 .category-info p {
    border-radius: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    margin: 0;
    text-align: center;
    margin-top: 10px;
    color: var(--title-color);
    transition: color 0.3s ease;
}
.category.style-1 .category-card:hover .category-info p {
    color: var(--primary-color);
}

/* Tile cards: the card is the tile (icon and name inside), filling its grid cell */
.category.style-1.is-tile .category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    margin: 0;
    padding: 18px 8px 14px;
    border: 1px solid var(--cat-card-border, var(--border-color, #e1e8f0));
    border-radius: 12px;
    background: var(--cat-card-bg, color-mix(in srgb, var(--primary-color) 5%, #fff));
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.category.style-1.is-tile .category-card:hover,
.category.style-1.is-tile .category-card:focus-visible {
    border-color: var(--cat-card-hover, var(--primary-color));
    background: color-mix(in srgb, var(--cat-card-hover, var(--primary-color)) 8%, #fff);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.06);
}
.category.style-1.is-tile .category-img {
    width: var(--cat-icon-size, 72px) !important;
    border-radius: 0;
    overflow: visible;
}
.category.style-1.is-tile .category-img img {
    border-radius: 0;
    object-fit: contain;
}
.category.style-1.is-tile .category-card:hover .category-img img {
    transform: none;
}
.category.style-1.is-tile .category-info p {
    margin-top: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}
.category.style-1.is-tile .category-card:hover .category-info p {
    color: var(--title-color);
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .category.style-1 .category-wrapper {
        grid-template-columns: repeat(var(--cat-cols-desktop, 6), minmax(0, 1fr));
    }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .category.style-1 .category-wrapper {
        grid-template-columns: repeat(var(--cat-cols-tablet, 5), minmax(0, 1fr));
        gap: var(--cat-gap, 12px);
    }
}

@media only screen and (max-width: 767px) {
    .category.style-1 .category-wrapper {
        grid-template-columns: repeat(var(--cat-cols-mobile, 4), minmax(0, 1fr));
        gap: var(--cat-gap, 12px);
    }

    .category.style-1 .category-img {
        width: min(var(--cat-icon-size, 72px), 100%) !important;
        border-radius: 12px;
    }
    .category.style-1 .category-img img {
        border-radius: 12px;
    }

    .category.style-1 .category-info p {
        font-size: 12px;
        margin-top: 8px;
    }

    .category.style-1.is-tile .category-card {
        padding: 14px 6px 12px;
    }
    .category.style-1.is-tile .category-img {
        width: min(var(--cat-icon-size, 56px), 100%) !important;
    }
    .category.style-1.is-tile .category-info p {
        margin-top: 0;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category.style-1 .category-card,
    .category.style-1 .category-img img,
    .category.style-1 .category-info p {
        transition: none;
    }
    .category.style-1 .category-card:hover .category-img img {
        transform: none;
    }
}

/*============================================================================================
   End Category Area
=============================================================================================*/
