/* Shop Layout */
.novateplica-shop-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    margin: 20px 0;
    align-items: start;
}

.novateplica-filters-sidebar.prom-style {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    color: #111;
}

/* Sorting Tabs - Compact Prom Style */
.prom-sorting-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: #f0f2f5;
    padding: 2px;
    border-radius: 6px;
    /* Slightly tighter radius */
    margin-bottom: 15px;
    /* Closer to filters */
}

.sort-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 5px 8px;
    /* More compact padding */
    font-size: 12px;
    /* Smaller font */
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    /* Tighter radius */
    transition: all 0.2s;
    white-space: nowrap;
}

.sort-tab:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.sort-tab.active {
    background: #fff;
    color: #000;
    font-weight: 500;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

/* Filter Groups */
.filter-group {
    border-bottom: 1px solid #e9e9e9;
    padding: 15px 0;
}

.filter-group:first-child {
    padding-top: 0;
}

.filter-group:last-child {
    border-bottom: none;
}

/* Titles */
.filter-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    user-select: none;
    position: relative;
}

.filter-counter-badge {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-title .toggle-icon {
    margin-left: auto;
    /* Push icon to the right */
}

.toggle-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.filter-group.expanded .toggle-icon {
    transform: rotate(180deg);
}

.filter-group:not(.expanded) .filter-content {
    display: none;
}

/* PRICE HISTOGRAM */
.price-histogram {
    display: flex;
    align-items: flex-end;
    height: 60px;
    gap: 1px;
    margin-bottom: 5px;
    padding: 0 5px;
}

.histogram-bar {
    flex: 1;
    background-color: #FFDE00;
    /* Prom Yellow */
    min-height: 1px;
    transition: background-color 0.2s;
    border-radius: 2px 2px 0 0;
}

.histogram-bar:hover {
    background-color: #E6C800;
}

/* Range Slider Visuals */
.price-slider-visual {
    position: relative;
    height: 20px;
    margin-bottom: 15px;
    cursor: pointer;
}

.range-bg {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e9e9e9;
    border-radius: 2px;
}

.range-selected {
    position: absolute;
    top: 8px;
    height: 4px;
    background: #00a046;
    /* Prom accent Green */
    border-radius: 2px;
}

.slider-handle {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: grab;
    z-index: 2;
    transform: translateX(-50%);
}

.slider-handle:hover {
    border-color: #999;
}

.slider-handle:active {
    cursor: grabbing;
    border-color: #00a046;
}

/* Helper pseudo-elements for active/inactive bars (JS controlled via classes if needed, 
   but simplistic approach is just CSS) */

/* Categories */
.prom-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prom-categories-list a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: block;
    padding: 3px 0;
    line-height: 1.4;
}

.prom-categories-list a:hover {
    color: #00a046;
    text-decoration: underline;
}

.prom-categories-list li.current-cat>a {
    font-weight: 700;
    color: #3cc54e;
}

.prom-categories-list .children {
    padding-left: 15px;
    border-left: 1px solid #eee;
    margin-top: 5px;
    transition: all 0.3s ease;
}

/* Collapsed state for inactive categories */
.prom-categories-list .children.collapsed {
    display: none;
}

.prom-categories-list .count {
    color: #999;
    font-size: 12px;
}

.prom-categories-list a {
    position: relative;
    padding-right: 25px;
}

.cat-toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.cat-toggle-icon.open {
    transform: translateY(-50%) rotate(180deg);
}

/* Inputs Row */
.price-inputs-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs-row input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.price-inputs-row input:focus {
    border-color: #00a046;
    outline: none;
}

