/* Rimi Top Filters */
.rtf-card {
  background: var(--rtf-bg, #f3f3f3);
  border-radius: 14px;
  padding: 24px 30px;
  margin: 20px 0 30px;
  position: relative;
  z-index: 20;
  overflow: visible;
  clear: both;
}
.rtf-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}
.rtf-toggle { display: none; }

/* wrapper-ul facetelor trebuie sa fie mereu vizibil in card */
.rtf-card #search_filters_wrapper {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}
.rtf-card #search_filters_wrapper > .close,
.rtf-card #search_filters_wrapper .js-search-filters-close { display: none; }

/* ascunde titlul "FILTRARE DUPA" din facete */
.rtf-card #search_filters > .h6,
.rtf-card #search_filters > .text-uppercase,
.rtf-card #search_filters > .facet-title-main,
.rtf-card #search_filters > h4 { display: none; }

/* facetele pe un rand */
.rtf-card #search_filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
}
.rtf-card .facet {
  flex: 1 1 calc(20% - 16px);
  min-width: 170px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  position: relative;
}
.rtf-card .facet .facet-title,
.rtf-card .facet .title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* dropdown-uri ca selectele din blocul de cautare dupa masina */
.rtf-card .facet .facet-dropdown,
.rtf-card .facet .custom-select,
.rtf-card .facet select {
  background: #fff;
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  padding: 0 14px;
  width: 100%;
}
.rtf-card .facet .dropdown-menu { z-index: 50; }

/* prima faceta (ex. Sezon, cu checkbox-uri) pe toata latimea, ca butoane */
.rtf-card .facet:first-child:not(:has(.facet-dropdown)):not(:has(select)) { flex: 1 1 100%; }
.rtf-card .facet:first-child:not(:has(.facet-dropdown)):not(:has(select)) ul {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0;
}
.rtf-card .facet:first-child:not(:has(.facet-dropdown)):not(:has(select)) li {
  background: #fff; border-radius: 8px; padding: 8px 14px; list-style: none;
}

/* filtre active + sterge toate */
.rtf-card #js-active-search-filters,
.rtf-card .active_filters { flex: 1 1 100%; margin: 0 0 8px; }
.rtf-card .clear-all-wrapper { flex: 1 1 100%; }

/* mobil */
@media (max-width: 767px) {
  .rtf-toggle {
    display: block;
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: var(--rtf-accent, #f0233c);
    color: #fff;
    font-weight: 700;
    margin: 15px 0 0;
  }
  .rtf-card { display: none; padding: 16px; margin: 10px 0 20px; }
  .rtf-card.rtf-open { display: block; }
  .rtf-card .facet { flex: 1 1 100%; min-width: 0; }
}
