/* Sexshop.Express — orden y filtros de los listados (SSE_SORT_V2). Prefijo .sse-sort */
.sse-sort { --pk: #fe0141; --ink: #17121a; --mut: #6b6470; --line: #e8dfe3; position: relative; display: flex !important; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 !important; float: none !important; }
.sse-sort *, .sse-sort *::before, .sse-sort *::after { box-sizing: border-box; }
.sse-sort svg { flex-shrink: 0; }
.sse-sort svg[fill="none"], .sse-sort svg[fill="none"] * { fill: none !important; }
.sort-by-row:has(.sse-sort) { display: flex; margin: 0 !important; }
.sort-by-row:has(.sse-sort) > .filter-button { display: none !important; }

.sse-sort__lbl { color: var(--mut); font-size: 14px; white-space: nowrap; }
.sse-sort__btn, .sse-sort__filter { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.sse-sort__btn:hover, .sse-sort__filter:hover, .sse-sort.is-open .sse-sort__btn { border-color: #d9c9d0; box-shadow: 0 4px 14px rgba(23, 18, 26, .06); }
.sse-sort__btn:focus-visible, .sse-sort__filter:focus-visible, .sse-sort__opt:focus-visible { outline: 2px solid var(--pk); outline-offset: 2px; }
.sse-sort__ico { color: var(--pk); }
.sse-sort__chev { color: var(--mut); transition: transform .15s ease; }
.sse-sort.is-open .sse-sort__chev { transform: rotate(180deg); }
.sse-sort__txt-m { display: none; }
.sse-sort__filter { display: none; }
.sse-sort__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pk); color: #fff; font-size: 12px; font-weight: 700; }
.sse-sort__badge[hidden] { display: none; }

/* Desplegable (escritorio) */
.sse-sort__overlay { display: none; }
.sse-sort__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 260px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(23, 18, 26, .12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.sse-sort.is-open .sse-sort__menu { opacity: 1; visibility: visible; transform: none; }
.sse-sort__sheet-head { display: none; }
.sse-sort__opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--ink) !important; font-size: 14.5px; text-decoration: none !important; }
.sse-sort__opt:hover { background: #faf6f7; }
.sse-sort__check { color: var(--pk); visibility: hidden; }
.sse-sort__opt.is-current { font-weight: 700; }
.sse-sort__opt.is-current .sse-sort__check { visibility: visible; }

/* Móvil: «Ordenar» y «Filtrar» lado a lado + hoja inferior */
@media (max-width: 767px) {
  .products-selection .sort-block, .products-selection .sort-block .sort-by-row { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
  .sse-sort { display: grid !important; grid-template-columns: 1fr; gap: 10px; width: 100%; }
  .sse-sort--filters { grid-template-columns: 1fr 1fr; }
  .sse-sort__lbl, .sse-sort__val, .sse-sort__chev { display: none; }
  .sse-sort__txt-m { display: inline; }
  .sse-sort__btn, .sse-sort__filter { display: inline-flex; justify-content: center; width: 100%; }
  .sse-sort__filter svg { color: var(--pk); }
  .sse-sort__overlay { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(23, 18, 26, .45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
  .sse-sort__menu { position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 1001; min-width: 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; border: 0;
    transform: translateY(100%); opacity: 1; transition: transform .22s ease, visibility .22s; box-shadow: 0 -12px 40px rgba(23, 18, 26, .18); }
  .sse-sort.is-open .sse-sort__overlay { opacity: 1; visibility: visible; }
  .sse-sort.is-open .sse-sort__menu { transform: none; }
  .sse-sort__sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
  .sse-sort__close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f5f1f3; color: var(--ink); cursor: pointer; }
  .sse-sort__opt { min-height: 50px; font-size: 15.5px; }
  body.sse-sort-lock { overflow: hidden; }
}
