/* Barre "Trier / Filtrer" des pages listing,
   alignée sur le header luxury (Inter, majuscules espacées, bordures fines). */

/* --- Desktop : sélecteur de tri --- */
@media (min-width: 992px) {
  #js-product-list-top .sort-by-row label[for="select-sort-order"] {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
    white-space: nowrap;
  }

  /* Le select s'adapte à la place restante à côté du label (pas de débordement de colonne) */
  #js-product-list-top .sort-by-row .form-inline {
    flex-wrap: nowrap;
    max-width: 100%;
  }

  #js-product-list-top .sort-by-row .form-inline .form-group {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  #js-product-list-top #select-sort-order {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: 240px;
    height: 44px;
    margin: 0 0 0 0.75rem;
    padding: 0 2.4rem 0 1rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 2px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 8px;
    box-shadow: none;
    font-family: Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 42px;
    text-transform: uppercase;
    color: #111;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
  }

  #js-product-list-top #select-sort-order:hover,
  #js-product-list-top #select-sort-order:focus {
    border-color: #111;
    outline: 0;
    box-shadow: none;
  }
}

/* --- Mobile & tablette : sélecteur de tri + bouton Filtrer --- */
@media (max-width: 991.98px) {
  #js-product-list-top .sort-by-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  #js-product-list-top .sort-by-row .form-inline {
    flex: 1 1 auto;
    min-width: 0;
  }

  #js-product-list-top .sort-by-row .form-inline .form-group {
    width: 100%;
  }

  #js-product-list-top #select-sort-order {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 2.4rem 0 1rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 2px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 8px;
    box-shadow: none;
    font-family: Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 42px;
    text-transform: uppercase;
    color: #111;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  #js-product-list-top #select-sort-order:focus {
    border-color: #111;
    outline: 0;
    box-shadow: none;
  }

  #js-product-list-top #search_filter_toggler {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 128px;
    height: 44px;
    margin: 0;
    padding: 0 1.25rem;
    border: 1px solid #111;
    border-radius: 2px;
    background-color: #111;
    background-image: none;
    box-shadow: none;
    font-family: Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  /* Pictogramme "filtres" (3 lignes) */
  #js-product-list-top #search_filter_toggler::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 10px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M0 1h14M2.5 5h9M5 9h4' stroke='%23fff' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px 10px;
  }

  #js-product-list-top #search_filter_toggler:hover,
  #js-product-list-top #search_filter_toggler:focus,
  #js-product-list-top #search_filter_toggler:active {
    background-color: #fff;
    color: #111;
    border-color: #111;
    outline: 0;
    box-shadow: none;
  }

  #js-product-list-top #search_filter_toggler:hover::before,
  #js-product-list-top #search_filter_toggler:focus::before,
  #js-product-list-top #search_filter_toggler:active::before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M0 1h14M2.5 5h9M5 9h4' stroke='%23111' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}
