/* =================================================================
   Exo Product Filter — Styles
   ================================================================= */

/* ---- Variables -------------------------------------------------- */
:root {
    --exo-accent: #f07c00;
    --exo-accent-hover: #d96b00;
    --exo-bg: #fafafa;
    --exo-border: #e0e0e0;
    --exo-radius: 8px;
    --exo-text: #333;
    --exo-text-light: #777;
    --exo-white: #fff;
}

/* =================================================================
   DESKTOP filter bar
   ================================================================= */

.exo-filter-wrapper {
    margin-bottom: 24px;
}

.exo-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px 18px;
    background: var(--exo-bg);
    border: 1px solid var(--exo-border);
    border-radius: var(--exo-radius);
}

.exo-filter-field {
    flex: 1 1 150px;
    min-width: 120px;
}

.exo-filter-search {
    flex: 1 1 200px;
}

.exo-filter-reset-wrap {
    flex: 0 0 auto;
    min-width: auto;
}

/* Inputs & selects */
.exo-filter-bar input[type="text"],
.exo-filter-bar select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--exo-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--exo-text);
    background: var(--exo-white);
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.exo-filter-bar input[type="text"]:focus,
.exo-filter-bar select:focus {
    outline: none;
    border-color: var(--exo-accent);
    box-shadow: 0 0 0 2px rgba(240, 124, 0, 0.15);
}

/* Custom select arrow */
.exo-filter-select {
    position: relative;
}
.exo-filter-select::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--exo-text-light);
    pointer-events: none;
}

/* Reset button — ID selector + !important to override ANY theme button styles */
#exo-filter-reset,
button#exo-filter-reset,
.exo-filter-bar #exo-filter-reset,
.exo-filter-bar button#exo-filter-reset {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 1px solid var(--exo-border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #777 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s;
    padding: 0 !important;
    min-width: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}
#exo-filter-reset:hover,
button#exo-filter-reset:hover {
    border-color: var(--exo-accent) !important;
    color: var(--exo-accent) !important;
    background: #fff !important;
    background-color: #fff !important;
}
#exo-filter-reset svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* =================================================================
   MOBILE — hide desktop bar, show trigger
   ================================================================= */

/* =================================================================
   MOBILE — floating action button (FAB)
   ================================================================= */

.exo-mobile-trigger {
    display: none;
}

@media (max-width: 768px) {

    /* Hide desktop bar */
    .exo-filter-wrapper {
        display: none;
    }

    /* Floating centered button */
    .exo-mobile-trigger {
        display: block;
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .exo-mobile-trigger.exo-fab-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .exo-mobile-trigger button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 14px 28px;
        background: var(--exo-accent);
        color: var(--exo-white);
        border: none;
        border-radius: 50px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        box-shadow: 0 4px 14px rgba(240, 124, 0, 0.4),
                    0 2px 6px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s, box-shadow 0.2s;
        white-space: nowrap;
    }
    .exo-mobile-trigger button:active {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(240, 124, 0, 0.3),
                    0 1px 3px rgba(0, 0, 0, 0.1);
    }
    .exo-mobile-trigger button svg {
        stroke: var(--exo-white);
        flex-shrink: 0;
    }

    .exo-active-count:not(:empty) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        background: var(--exo-white);
        color: var(--exo-accent);
        border-radius: 10px;
        font-size: 12px;
        font-weight: 700;
    }

}

/* =================================================================
   BOTTOM SHEET
   ================================================================= */

.exo-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.exo-sheet-backdrop.open {
    display: block;
    opacity: 1;
}

.exo-bottom-sheet {
    display: none; /* Hidden by default — JS adds .open to show */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: var(--exo-white);
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}
.exo-bottom-sheet.open {
    display: flex;
    transform: translateY(0);
}

/* Drag handle */
.exo-sheet-handle {
    width: 36px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

/* Header */
.exo-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--exo-text);
    flex-shrink: 0;
}
.exo-sheet-header button {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--exo-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

/* Body — scrollable filter fields */
.exo-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.exo-sheet-body .exo-filter-field {
    width: 100%;
    margin-bottom: 14px;
    flex: none;
    min-width: 0;
}
.exo-sheet-body input[type="text"],
.exo-sheet-body select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--exo-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: var(--exo-text);
    background: var(--exo-white);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.exo-sheet-body input[type="text"]:focus,
.exo-sheet-body select:focus {
    outline: none;
    border-color: var(--exo-accent);
}

/* Custom arrow for selects inside sheet */
.exo-sheet-body .exo-filter-select {
    position: relative;
}
.exo-sheet-body .exo-filter-select::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--exo-text-light);
    pointer-events: none;
}

/* Footer */
.exo-sheet-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--exo-border);
    flex-shrink: 0;
}

.exo-sheet-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--exo-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: background 0.2s;
}
.exo-sheet-btn-outline {
    background: var(--exo-bg);
    color: var(--exo-text);
    border: 1px solid var(--exo-border);
}
.exo-sheet-btn-outline:hover {
    background: #eee;
}
.exo-sheet-btn-primary {
    background: var(--exo-accent);
    color: var(--exo-white);
}
.exo-sheet-btn-primary:hover {
    background: var(--exo-accent-hover);
}

/* Bottom sheet buttons & selects — override theme interference */
.exo-bottom-sheet .exo-sheet-footer .exo-sheet-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.exo-bottom-sheet .exo-sheet-footer .exo-sheet-btn-outline {
    background: var(--exo-bg) !important;
    color: var(--exo-text) !important;
}
.exo-bottom-sheet .exo-sheet-footer .exo-sheet-btn-primary {
    background: var(--exo-accent) !important;
    color: var(--exo-white) !important;
}
.exo-bottom-sheet .exo-sheet-body select,
.exo-bottom-sheet .exo-sheet-body input[type="text"] {
    color: var(--exo-text) !important;
    background: var(--exo-white) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
}

/* =================================================================
   ELEMENTOR EDITOR — hide mobile-only elements in edit mode
   ================================================================= */

.elementor-editor-active .exo-mobile-trigger,
.elementor-editor-active .exo-bottom-sheet,
.elementor-editor-active .exo-sheet-backdrop,
.elementor-editor-active #exo-mobile-trigger,
.elementor-editor-active #exo-bottom-sheet,
.elementor-editor-active #exo-sheet-backdrop {
    display: none !important;
}
