/*
 * ZP PRODUCT CATEGORY WIDGET V2
 * Tree + Footer layout
 */

/*
             * ==========================================================
             * ZP PRODUCT CATEGORY WIDGET V2
             * ==========================================================
             */

            .zp-category-widget {
                --zp-cat-accent: #f5a800;
                --zp-cat-text: #333;
                --zp-cat-muted: #6b7280;
                --zp-cat-border: rgba(15, 23, 42, .09);
                --zp-cat-soft: rgba(15, 23, 42, .035);
                --zp-cat-soft-hover: rgba(15, 23, 42, .065);
                --zp-cat-active: rgba(245, 168, 0, .13);

                min-width: 0;
                width: 100%;
            }

            .zp-category-widget__title {
                position: relative;
                margin: 0 0 14px;
                padding: 0 0 11px;

                color: #171717;
                font-size: 16px;
                font-weight: 700;
                line-height: 1.25;
            }

            .zp-category-widget__title::after {
                position: absolute;
                bottom: 0;
                left: 0;

                width: 38px;
                height: 2px;

                border-radius: 999px;
                background: var(--zp-cat-accent);

                content: '';
            }


            /*
             * ==========================================================
             * TREE / SIDEBAR
             * ==========================================================
             */

            .zp-category-widget--tree {
                padding: 16px;

                border: 1px solid var(--zp-cat-border);
                border-radius: 12px;

                background: #fff;

                box-shadow:
                    0 1px 2px rgba(15, 23, 42, .03),
                    0 4px 16px rgba(15, 23, 42, .025);
            }

            .zp-category-widget--tree
            .zp-category-widget__nav {
                min-width: 0;
            }

            .zp-category-widget--tree
            .zp-category-widget__list,
            .zp-category-widget--tree
            .zp-category-widget__children {
                margin: 0;
                padding: 0;

                list-style: none;
            }

            .zp-category-widget--tree
            .zp-category-widget__list {
                display: grid;
                gap: 3px;
            }

            .zp-category-widget--tree
            .zp-category-widget__item {
                position: relative;
                min-width: 0;
            }

            .zp-category-widget--tree
            .zp-category-widget__row {
                position: relative;

                display: flex;
                align-items: center;

                min-width: 0;
                min-height: 40px;

                border-radius: 8px;

                transition:
                    background-color .16s ease,
                    box-shadow .16s ease;
            }

            .zp-category-widget--tree
            .zp-category-widget__row:hover {
                background: var(--zp-cat-soft);
            }

            .zp-category-widget--tree
            .zp-category-widget__item.is-active
            > .zp-category-widget__row {
                background: var(--zp-cat-active);
                box-shadow:
                    inset 3px 0 0 var(--zp-cat-accent);
            }

            .zp-category-widget--tree
            .zp-category-widget__link {
                position: relative;

                display: flex;
                align-items: center;

                flex: 1 1 auto;

                min-width: 0;
                min-height: 40px;

                padding:
                    8px
                    8px
                    8px
                    11px;

                color: var(--zp-cat-text);

                font-size: 14px;
                font-weight: 500;
                line-height: 1.35;

                text-decoration: none;

                transition:
                    color .16s ease,
                    padding-left .16s ease;
            }

            .zp-category-widget--tree
            .zp-category-widget__row:hover
            > .zp-category-widget__link {
                color: #111;
                padding-left: 14px;
            }

            .zp-category-widget--tree
            .zp-category-widget__item.is-active
            > .zp-category-widget__row
            > .zp-category-widget__link {
                color: #111;
                font-weight: 700;
            }

            .zp-category-widget--tree
            .zp-category-widget__label {
                min-width: 0;

                overflow-wrap: anywhere;
            }


            /*
             * TOGGLE
             */

            .zp-category-widget--tree
            .zp-category-widget__toggle {
                position: relative;

                display: inline-flex;
                align-items: center;
                justify-content: center;

                flex: 0 0 34px;

                width: 34px;
                height: 34px;

                margin: 0 3px 0 0;
                padding: 0;

                border: 0;
                border-radius: 7px;

                background: transparent;
                color: #737373;

                cursor: pointer;

                transition:
                    background-color .15s ease,
                    color .15s ease,
                    transform .15s ease;
            }

            .zp-category-widget--tree
            .zp-category-widget__toggle:hover {
                background: var(--zp-cat-soft-hover);
                color: #111;
            }

            .zp-category-widget--tree
            .zp-category-widget__toggle span {
                position: relative;

                display: block;

                width: 12px;
                height: 12px;
            }

            .zp-category-widget--tree
            .zp-category-widget__toggle span::before,
            .zp-category-widget--tree
            .zp-category-widget__toggle span::after {
                position: absolute;
                top: 50%;
                left: 50%;

                display: block;

                width: 12px;
                height: 1.5px;

                border-radius: 999px;

                background: currentColor;

                content: '';

                transform:
                    translate(-50%, -50%);

                transition:
                    opacity .17s ease,
                    transform .17s ease;
            }

            .zp-category-widget--tree
            .zp-category-widget__toggle span::after {
                transform:
                    translate(-50%, -50%)
                    rotate(90deg);
            }

            .zp-category-widget--tree
            .zp-category-widget__toggle[
                aria-expanded="true"
            ] span::after {
                opacity: 0;

                transform:
                    translate(-50%, -50%)
                    rotate(0);
            }


            /*
             * CHILDREN
             */

            .zp-category-widget--tree
            .zp-category-widget__children {
                position: relative;

                margin:
                    2px
                    0
                    3px
                    15px;

                padding-left: 12px;
            }

            .zp-category-widget--tree
            .zp-category-widget__children::before {
                position: absolute;

                top: 2px;
                bottom: 5px;
                left: 0;

                width: 1px;

                background:
                    rgba(15, 23, 42, .10);

                content: '';
            }

            .zp-category-widget--tree
            .zp-category-widget__children
            .zp-category-widget__row {
                min-height: 36px;
            }

            .zp-category-widget--tree
            .zp-category-widget__children
            .zp-category-widget__link {
                min-height: 36px;

                padding:
                    7px
                    7px
                    7px
                    9px;

                color: #616161;

                font-size: 13.5px;
                font-weight: 400;
            }

            .zp-category-widget--tree
            .zp-category-widget__children
            .zp-category-widget__item.is-active
            > .zp-category-widget__row
            > .zp-category-widget__link {
                color: #111;
                font-weight: 600;
            }


            /*
             * ==========================================================
             * FOOTER MODE
             * ==========================================================
             */

            .zp-category-widget--footer {
                padding: 0;

                border: 0;

                background: transparent;
                box-shadow: none;
            }

            .zp-category-widget--footer
            .zp-category-widget__title {
                margin-bottom: 13px;

                font-size: 15px;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-list {
                display: grid;

                grid-template-columns:
                    minmax(0, 1fr);

                margin: 0;
                padding: 0;

                gap: 1px;

                list-style: none;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-item {
                min-width: 0;

                margin: 0;
                padding: 0;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link {
                position: relative;

                display: flex;
                align-items: center;

                min-width: 0;
                min-height: 30px;

                padding:
                    5px
                    18px
                    5px
                    14px;

                color: #666;

                font-size: 13.5px;
                font-weight: 400;
                line-height: 1.35;

                text-decoration: none;

                overflow-wrap: anywhere;

                transition:
                    color .15s ease,
                    padding-left .15s ease,
                    background-color .15s ease;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link::before {
                position: absolute;

                top: 50%;
                left: 2px;

                width: 5px;
                height: 5px;

                border-radius: 50%;

                background: #b7b7b7;

                content: '';

                transform:
                    translateY(-50%);

                transition:
                    background-color .15s ease,
                    transform .15s ease;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link::after {
                position: absolute;

                top: 50%;
                right: 3px;

                width: 6px;
                height: 6px;

                border-top: 1px solid currentColor;
                border-right: 1px solid currentColor;

                content: '';

                opacity: 0;

                transform:
                    translate(-3px, -50%)
                    rotate(45deg);

                transition:
                    opacity .15s ease,
                    transform .15s ease;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link:hover {
                padding-left: 17px;

                color: #111;

                background:
                    rgba(15, 23, 42, .025);
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link:hover::before {
                background:
                    var(--zp-cat-accent);

                transform:
                    translateY(-50%)
                    scale(1.15);
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-link:hover::after {
                opacity: .65;

                transform:
                    translate(0, -50%)
                    rotate(45deg);
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-item.is-active
            .zp-category-widget__footer-link {
                color: #111;
                font-weight: 600;
            }

            .zp-category-widget--footer
            .zp-category-widget__footer-item.is-active
            .zp-category-widget__footer-link::before {
                background:
                    var(--zp-cat-accent);
            }


            /*
             * FOOTER GRID IN WIDER WIDGETS
             */

            @media (min-width: 1200px) {
                #footer-links
                .zp-category-widget--footer
                .zp-category-widget__footer-list {
                    grid-template-columns:
                        minmax(0, 1fr);
                }
            }


            /*
             * ==========================================================
             * RESPONSIVE
             * ==========================================================
             */

            @media (max-width: 991.98px) {
                .zp-category-widget--tree {
                    padding: 14px;
                }
            }

            @media (max-width: 767.98px) {
                .zp-category-widget--tree {
                    padding: 12px;

                    border-radius: 10px;
                }

                .zp-category-widget--tree
                .zp-category-widget__row,
                .zp-category-widget--tree
                .zp-category-widget__link {
                    min-height: 44px;
                }

                .zp-category-widget--tree
                .zp-category-widget__link {
                    padding-top: 9px;
                    padding-bottom: 9px;
                }

                .zp-category-widget--tree
                .zp-category-widget__toggle {
                    flex-basis: 42px;

                    width: 42px;
                    height: 42px;
                }

                .zp-category-widget--footer
                .zp-category-widget__footer-link {
                    min-height: 36px;

                    padding-top: 7px;
                    padding-bottom: 7px;
                }
            }


/*
 * ==========================================================
 * ZP HOMEPAGE PRIMARY SIDEBAR LAYOUT
 * ==========================================================
 */

.zp-home-layout {
    width: 100%;
}

.zp-home-layout > .ps-container {
    width: 100%;
}

.zp-home-layout__grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 300px)
        minmax(0, 1fr);

    gap: 28px;

    width: 100%;

    align-items: start;
}

.zp-home-layout__sidebar {
    min-width: 0;
    width: 100%;
}

.zp-home-layout__content {
    min-width: 0;
    width: 100%;
}


/*
 * CATEGORY WIDGET WHEN USED IN PRIMARY SIDEBAR
 */

.zp-home-layout__sidebar
.zp-category-widget--tree {
    position: static;
    top: auto;

    width: 100%;

    margin: 0;
}


/*
 * HOMEPAGE CONTENT SAFETY
 */

.zp-home-layout__content
> *:first-child {
    margin-top: 0;
}


/*
 * TABLET
 */

@media (max-width: 1199.98px) {
    .zp-home-layout__grid {
        grid-template-columns:
            minmax(230px, 270px)
            minmax(0, 1fr);

        gap: 22px;
    }
}


/*
 * MOBILE / SMALL TABLET
 */

@media (max-width: 991.98px) {
    .zp-home-layout__grid {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 22px;
    }

    .zp-home-layout__sidebar
    .zp-category-widget--tree {
        position: static;
    }
}


/*
 * PHONE
 */

@media (max-width: 767.98px) {
    .zp-home-layout__grid {
        gap: 18px;
    }
}


/* ZP_HOME_CATEGORY_HIDE_TABLET_MOBILE_V1 */
@media (max-width: 1199.98px) {
    .zp-home-layout__sidebar .zp-category-widget--tree {
        display: none !important;
    }
}


/* ZP_SIDEBAR_CATEGORY_COMPACT_V1 */

/* Square styling is scoped to the homepage sidebar. */
.zp-home-layout__sidebar .zp-category-widget--tree,
.zp-home-layout__sidebar .zp-category-widget--tree *,
.zp-home-layout__sidebar .zp-category-widget--tree *::before,
.zp-home-layout__sidebar .zp-category-widget--tree *::after {
    border-radius: 0 !important;
}

.zp-home-layout__sidebar .zp-category-widget--tree {
    position: relative;
    isolation: isolate;
}

.zp-home-layout__sidebar .zp-cat-compact-more {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    margin: 10px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--zp-cat-border);
    border-radius: 0 !important;
    background: #f6f7f9;
    color: var(--zp-cat-text);
    font: inherit;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.zp-home-layout__sidebar .zp-cat-compact-more:hover,
.zp-home-layout__sidebar .zp-cat-compact-more:focus-visible {
    background: var(--zp-cat-soft-hover);
    outline-offset: 2px;
}

.zp-home-layout__sidebar .zp-cat-compact-more__symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    font-size: 18px;
    line-height: 1;
}

.zp-home-layout__sidebar .zp-cat-compact-more[hidden] {
    display: none !important;
}

.zp-home-layout__sidebar
.zp-cat-compact-active:not(.zp-cat-compact-open)
.zp-cat-compact-hidden {
    display: none !important;
}

/*
 * The expanded category list is anchored above its original
 * bottom position. It does not increase aside height or cover
 * the Facebook widget below the category box.
 */
.zp-home-layout__sidebar
.zp-cat-compact-active.zp-cat-compact-open
.zp-category-widget__nav {
    position: relative;
    z-index: 5;
}

.zp-home-layout__sidebar
.zp-cat-compact-active.zp-cat-compact-open
.zp-category-widget__nav > .zp-category-widget__list {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 10px !important;
    border: 1px solid var(--zp-cat-border);
    background: #fff;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, .12);
}

.zp-home-layout__sidebar
.zp-cat-compact-active.zp-cat-compact-open
.zp-cat-compact-hidden {
    display: list-item !important;
}

/* Sidebar Facebook cards: square corners, without changing
   the full-size Social Section outside the aside. */
.zp-home-layout__sidebar [class*="zp-fb"],
.zp-home-layout__sidebar [class*="zp-fb"] *,
.zp-home-layout__sidebar [class*="zp-fb"] *::before,
.zp-home-layout__sidebar [class*="zp-fb"] *::after {
    border-radius: 0 !important;
}