.price-submit-btn {
    height: 36px;
    padding: 0 15px;
    background: var(--primary-color);
    /* Primary Green */
    border: 1px solid var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.price-submit-btn:hover {
    background: #2ea640;
    border-color: #2ea640;
    color: #fff;
}

/* Checkboxes */
.prom-checkbox {
    display: flex;
    padding: 6px 0;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.prom-checkbox input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 6px;
    left: 0;
    height: 18px;
    width: 18px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.prom-checkbox:hover input~.checkmark {
    border-color: #999;
}

.prom-checkbox input:checked~.checkmark {
    background: var(--primary-color);
    /* Primary Green */
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.prom-checkbox input:checked~.checkmark:after {
    display: block;
}

.label-text {
    margin-left: 28px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.prom-checkbox .count {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

/* Skeleton Screens moved to /css/skeletons.css */

/* Search Inside Filters */
.prom-filter-search {
    margin-bottom: 12px;
    position: relative;
}

.filter-search-input {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 32px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    transition: all 0.2s;
}

.filter-search-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 160, 70, 0.1);
}


/* Mobile */
@media (max-width: 992px) {
    .novateplica-shop-layout {
        grid-template-columns: 1fr;
        margin: 0 -15px;
        width: auto;
    }

    .novateplica-filters-wrapper {
        display: none;
    }

    .novateplica-mobile-toolbar-wrapper {
        margin: 0 -15px;
        width: auto;
    }

    body.body-lock {
        overflow: hidden !important;
        height: 100vh;
    }

    /* Sticky Mobile Toolbar (Prom Style - Fixed like Tabs) */
    .novateplica-mobile-toolbar {
        display: flex;
        gap: 12px;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 15px;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;

        /* Default state: not fixed */
        position: relative;
        z-index: 100;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .novateplica-mobile-toolbar.is-sticky {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin: 0 !important;
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    }


    .novateplica-mobile-toolbar.is-sticky.toolbar-hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }

    .novateplica-mobile-toolbar.is-sticky.toolbar-visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }



    /* Admin Bar Adjustments for Sticky Toolbar */
    body.admin-bar .novateplica-mobile-toolbar {
        top: 32px !important;
    }

    @media (max-width: 782px) {
        body.admin-bar .novateplica-mobile-toolbar {
            top: 46px !important;
        }
    }

    /* New Button Styles (Screenshot Match) */
    .am-btn {
        appearance: none;
        border: none;
        background: #f0f2f5;
        /* Light gray */
        color: #222;
        border-radius: 8px;
        padding: 0 16px;
        height: 44px;
        font-size: 14px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        cursor: pointer;
        transition: background 0.2s;
    }

    .am-btn:active {
        background: #e4e6e8;
    }

    .am-btn-filters {
        flex: 1;
        /* Fills space */
        justify-content: space-between;
        /* Icon Left, Chevron Right, Text Center */
    }

    .am-btn-sort {
        flex: 1;
        /* Equal width with filters button */
        width: auto;
        padding: 0 16px;
        justify-content: center;
        /* Center content like filters */
        gap: 8px;
        /* Space between text and arrows */
    }

    .sort-current-label {
        font-size: 14px;
        font-weight: 600;
    }

    .sort-arrows {
        flex-shrink: 0;
        /* Prevent icon from shrinking */
        opacity: 0.7;
    }

    .novateplica-filters-wrapper.open {
        display: block;
        position: fixed;
        width: 300px;
        height: 100%;
        top: 0;
        left: 0;
        background: #fff;
        z-index: 5001;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .mobile-filters-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 15px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 15px;
        font-weight: 600;
        font-size: 14px;
    }
}


/* Mobile Styles Initial setup */
.novateplica-mobile-toolbar,
.am-mobile-header,
.am-mobile-footer {
    display: none;
    /* Desktop hidden */
}


/* Hide standard components on mobile to clear clutter */
@media (max-width: 992px) {

    .woocommerce-result-count,
    .woocommerce-ordering,
    .storefront-sorting,
    #sidebar,
    .sidebar,
    #secondary,
    .widget-area {
        display: none !important;
    }
}

.am-modal-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5000;
    /* Below sidebar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

body.filters-open .am-modal-overlay,
.am-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 992px) {


    /* Hide standard sidebar on mobile */
    .novateplica-sidebar-col {
        position: fixed !important;
        /* Bottom Sheet Positioning */
        top: auto !important;
        bottom: 0 !important;
        left: 0;
        right: 0;
        /* ensure flush right */
        width: 100% !important;
        margin: 0 !important;
        /* Remove any grid margins */
        height: auto;
        max-height: 90vh;
        /* Don't cover full screen */

        background: #fff;
        z-index: 999999;

        display: flex;
        flex-direction: column;

        /* Bottom Sheet Styling */
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);

        /* Animation */
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;

        /* Logic to completely hide when closed */
        visibility: hidden;
        pointer-events: none;
    }

    .novateplica-sidebar-col.open {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* Filters wrapper inside sidebar */
    .novateplica-filters-wrapper {
        flex: 1;
        min-height: 0;
        height: auto;
        overflow-y: auto !important;
        /* Force scroll */
        padding: 10px 15px 80px 15px !important;
        /* Extra bottom padding for scroll */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;

        /* Fix visibility */
        display: block !important;
        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        /* visibility: visible !important; RE MOVED - Let parent control visibility */
        position: static !important;
        /* Override any fixed pos */
        width: auto !important;
        /* Override fixed width */
        padding: 10px 15px 80px 15px !important;
        /* Restore padding */
    }



    /* Mobile Sidebar Header */
    .am-mobile-header {
        display: flex;
        /* Flex but visible only effectively due to parent open */
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background: #fff;
        border-bottom: 1px solid #f0eff1;
        height: 60px;
        flex-shrink: 0;
        z-index: 20;
        border-radius: 16px 16px 0 0;
    }

    .am-header-title {
        font-size: 20px;
        font-weight: 700;
        color: #000;
        margin: 0;
        flex-grow: 1;
        text-align: center;
        /* Center Title like Prom */
        padding-left: 24px;
        /* Offset closer icon width to true center */
    }

    .am-sidebar-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 8px;
        color: #000;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s;
    }

    .am-sidebar-close:hover {
        color: #555;
    }

    /* Scrollable Content Area */
    .am-filters-scrollable {
        flex: 1;
        overflow-y: auto;
        padding: 15px 15px 80px 15px;
        /* Bottom padding for footer */
        -webkit-overflow-scrolling: touch;
    }



    /* Mobile Footer (Fixed at bottom of flex container) */
    .am-mobile-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        /* Compact padding */
        background: #fff;
        border-top: 1px solid #f0eff1;
        min-height: 60px;
        /* Reduced from 72px */
        flex-shrink: 0;
        z-index: 20;
        gap: 12px;
    }

    .am-reset-btn {
        background: none;
        border: none;
        color: #555 !important;
        /* Darker grey for visibility */
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        padding: 0;
        transition: color 0.2s;
        white-space: nowrap;
    }

    .am-reset-btn:hover,
    .am-reset-btn:active {
        color: var(--primary-color);
        /* Green on interaction */
    }

    .am-show-btn {
        background: var(--primary-color) !important;
        /* Primary Green */
        color: #fff !important;
        border: none;
        border-radius: 4px;
        /* Standard slight roundness */
        font-weight: 500;
        /* Medium weight, not bold */
        font-size: 14px;
        padding: 0 20px;
        flex: 1;
        /* Take remaining space */
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: none !important;
        /* Flat design */
        cursor: pointer;
        transition: background 0.2s, opacity 0.2s;
    }

    .am-show-btn:hover {
        background: #2ea640 !important;
    }

    /* Hide desktop elements on mobile if needed */
    .novateplica-filters-sidebar h3.widget-title {
        display: none;
    }

    .am-sidebar-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        color: #555;
        line-height: 1;
    }

    /* Remove Pseudo Elements previously added */
    .novateplica-sidebar-col::before,
    .novateplica-sidebar-col::after {
        content: none !important;
        display: none !important;
    }

    /* Sorting tabs inside sidebar - Hide duplicate sorting on mobile if using modal */
    .prom-sorting-tabs {
        display: none;
    }

    /* Mobile Toolbar */
    .novateplica-mobile-toolbar {
        display: flex;
    }

    .am-btn-reset-toolbar {
        color: #333 !important;
        background: #fff !important;
        border: 1px solid #ff9800 !important;
        padding: 0 12px !important;
        height: 32px !important;
        width: auto !important;
        border-radius: 50px !important;
        display: inline-flex;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: normal !important;
        white-space: nowrap !important;
        gap: 8px !important;
        transition: all 0.2s;
    }

    .am-btn-reset-toolbar span {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        display: inline-block !important;
        line-height: 1 !important;
        /* Force line-height to fit icon */
    }

    .am-btn-reset-toolbar svg {
        color: #999;
        transition: color 0.2s;
        display: inline-block !important;
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }

    .am-btn-reset-toolbar:hover {
        border-color: #f57c00 !important;
        background: #fff8e1 !important;
    }

    .am-btn-reset-toolbar:hover svg {
        color: #f57c00;
    }

    .am-btn-reset-toolbar:active {
        background: #ffe0b2 !important;
    }

    .am-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 32px;
        padding: 0 14px;
        background: #f0f2f5;
        /* Light gray pill background */
        color: #333;
        border: none;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .am-btn:active {
        background: #e4e6ea;
    }

    .am-btn svg {
        margin-right: 6px;
    }



    /* Ensure no margins on hidden desktop elements taking space */
    .novateplica-sidebar-col>*:not(.am-mobile-header):not(.novateplica-filters-wrapper):not(.am-mobile-footer) {
        display: none !important;
    }

    /* Remove potential gaps */
    .novateplica-mobile-toolbar {
        margin-bottom: 0 !important;
        border-bottom: 1px solid #eee;
    }

    /* Fix sticky top */
    .novateplica-mobile-toolbar {
        top: 0;
        /* Stick to very top if header scrolls away, or adjust if header is sticky */
    }

    /* Sort Modal (Bottom Sheet) */
    .am-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10001;
        align-items: flex-end;
        /* Bottom alignment */
    }

    .am-modal-overlay.open {
        display: flex;
    }

    .am-modal-content {
        background: #fff;
        width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 20px;
        animation: slideUp 0.3s ease-out;
        max-height: 80vh;
        overflow-y: auto;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .am-modal-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-radius: 24px 24px 0 0;
        padding: 24px 20px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
        max-height: 90vh;
        overflow-y: auto;
        animation: slideUp 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .am-modal-header {
        display: flex;
        justify-content: center;
        /* Center title */
        align-items: center;
        margin-bottom: 24px;
        position: relative;
    }

    .am-modal-header h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #000;
    }

    .am-close-modal {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
        color: #000;
        line-height: 1;
        transition: opacity 0.2s;
    }

    .am-close-modal:hover {
        opacity: 0.7;
    }

    /* Sort Options Container */
    .am-sort-options {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .am-sort-option {
        display: flex;
        align-items: center;
        padding: 14px 0;
        border: none;
        color: #000;
        text-decoration: none;
        font-size: 16px;
        line-height: 1.4;
        cursor: pointer;
        background: transparent;
    }

    /* Radio Circle Styling (Purple Ring) */
    .am-radio-circle {
        width: 22px;
        height: 22px;
        border: 2px solid #e0e0e0;
        border-radius: 50%;
        margin-right: 16px;
        position: relative;
        flex-shrink: 0;
        transition: all 0.2s;
        box-sizing: border-box;
    }

    /* Hover */
    .am-sort-option:hover .am-radio-circle {
        border-color: #b0b0b0;
    }

    /* Active State */
    .am-sort-option.active .am-radio-circle {
        border-color: var(--primary-color);
        /* Green Ring */
        border-width: 2px;
    }

    .am-sort-option.active .am-radio-circle::after {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        background: var(--primary-color);
        /* Green Dot */
        border-radius: 50%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .am-sort-option.active {
        font-weight: 500;
    }
}

/* Active Filters Chips */
.active-filters-container {
    padding-bottom: 20px;
    border-bottom: 1px solid #e9e9e9;
    margin-bottom: 15px;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    /* Pill shape */
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: #f5f5f5;
    background: #f9f9f9;
}

.filter-tag .remove-icon {
    margin-left: 8px;
    font-size: 14px;
    color: #999;
}

.filter-tag:hover .remove-icon {
    color: #333;
}

.filter-tag.reset-all-tag {
    border-color: #FFDE00;
    /* Prom yellow border */
    color: #333;
    font-weight: 500;
}

.filter-tag.reset-all-tag:hover {
    background: #FFDE00;
}

.filters-reset-all {
    display: none;
    /* We use the tag style reset button inside list usually, or separate text link */
}

/* Sidebar Column (Tabs + Filters) */
.novateplica-sidebar-col {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* Sidebar Wrapper - This is now the main white box */
.novateplica-filters-wrapper {
    /* Removed sticky, now handled by parent column */
    flex: 1;
    /* Take remaining space */
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll */

    /* Prom White Style Applied Here */
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px 12px 15px 15px;
    /* Comfortable padding */
    box-shadow: none;

    /* Prom-like Thin Scrollbar - Hidden by default, shown on hover/scroll */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    /* Firefox: hidden default */
    transition: scrollbar-color 0.3s;
    /* Smooth transition for Firefox */
}

.novateplica-filters-wrapper:hover {
    scrollbar-color: #c1c1c1 transparent;
    /* Firefox: visible on hover */
}

.novateplica-filters-wrapper::-webkit-scrollbar {
    width: 5px;
}

.novateplica-filters-wrapper::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.novateplica-filters-wrapper::-webkit-scrollbar-thumb {
    background-color: transparent;
    /* Webkit: hidden default */
    border-radius: 4px;
    transition: background-color 0.3s;
}

.novateplica-filters-wrapper:hover::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    /* Webkit: visible on hover */
}

.novateplica-filters-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
    /* Darker on grab */
}

