/* =====================================================================
   Masand Agritech — product card grid + product detail page
   Self-contained (.mpg- grid, .mpd- detail). Loaded via global/top.php.
   ===================================================================== */

/* ---------- top product grid ---------- */
.mpg-section{ padding-top:40px; padding-bottom:10px; }
.mpg-heading{ margin-bottom:22px; }
.mpg-grid{ margin-top:2px; }

.mpg-card{
  display:flex; flex-direction:column; height:100%;
  margin-bottom:26px;
  background:#ffffff; border:1px solid #e2eae3; border-radius:14px;
  overflow:hidden;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mpg-card:hover{
  border-color:#1f7a3d; box-shadow:0 8px 22px rgba(20,83,43,.12);
  transform:translateY(-3px);
}
.mpg-card__media{
  position:relative; height:200px;
  display:flex; align-items:center; justify-content:center;
  padding:16px; background:#f6f8f5; border-bottom:1px solid #eef2ee;
}
.mpg-card__media img{ max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; display:block; }
.mpg-card__badge{
  position:absolute; top:12px; right:12px;
  background:#14532b; color:#fff; font-size:11.5px; font-weight:700;
  line-height:1; padding:6px 10px; border-radius:999px;
}
.mpg-card__body{ display:flex; flex-direction:column; flex:1 1 auto; padding:15px 16px 16px; }
.mpg-card__name{ margin:0 0 6px; font-size:1.02rem; font-weight:700; line-height:1.25; color:#182a1e; }
.mpg-card__name a{ color:inherit; text-decoration:none; }
.mpg-card__name a:hover{ color:#1f7a3d; }
.mpg-card__spec{
  margin:0 0 14px; font-size:.8rem; line-height:1.4; color:#5f7065;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.mpg-card__actions{ margin-top:auto; display:flex; gap:8px; }
.mpg-btn{
  flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 8px; border-radius:8px; font-size:.8rem; font-weight:600; line-height:1;
  text-align:center; text-decoration:none; cursor:pointer;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease;
}
.mpg-btn--outline{ background:#fff; color:#1f7a3d; border:1.5px solid #1f7a3d; }
.mpg-btn--outline:hover{ background:#1f7a3d; color:#fff; }
.mpg-btn--wa{ background:#1fab54; color:#fff; border:1.5px solid #1fab54; }
.mpg-btn--wa:hover{ background:#178f45; border-color:#178f45; color:#fff; }
.mpg-btn--wa svg{ width:14px; height:14px; flex:0 0 auto; }

@media (max-width:575px){
  .mpg-card__media{ height:190px; }
  .mpg-card__actions{ flex-direction:column; }
}

/* ---------- product detail page ---------- */
.mpd{ margin-top:4px; }
.mpd__media{
  background:#f6f8f5; border:1px solid #e2eae3; border-radius:14px;
  padding:22px; display:flex; align-items:center; justify-content:center;
  min-height:320px; margin-bottom:24px;
}
.mpd__media img{ max-width:100%; max-height:420px; width:auto; height:auto; object-fit:contain; }
.mpd__info{ padding-left:6px; }
.mpd__eyebrow{
  display:inline-block; font-size:.8rem; font-weight:700; color:#1f7a3d;
  text-decoration:none; margin-bottom:8px;
}
.mpd__eyebrow:hover{ color:#14532b; }
.mpd__title{ margin:0 0 14px; font-size:1.7rem; line-height:1.2; color:#182a1e; }
.mpd__desc{ font-size:.98rem; line-height:1.6; color:#3d4c43; margin:0 0 18px; }
.mpd__block{
  border-top:1px solid #edf2ee; padding-top:14px; margin-top:14px;
}
.mpd__block h4{ margin:0 0 6px; font-size:1rem; color:#14532b; }
.mpd__block p{ margin:0; font-size:.92rem; line-height:1.55; color:#4a5a50; }
.mpd__actions{ margin-top:22px; display:flex; flex-wrap:wrap; gap:10px; }
.mpd__actions .thm-btn{ margin:0; }
.mpd__btn-ghost{ background:#eef4ef !important; color:#14532b !important; }
.mpd__back{ margin-top:18px; }
.mpd__back a{ color:#5f7065; text-decoration:none; font-size:.9rem; }
.mpd__back a:hover{ color:#1f7a3d; }

@media (max-width:767px){
  .mpd__info{ padding-left:0; }
  .mpd__title{ font-size:1.45rem; }
}

@media (prefers-reduced-motion:reduce){
  .mpg-card,.mpg-btn{ transition:none; }
  .mpg-card:hover{ transform:none; }
}
