/* SAMA CATEGORY CARDS FAST FIX — PRESENTATION ONLY — 2026-10-25
   Fixes one-category rail expansion caused by grid-auto-columns: minmax(175px,1fr).
   Does not edit categories, products, inventory, orders, Firebase, or URLs. */
body.s4-active #s4CategoryRail {
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
body.s4-active #s4CategoryRail .s4-category-list {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:232px !important;
  grid-template-columns:none !important;
  justify-content:start;
  align-items:stretch;
  gap:14px;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  padding:5px 2px 12px;
  scroll-snap-type:x proximity;
}
body.s4-active #s4CategoryRail button.s4-category-tile {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:232px;
  align-self:stretch;
  flex-direction:column;
  border-radius:15px;
  overflow:hidden;
  scroll-snap-align:start;
}
body.s4-active #s4CategoryRail .s4-category-photo {
  display:block;
  position:relative;
  width:100%;
  height:148px !important;
  max-height:148px;
  overflow:hidden;
  background:#f4f6f8;
  flex:0 0 auto;
}
body.s4-active #s4CategoryRail .s4-category-photo img,
body.s4-active #s4CategoryRail .s4-category-photo img.s7-category-image {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
}
body.s4-active #s4CategoryRail .s4-category-name {
  display:block;
  min-height:51px;
  max-height:80px;
  padding:12px 12px 14px;
  padding-inline-end:38px;
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
@media(max-width:650px){
 body.s4-active #s4CategoryRail .s4-category-list {grid-auto-columns:168px !important;gap:10px}
 body.s4-active #s4CategoryRail button.s4-category-tile {max-width:168px}
 body.s4-active #s4CategoryRail .s4-category-photo{height:111px !important;max-height:111px}
 body.s4-active #s4CategoryRail .s4-category-name{font-size:11px;min-height:46px;padding:10px 9px 12px;padding-inline-end:30px}
}
@media(max-width:375px){
 body.s4-active #s4CategoryRail .s4-category-list {grid-auto-columns:148px !important}
 body.s4-active #s4CategoryRail button.s4-category-tile {max-width:148px}
 body.s4-active #s4CategoryRail .s4-category-photo{height:101px !important;max-height:101px}
}
