/* Mobile card layout for collection and product grids (loaded last, <=750px only) */
@media (max-width:750px){
  .grid{gap:12px}

  .card{
    padding:10px;
    min-width:0;
  }
  .card img,
  .card .product-image-link img{
    width:100%;
    height:auto;
    aspect-ratio:1/1;
    object-fit:contain;
    background:#fffefa;
  }
  /* The script promotes the whole collection card to .product-image-link, so its
     "View details" badge is positioned against the card and covers the title.
     The whole card is already tappable, so drop the badge on small screens. */
  .card > .product-image-cta{display:none}

  .card h3{
    font-size:15px;
    line-height:1.3;
    margin:10px 0 4px;
  }
  .card .ref{
    display:block;
    font-size:12px;
    line-height:1.4;
    color:#5a6b63;
  }
  .card a.textlink{
    font-size:12px;
    line-height:1.4;
    margin-top:8px;
    padding-top:8px;
  }

  /* product cards keep a small badge that stays inside the image box */
  .product-image-link{display:block;position:relative}
  .product-image-link .product-image-cta{
    right:6px;
    bottom:6px;
    padding:5px 8px;
    font-size:10.5px;
    border-radius:2px;
  }
  .card .product-image-cta + *{margin-top:0}
}
