/* TAQA STORE V269 — MOBILE PRODUCT CARD SURGICAL REPAIR
   STRICT SCOPE: mobile product cards on the three pages the user reported:
   Home featured cards, Store/Products cards, Search result cards.
   No desktop selectors. No navigation, WhatsApp, filters, Supabase, cart or checkout changes. */

@media (max-width:767px){
  /* ---------- Shared containment only inside the reported mobile card surfaces ---------- */
  body[data-page="home"] #homeFeaturedGrid,
  body[data-page="products"] #productsGrid,
  body[data-page="search"] #v128SearchResults{
    align-items:start!important;
  }

  body[data-page="home"] #homeFeaturedGrid > *,
  body[data-page="products"] #productsGrid > *,
  body[data-page="search"] #v128SearchResults > *{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* ---------- HOME: only the featured product cards ---------- */
  body[data-page="home"] #homeFeaturedGrid .home204-product-card{
    align-self:start!important;
    height:auto!important;
    min-height:0!important;
    max-width:100%!important;
  }

  body[data-page="home"] #homeFeaturedGrid .home204-product-body{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    gap:5px!important;
  }

  body[data-page="home"] #homeFeaturedGrid .home204-product-body h3{
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="home"] #homeFeaturedGrid .home204-product-body h3 a{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-meta-row{
    width:100%!important;
    min-width:0!important;
    min-height:18px!important;
    max-height:20px!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    overflow:hidden!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-meta-chip{
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    flex:0 1 auto!important;
  }

  body[data-page="home"] #homeFeaturedGrid .home204-product-subtitle{
    width:100%!important;
    min-width:0!important;
    min-height:14px!important;
    height:14px!important;
    margin:0!important;
    line-height:14px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-price-row{
    width:100%!important;
    min-width:0!important;
    min-height:30px!important;
    margin-top:7px!important;
    gap:5px!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-price-stack{
    min-width:0!important;
    flex-wrap:nowrap!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-variant-count{
    min-width:0!important;
    max-width:64px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body[data-page="home"] #homeFeaturedGrid .v253-enhanced .home204-product-foot{
    margin-top:0!important;
  }

  /* ---------- STORE / PRODUCTS: only cards; toolbar/header remain untouched ---------- */
  body[data-page="products"].taqa-v263-storefront #productsGrid.v263-products-grid{
    align-items:start!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-product-card{
    align-self:start!important;
    height:auto!important;
    min-height:0!important;
    max-width:100%!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-card-body{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-product-title,
  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-product-title a{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-product-subtitle{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-delivery{
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-card-footer{
    margin-top:7px!important;
    min-width:0!important;
  }

  body[data-page="products"].taqa-v263-storefront #productsGrid .v263-price{
    min-width:0!important;
    flex:1 1 auto!important;
    overflow:hidden!important;
  }

  /* ---------- SEARCH: only search-result cards ---------- */
  body[data-page="search"] #v128SearchResults .product-card{
    align-self:start!important;
    height:auto!important;
    min-height:0!important;
    max-width:100%!important;
  }

  body[data-page="search"] #v128SearchResults .product-info{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    gap:5px!important;
  }

  body[data-page="search"] #v128SearchResults .product-info h3{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="search"] #v128SearchResults .v253-meta-row{
    width:100%!important;
    min-width:0!important;
    min-height:18px!important;
    max-height:20px!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    overflow:hidden!important;
  }

  body[data-page="search"] #v128SearchResults .v253-meta-chip{
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    flex:0 1 auto!important;
  }

  body[data-page="search"] #v128SearchResults .product-subtitle{
    width:100%!important;
    min-width:0!important;
    min-height:14px!important;
    height:14px!important;
    margin:0!important;
    line-height:14px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    text-align:right!important;
    direction:rtl!important;
    unicode-bidi:plaintext!important;
  }

  body[data-page="search"] #v128SearchResults .v253-price-row{
    width:100%!important;
    min-width:0!important;
    min-height:30px!important;
    margin-top:7px!important;
    gap:5px!important;
  }

  body[data-page="search"] #v128SearchResults .v253-price-stack{
    min-width:0!important;
    flex-wrap:nowrap!important;
  }

  body[data-page="search"] #v128SearchResults .v253-variant-count{
    min-width:0!important;
    max-width:64px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body[data-page="search"] #v128SearchResults .product-actions{
    width:100%!important;
    min-width:0!important;
    margin-top:0!important;
  }

  body[data-page="search"] #v128SearchResults .product-actions .order-clean.v253-primary-action{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 9px!important;
    border-radius:10px!important;
    font-size:10.5px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
}
