/*
 * ZUVA Cloud Kitchen PWA 3.5 — phone menu list view with reliable full-image rendering.
 * Presentation only. Product links, buttons, cart actions, prices, branch logic and APIs are unchanged.
 */
@media (max-width: 782px) {
  html.zuva-pwa-standalone body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag) :is(.wp-block-woocommerce-product-template,ul.products),
  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-universal-shop :is(.wp-block-woocommerce-product-template,ul.products) {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 680px !important;
    margin-inline: auto !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag) .wc-block-product,
  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-universal-shop .wc-block-product,
  html.zuva-pwa-standalone body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag) ul.products li.product,
  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-universal-shop ul.products li.product {
    display: grid !important;
    grid-template-columns: clamp(96px,28vw,122px) minmax(0,1fr) minmax(104px,116px) !important;
    grid-template-rows: auto auto minmax(8px,1fr) 42px !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 164px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(71,64,55,.11) !important;
    border-radius: 20px !important;
    background: rgba(255,253,248,.98) !important;
    box-shadow: 0 12px 30px rgba(41,35,28,.07) !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product > :is(a:first-child,.woocommerce-LoopProduct-link) {
    position: relative !important;
    isolation: isolate !important;
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: #f8f1e3 !important;
  }

  /* Keep the original image as a safe fallback. It is hidden only after the independent full image loads. */
  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img:not(.zuva-pwa-menu-image-35),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product a img:not(.zuva-pwa-menu-image-35) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 144px !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 14px !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity .18s ease !important;
  }

  /* A separate image avoids LiteSpeed/WordPress lazy placeholder conflicts and shows the complete picture. */
  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-pwa-menu-image-host-35 > .zuva-pwa-menu-image-35 {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    object-fit: contain !important;
    object-position: center center !important;
    opacity: 0 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
    background: #f8f1e3 !important;
    transition: opacity .18s ease !important;
    pointer-events: none !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-pwa-menu-image-host-35.zuva-pwa-menu-image-ready-35 > .zuva-pwa-menu-image-35 {
    opacity: 1 !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-pwa-menu-image-host-35.zuva-pwa-menu-image-ready-35 img:not(.zuva-pwa-menu-image-35) {
    opacity: 0 !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-post-title,.wc-block-components-product-title),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product .woocommerce-loop-product__title {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    display: -webkit-box !important;
    align-self: end !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 2.15em !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: clamp(1.28rem,5.4vw,1.58rem) !important;
    line-height: 1.02 !important;
    text-align: left !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-woocommerce-product-summary,.wc-block-components-product-summary,.wp-block-post-excerpt),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product .zuva-loop-short-description {
    grid-column: 2 / 4 !important;
    grid-row: 2 !important;
    display: -webkit-box !important;
    align-self: start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 2.8em !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: rgba(40,37,31,.64) !important;
    font-size: .78rem !important;
    line-height: 1.4 !important;
    text-align: left !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-woocommerce-product-summary,.wc-block-components-product-summary,.wp-block-post-excerpt) :is(p,div),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product .zuva-loop-short-description :is(p,div) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-woocommerce-product-price,.wc-block-components-product-price),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product .price {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 4 !important;
    display: flex !important;
    align-self: center !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .98rem !important;
    line-height: 1 !important;
    text-align: left !important;
    transform: none !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-woocommerce-product-button,.wc-block-components-product-button,.zuva-customize-button-wrap),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product > :is(.button,.zuva-customize-product-link) {
    grid-column: 3 !important;
    grid-row: 4 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    align-self: center !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-woocommerce-product-button,.wc-block-components-product-button,.zuva-customize-button-wrap) > :is(a,button),
  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product .zuva-customize-product-link,
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product > :is(.button,.zuva-customize-product-link) {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: .58rem !important;
    letter-spacing: .10em !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag) .zuva-shop-shell,
  html.zuva-pwa-standalone body.zuva-universal-theme .zuva-universal-shop {
    width: 100% !important;
    padding-inline: 12px !important;
    padding-bottom: calc(108px + env(safe-area-inset-bottom,0px)) !important;
  }
}

@media (max-width: 370px) {
  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product,
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product {
    grid-template-columns: 92px minmax(0,1fr) 102px !important;
    column-gap: 10px !important;
    min-height: 154px !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme .wc-block-product :is(.wp-block-post-title,.wc-block-components-product-title),
  html.zuva-pwa-standalone body.zuva-universal-theme ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.2rem !important;
  }

  html.zuva-pwa-standalone body.zuva-universal-theme :is(.wc-block-product,ul.products li.product) :is(.zuva-customize-product-link,.wp-block-button__link,.wc-block-components-product-button__button,a.button,button.button) {
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    padding-inline: 10px !important;
    letter-spacing: .08em !important;
  }
}