/* Reset inner styles */
.novateplica-filters-sidebar.prom-style-white {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.prom-style-white .price-inputs-row input {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.prom-style-white .prom-checkbox:hover {
    background: transparent;
}

.prom-style-white .prom-scrollable::-webkit-scrollbar-track {
    background: #fff;
}

.prom-style-white .prom-scrollable::-webkit-scrollbar-thumb {
    background: #e0e0e0;
}

/* Show More Toggle */
.show-more-toggle {
    color: var(--text-light);
    /* Prom Blue link style */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.show-more-toggle:hover {
    color: #1557b0;
    text-decoration: underline;
}

.show-more-toggle i {
    font-size: 10px;
    transition: transform 0.3s;
}

.show-more-toggle.expanded i {
    transform: rotate(180deg);
}



/* Category Icons */
.cat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 2px;
}

.prom-categories-list a {
    display: flex;
    /* Flex for correct alignment */
    align-items: center;
}

.cat-name {
    flex: 1;
    white-space: normal;
    /* Allow wrap */
    overflow: hidden;
    /* text-overflow: ellipsis; Removed to allow wrap */
    padding-right: 5px;
}

/* Fix Count Spacing */
.prom-categories-list .count,
.prom-checkbox .count {
    margin-left: auto;
    /* Push to right */
    padding-left: 8px;
    color: #bbb;
    font-size: 11px;
}

.prom-categories-list a,
.prom-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Subcategories indentation */
.prom-categories-list .children {
    margin-left: 10px;
    border-left: 1px solid #eee;
    padding-left: 10px;
}

/* Hover Effects Update */
.prom-categories-list a {
    text-decoration: none !important;
    transition: color 0.2s;
}

.prom-categories-list a:hover {
    color: #00a046 !important;
    text-decoration: none !important;
}

.prom-categories-list a:hover .cat-name {
    color: #00a046;
    font-weight: 700;
}

/* Neutral default */
.show-more-toggle:hover {
    color: #00a046;
    text-decoration: none;
}




/* Fix Animation Conflict */
.filter-content {
    transition: none !important;
}

/* Clean up Show More Button in lists */
.show-more-li {
    list-style: none;
    margin-top: 5px;
}

/* FIX ANIMATION: Restore proper display logic */


.filter-group.expanded .filter-content {
    display: block;
}

.filter-group.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Empty State (No Products Found) - Mimicking Wishlist Style */
.novateplica-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    /* Matched wishlist padding */
    text-align: center;
    background: #fff;
    width: 100%;
    grid-column: 1 / -1;
    min-height: 50vh;
    margin: 0 auto;
}

.novateplica-empty-state .empty-icon {
    font-size: 100px;
    /* Large icon like wishlist (was 120px there, adjusting slightly for search) */
    color: #e0e0e0;
    margin-bottom: 30px;
    display: block;
    /* Ensure it behaves like a block */
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

.novateplica-empty-state .empty-icon i {
    font-size: inherit;
    /* inherit 100px */
}

.empty-state-title {
    font-size: 28px;
    /* Matched wishlist h2 */
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.empty-state-desc {
    font-size: 16px;
    /* Matched wishlist p */
    color: #666;
    margin: 0 0 30px 0;
    max-width: 500px;
    line-height: 1.5;
}

.reset-filters-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    /* Matched wishlist button dims */
    background-color: #f5f5f5;
    /* User Requested Color */
    color: #3e77aa;
    /* User Requested Color */
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: none;
}

.reset-filters-btn:hover {
    background-color: #e5f1ff;
    color: #2b5f8c;
    transform: translateY(-2px);
    /* Matched wishlist hover effect */
}

@media (max-width: 768px) {
    .novateplica-empty-state {
        padding: 60px 20px;
        min-height: 40vh;
    }

    .novateplica-empty-state .empty-icon {
        font-size: 80px;
    }

    .empty-state-title {
        font-size: 24px;
    }
}

/* ============================================
   Loading Spinner & Smooth Transitions
   ============================================ */

/* Products Wrapper Smooth Transition */
.novateplica-products-wrapper {
    transition: opacity 0.3s ease-in-out;
    position: relative;
    min-height: 400px;
}

/* Loading State */
/* Handled by Skeleton Screens in filters.js and earlier in this CSS file */


/* ============================================
   Hide Default WooCommerce Elements
   ============================================ */

/* Hide default result count and ordering dropdown */
.woocommerce-result-count,
.woocommerce-ordering {
    display: none !important;
}

/* =========================================
   Pagination Styles (Fixed & Polished)
   ========================================= */

.novateplica-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space between pagination and text */
    flex-wrap: nowrap !important;
    gap: 20px;
    margin: 30px 0;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Force container to show */
.woocommerce-pagination {
    display: block !important;
    border: none !important;
    margin: 0 !important;
}

/* Reset List */
.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    gap: 8px !important;
    /* Space between buttons */
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    overflow: visible !important;
}

.woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    float: none !important;
}

