/* =========================
   PRODUCT CARD (1mg-style compact)
   ONLY product card UI here.
   (Track/grid layout is in home-sections.css)
   ========================= */

.mfh-product-card{
  background:#fff;
  border-radius: 16px;
  padding: 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;

  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);

  overflow:hidden;
  position: relative; /* allows stable action placement */
}

/* whole click area (image + title) */
.mfh-product-card .product-link{
  text-decoration:none;
  color:inherit;
  display:block;
}

/* =========================
   Image
   ========================= */
.mfh-p-img{
  width:100%;
  border-radius: 14px;
  overflow:hidden;
  background:#f6f7f9;
}

/* Stable square image */
.mfh-p-img img{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display:block;
}

/* Fallback inside image box (if no image) */
.mfh-p-img .mfh-fallback{
  width:100%;
  aspect-ratio: 1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  font-size: 22px;
  background: rgba(0,0,0,0.06);
  color:#111;
  border-radius: 14px;
}

/* =========================
   Title + Meta
   ========================= */
.mfh-p-title{
  font-size: 14px;
  font-weight: 700;
  color:#111;
  line-height: 1.25;

  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 36px;
  margin: 2px 0 0;
}

.mfh-p-meta{
  display:flex;
  flex-direction: column;
  gap: 4px;
}

.mfh-price-row{
  display:flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.mfh-price{
  font-size: 14px;
  font-weight: 800;
  color:#111;
}

.mfh-mrp{
  font-size: 12px;
  color:#6b7280;
  text-decoration: line-through;
}

.mfh-variant{
  font-size: 12px;
  color:#6b7280;
}

.mfh-coming{
  font-size: 12px;
  color:#6b7280;
}

/* =========================
   Actions (Add / Qty) bottom-right
   ========================= */
.mfh-p-actions{
  margin-top: auto;
  display:flex;
  justify-content: flex-end;
  padding-top: 6px;
}

/* reserve area so layout doesn't jump */
.qty-box{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  min-height: 36px;
}

/* ADD button */
.btn-add-cart{
  background:#1ba672;
  color:#fff;
  border:none;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
  line-height: 1;
  white-space: nowrap;
}

/* disabled */
.btn-add-cart[disabled]{
  opacity:.55;
  cursor:not-allowed;
}

/* Qty pill */
.qty-controls{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  background:#1ba672;
  color:#fff;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
}

.qty-controls .qty{
  font-weight: 900;
  min-width: 18px;
  text-align:center;
}

/* +/- buttons */
.qty-btn{
  background:none;
  border:none;
  color:#fff;
  font-size: 18px;
  font-weight: 900;
  cursor:pointer;
  line-height: 1;
  padding: 0 4px;
}

.hidden{ display:none !important; }

/* =========================
   ✅ MOBILE: Compact card for horizontal scroll
   (like 1mg deals row)
   ========================= */
@media (max-width: 860px){
  .mfh-product-card{
    padding: 10px;
    border-radius: 14px;
  }

  .mfh-p-title{
    font-size: 13px;
    min-height: 34px;
  }

  .btn-add-cart{
    padding: 8px 16px;
    font-size: 12.5px;
  }

  .qty-controls{
    padding: 6px 10px;
  }
}

/* =========================
   DESKTOP tweaks
   ========================= */
@media (min-width: 861px){
  .mfh-product-card{
    border-radius: 18px;
    padding: 14px;
  }

  .mfh-p-title{
    font-size: 15px;
    min-height: 38px;
  }
}
