
/* Dedicated category layout repair; scoped to the existing generic categories dialog. */
#backdrop:has(.cat-grid-item) {padding:12px!important;box-sizing:border-box!important}
#backdrop:has(.cat-grid-item) > .modal{
 position:relative!important;inset:auto!important;
 width:min(100%,600px)!important;max-width:600px!important;
 min-width:0!important;max-height:calc(100dvh - 36px)!important;
 margin:auto!important;box-sizing:border-box!important;
 transform:scale(1)!important;
}
#backdrop:has(.cat-grid-item) .modal-body{
 max-height:calc(100dvh - 120px)!important;
 overflow-x:hidden!important;overflow-y:auto!important;
 min-width:0!important;box-sizing:border-box!important;
}
#backdrop:has(.cat-grid-item) #modal-content-area > .grid:first-child{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:12px 8px!important;width:100%!important;min-width:0!important;
}
#backdrop:has(.cat-grid-item) .cat-grid-item{min-width:0!important;max-width:100%!important;overflow:hidden!important;align-items:center!important}
#backdrop:has(.cat-grid-item) .cat-grid-item > div:first-child{
 width:min(100%,96px)!important;height:auto!important;aspect-ratio:1/1!important;
 min-width:0!important;flex-shrink:0!important;
}
#backdrop:has(.cat-grid-item) .cat-grid-item img{width:100%!important;height:100%!important;object-fit:cover!important}
#backdrop:has(.cat-grid-item) .cat-grid-item > span{
 display:-webkit-box!important;-webkit-box-orient:vertical!important;
 -webkit-line-clamp:2!important;line-clamp:2!important;
 overflow:hidden!important;text-overflow:ellipsis!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
 line-height:1.4!important;max-width:100%!important;min-height:2.8em!important;
 font-size:12px!important;text-align:center!important;
}
@media(min-width:560px){
 #backdrop:has(.cat-grid-item) #modal-content-area > .grid:first-child{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}


/* AISTORE isolated category rail: wide one-line labels, compact height. */
#filter-wrapper {max-width:100vw!important;overflow:hidden!important}
#filter-wrapper #filter-container{
 display:flex!important;flex-direction:column!important;min-width:0!important;
 max-width:100%!important;width:100%!important;overflow:hidden!important;
 padding:2px 0 3px!important;gap:3px!important;box-sizing:border-box!important;
}
#filter-wrapper .oms-main-category-row {
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
 justify-content:flex-start!important;gap:30px!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 overflow-x:auto!important;overflow-y:hidden!important;
 padding:4px 22px 7px!important;box-sizing:border-box!important;
 scrollbar-width:none!important;-webkit-overflow-scrolling:touch;
 scroll-snap-type:x proximity;overscroll-behavior-x:contain;
}
#filter-wrapper .oms-main-category-row::-webkit-scrollbar,
#filter-wrapper #subcategories-row-container::-webkit-scrollbar{display:none}
#filter-wrapper .oms-main-category-row > button.filter-btn {
 display:flex!important;flex-flow:column nowrap!important;align-items:center!important;
 justify-content:center!important;gap:4px!important;flex:0 0 auto!important;
 width:max-content!important;min-width:max-content!important;max-width:none!important;
 margin:0!important;padding:0 10px!important;box-sizing:border-box!important;
 overflow:visible!important;white-space:nowrap!important;scroll-snap-align:start;
}
#filter-wrapper .oms-main-category-row > button.filter-btn > .img-wrapper{
 width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;
 flex:0 0 52px!important;margin:0 auto!important;
}
#filter-wrapper .oms-main-category-row > button.filter-btn > span{
 display:block!important;position:static!important;width:max-content!important;
 min-width:max-content!important;max-width:none!important;white-space:nowrap!important;
 overflow:visible!important;text-overflow:clip!important;
 height:20px!important;min-height:20px!important;line-height:20px!important;
 font-size:12px!important;text-align:center!important;
 letter-spacing:0!important;transform:none!important;padding:0!important;margin:0!important;
}
#filter-wrapper .oms-main-category-row > .filter-separator{
 flex:0 0 1px!important;width:1px!important;min-width:1px!important;max-width:1px!important;
 height:24px!important;margin:0!important;align-self:center!important;
}
/* Separate, independently scrolling row for subcategories, pill centered label. */
#filter-wrapper #subcategories-row-container.subcategories-dropdown.show{
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
 justify-content:flex-start!important;gap:14px!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 padding:5px 15px 8px!important;margin:0!important;box-sizing:border-box!important;
 overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
 -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
}
#filter-wrapper #subcategories-row-container > button.filter-btn {
 display:inline-flex!important;flex-direction:row!important;flex:0 0 auto!important;
 align-items:center!important;justify-content:center!important;gap:7px!important;
 width:max-content!important;min-width:max-content!important;max-width:none!important;
 min-height:35px!important;margin:0!important;padding:5px 14px!important;
 border-radius:999px!important;box-sizing:border-box!important;
 white-space:nowrap!important;overflow:visible!important;
}
#filter-wrapper #subcategories-row-container > button.filter-btn > img {
 width:24px!important;height:24px!important;flex:0 0 24px!important;object-fit:cover!important;
}
#filter-wrapper #subcategories-row-container > button.filter-btn > span{
 display:block!important;position:static!important;flex:0 0 auto!important;
 width:max-content!important;max-width:none!important;min-width:max-content!important;
 white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;
 text-align:center!important;line-height:22px!important;font-size:12px!important;
 padding:0!important;margin:0!important;transform:none!important;
}
