/* Catalog sidebar icon tiles (catalog-style, JM green). One tile family for categories, subcategories
   and the mobile subcategory strip. Markup + trimmed tile images: tools/i18n/patch_sidetiles.py */
:root{--jm-tile-bg:#eef7f1;--jm-tile-bg-hover:#e3f3e8;--jm-tile-bg-on:#d9f0e0;--jm-tile-ring:#16a34a}
.jm-tile{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;
  background:var(--jm-tile-bg);border-radius:12px;isolation:isolate;overflow:hidden;transition:background-color .15s ease,box-shadow .15s ease}
.jm-tile>img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;object-position:center!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;mix-blend-mode:multiply}
/* sizes: category > subcategory, same radius ratio and padding ratio */
.jm-tile--cat{width:50px;height:50px;padding:2px;border-radius:13px;margin:0 0 5px}
.jm-tile--sub{width:36px;height:36px;padding:2px;border-radius:10px;margin-inline-end:12px}
.jm-tile--chip{width:56px;height:56px;padding:2px;border-radius:14px}
/* Full-bleed photos (no product cutout): fill the rounded tile, no mint corner gaps */
.jm-tile--photo{padding:0!important}
.jm-tile--photo>img{object-fit:cover!important;mix-blend-mode:normal!important}
/* hover + active (brand green ring) */
.cat-item:hover .jm-tile,.subcat-row:hover .jm-tile,.jm-sub-chip:hover .jm-tile{background:var(--jm-tile-bg-hover)}
.cat-item.active .jm-tile,.subcat-row.active .jm-tile,.jm-sub-chip.is-active .jm-tile{background:var(--jm-tile-bg-on);box-shadow:inset 0 0 0 2px var(--jm-tile-ring)}
@media (min-width:768px){
  .jm-tile--cat{width:52px;height:52px;margin:0;margin-inline-end:14px}
  .subcat-tree .subcat-row{padding-inline-start:34px!important}
  /* RTL: the active bar belongs on the start (right) edge */
  [dir=rtl] .cat-item{border-left:0!important;border-right:3px solid transparent!important;text-align:right!important}
  [dir=rtl] .cat-item.active{border-right-color:#16a34a!important}
}
/* mobfix: the navbar is sticky (in flow), so the old fixed-nav clearance spacer only left a blank band */
#nav-spacer{display:none!important;height:0!important}
/* mobfix: mobile labels wrap only between words, no hyphens (category column + subcategory photo row) */
@media (max-width:767px){
  .cat-name,.cat-name .name-mobile,.jm-sub-chip span:not(.jm-tile){word-break:normal!important;overflow-wrap:normal!important;-webkit-hyphens:manual!important;hyphens:manual!important}
  .cat-name,.cat-name .name-mobile{font-size:10.5px!important;line-height:13px!important;letter-spacing:-.01em}
}
/* cards2: desktop category names wrap to 2 lines between words (no 1-line ellipsis), EN + AR */
@media (min-width:768px){
  .cat-item .cat-name{-webkit-line-clamp:2!important;line-clamp:2;word-break:normal!important;overflow-wrap:normal!important;-webkit-hyphens:manual!important;hyphens:manual!important}
  [dir=rtl] .cat-item .cat-name{text-align:right!important}
}
