/* Two complete product tiles on phones. Desktop merchandising stays unchanged. */
@media (max-width:700px) {
  .ps,.ps.category-feature { --per:2; --gap:10px; }
  .ps .track,.ps.category-feature .track { gap:var(--gap); }
  #grid,.wl-grid,.wg,.rel .row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .ps .card,#grid .card,.wl-card,.wc,.rel .rc { min-width:0; border-radius:18px; }

  /* Keep photos clear: the two utility controls have their own image-row space.
     Cart remains available in the purchase row, with a full 44px touch target. */
  .ps .card .media,#grid .media,.wl-card .wl-img-box,.wc .wm {
    box-sizing:border-box; height:auto; min-height:190px; aspect-ratio:1/1.25;
    padding:30px 10px 10px;
  }
  .ps .card .media.has-product-actions,#grid .media.has-product-actions,
  .wl-card .wl-img-box.has-product-actions,.wc .wm.has-product-actions {
    display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) 44px; gap:8px;
  }
  .ps .media>img,#grid .media>img,.wl-img-box>img,.wc .wm>img {
    grid-column:1; grid-row:1; min-width:0; min-height:0; object-fit:contain;
  }
  .product-photo-actions {
    position:relative; inset:auto; grid-column:1; grid-row:2; width:100%;
    flex-direction:row; justify-content:flex-end; gap:8px;
    opacity:1; transform:none; pointer-events:auto;
  }
  .has-product-actions:hover>.product-photo-actions,
  .has-product-actions:focus-within>.product-photo-actions { transform:none; }
  .product-photo-actions button[data-photo-action="cart"] { display:none; }

  .ps .card .body,#grid .card .body,.wl-card .wl-body,.wc .wb { padding:10px; gap:6px; min-width:0; }
  .ps .name,#grid .name,.wl-card .wl-name,.wc .wb>a:first-of-type {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3;
    overflow:hidden; overflow-wrap:anywhere;
    font-size:clamp(13px,3.5vw,15px); line-height:1.3; height:3.9em; min-height:3.9em; margin:0;
  }
  .ps .body>.mi-image-caption,#grid .body>.mi-image-caption,.wl-body>.mi-image-caption,.wc .wb>.mi-image-caption {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    overflow:hidden; font-size:11px; line-height:1.4; margin:0;
  }
  .ps .price,.ps .price.ask,#grid .pr,.wl-card .wl-price,.wc .wp {
    font-size:clamp(14px,3.8vw,17px); line-height:1.25; overflow-wrap:anywhere;
  }
  .ps .buy,#grid .buy { min-height:36px; padding-top:4px; }
  #grid .spec,.wl-card .wl-spec,.wc .wb>small { font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
  .ps .card .product-card-cta,#grid .card .product-card-cta { gap:6px; padding-top:6px; }
  .ps .card .product-card-cta a.view,#grid .card .product-card-cta a.view {
    padding:8px 4px; font-size:11px; min-height:44px; box-sizing:border-box;
  }
  .ps .badge,.ps .tag,#grid .badge,#grid .tag,.wl-card .wl-badge-brand {
    max-width:calc(50% - 12px); box-sizing:border-box; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; font-size:10px; padding:4px 6px;
  }
  .ps .badge,#grid .badge,.wl-card .wl-badge-brand { top:8px; left:8px; }
  .ps .tag { top:8px; right:8px; }
  #grid .tag { bottom:auto; top:8px; right:8px; left:auto; }

  .wl-card .wl-price-row { flex-wrap:wrap; gap:6px; padding-top:4px; }
  .wl-card .wl-stock { font-size:11px; }
  .wl-card .wl-actions { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:8px; }
  .wl-card .wl-actions .btn-cart { grid-column:1/-1; min-width:0; min-height:44px; font-size:12px; }
  .wl-card .wl-actions .btn-icon-sq { width:100%; min-width:44px; box-sizing:border-box; }
  .wc .wa { flex-wrap:wrap; gap:6px; }
  .wc .wa button { flex:1 1 100%; min-height:44px; font-size:12px; }
  .rel .rc { min-width:0; }
  .rel .rc .m { padding:0; }
  .rel .rc .t { padding:12px; min-width:0; }
  .rel .rc .t b { font-size:14px; overflow-wrap:anywhere; }
  .rel .rc .t>span { font-size:13px; overflow-wrap:anywhere; }
}
