/* Nutroflow Generic Elementor Filters - all rules are scoped to the widget. */
.nfgef-filters {
    width: 100%;
    position: relative;
    z-index: 20;
    box-sizing: border-box;
}

.nfgef-filters,
.nfgef-filters * {
    box-sizing: border-box;
}

.nfgef-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 24px;
    width: 100%;
    max-width: 100%;
}

.nfgef-filter-list {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.nfgef-filter {
    position: relative;
    width: auto;
    min-width: 120px;
    max-width: 100%;
    flex: 0 0 auto;
}

/* Product Type uses the full left-side filter width. Its children are tabs. */
.nfgef-filter--types {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.nfgef-type-row {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9dde3;
    border-radius: 4px;
    background: #fff;
}

.nfgef-type-option {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    cursor: pointer;
}

.nfgef-type-option + .nfgef-type-option {
    border-left: 1px solid #d9dde3;
}

.nfgef-type-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nfgef-type-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 0;
    max-width: 100%;
    padding: 10px 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333;
    font: inherit;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    transition: background-color .15s ease, color .15s ease;
}

.nfgef-type-option:hover span {
    background: #f5f5f5;
}

.nfgef-type-option input:focus-visible + span {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.nfgef-type-option input:checked + span {
    background: #f5f5f5;
    color: #333;
}

.nfgef-trigger {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #d9dde3;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font: inherit;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.nfgef-trigger:hover,
.nfgef-filter.is-open .nfgef-trigger {
    border-color: #aaa;
}

.nfgef-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    line-height: 0;
    transform-origin: center;
    transition: transform .15s ease;
}

.nfgef-chevron svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.nfgef-filter.is-open .nfgef-chevron {
    transform: rotate(180deg);
}

.nfgef-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #d9dde3;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    z-index: 9999;
}

.nfgef-menu[hidden] {
    display: none;
}

.nfgef-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 8px;
    border-radius: 3px;
    color: #333;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.nfgef-option:hover {
    background: #f5f5f5;
}

.nfgef-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.nfgef-sort {
    flex: 0 0 auto;
    width: 180px;
    min-width: 120px;
    position: relative;
    margin-left: auto;
}

.nfgef-sort-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nfgef-sort-trigger {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 42px;
    padding: 10px 32px 10px 12px;
    border: 1px solid #d9dde3;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.nfgef-no-products {
    width: 100%;
    padding: 40px 10px;
    text-align: center;
}

.nfgef-filters .nfgef-loading {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}

@media (max-width: 1024px) {
    .nfgef-toolbar {
        gap: 16px;
    }

    .nfgef-filter-list {
        gap: 12px;
    }

    .nfgef-sort {
        width: 160px;
    }
}

@media (max-width: 767px) {
    .nfgef-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nfgef-filter-list {
        width: 100%;
        min-width: 100%;
        gap: 10px;
    }

    .nfgef-filter--types {
        width: 100%;
        min-width: 0;
    }

    /* Keep Product Type tabs on one line without creating a page-level scrollbar. */
    .nfgef-type-row {
        overflow: hidden;
    }

    .nfgef-type-option span {
        padding-left: 12px;
        padding-right: 12px;
        min-height: 42px;
    }

    .nfgef-filter:not(.nfgef-filter--types) {
        min-width: 0;
        flex: 1 1 0;
    }

    .nfgef-sort {
        width: 100%;
        min-width: 100%;
        margin-left: 0;
    }

    .nfgef-menu {
        max-height: 240px;
    }
}


/* v1.2.5: Product Type tabs share the full left filter area; Sort By stays right. */
.nfgef-filters .nfgef-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:24px;
    width:100%;
    max-width:100%;
}
.nfgef-filters .nfgef-filter-list {
    flex:1 1 auto;
    min-width:0;
    width:100%;
    max-width:100%;
    flex-wrap:nowrap;
    align-items:center;
}
.nfgef-filters .nfgef-filter--types {
    flex:1 1 auto;
    width:100%;
    min-width:0;
    max-width:100%;
}
.nfgef-filters .nfgef-type-row {
    width:100%;
    max-width:100%;
    min-width:0;
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;
    gap:0;
    overflow:hidden;
    border:1px solid #d9dde3;
    border-radius:4px;
    background:#fff;
}
.nfgef-filters .nfgef-type-option {
    flex:0 1 auto;
    min-width:0;
    margin:0;
}
.nfgef-filters .nfgef-type-option + .nfgef-type-option {
    border-left:1px solid #d9dde3;
}
.nfgef-filters .nfgef-type-option span {
    min-height:42px;
    border:0;
    border-radius:0;
    background:transparent;
    padding:10px 18px;
    white-space:nowrap;
    justify-content:center;
    transition:background-color .15s ease,color .15s ease;
}
.nfgef-filters .nfgef-type-option:hover span {
    background:#f5f5f5;
}
.nfgef-filters .nfgef-type-option input:checked + span {
    background:#f5f5f5;
}
.nfgef-filters .nfgef-sort {
    flex:0 0 180px;
    width:180px;
    min-width:120px;
    margin-left:auto;
}
.nfgef-filters .nfgef-sort-trigger {
    width:100%;
}

@media (max-width:767px) {
    .nfgef-filters .nfgef-toolbar {
        flex-wrap:wrap;
    }
    .nfgef-filters .nfgef-filter-list,
    .nfgef-filters .nfgef-sort {
        width:100%;
        min-width:100%;
    }
    .nfgef-filters .nfgef-filter--types {
        width:100%;
        min-width:0;
    }
    .nfgef-filters .nfgef-type-row {
        overflow:hidden;
    }
    .nfgef-filters .nfgef-type-option span {
        padding-left:12px;
        padding-right:12px;
    }
    .nfgef-filters .nfgef-sort {
        flex:0 0 100%;
        margin-left:0;
    }
}
