/* ================================
       JQUERY UI SLIDER
    ================================= */
.ui-slider-horizontal {
    height: 8px;
    background: #ccc;
    border-radius: 4px;
}

.ui-slider .ui-slider-range {
    background: #0072c6;
}

.ui-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0072c6;
    border: 2px solid #fff;
    top: -6px;
    cursor: pointer;
    outline: none;
}

/* ================================
       LAYOUT: PAGE + SIDEBAR + PRODUCTS
    ================================= */
.fisheaz-product-page {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    /* padding: 20px 15px 40px;  // enable if you want outer padding */
}

.filter-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-sidebar h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-group h4 {
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}

.filter-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-group li + li {
    margin-top: 4px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.btn-clear-filters,
.btn-apply-filters {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-apply-filters {
    background-color: #0b7cc1;
    color: #fff;
}

.btn-clear-filters {
    background-color: #dc3545;
    color: #fff;
}

/* ================================
       PRODUCTS GRID + CARD
    ================================= */
.product-display {
    position: relative;
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, 1fr);
}

.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ================================
       LOADER OVERLAY
    ================================= */
#loadingOverlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    justify-content: center;
    align-items: center;
}

.spinner-dots {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-dots span {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background-color: #0072c6;
    border-radius: 50%;
    opacity: 0;
    animation: dot-pulse 1.2s infinite ease-in-out;
}

.spinner-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ================================
       MOBILE FILTER BAR (TOGGLE BUTTON)
    ================================= */
.mobile-filter-bar {
    display: none; /* hidden on desktop */
}

.mobile-filter-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #0072c6;
    background: #fff;
    color: #0072c6;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

/* Header inside mobile popup */
.filter-header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filter-close-btn {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* Dark overlay behind popup */
.filter-overlay {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0; /* top adjusted via JS when opening */
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
}

.filter-overlay.is-visible {
    display: block;
}

/* ================================
       RESPONSIVE
    ================================= */

/* Tablet */
@media (max-width: 992px) {
    .fisheaz-product-page {
        grid-template-columns: 1fr;
    }

    .product-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .fisheaz-product-page {
        grid-template-columns: 1fr;
        padding-inline: 10px;
    }

    /* Filter bar under breadcrumb */
    .mobile-filter-bar {
        display: flex;
        justify-content: flex-end; /* button to the right */
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 40;
        background: #fff;
        padding: 4px 10px; /* reduced top/bottom space */
        margin-bottom: 6px;
    }

    .mobile-filter-btn {
        margin-left: auto; /* push button to right */
    }

    .product-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Filter sidebar becomes mobile popup (bottom sheet) */
    .filter-sidebar {
        display: none; /* hidden until open */
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto; /* JS sets exact top under filter bar */
        max-width: 100%;
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        border-radius: 0;
        padding-bottom: 12px;
    }

    .filter-sidebar.is-open {
        display: block;
    }

    .filter-header-mobile {
        display: flex;
    }

    .filter-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding-top: 10px;
        margin-bottom: 0;
    }
}

/* Hide Apply button on desktop/tablets */
.btn-apply-filters {
    display: none;
}

/* Show Apply button only on mobile */
@media (max-width: 600px) {
    .btn-apply-filters {
        display: block;
    }
}
