/* MealFromHome - Home Sections ONLY (Categories + Products + Banners)
   NOTE:
   - Product card UI is in product-card.css
   - This file controls layout/sections/track/grid only
*/

/* =========================
   Section Head (Title + View All)
   ========================= */
.mfh-sec-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 12px 0 10px;
}

.mfh-sec-head h2{
  font-family: Poppins, Inter, system-ui;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.mfh-viewall{
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  opacity: .85;
  color: inherit;
  white-space: nowrap;
}
.mfh-viewall:hover{ opacity:1; text-decoration: underline; }


/* =========================
   Categories (Top)
   ========================= */
.mfh-category-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media(min-width:861px){
  .mfh-category-grid{ grid-template-columns: repeat(6, 1fr); }
}

.mfh-category-card{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  text-decoration:none;
  color:#111;
  transition: transform .15s ease, box-shadow .15s ease;
}

.mfh-category-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.mfh-cat-img img{
  width:44px;
  height:44px;
  border-radius: 12px;
  object-fit: cover;
  display:block;
}

.mfh-cat-name{
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}


/* =========================
   HOME PRODUCTS LAYOUT
   Mobile: horizontal scroll (single row)
   Desktop: grid 5 columns
   ========================= */

.mfh-home-products-track{
  display:flex;
  gap: 12px;
  overflow-x:auto;
  padding: 6px 2px 12px;          /* little bottom padding */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* smooth swipe feeling */
.mfh-home-products-track{
  scroll-behavior: smooth;
}

/* scrollbar (optional) */
.mfh-home-products-track::-webkit-scrollbar{
  height: 6px;
}
.mfh-home-products-track::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
}

/* IMPORTANT: fixed card width on mobile */
.mfh-home-products-track .mfh-product-card{
  flex: 0 0 auto;                  /* do not shrink */
  width: 165px;                    /* ✅ mobile card width */
  scroll-snap-align: start;
}

/* Small phones: slightly smaller cards */
@media(max-width:380px){
  .mfh-home-products-track .mfh-product-card{
    width: 150px;
  }
}

/* Desktop: switch to grid */
@media(min-width:861px){
  .mfh-home-products-track{
    display:grid;
    grid-template-columns: repeat(5, 1fr);  /* ✅ 5 per row */
    gap: 16px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .mfh-home-products-track .mfh-product-card{
    width: auto;
  }
}


/* =========================
   Banner
   ========================= */
.mfh-banner-wrap{
  position: relative;
  display:block;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
  border:1px solid rgba(0,0,0,0.06);
  text-decoration:none;
  color:#fff;
}

.mfh-banner-img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  display:block;
}

@media(min-width:861px){
  .mfh-banner-img{ height: 230px; }
}

.mfh-banner-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction: column;
  justify-content:flex-end;
  padding: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%);
}

.mfh-banner-title{ font-size: 18px; font-weight: 900; }
.mfh-banner-sub{ font-size: 13px; opacity: .95; margin-top: 6px; }

.mfh-banner-meta{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mfh-pill{
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
}


/* =========================
   Fallback blocks
   (category fallback remains small)
   ========================= */
.mfh-fallback{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(0,0,0,0.06);
  color:#111;
}


/* =========================
   Desktop Breadcrumb / Category Heading styles
   (Used in Category page later)
   ========================= */
.mfh-breadcrumb{
  display:none;
  font-size: 13px;
  font-weight: 600;
  opacity: .8;
  margin: 8px 0 6px;
  gap: 8px;
  align-items: center;
}

.mfh-breadcrumb a{
  text-decoration: none;
  color: inherit;
}

.mfh-breadcrumb a:hover{
  text-decoration: underline;
}

.mfh-breadcrumb span{
  opacity: .6;
}

@media(min-width:861px){
  .mfh-breadcrumb{ display:flex; }
  .mfh-cat-title{ font-size: 22px; font-weight: 900; }
}
