/* t143 r6: match M1 :8088 MEASURED layout (mobile + desktop)
   Refs:
   - /workspace/compare-shots/M1-8088-toolbar-mobile-target.png (390px)
   - /workspace/compare-shots/M1-8088-toolbar-desktop-target.png (1280×800)
   - user phone 01M63CPVKVAE4HRRXETX6D318W.jpg
   Reverses r5 wrongs: chevron LEFT, Sort/Show space-between, pager center MOBILE only.
   Desktop: no FILTER bar, Sort LEFT + amount/Show RIGHT, pager LEFT under Sort.
   Loads LAST on category (after r5 or replaces layout ref). */

/* ========== Mobile FILTER: black bar, ▶ LEFT then FILTER ========== */
@media (max-width:767px){
  html body.catalog-category-view .block.filter .filter-title,
  html body.catalog-category-view #layered-filter-block .filter-title,
  html body.catalogsearch-result-index .block.filter .filter-title,
  html body.catalogsearch-result-index #layered-filter-block .filter-title{
    display:block!important;
    margin:0 0 10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }
  html body.catalog-category-view .block.filter .filter-title strong,
  html body.catalog-category-view #layered-filter-block .filter-title strong,
  html body.catalog-category-view .filter-title strong,
  html body.catalogsearch-result-index .block.filter .filter-title strong,
  html body.catalogsearch-result-index #layered-filter-block .filter-title strong{
    display:block!important;
    position:relative!important;
    width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:10px 14px 10px 28px!important; /* room for LEFT chevron */
    border:0!important;
    border-radius:0!important;
    background:#333333!important;
    color:#ffffff!important;
    font:700 14px/1.4 Raleway,"Helvetica Neue",Helvetica,Arial,sans-serif!important;
    text-transform:uppercase!important;
    letter-spacing:.04em!important;
    text-align:left!important;
    box-shadow:none!important;
    cursor:pointer!important;
    font-size:0!important;
    line-height:0!important;
  }
  html body.catalog-category-view .block.filter .filter-title strong:before,
  html body.catalog-category-view #layered-filter-block .filter-title strong:before,
  html body.catalog-category-view .filter-title strong:before,
  html body.catalogsearch-result-index .block.filter .filter-title strong:before,
  html body.catalogsearch-result-index #layered-filter-block .filter-title strong:before{
    content:"FILTER"!important;
    display:inline-block!important;
    font:700 14px/1.4 Raleway,"Helvetica Neue",Helvetica,Arial,sans-serif!important;
    color:#fff!important;
    letter-spacing:.04em!important;
    text-transform:uppercase!important;
    vertical-align:middle!important;
  }
  /* white ▶ on the LEFT (M1 measured) — override r5 right */
  html body.catalog-category-view .block.filter .filter-title strong:after,
  html body.catalog-category-view #layered-filter-block .filter-title strong:after,
  html body.catalog-category-view .filter-title strong:after,
  html body.catalogsearch-result-index .block.filter .filter-title strong:after,
  html body.catalogsearch-result-index #layered-filter-block .filter-title strong:after{
    content:""!important;
    display:block!important;
    position:absolute!important;
    left:12px!important;
    right:auto!important;
    top:50%!important;
    width:0!important;height:0!important;
    margin-top:-5px!important;
    border-top:5px solid transparent!important;
    border-bottom:5px solid transparent!important;
    border-left:7px solid #fff!important;
    border-right:none!important;
    background:none!important;
  }
  html body.catalog-category-view .filter.active .filter-title strong,
  html body.catalog-category-view #layered-filter-block.filter.active .filter-title strong,
  html body.catalog-category-view #layered-filter-block.active .filter-title strong{
    background:#2c4482!important;
    color:#fff!important;
    border:0!important;
    font-size:0!important;
  }
}

/* Desktop: NO black FILTER bar in main column — sidebar Shop By only */
@media (min-width:768px){
  html body.catalog-category-view .block.filter .filter-title strong:before,
  html body.catalog-category-view #layered-filter-block .filter-title strong:before,
  html body.catalog-category-view .filter-title strong:before,
  html body.catalogsearch-result-index .block.filter .filter-title strong:before,
  html body.catalogsearch-result-index #layered-filter-block .filter-title strong:before,
  html body.catalog-category-view .block.filter .filter-title strong:after,
  html body.catalog-category-view #layered-filter-block .filter-title strong:after,
  html body.catalog-category-view .filter-title strong:after,
  html body.catalogsearch-result-index .block.filter .filter-title strong:after,
  html body.catalogsearch-result-index #layered-filter-block .filter-title strong:after{
    content:none!important;
    display:none!important;
  }
}