/* Clean Pagination Design */
.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px !important;
    list-style: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
}

.woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    display: block !important;
}

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span:not(.dots) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    background-color: #fff !important;
    border: 1px solid #dfe1e5 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    color: #444 !important;
    transition: all 0.2s ease !important;
}

/* Active & Hover States */
.woocommerce-pagination ul.page-numbers li a:hover {
    border-color: #c1c1c1 !important;
    background-color: #f8f9fa !important;
}

.woocommerce-pagination ul.page-numbers li span.current {
    background-color: #f1f3f5 !important;
    border-color: #dfe1e5 !important;
    color: #888 !important;
    font-weight: 500 !important;
}

/* Dots */
.woocommerce-pagination ul.page-numbers li span.dots {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 24px !important;
    border: none !important;
    background: transparent !important;
    color: #444 !important;
}

/* Stats Text */
.novateplica-pagination-count {
    color: #888;
    font-size: 13px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .novateplica-pagination-wrapper {
        flex-direction: column;
        gap: 15px;
        align-items: center !important;
        justify-content: center !important;
    }

    .woocommerce-pagination ul.page-numbers {
        justify-content: center;
    }

    .novateplica-pagination-count {
        font-size: 12px;
    }
}

/* ============================================
   Dark Mode Support for Filters
   ============================================ */
