/* Font globale */
body,
.b2b-filter-wrapper,
#b2b-filter-box,
.b2b-filter,
.b2b-filter-header,
.b2b-parent,
.parent-label,
.subcat,
.subcat label {
  font-family: 'Inclusive Sans', sans-serif;
}

.b2b-dropdown-wrapper{
  font-family: 'Inclusive Sans', sans-serif;
}

/* Wrapper esterno con etichetta-tab */
.b2b-filter-wrapper {
  position: relative;
}

/* Contorno rosso unico */
#b2b-filter-box {
  border: 1px solid #f02900;
  border-radius: 0px 5px 5px 5px;
  padding: 1rem;
}

/* Etichetta-tab fuori dal box */
.b2b-filter-header {
  background-color: #f02900;
  color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
  padding: 0.5rem;
  border-radius: 4px 4px 0px 0px;
  display: inline-block;
}

/* Lista categorie */
.b2b-filter {
  list-style: none;
  margin: 0;
  padding: 1rem 1rem 0rem 1rem;
  border: solid #f02900 1px;
  border-radius: 0px 6px 6px 6px;
}

.b2b-parent {
  margin-bottom: 0.75rem;
}

.parent-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.subcat {
  list-style: none;
  margin: 0.5rem 0 0 0.4rem;
  padding: 0;
  margin-bottom: 1rem;
}

.subcat li {
  margin: 0.25rem 0;
}

.subcat label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Checkbox rossa */
#b2b-filter-box input[type="checkbox"],
.b2b-checkbox {
  accent-color: #f02900;
}

/* Fade AJAX */
#loop-grid-wrapper {
  transition: opacity 0.2s ease;
}

/* ============================================================
   PULSANTE RESET — ANTI-FLASH + CLASSE DI VISIBILITÀ
   ============================================================ */

/* Stile pulsante */
button#b2b-filter-rst,
a#b2b-filter-rst,
.b2b-filter-rst,
.elementor-button#b2b-filter-rst {
  background-color: #2D2D2D !important;
  color: #fff !important;
  font-family: 'Inclusive Sans', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 0.3rem 0.6rem !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem !important;
  transition: background-color 0.25s ease;
}

/* Hover */
button#b2b-filter-rst:hover,
a#b2b-filter-rst:hover,
.elementor-button#b2b-filter-rst:hover {
  background-color: #333 !important;
}

/* Icona */
.b2b-filter-rst .rst-icon-dc {
  color: #fff !important;
  font-size: 0.5rem !important;
  line-height: 1 !important;
}

/* Nascondi SEMPRE al load (anti-flash) */
#b2b-filter-rst,
button#b2b-filter-rst,
a#b2b-filter-rst,
.elementor-button#b2b-filter-rst {
  display: none !important;
}

/* Mostra SOLO quando il JS aggiunge .b2b-show */
#b2b-filter-rst.b2b-show {
  display: inline-flex !important;
}

/* === Slider === */
.noUi-target {
  border-radius: 4px;
  height: 0.2rem;
  margin: 24px 0;
  position: relative;
}

.noUi-connect {
  background: #f02900 !important;
  height: 0.2rem !important;
}

.noUi-handle {
  background: #f02900;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 0.9rem !important;
  height: 0.9rem !important;
  top: -6px;
  cursor: grab;
  box-shadow: none !important;
}

.noUi-horizontal .noUi-handle {
  right: -5px;
}

.noUi-tooltip,
.noUi-handle:after,
.noUi-handle:before {
  visibility: hidden;
}

.noUi-connects {
  background-color: #ccc !important;
  height: 0.2rem !important;
}

.b2b-slider-values{
  position: relative;
  top: -23px;
  color: #2D2D2D;
  font-size: 1rem;
  font-family: 'Inclusive Sans', sans-serif;
}

.b2b-slider-wrapper label{
  position: relative;
  top: 16px;
  font-size: 1rem;
  font-family: 'Inclusive Sans', sans-serif;
  color: #2D2D2D;
}

/* Linee verticali */
.b2b-parent > ul.subcat {
  border-left: 1px solid #f02900;
}

.subcat.subcat-level-2 {
  border-left: 1px solid #f02900;
  margin-top: 0.5rem;
}

/* Traccia orizzontale */
.subcat li label::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 1px;
  background-color: #f02900;
  margin-right: 6px;
  vertical-align: middle;
}

.subcat li {
  margin-left: 10px;
}

.b2b-radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  border: solid #f02900 1px;
  border-radius: 0px 6px 6px 6px;
  padding: 1rem;
}

.b2b-radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inclusive Sans', sans-serif;
}

.b2b-radio {
  accent-color: #f02900;
}

/* ============================
   WRAPPER GENERALE
============================ */
#b2b-filters-wrapper {
    width: 100%;
    margin-bottom: 20px;
}


/* ============================
   BARRA PRINCIPALE
============================ */
#b2b-filters-bar {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

#b2b-filters-bar .b2b-filters-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}


/* ============================
   COLONNE CON PRIORITÀ
============================ */

/* RESET — spazio fisso, intoccabile */
#b2b-filters-bar .col-reset {
    flex: 0 0 140px;   /* spazio garantito */
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

/* Placeholder invisibile per mantenere lo spazio */
#b2b-filters-bar .col-reset::before {
    content: "";
    width: 100%;
    height: 40px;
    visibility: hidden;
    flex-shrink: 0;
}


/* BRAND + TECNOLOGIA — spazio garantito ma non fisso */
#b2b-filters-bar .col-mid {
    flex: 0 0 auto; /* prende lo spazio necessario */
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}


/* RICERCA — prende tutto lo spazio rimanente */
#b2b-filters-bar .col-search {
    flex: 1 1 auto;
    min-width: 0;
}

#b2b-filters-bar .col-search > * {
    width: 100%;
}


/* ============================
   FILTRI AVANZATI
============================ */
.b2b-filters-advanced-btn {
    font-family: "Inclusive Sans", sans-serif;
    color: #2d2d2d !important;
    cursor: pointer;
    text-decoration: underline;
}


/* ============================
   BARRA SECONDARIA (slide-down)
============================ */
#b2b-filters-panel {
    display: block;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
    margin-top: 0;

    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

#b2b-filters-panel.is-open {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
}

#b2b-filters-panel > * {
    display: inline-block;
    vertical-align: middle;
    margin-right: 20px;
    white-space: nowrap;
}

/* Fix Safari iOS per flex + nowrap */
#b2b-filters-bar .b2b-filters-row,
#b2b-filters-panel {
    min-width: 0;
}

#b2b-filters-panel > * {
    flex-shrink: 0;
}