/* ========== Toolbar card shell ========== */
html body.catalog-category-view .toolbar.toolbar-products,
html body.catalogsearch-result-index .toolbar.toolbar-products{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  align-content:flex-start!important;
  justify-content:flex-start!important;
  gap:8px 8px!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  margin:0 0 14px!important;
  padding:8px 10px!important;
  background:#eef1f7!important;
  border:1px solid #d5dbe6!important;
  border-radius:10px!important;
  box-shadow:none!important;
}

/* Hide modes + "per page" always */
html body.catalog-category-view .toolbar .modes,
html body.catalogsearch-result-index .toolbar .modes,
html body.catalog-category-view .toolbar .limiter-text,
html body.catalogsearch-result-index .toolbar .limiter-text{
  display:none!important;
}

/* Amount: mobile HIDDEN; desktop shown on RIGHT with Show (media below) */
html body.catalog-category-view .toolbar .toolbar-amount,
html body.catalog-category-view .toolbar #toolbar-amount,
html body.catalogsearch-result-index .toolbar .toolbar-amount,
html body.catalogsearch-result-index .toolbar #toolbar-amount{
  display:none!important;
}

/* —— Sort By LEFT —— */
html body.catalog-category-view .toolbar .toolbar-sorter,
html body.catalog-category-view .toolbar .sorter,
html body.catalogsearch-result-index .toolbar .toolbar-sorter,
html body.catalogsearch-result-index .toolbar .sorter{
  display:inline-flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:6px!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
  order:1!important;
  flex:0 0 auto!important;
  width:auto!important;
  max-width:100%!important;
  white-space:nowrap!important;
  min-height:0!important;
  height:auto!important;
}

/* —— Show RIGHT via margin-left:auto (space-between) — override r5 pack-left —— */
html body.catalog-category-view .toolbar .field.limiter,
html body.catalog-category-view .toolbar .limiter,
html body.catalogsearch-result-index .toolbar .field.limiter,
html body.catalogsearch-result-index .toolbar .limiter{
  display:inline-flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:6px!important;
  float:none!important;
  margin:0 0 0 auto!important; /* CRITICAL: push Show to RIGHT */
  padding:0!important;
  order:3!important;
  flex:0 0 auto!important;
  width:auto!important;
  white-space:nowrap!important;
  min-height:0!important;
  height:auto!important;
}
html body.catalog-category-view .toolbar .limiter .control,
html body.catalogsearch-result-index .toolbar .limiter .control{
  display:inline-block!important;
  margin:0!important;padding:0!important;width:auto!important;
}

/* Force Sort By / Show labels visible (undo catalog-modern clip) */
html body.catalog-category-view .toolbar .sorter-label,
html body.catalog-category-view .sorter-label,
html body.catalog-category-view .toolbar .limiter .label,
html body.catalog-category-view .toolbar .limiter label,
html body.catalogsearch-result-index .toolbar .sorter-label,
html body.catalogsearch-result-index .sorter-label,
html body.catalogsearch-result-index .toolbar .limiter .label,
html body.catalogsearch-result-index .toolbar .limiter label{
  display:inline-block!important;
  position:static!important;
  clip:auto!important;
  clip-path:none!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  max-width:none!important;
  overflow:visible!important;
  margin:0 4px 0 0!important;
  padding:0!important;
  font-size:13px!important;
  font-weight:600!important;
  color:#5b6472!important;
  line-height:34px!important;
  white-space:nowrap!important;
  text-indent:0!important;
  left:auto!important;top:auto!important;
}
html body.catalog-category-view .toolbar .limiter .label>span,
html body.catalogsearch-result-index .toolbar .limiter .label>span{
  font:inherit!important;color:inherit!important;
  position:static!important;clip:auto!important;width:auto!important;height:auto!important;overflow:visible!important;
}

