/* FOOD VIBES STEP 61 — compact featured food cards on the HOME page only.
   Complements Step 60's menu layout. No changes to food/payment/login logic.
   Loaded last in index.php. Preserves existing light/dark theme colours. */
@media screen and (max-width: 640px) {
  html body section.customer-wrap#menu {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px 12px 82px !important;
  }

  html body section.customer-wrap#menu .section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px !important;
  }
  html body section.customer-wrap#menu .section-heading > div { min-width: 0; flex: 1 1 180px; }
  html body section.customer-wrap#menu .section-heading h2 {
    font-size: clamp(1.23rem, 5.3vw, 1.68rem) !important;
    line-height: 1.2 !important;
    margin: 4px 0 5px !important;
  }
  html body section.customer-wrap#menu .section-heading :is(.muted,p) {
    font-size: .79rem;
    line-height: 1.4;
    margin: 0;
  }
  html body section.customer-wrap#menu .section-heading a.btn {
    font-size: .78rem !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    max-width: 100%;
    white-space: normal;
  }

  html body section.customer-wrap#menu .food-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 11px !important;
  }
  html body section.customer-wrap#menu .food-grid > .food-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 15px !important;
    overflow: hidden !important;
  }
  html body section.customer-wrap#menu .food-card .food-photo {
    width: 100% !important;
    height: clamp(106px, 31vw, 146px) !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  html body section.customer-wrap#menu .food-photo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  html body section.customer-wrap#menu .food-photo > span { font-size: 2.3rem !important; }
  html body section.customer-wrap#menu .food-card .food-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 7px;
    padding: 12px 10px 12px !important;
  }
  html body section.customer-wrap#menu .food-content :is(h2,h3) {
    font-size: clamp(.93rem, 3.65vw, 1.12rem) !important;
    line-height: 1.24 !important;
    margin: 0 !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
  }
  html body section.customer-wrap#menu .food-content > p {
    font-size: .74rem !important;
    line-height: 1.36 !important;
    margin: 0 !important;
    min-height: 0 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  html body section.customer-wrap#menu .food-content .food-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding-top: 5px !important;
    min-width: 0;
  }
  html body section.customer-wrap#menu .food-bottom strong {
    display: block;
    font-size: clamp(.96rem, 4vw, 1.12rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
  }
  html body section.customer-wrap#menu .food-bottom form { width: 100%; margin: 0 !important; }
  html body section.customer-wrap#menu .food-bottom form > button.btn,
  html body section.customer-wrap#menu .food-bottom > a.btn,
  html body section.customer-wrap#menu .food-bottom > a.small-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 7px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    font-size: .79rem !important;
    line-height: 1.2 !important;
    white-space: normal;
    text-align: center;
  }
}
/* Narrow phones: keep meaningful photo and readable Add button. */
@media screen and (max-width: 340px) {
  html body section.customer-wrap#menu .food-grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px !important;
  }
  html body section.customer-wrap#menu .food-grid > .food-card {
    display: grid !important;
    grid-template-columns: 105px minmax(0,1fr) !important;
    align-items: stretch !important;
  }
  html body section.customer-wrap#menu .food-card .food-photo {
    height: 100% !important;
    min-height: 150px !important;
  }
  html body section.customer-wrap#menu .food-card .food-content { padding: 10px !important; }
  html body section.customer-wrap#menu .food-content :is(h2,h3) { font-size: .96rem !important; }
  html body section.customer-wrap#menu .food-bottom strong { font-size: 1rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body section.customer-wrap#menu .food-card,
  html body section.customer-wrap#menu .food-photo img { transition: none !important; }
}
