/*
 * ReHub Mobile Filter Slider — child theme  v1.7.0
 */

@media (max-width: 767px) {

  /* ── 1. Hide original filter bar ─────────────────────────── */
  .re_filter_panel.rh-mslider-hidden-filter {
    display: none !important;
  }

  /* ── 2. Clip wrapper for slide animation ─────────────────── */
  .rh-mslider-clip {
    overflow: hidden;
    width: 100%;
  }

  /* ── 3. Sentinel — holds layout space when nav is sticky ─── */
  .rh-mslider-sentinel {
    display: block;
    height: 0;
    width: 100%;
  }

  /* ── 4. Pill nav row ──────────────────────────────────────── */
  .rh-mslider-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Smooth transition between normal and sticky */
    transition: box-shadow 0.2s;
  }
  .rh-mslider-nav::-webkit-scrollbar { display: none; }

  /* ── 5. Sticky state — sticks to very top of screen ─────── */
  .rh-mslider-nav--sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    border-bottom: 1px solid #ddd;
    padding: 8px 14px;
  }

  /* ── 6. Individual pill ───────────────────────────────────── */
  .rh-mslider-pill {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1.5px solid #e0e0e0;
    background: #f6f6f6;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
  }
  .rh-mslider-pill:active {
    transform: scale(0.94);
  }
  .rh-mslider-pill--active {
    background: var(--rehub-main-color, #e4572e);
    border-color: var(--rehub-main-color, #e4572e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(228, 87, 46, 0.28);
  }
  /* Active pill slightly more prominent when nav is sticky */
  .rh-mslider-nav--sticky .rh-mslider-pill--active {
    box-shadow: 0 2px 12px rgba(228, 87, 46, 0.40);
  }

  /* ── 7. Footer: fixed bar ─────────────────────────────────── */
  .footer-mobile {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.07);
  }

  /* Safe spacing so footer doesn't cover last grid row */
  body {
    padding-bottom: 64px;
  }

  /* ── 8. Footer icon layout ────────────────────────────────── */
  .mobile-footer-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 env(safe-area-inset-bottom, 4px);
  }

  .mobile-footer-icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #999;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 8px;
    transition: color 0.12s;
    -webkit-tap-highlight-color: transparent;
    min-width: 48px;
  }
  .mobile-footer-icons a .rhicon {
    font-size: 21px;
    line-height: 1;
  }

  /* ── 9. Footer active highlight (set by JS on page load) ─── */
  .mobile-footer-icons a.rh-footer-active,
  .mobile-footer-icons a.rh-footer-active .rhicon {
    color: var(--rehub-main-color, #e4572e) !important;
  }
  .mobile-footer-icons a.rh-footer-active {
    background: rgba(228, 87, 46, 0.07);
  }
  .mobile-footer-icons a:active {
    color: var(--rehub-main-color, #e4572e);
    background: rgba(228, 87, 46, 0.06);
  }

} /* end @media */