html body.catalog-category-view .toolbar select,
html body.catalogsearch-result-index .toolbar select{
  -webkit-appearance:none!important;appearance:none!important;
  display:inline-block!important;
  height:34px!important;min-height:34px!important;
  margin:0!important;
  padding:0 26px 0 10px!important;
  border:1px solid #cfd6e4!important;border-radius:6px!important;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235b6472' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center!important;
  color:#1f2937!important;
  font-size:14px!important;font-weight:500!important;line-height:32px!important;
  box-shadow:none!important;
  vertical-align:middle!important;
}
html body.catalog-category-view .toolbar #sorter,
html body.catalog-category-view .toolbar .sorter-options,
html body.catalogsearch-result-index .toolbar #sorter,
html body.catalogsearch-result-index .toolbar .sorter-options{
  width:auto!important;min-width:90px!important;max-width:118px!important;
}
html body.catalog-category-view .toolbar #limiter,
html body.catalog-category-view .toolbar .limiter-options,
html body.catalogsearch-result-index .toolbar #limiter,
html body.catalogsearch-result-index .toolbar .limiter-options{
  width:auto!important;min-width:52px!important;max-width:68px!important;
}

html body.catalog-category-view .toolbar .action.sorter-action,
html body.catalog-category-view .toolbar .sorter-action,
html body.catalogsearch-result-index .toolbar .action.sorter-action,
html body.catalogsearch-result-index .toolbar .sorter-action{
  display:inline-flex!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 34px!important;
  width:34px!important;height:34px!important;min-width:34px!important;
  margin:0!important;padding:0!important;
  border:1px solid #cfd6e4!important;border-radius:6px!important;
  background:#fff!important;
  vertical-align:middle!important;
}

/* —— Pages row: full width under Sort/Show —— */
html body.catalog-category-view .toolbar.toolbar-products .pages,
html body.catalog-category-view .toolbar .pages,
html body.catalogsearch-result-index .toolbar.toolbar-products .pages,
html body.catalogsearch-result-index .toolbar .pages{
  display:block!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
  order:4!important;
  flex:1 1 100%!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
}
html body.catalog-category-view .toolbar .pages .pages-label,
html body.catalogsearch-result-index .toolbar .pages .pages-label{
  position:absolute!important;width:1px!important;height:1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;
  font-size:0!important;line-height:0!important;
}
html body.catalog-category-view .toolbar .pages .item,
html body.catalog-category-view .toolbar-products .pages .item,
html body.catalogsearch-result-index .toolbar .pages .item,
html body.catalogsearch-result-index .toolbar-products .pages .item{
  display:block!important;margin:0!important;padding:0!important;float:none!important;
  width:auto!important;height:auto!important;background:none!important;border:0!important;
  flex:0 0 auto!important;
}
html body.catalog-category-view .toolbar.toolbar-products .pages .page,
html body.catalog-category-view .toolbar.toolbar-products .pages .action,
html body.catalog-category-view .toolbar .pages .page,
html body.catalog-category-view .toolbar .pages .action,
html body.catalog-category-view .toolbar-products .pages .page,
html body.catalog-category-view .toolbar-products .pages .action,
html body.catalogsearch-result-index .toolbar.toolbar-products .pages .page,
html body.catalogsearch-result-index .toolbar.toolbar-products .pages .action,
html body.catalogsearch-result-index .toolbar .pages .page,
html body.catalogsearch-result-index .toolbar .pages .action{
  display:inline-flex!important;
  align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;
  min-width:34px!important;width:34px!important;max-width:34px!important;height:34px!important;
  padding:0!important;margin:0!important;
  background:#fff!important;
  border:1px solid #cfd6e4!important;
  border-radius:6px!important;
  color:#1f2937!important;
  font-size:14px!important;font-weight:600!important;
  text-decoration:none!important;line-height:1!important;
}
html body.catalog-category-view .toolbar .pages .item.current .page,
html body.catalog-category-view .toolbar .pages strong.page,
html body.catalogsearch-result-index .toolbar .pages .item.current .page{
  background:#2c4482!important;
  border-color:#2c4482!important;
  color:#fff!important;
}

html body.catalog-category-view .toolbar .pages .item .label,
html body.catalog-category-view .toolbar .pages .label,
html body.catalogsearch-result-index .toolbar .pages .item .label,
html body.catalogsearch-result-index .toolbar .pages .label{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
  display:block!important;font-size:0!important;line-height:0!important;color:transparent!important;
}
html body.catalog-category-view .toolbar .pages .item .page > span:not(.label),
html body.catalog-category-view .toolbar .pages .item strong.page > span:not(.label),
html body.catalogsearch-result-index .toolbar .pages .item .page > span:not(.label),
html body.catalogsearch-result-index .toolbar .pages .item strong.page > span:not(.label){
  font-size:14px!important;line-height:1!important;color:inherit!important;
}

