@media (max-width: 520px) {
  body.harry-page-category .harry-range-slider-block {
    padding: 0.72rem 0.62rem;
  }

  body.harry-page-category .harry-range-slider-header {
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  body.harry-page-category .harry-drawer-label--range,
  body.harry-page-category .harry-range-slider-header > .harry-drawer-label {
    min-width: 0;
    font-size: 0.64rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  body.harry-page-category .harry-range-values-display,
  body.harry-page-category .harry-range-values-display--compact {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.18rem;
    font-size: 0.7rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  body.harry-page-category .harry-range-values-display .harry-val-bubble {
    padding: 0.08rem 0.22rem;
  }
}

/* Recherche globale du catalogue : produits, marques et catégories. */
#harry-inline-search-wrapper {
  position: relative;
}

.harry-inline-search-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.55rem);
  right: 0;
  display: none;
  width: min(31rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 9rem));
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid #d8e2e3;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(24, 45, 47, 0.18);
}

.harry-inline-search-results.harry-is-visible {
  display: block;
}

.harry-inline-search-section + .harry-inline-search-section {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #edf1f1;
}

.harry-inline-search-heading {
  margin: 0.35rem 0.65rem 0.25rem;
  color: #637174;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
}

.harry-inline-search-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.harry-inline-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.12rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  color: #263238;
  text-decoration: none;
}

.harry-inline-search-result-content {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.harry-inline-search-result-image {
  width: 2.7rem;
  height: 2.7rem;
  margin-left: 0.55rem;
  object-fit: contain;
}

.harry-inline-search-result:hover,
.harry-inline-search-result:focus-visible {
  background: #eef8f7;
  outline: none;
}

.harry-inline-search-result-label {
  color: #008b82;
  font-size: 0.9rem;
  font-weight: 800;
}

.harry-inline-search-result-meta,
.harry-inline-search-empty {
  color: #68777a;
  font-size: 0.76rem;
  line-height: 1.35;
}

.harry-inline-search-empty {
  margin: 0;
  padding: 0.65rem;
}

@media (max-width: 700px) {
  .harry-inline-search-results {
    right: auto;
    left: 0;
    width: min(100vw - 2rem, 31rem);
  }
}

/* Recherche dans la barre mobile : loupe entre les filtres et le tri. */
.harry-mobile-search-trigger,
.harry-mobile-search-slot {
  display: none;
}

@media (max-width: 868px) {
  .harry-mobile-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.75rem 4.7rem;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    box-sizing: border-box;
  }

  .harry-mobile-filter-trigger {
    width: 100%;
    min-width: 0;
  }

  .harry-mobile-search-trigger {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid #d8e2e3;
    border-radius: 999px;
    background: #fff;
    color: #008b82;
  }

  .harry-mobile-search-trigger svg {
    display: block;
  }

  .harry-mobile-sort-wrapper {
    width: 100%;
    min-width: 0;
  }

  .harry-mobile-filter-bar.harry-is-search-active {
    grid-template-columns: 2.75rem minmax(0, 1fr) 4.7rem;
    gap: 0.35rem;
  }

  .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-filter-trigger {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
  }

  .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-filter-trigger span,
  .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-search-trigger {
    display: none;
  }

  .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-search-slot {
    display: block;
    min-width: 0;
  }

  .harry-mobile-search-slot .harry-filter-search-inline,
  .harry-mobile-search-slot #harry-inline-search-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: visible;
  }

  .harry-mobile-search-slot .harry-filter-search-btn-toggle {
    display: none;
  }

  .harry-mobile-search-slot #harry-inline-search-input {
    display: block;
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: 0 0.85rem;
    border: 1px solid #008b82;
    border-radius: 999px;
    opacity: 1;
    box-sizing: border-box;
  }

  .harry-mobile-search-slot .harry-inline-search-results {
    right: auto;
    left: auto;
    width: min(31rem, calc(100vw - 2rem));
  }
}

/* Répartition finale de la barre mobile : 50 / 25 / 25, puis 25 / 50 / 25 ouverte. */
@media (max-width: 868px) {
  body.harry-page-category .harry-mobile-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
  }

  body.harry-page-category .harry-mobile-filter-trigger,
  body.harry-page-category .harry-mobile-search-trigger,
  body.harry-page-category .harry-mobile-sort-wrapper,
  body.harry-page-category .harry-mobile-sort-wrapper .harry-custom-select-trigger {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  body.harry-page-category .harry-mobile-search-trigger {
    display: inline-grid !important;
    place-items: center;
  }

  body.harry-page-category .harry-mobile-search-slot {
    display: none !important;
    min-width: 0 !important;
  }

  body.harry-page-category .harry-mobile-filter-bar.harry-is-search-active {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr) !important;
  }

  body.harry-page-category .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-filter-trigger {
    display: inline-grid !important;
    place-items: center;
    padding: 0 !important;
  }

  body.harry-page-category .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-filter-trigger span,
  body.harry-page-category .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-search-trigger {
    display: none !important;
  }

  body.harry-page-category .harry-mobile-filter-bar.harry-is-search-active .harry-mobile-search-slot {
    display: block !important;
  }

  body.harry-page-category .harry-mobile-search-slot .harry-filter-search-inline,
  body.harry-page-category .harry-mobile-search-slot #harry-inline-search-wrapper {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.harry-page-category .harry-mobile-search-slot .harry-filter-search-btn-toggle {
    display: none !important;
  }

  body.harry-page-category .harry-mobile-search-slot #harry-inline-search-input {
    display: block !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 0.75rem !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
  }
}
