/**
 * MV Shop Filters — sidebar styling.
 * RTL-first (site locale he_IL). Minimal, theme-aligned.
 * Font: futurizem. Accent: site beige/gold #cba654. Text: near-black #111.
 * No pink/red anywhere. Preserves structural behavior:
 * collapse (.mvf-collapsed/.mvf-expanded), search (.mvf-searching),
 * long-list scroll, loading spinner overlay, no-JS submit hide (.mvf-js-hide).
 */

/* ---- Font: force futurizem on the whole sidebar ---- */
.mvf-filters,
.mvf-filters * {
  font-family: "futurizem", sans-serif;
}

/* ---- Box model / overflow containment (sit fully inside the column) ---- */
.mvf-filters {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  direction: rtl;
  text-align: right;
  font-size: 14px;
  line-height: 1.5;
  color: #111;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.mvf-filters *,
.mvf-filters *::before,
.mvf-filters *::after {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Every form control fills its container, never wider. */
.mvf-filters input,
.mvf-filters select,
.mvf-filters textarea,
.mvf-filters button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ---- Top bar: count + clear ---- */
.mvf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.mvf-count {
  font-weight: 600;
  color: #111;
}
.mvf-clear {
  width: auto;
  font-size: 13px;
  color: #cba654;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  opacity: 0.9;
}
.mvf-clear:hover,
.mvf-clear:focus {
  color: #cba654;
  opacity: 1;
}

/* ---- Collapsible sections ---- */
.mvf-section {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 6px 0;
}
.mvf-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #111;
  padding: 8px 2px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.mvf-summary::-webkit-details-marker { display: none; }
.mvf-summary::after {
  content: "\002B"; /* + */
  font-weight: 400;
  color: #cba654;
  margin-inline-start: 8px;
  flex: 0 0 auto;
}
.mvf-section[open] > .mvf-summary::after {
  content: "\2212"; /* − */
  color: #cba654;
}
.mvf-summary:hover { color: #111; }
.mvf-section-body { padding: 4px 2px 12px; }

/* ---- Field controls ---- */
.mvf-field { display: block; }
.mvf-orderby,
.mvf-search {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 14px;
}
.mvf-orderby:focus,
.mvf-search:focus {
  outline: none;
  border-color: #cba654;
  box-shadow: 0 0 0 1px #cba654;
}
.mvf-search { margin-bottom: 8px; }

/* ---- Checkbox lists ---- */
.mvf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mvf-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
}
.mvf-item { margin: 0; }
.mvf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
  cursor: pointer;
  color: #111;
}
.mvf-check input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #cba654; /* checked boxes render beige, not browser default */
}
.mvf-check span { flex: 1 1 auto; min-width: 0; }
.mvf-check:hover { color: #cba654; }

/* Long searchable lists get a capped scroll area. */
.mvf-searchable .mvf-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline-end: 4px;
}

/* Collapsed: show only the first 10 items until expanded or searching. */
.mvf-list.mvf-collapsed .mvf-item:nth-child(n + 11) { display: none; }
.mvf-list.mvf-collapsed.mvf-expanded .mvf-item { display: list-item; }
/* While searching, JS sets inline display per item; ensure collapse doesn't win. */
.mvf-list.mvf-searching .mvf-item { display: list-item; }

/* ---- "הצג עוד / הצג פחות" toggle ---- */
.mvf-more {
  display: block;
  width: auto;
  margin: 8px 0 2px auto; /* nudge to the (RTL) inline-start / left edge */
  padding: 2px 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: #cba654;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: text-decoration-color 0.15s ease;
}
.mvf-more:hover,
.mvf-more:focus {
  color: #cba654;
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

/* ---- Price ---- */
.mvf-price {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 100%;
}
.mvf-price-field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #111;
}
.mvf-price-field input {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 14px;
}
.mvf-price-field input:focus {
  outline: none;
  border-color: #cba654;
  box-shadow: 0 0 0 1px #cba654;
}