html body.catalog-category-view .toolbar .pages .action.next,
html body.catalog-category-view .toolbar .pages .action.previous,
html body.catalogsearch-result-index .toolbar .pages .action.next,
html body.catalogsearch-result-index .toolbar .pages .action.previous{
  font-size:0!important;color:#2c4482!important;position:relative!important;
}
html body.catalog-category-view .toolbar .pages .action.next > span,
html body.catalog-category-view .toolbar .pages .action.previous > span,
html body.catalogsearch-result-index .toolbar .pages .action.next > span,
html body.catalogsearch-result-index .toolbar .pages .action.previous > span{
  font-size:0!important;line-height:0!important;color:transparent!important;
}
html body.catalog-category-view .toolbar .pages .action.next:before,
html body.catalogsearch-result-index .toolbar .pages .action.next:before{
  content:""!important;display:block!important;
  width:8px!important;height:8px!important;
  border:solid currentColor!important;border-width:2px 2px 0 0!important;
  transform:translateX(-1px) rotate(45deg)!important;
  background:none!important;
}
html body.catalog-category-view .toolbar .pages .action.previous:before,
html body.catalogsearch-result-index .toolbar .pages .action.previous:before{
  content:""!important;display:block!important;
  width:8px!important;height:8px!important;
  border:solid currentColor!important;border-width:0 0 2px 2px!important;
  transform:translateX(1px) rotate(45deg)!important;
  background:none!important;
}

/* ========== MOBILE: pager CENTERED; Sort left / Show right; amount hidden ========== */
@media (max-width:767px){
  html body.catalog-category-view .toolbar.toolbar-products,
  html body.catalogsearch-result-index .toolbar.toolbar-products{
    padding:8px 10px!important;
    gap:8px 6px!important;
  }
  html body.catalog-category-view .toolbar .toolbar-amount,
  html body.catalog-category-view .toolbar #toolbar-amount,
  html body.catalogsearch-result-index .toolbar .toolbar-amount,
  html body.catalogsearch-result-index .toolbar #toolbar-amount{
    display:none!important;
  }
  html body.catalog-category-view .toolbar .toolbar-sorter,
  html body.catalog-category-view .toolbar .sorter,
  html body.catalogsearch-result-index .toolbar .toolbar-sorter,
  html body.catalogsearch-result-index .toolbar .sorter{
    flex:0 0 auto!important;
    min-width:0!important;
    order:1!important;
  }
  html body.catalog-category-view .toolbar .field.limiter,
  html body.catalog-category-view .toolbar .limiter,
  html body.catalogsearch-result-index .toolbar .field.limiter,
  html body.catalogsearch-result-index .toolbar .limiter{
    margin:0 0 0 auto!important; /* Show RIGHT; may wrap still right-ish */
    flex:0 0 auto!important;
    order:3!important;
  }
  html body.catalog-category-view .toolbar select,
  html body.catalogsearch-result-index .toolbar select{
    font-size:16px!important; /* iOS zoom avoid */
    height:34px!important;min-height:34px!important;line-height:32px!important;
  }
  html body.catalog-category-view .toolbar .sorter-label,
  html body.catalog-category-view .toolbar .limiter .label,
  html body.catalogsearch-result-index .toolbar .sorter-label,
  html body.catalogsearch-result-index .toolbar .limiter .label{
    display:inline-block!important;
    position:static!important;
    clip:auto!important;
    width:auto!important;height:auto!important;overflow:visible!important;
    font-size:13px!important;
    line-height:34px!important;
  }
  /* PAGER CENTERED — override r5 left + reinforce vs m1match-r4 */
  html body.catalog-category-view .toolbar.toolbar-products .pages,
  html body.catalog-category-view .toolbar .pages,
  html body.catalogsearch-result-index .toolbar.toolbar-products .pages,
  html body.catalogsearch-result-index .toolbar .pages{
    text-align:center!important;
    order:4!important;
    flex:1 1 100%!important;
  }
  html body.catalog-category-view .toolbar.toolbar-products .pages .pages-items,
  html body.catalog-category-view .toolbar .pages .pages-items,
  html body.catalog-category-view .toolbar-products .pages .pages-items,
  html body.catalogsearch-result-index .toolbar.toolbar-products .pages .pages-items,
  html body.catalogsearch-result-index .toolbar .pages .pages-items,
  html body.catalogsearch-result-index .toolbar-products .pages .pages-items{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:center!important; /* CENTER mobile — not flex-start */
    gap:4px!important;
    margin:0 auto!important;
    padding:0!important;
    list-style:none!important;
    width:auto!important;
    max-width:100%!important;
  }
  html body.catalog-category-view .toolbar .pages .page,
  html body.catalog-category-view .toolbar .pages .action,
  html body.catalogsearch-result-index .toolbar .pages .page,
  html body.catalogsearch-result-index .toolbar .pages .action{
    min-width:34px!important;width:34px!important;max-width:34px!important;height:34px!important;
  }
}

