.v1-categories-page{
  padding:18px 0 32px;
}

.v1-categories-shell{
  width:100%;
  max-width:1360px;
  margin:0 auto;
  padding:0 16px;
}

.v1-categories-block{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.05);
  padding:18px;
  margin-bottom:22px;
}

.v1-categories-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.v1-categories-head h1,
.v1-categories-head h2{
  margin:0;
  font-size:22px;
  line-height:1.2;
  font-weight:700;
  color:#111827;
}

.v1-categories-head p{
  margin:6px 0 0;
  font-size:13px;
  line-height:1.6;
  color:#6b7280;
}

.v1-categories-link{
  text-decoration:none;
  color:#15803d;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  padding-top:4px;
}

.v1-categories-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.v1-category-tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-decoration:none;
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:18px;
  padding:12px 10px 14px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:transform .15s ease, box-shadow .15s ease;
}

.v1-category-tile:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(15,23,42,.07);
}

.v1-category-media{
  width:96px;
  height:96px;
  border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
}

.v1-category-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

.v1-category-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  font-weight:700;
  color:#111827;
  background:#eceff3;
}

.v1-category-title{
  font-size:13px;
  line-height:1.35;
  font-weight:600;
  color:#111827;
  text-align:center;
}

.v1-explore-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:start;
}

.v1-explore-grid .mfh-card2{
  min-width:100%;
}

.v1-empty{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:18px;
  padding:16px;
  color:#6b7280;
  font-size:14px;
  line-height:1.6;
}

/* =========================
   MOBILE ONLY NEW CATEGORY LAYOUT
========================= */
.mcat-mobile-only{
  display:block;
}

.mcat-desktop-only{
  display:none;
}

.mcat-mobile-layout{
  display:grid;
  grid-template-columns:86px minmax(0, 1fr);
  gap:12px;
  align-items:start;
}

.mcat-rail{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:18px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
  padding:10px 6px;
  display:flex;
  flex-direction:column;
  gap:8px;
  position:sticky;
  top:136px;
  overflow:visible;
  max-height:none;
}

.mcat-rail-item{
  text-decoration:none;
  color:#111827;
  border-radius:14px;
  padding:8px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  position:relative;
  background:transparent;
  transition:background .15s ease, transform .15s ease;
}

.mcat-rail-item:active{
  transform:scale(.98);
}

.mcat-rail-item.active{
  background:linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.mcat-rail-item.active::before{
  content:"";
  position:absolute;
  left:-6px;
  top:8px;
  bottom:8px;
  width:4px;
  border-radius:999px;
  background:linear-gradient(180deg, #22c55e 0%, #15803d 100%);
}

.mcat-rail-thumb{
  width:48px;
  height:48px;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(17,24,39,.05);
}

.mcat-rail-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.mcat-rail-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  font-weight:700;
  color:#111827;
  background:#eceff3;
}

.mcat-rail-label{
  font-size:10.5px;
  line-height:1.25;
  font-weight:600;
  text-align:center;
  color:#374151;
  word-break:break-word;
}

.mcat-main{
  min-width:0;
}

.mcat-head{
  margin-bottom:10px;
}

.mcat-title{
  margin:0;
  font-size:18px;
  line-height:1.2;
  font-weight:700;
  color:#111827;
}

.mcat-sub{
  margin:4px 0 0;
  font-size:12px;
  line-height:1.5;
  color:#6b7280;
}

.mcat-delivery-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 10px;
}

.mcat-delivery-badge{
  font-family:Inter,sans-serif;
  font-size:11px;
  line-height:1;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.03);
  color:rgba(0,0,0,.72);
  white-space:nowrap;
  font-weight:600;
}

.mcat-delivery-badge.express{
  background:rgba(16,185,129,.10);
  border-color:rgba(16,185,129,.25);
  color:#0f766e;
}

.mcat-delivery-badge.slot{
  background:rgba(59,130,246,.10);
  border-color:rgba(59,130,246,.25);
  color:#1d4ed8;
}