/* ---- Submit / no-JS fallback ---- */
.mvf-submit {
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #cba654;
  border-radius: 4px;
  background: #cba654;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.mvf-submit:hover { background: #b8934a; border-color: #b8934a; }
/* When JS is active, hide the manual submit button (AJAX is live). */
.mvf-js .mvf-js-hide { display: none; }

/* ---- Busy states ---- */
.mvf-filters.mvf-busy { opacity: 0.7; pointer-events: none; }

.mvf-loading { position: relative; }
.mvf-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 5;
}
.mvf-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #cba654;
  border-radius: 50%;
  z-index: 6;
  animation: mvf-spin 0.7s linear infinite;
}
@keyframes mvf-spin { to { transform: rotate(360deg); } }

/* Accessible-only helper (labels for screen readers). */
.mvf-filters .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---- overrides (v1.1): kill theme pink on links, refine "הצג עוד" ---- */
.mvf-filters a,
.mvf-filters .mvf-clear,
.mvf-filters .mvf-more { color: #cba654 !important; text-decoration: none; }
.mvf-filters a:hover,
.mvf-filters a:focus,
.mvf-filters .mvf-clear:hover,
.mvf-filters .mvf-clear:focus,
.mvf-filters .mvf-more:hover,
.mvf-filters .mvf-more:focus { color: #b8963f !important; text-decoration: underline; }
.mvf-filters .mvf-more {
    display: block;
    width: auto;
    text-align: right;
    margin: 8px 0 2px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    font-size: 13px;
    cursor: pointer;
}

/* ---- mobile / tablet: collapse the panel behind a “סינון” button ---- */
.mvf-filters .mvf-mobile-toggle { display: none; }
@media (max-width: 1024px) {
    .mvf-filters .mvf-mobile-toggle {
        display: block;
        width: 100%;
        padding: 12px 16px;
        margin: 0 0 10px;
        background: #cba654;
        color: #fff;
        border: 0;
        border-radius: 6px;
        font-family: "futurizem", sans-serif;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
    }
    .mvf-filters .mvf-mobile-toggle::before { content: "\2261\00a0"; } /* ≡ icon */
    .mvf-filters .mvf-topbar,
    .mvf-filters .mvf-section { display: none; }
    .mvf-filters.mvf-open .mvf-topbar { display: flex; }
    .mvf-filters.mvf-open .mvf-section { display: block; }
}

/* ---- infinite-scroll bottom spinner (no blocking grid overlay) ---- */
.mvf-sentinel { min-height: 1px; }
.mvf-sentinel.mvf-loading-more { min-height: 46px; }
.mvf-sentinel.mvf-loading-more::after {
    content: ""; display: block; width: 26px; height: 26px; margin: 10px auto;
    border: 3px solid #eee; border-top-color: #cba654; border-radius: 50%;
    animation: mvf-spin .8s linear infinite;
}
@keyframes mvf-spin { to { transform: rotate(360deg); } }

/* ---- mobile / tablet: slim bar (סינון right, מיון left) + 80% side drawer ---- */
.mvf-mobile-bar, .mvf-sort-pop { display: none; }
@media (max-width: 1024px) {
    .mvf-mobile-toggle { display: none !important; }
    .mvf-mobile-bar {
        display: flex; position: sticky; top: 0; z-index: 999;
        justify-content: space-between; align-items: center;
        padding: 8px 4px; margin: 0; background: #fff; border-bottom: 1px solid #eee;
    }
    .mvf-mbtn {
        background: none; border: 0; box-shadow: none; color: #111;
        font-family: "futurizem", sans-serif; font-size: 15px; cursor: pointer;
        padding: 6px 8px; display: inline-flex; align-items: center; gap: 6px;
    }
    .mvf-mbtn-filter::before { content: "\2261"; color: #cba654; font-size: 19px; line-height: 1; }
    .mvf-mbtn-sort::after { content: "\21C5"; color: #cba654; font-size: 16px; }
    .mvf-sort-pop {
        position: absolute; left: 2px; top: 100%; margin-top: 4px;
        background: #fff; border: 1px solid #eee; border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,.12); min-width: 190px; z-index: 100002;
        flex-direction: column; overflow: hidden;
    }
    .mvf-sort-pop.mvf-show { display: flex; }
    .mvf-sort-opt {
        background: none; border: 0; text-align: right; padding: 11px 14px;
        font-family: "futurizem", sans-serif; font-size: 14px; cursor: pointer; color: #111;
    }
    .mvf-sort-opt:hover { background: #faf6ec; }
    .mvf-sort-opt.mvf-active { color: #cba654; font-weight: 600; }

    .mvf-filters {
        position: fixed; top: 0; right: 0; height: 100vh; width: 80%; max-width: 380px;
        background: #fff; z-index: 100001; transform: translateX(100%);
        transition: transform .25s ease; overflow-y: auto; padding: 18px 16px 40px;
        box-shadow: -6px 0 24px rgba(0,0,0,.18);
    }
    .mvf-filters.mvf-open { transform: translateX(0); }
    .mvf-filters .mvf-topbar { display: flex; }
    .mvf-filters .mvf-section { display: block; }

    .mvf-backdrop {
        position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100000;
        opacity: 0; visibility: hidden; transition: opacity .25s;
    }
    .mvf-backdrop.mvf-show { opacity: 1; visibility: visible; }
    body.mvf-noscroll { overflow: hidden; }
}

@media (max-width: 1024px) { .mvf-filters .mvf-hide-mobile { display: none; } }

@media (max-width: 1024px) { .mvf-filters .mvf-hide-mobile, .mvf-filters.mvf-open .mvf-section.mvf-hide-mobile { display: none !important; } }

/* sentinel spans the grid column and sits below the products */
.mvf-sentinel { width: 100%; clear: both; flex-basis: 100%; }
/* breathing room between the filters column and the product grid (desktop) */
@media (min-width: 1025px) { .mvf-filters { margin-inline-end: 26px; } }

@media (min-width: 1025px) { .mvf-filters { margin-inline-end: 0; margin-left: 30px; } }

@media (min-width: 1025px) {
    .mvf-filters { margin-left: 0; }
    .elementor-element.elementor-element-5ea282e { margin-inline-start: 30px; }
}

/* mobile bar buttons: no pink tap/active/focus background — light grey instead */
.mvf-mbtn { -webkit-tap-highlight-color: transparent; border-radius: 6px; }
.mvf-mbtn:hover, .mvf-mbtn:focus, .mvf-mbtn:active, .mvf-mbtn:focus-visible,
.mvf-mbtn[aria-expanded="true"] {
    background: #f2f2f2 !important;
    color: #111 !important;
    outline: none !important;
    box-shadow: none !important;
}
.mvf-sort-opt:hover, .mvf-sort-opt:focus, .mvf-sort-opt:active {
    background: #f2f2f2 !important;
    color: #111 !important;
    box-shadow: none !important;
}
.mvf-sort-opt.mvf-active { color: #cba654 !important; font-weight: 600; }

.mvf-mobile-bar button.mvf-mbtn,
.mvf-mobile-bar button.mvf-mbtn:link { background: transparent !important; }
.mvf-mobile-bar button.mvf-mbtn:hover,
.mvf-mobile-bar button.mvf-mbtn:focus,
.mvf-mobile-bar button.mvf-mbtn:active,
.mvf-mobile-bar button.mvf-mbtn[aria-expanded="true"] {
    background: #f1f1f1 !important;
    color: #111 !important;
    outline: none !important;
    box-shadow: none !important;
}

.mvf-mobile-bar button.mvf-mbtn.mvf-pressed { background: #f1f1f1 !important; border-radius: 6px; }

/* ---- faceted narrowing: hide options with no matching products (v1.4) ---- */
.mvf-item.mvf-unavailable { display: none; }

/* faceted-out options must stay hidden even when a list is expanded */
.mvf-item.mvf-unavailable { display: none !important; }
