/* V153 — responsive quick-filter layout cleanup when resizing desktop */

/* Fix quick filters becoming long/ragged rows when the screen is resized */
@media (min-width: 721px){
  body.order-redesign #shopFinder.finder-top-dock .quick-shop-wrap,
  body.order-redesign #shopFinder .quick-shop-wrap{
    margin:0 0 14px!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons,
  body.order-redesign #shopFinder .quick-shop-buttons{
    display:grid!important;
    grid-template-columns:repeat(5, minmax(0, 1fr))!important;
    gap:12px!important;
    width:100%!important;
    margin:0 auto!important;
    justify-content:stretch!important;
    align-items:stretch!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons > .quick-filter-btn,
  body.order-redesign #shopFinder .quick-shop-buttons > .quick-filter-btn{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    flex:none!important;
    min-height:54px!important;
    height:54px!important;
    padding:0 14px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    font-size:13px!important;
    font-weight:800!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-filter-label,
  body.order-redesign #shopFinder .quick-filter-label{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-filter-count,
  body.order-redesign #shopFinder .quick-filter-count{
    flex:0 0 auto!important;
  }
}

/* Large laptop / mid desktop */
@media (min-width: 1100px) and (max-width: 1399px){
  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons,
  body.order-redesign #shopFinder .quick-shop-buttons{
    grid-template-columns:repeat(4, minmax(0, 1fr))!important;
  }
}

/* Narrow laptop */
@media (min-width: 900px) and (max-width: 1099px){
  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons,
  body.order-redesign #shopFinder .quick-shop-buttons{
    grid-template-columns:repeat(3, minmax(0, 1fr))!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons > .quick-filter-btn,
  body.order-redesign #shopFinder .quick-shop-buttons > .quick-filter-btn{
    font-size:12px!important;
    padding:0 12px!important;
  }
}

/* Wide tablet / very narrow desktop */
@media (min-width: 721px) and (max-width: 899px){
  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons,
  body.order-redesign #shopFinder .quick-shop-buttons{
    grid-template-columns:repeat(2, minmax(0, 1fr))!important;
    gap:10px!important;
  }

  body.order-redesign #shopFinder.finder-top-dock .quick-shop-buttons > .quick-filter-btn,
  body.order-redesign #shopFinder .quick-shop-buttons > .quick-filter-btn{
    min-height:50px!important;
    height:50px!important;
    font-size:12px!important;
    padding:0 12px!important;
  }
}