.mcat-filters{
  display:flex;
  gap:8px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:4px;
  margin-bottom:10px;
  -ms-overflow-style:none;
  scrollbar-width:none;
}

.mcat-filters::-webkit-scrollbar{
  display:none;
}

.mcat-filter-chip{
  flex:0 0 auto;
  text-decoration:none;
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-size:11.5px;
  font-weight:600;
  color:#111827;
  white-space:nowrap;
  box-shadow:0 4px 12px rgba(15,23,42,.03);
  display:inline-flex;
  align-items:center;
  gap:7px;
  transition:all .16s ease;
}

.mcat-filter-chip:active{
  transform:scale(.98);
}

.mcat-filter-chip.active{
  color:#fff;
  border-color:transparent;
}

.mcat-filter-chip.all{
  background:#fff;
}

.mcat-filter-chip.all.active{
  background:linear-gradient(135deg, #111827 0%, #374151 100%);
}

.mcat-sort-chip.active{
  background:linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.mcat-filter-chip.veg{
  background:#f0fdf4;
  border-color:rgba(34,197,94,.25);
  color:#166534;
}

.mcat-filter-chip.veg.active{
  background:linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color:#fff;
}

.mcat-filter-chip.nonveg{
  background:#fef2f2;
  border-color:rgba(239,68,68,.22);
  color:#991b1b;
}

.mcat-filter-chip.nonveg.active{
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color:#fff;
}

.mcat-chip-icon{
  font-size:12px;
  line-height:1;
  opacity:.95;
}

.mcat-food-dot{
  width:12px;
  height:12px;
  border-radius:4px;
  border:2px solid rgba(0,0,0,.16);
  position:relative;
  display:inline-block;
  flex:0 0 auto;
}

.mcat-food-dot::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:999px;
}

.veg-dot::after{
  background:#16a34a;
}

.nonveg-dot::after{
  background:#dc2626;
}

.mcat-products{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  align-items:start;
}

.mcat-products .mfh-card2{
  width:100%;
  min-width:0;
  max-width:100%;
}

.mcat-products .mfh-card2-top{
  padding:7px 7px 0;
}

.mcat-products .mfh-card2-addwrap{
  right:9px;
  bottom:-17px;
}

.mcat-products .qty-box{
  min-width:62px;
  min-height:36px;
}

.mcat-products .mfh-card2-add.btn-add-cart{
  min-width:62px;
  height:32px;
  font-size:11px;
  padding:0 10px;
}

.mcat-products .mfh-card2-qty.qty-controls{
  min-width:62px;
  min-height:32px;
  padding:5px 8px;
  gap:7px;
}

.mcat-products .mfh-options-hint{
  font-size:8px;
  bottom:4px;
}

.mcat-products .mfh-card2-body{
  padding:22px 9px 9px;
  gap:4px;
}

.mcat-products .mfh-card2-title{
  font-size:12px;
  min-height:28px;
}

.mcat-products .mfh-card2-now{
  font-size:12.5px;
}

.mcat-products .mfh-pill2{
  font-size:10px;
  padding:4px 7px;
}

/* =========================
   TABLET / DESKTOP
========================= */
@media (min-width: 768px){
  .v1-categories-shell{
    padding:0 18px;
  }

  .v1-categories-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
  }

  .v1-explore-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
  }
}

@media (min-width: 861px){
  .mcat-mobile-only{
    display:none;
  }

  .mcat-desktop-only{
    display:block;
  }
}

@media (min-width: 1024px){
  .v1-categories-page{
    padding:22px 0 36px;
  }

  .v1-categories-shell{
    padding:0 20px;
  }

  .v1-categories-block{
    padding:20px;
    margin-bottom:24px;
  }

  .v1-categories-grid{
    grid-template-columns:repeat(6, minmax(0, 1fr));
  }

  .v1-explore-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
  }
}