[data-theme="dark"] .prom-sorting-tabs {
    background: var(--input-bg);
}

[data-theme="dark"] .sort-tab {
    color: var(--text-light);
}

[data-theme="dark"] .sort-tab:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sort-tab.active {
    background: var(--primary-color, #17a34a);
    color: #ffffff !important;
    font-weight: 600;
}

[data-theme="dark"] .novateplica-filters-sidebar.prom-style {
    color: var(--text-color);
}

[data-theme="dark"] .filter-group {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .filter-title {
    color: var(--text-color);
}

[data-theme="dark"] .toggle-icon {
    filter: invert(1) brightness(0.8);
}

[data-theme="dark"] .price-inputs-row input,
[data-theme="dark"] .filter-search-input {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .label-text {
    color: var(--text-color);
}

[data-theme="dark"] .checkmark {
    background-color: var(--input-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .prom-checkbox:hover input~.checkmark {
    border-color: var(--primary-color);
}

[data-theme="dark"] .prom-categories-list a {
    color: var(--text-color);
}

[data-theme="dark"] .prom-categories-list .children {
    border-left-color: var(--border-color);
}

[data-theme="dark"] .range-bg {
    background: var(--border-color);
}

[data-theme="dark"] .slider-handle {
    background: var(--white);
    border-color: var(--border-color);
}

[data-theme="dark"] .prom-scrollable::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

[data-theme="dark"] .novateplica-mobile-toolbar {
    background: var(--header-bg) !important;
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .am-btn {
    background: var(--input-bg);
    color: var(--text-color);
}

[data-theme="dark"] .novateplica-sidebar-col {
    background: transparent;
}

[data-theme="dark"] .novateplica-filters-wrapper {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .woocommerce-pagination ul.page-numbers li a,
[data-theme="dark"] .woocommerce-pagination ul.page-numbers li span {
    background-color: var(--input-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .woocommerce-pagination ul.page-numbers li a:hover {
    background-color: var(--border-color) !important;
    color: var(--primary-color) !important;
}

[data-theme="dark"] .woocommerce-pagination ul.page-numbers li span.current {
    background-color: var(--input-bg) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

[data-theme="dark"] .novateplica-pagination-count {
    color: var(--text-light) !important;
}

[data-theme="dark"] .woocommerce-pagination {
    border-top-color: var(--border-color) !important;
}

/* Sorting Modal & Mobile Filter UI Dark Mode */
[data-theme="dark"] .am-modal-content {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .am-modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .am-modal-header h3 {
    color: var(--text-color);
}

[data-theme="dark"] .am-close-modal {
    color: var(--text-color);
}

[data-theme="dark"] .am-sort-option {
    color: var(--text-color);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .am-sort-option:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .am-sort-option.active {
    color: #ffffff;
}

[data-theme="dark"] .am-radio-circle {
    border-color: var(--border-color);
}

[data-theme="dark"] .am-sort-option.active .am-radio-circle {
    border-color: var(--primary-color);
}

[data-theme="dark"] .am-mobile-header {
    background: var(--header-bg);
    border-bottom-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .am-btn {
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .am-btn svg {
    color: var(--text-color);
}

[data-theme="dark"] .am-header-title {
    color: var(--text-color);
}

[data-theme="dark"] .am-sidebar-close {
    color: var(--text-color);
}

[data-theme="dark"] .am-mobile-footer {
    background: var(--header-bg);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .am-reset-btn {
    background: var(--input-bg);
    color: var(--text-color);
}

[data-theme="dark"] .am-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .novateplica-pagination-wrapper {
    border-top: 1px solid var(--border-color);
}