/* ========== DESKTOP (≥768): amount+Show RIGHT; pager LEFT under Sort ========== */
@media (min-width:768px){
  html body.catalog-category-view .toolbar.toolbar-products,
  html body.catalogsearch-result-index .toolbar.toolbar-products{
    padding:10px 12px!important;
    gap:10px 10px!important;
  }
  /* Show amount on RIGHT, before Show (order 2, margin-left auto) */
  html body.catalog-category-view .toolbar .toolbar-amount,
  html body.catalog-category-view .toolbar #toolbar-amount,
  html body.catalogsearch-result-index .toolbar .toolbar-amount,
  html body.catalogsearch-result-index .toolbar #toolbar-amount{
    display:inline-block!important;
    float:none!important;
    margin:0 8px 0 auto!important; /* pushes amount+Show cluster right */
    padding:0!important;
    order:2!important;
    flex:0 0 auto!important;
    width:auto!important;
    white-space:nowrap!important;
    font-size:13px!important;
    font-weight:600!important;
    color:#5b6472!important;
    line-height:36px!important;
    vertical-align:middle!important;
  }
  html body.catalog-category-view .toolbar .field.limiter,
  html body.catalog-category-view .toolbar .limiter,
  html body.catalogsearch-result-index .toolbar .field.limiter,
  html body.catalogsearch-result-index .toolbar .limiter{
    margin:0!important; /* amount already has margin-left:auto */
    order:3!important;
  }
  html body.catalog-category-view .toolbar .pages .page,
  html body.catalog-category-view .toolbar .pages .action,
  html body.catalogsearch-result-index .toolbar .pages .page,
  html body.catalogsearch-result-index .toolbar .pages .action{
    min-width:36px!important;width:36px!important;max-width:36px!important;height:36px!important;
  }
  html body.catalog-category-view .toolbar select,
  html body.catalogsearch-result-index .toolbar select,
  html body.catalog-category-view .toolbar .action.sorter-action,
  html body.catalogsearch-result-index .toolbar .action.sorter-action{
    height:36px!important;min-height:36px!important;
  }
  html body.catalog-category-view .toolbar .action.sorter-action,
  html body.catalogsearch-result-index .toolbar .action.sorter-action{
    width:36px!important;flex-basis:36px!important;
  }
  /* PAGER LEFT-aligned with Sort By — NOT centered (override m1match-r4 center) */
  html body.catalog-category-view .toolbar.toolbar-products .pages,
  html body.catalog-category-view .toolbar .pages,
  html body.catalogsearch-result-index .toolbar.toolbar-products .pages,
  html body.catalogsearch-result-index .toolbar .pages{
    text-align:left!important;
    order:4!important;
    flex:1 1 100%!important;
  }
  html body.catalog-category-view .toolbar.toolbar-products .pages .pages-items,
  html body.catalog-category-view .toolbar .pages .pages-items,
  html body.catalog-category-view .toolbar-products .pages .pages-items,
  html body.catalogsearch-result-index .toolbar.toolbar-products .pages .pages-items,
  html body.catalogsearch-result-index .toolbar .pages .pages-items,
  html body.catalogsearch-result-index .toolbar-products .pages .pages-items{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important; /* LEFT desktop */
    gap:5px!important;
    margin:0!important;
    padding:0!important;
    list-style:none!important;
    width:auto!important;
    max-width:100%!important;
  }
}

@media (max-width:379px){
  html body.catalog-category-view .toolbar .sorter-label,
  html body.catalogsearch-result-index .toolbar .sorter-label{
    display:inline-block!important;
    position:static!important;
    clip:auto!important;
    width:auto!important;height:auto!important;overflow:visible!important;
    font-size:12px!important;
  }
}
