/* Phase 57 - Final Mobile Dish Image Responsive Fit
   Scope: customer menu/home dish photos only. Keeps card layout, fixes cropped/half-visible images.
*/
:root{
  --sk57-dish-img-mobile-h: 150px;
  --sk57-dish-img-tablet-h: 165px;
  --sk57-dish-img-desktop-h: 178px;
  --sk57-dish-img-bg: #eefafa;
}

/* Stable image frame: same card width, controlled image height, no crop. */
.customer-page .sk-dish-card39 > .sk-dish-img39,
.customer-page .dish-card > .sk-dish-img39,
.customer-page .menu-card > .sk-dish-img39,
.customer-page .product-card > .sk-dish-img39,
.customer-page .food-card > .sk-dish-img39,
.customer-page .sk43-product-card .sk43-img,
.customer-page .menu-card .image-wrap,
.customer-page .product-card .image-wrap,
.customer-page .food-card .image-wrap{
  width:100% !important;
  height:var(--sk57-dish-img-desktop-h) !important;
  min-height:var(--sk57-dish-img-desktop-h) !important;
  max-height:var(--sk57-dish-img-desktop-h) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:8px !important;
  margin:0 !important;
  overflow:hidden !important;
  background:var(--sk57-dish-img-bg) !important;
  box-sizing:border-box !important;
  line-height:0 !important;
}

/* Force all dish images to show FULL image, centered, without stretching. */
.customer-page .sk-dish-card39 > .sk-dish-img39 > img,
.customer-page .dish-card > .sk-dish-img39 > img,
.customer-page .menu-card > .sk-dish-img39 > img,
.customer-page .product-card > .sk-dish-img39 > img,
.customer-page .food-card > .sk-dish-img39 > img,
.customer-page .sk43-product-card .sk43-img > img,
.customer-page .menu-card .image-wrap > img,
.customer-page .product-card .image-wrap > img,
.customer-page .food-card .image-wrap > img{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block !important;
  margin:auto !important;
  border-radius:12px !important;
  transform:none !important;
  transition:none !important;
}

/* Prevent hover zoom from cropping dish photos on touch screens and small screens. */
.customer-page .sk-dish-card39:hover .sk-dish-img39 img,
.customer-page .dish-card:hover .sk-dish-img39 img,
.customer-page .menu-card:hover .sk-dish-img39 img,
.customer-page .product-card:hover .sk-dish-img39 img{
  transform:none !important;
}

.customer-page .sk-dish-card39,
.customer-page .dish-card,
.customer-page .menu-card,
.customer-page .product-card,
.customer-page .food-card{
  contain:layout paint;
  overflow:hidden !important;
}

/* Tablet */
@media (max-width:900px){
  .customer-page .sk-dish-card39 > .sk-dish-img39,
  .customer-page .dish-card > .sk-dish-img39,
  .customer-page .menu-card > .sk-dish-img39,
  .customer-page .product-card > .sk-dish-img39,
  .customer-page .food-card > .sk-dish-img39,
  .customer-page .sk43-product-card .sk43-img,
  .customer-page .menu-card .image-wrap,
  .customer-page .product-card .image-wrap,
  .customer-page .food-card .image-wrap{
    height:var(--sk57-dish-img-tablet-h) !important;
    min-height:var(--sk57-dish-img-tablet-h) !important;
    max-height:var(--sk57-dish-img-tablet-h) !important;
    padding:8px !important;
  }
}

/* Phones: keep existing card size comfortable and stop image from taking over the screen. */
@media (max-width:640px){
  .customer-page .sk-dish-grid39,
  .customer-page .dish-grid,
  .customer-page .menu-grid,
  .customer-page .product-grid{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .customer-page .sk-dish-card39 > .sk-dish-img39,
  .customer-page .dish-card > .sk-dish-img39,
  .customer-page .menu-card > .sk-dish-img39,
  .customer-page .product-card > .sk-dish-img39,
  .customer-page .food-card > .sk-dish-img39,
  .customer-page .sk43-product-card .sk43-img,
  .customer-page .menu-card .image-wrap,
  .customer-page .product-card .image-wrap,
  .customer-page .food-card .image-wrap{
    height:var(--sk57-dish-img-mobile-h) !important;
    min-height:var(--sk57-dish-img-mobile-h) !important;
    max-height:var(--sk57-dish-img-mobile-h) !important;
    padding:7px !important;
  }
  .customer-page .sk-dish-card39 > .sk-dish-img39 > img,
  .customer-page .dish-card > .sk-dish-img39 > img,
  .customer-page .menu-card > .sk-dish-img39 > img,
  .customer-page .product-card > .sk-dish-img39 > img,
  .customer-page .food-card > .sk-dish-img39 > img,
  .customer-page .sk43-product-card .sk43-img > img,
  .customer-page .menu-card .image-wrap > img,
  .customer-page .product-card .image-wrap > img,
  .customer-page .food-card .image-wrap > img{
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    transform:none !important;
  }
}
