/* GAINVO Storefront v0.10.16 — Product Details related-product rail
   Keep “You may also like” consistent with Home merchandising: compact,
   horizontally swipeable, responsive cards instead of oversized single cards. */

@media (max-width:699px){
  .product-modal .pdp-related-v8{overflow:visible!important;}
  .product-modal .pdp-related-grid{
    display:grid!important;
    grid-auto-flow:column!important;
    grid-template-columns:none!important;
    grid-template-rows:1fr!important;
    grid-auto-columns:clamp(132px,43vw,184px)!important;
    gap:10px!important;
    width:auto!important;
    max-width:none!important;
    margin:0 -14px!important;
    padding:2px 14px 12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity!important;
    scroll-padding-inline:14px!important;
    overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
    touch-action:pan-x pan-y!important;
  }
  .product-modal .pdp-related-grid::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
  .product-modal .pdp-related-grid>.product-card,
  .product-modal .pdp-related-grid>.product-card-v7{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    margin:0!important;
    scroll-snap-align:start!important;
    scroll-snap-stop:normal!important;
    border-radius:16px!important;
  }
  .product-modal .pdp-related-grid .product-media-wrap,
  .product-modal .pdp-related-grid .product-image{width:100%!important;min-width:0!important;}
  .product-modal .pdp-related-grid .product-image{aspect-ratio:1.08/1!important;}
  .product-modal .pdp-related-grid .product-body{min-height:132px!important;padding:10px!important;}
  .product-modal .pdp-related-grid .product-title{
    min-height:34px!important;max-height:36px!important;margin:0 0 5px!important;
    font-size:clamp(.8125rem,.78rem + .13vw,.9rem)!important;line-height:1.28!important;
  }
  .product-modal .pdp-related-grid .product-shop-row{
    min-height:16px!important;margin:0 0 6px!important;
    font-size:clamp(.72rem,.69rem + .1vw,.78rem)!important;
  }
  .product-modal .pdp-related-grid .product-meta-line{
    min-height:15px!important;margin:0 0 7px!important;
    font-size:clamp(.7rem,.68rem + .08vw,.75rem)!important;
  }
  .product-modal .pdp-related-grid .product-price-row{margin-top:auto!important;gap:6px!important;align-items:center!important;}
  .product-modal .pdp-related-grid .product-price{
    min-width:0!important;font-size:clamp(.94rem,.9rem + .16vw,1.04rem)!important;
    line-height:1.05!important;white-space:nowrap!important;
  }
  .product-modal .pdp-related-grid .product-price small,
  .product-modal .pdp-related-grid .product-price-sale del{font-size:.7rem!important;}
  .product-modal .pdp-related-grid .mini-add{
    flex:0 0 44px!important;width:44px!important;min-width:44px!important;
    height:44px!important;min-height:44px!important;border-radius:13px!important;
  }
  .product-modal .pdp-related-grid .product-save-card{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  }
  .product-modal .pdp-related-grid>.empty-state,
  .product-modal .pdp-related-grid>.quiet-empty{
    width:calc(100vw - 28px)!important;max-width:100%!important;
  }
  /* Keep the section heading compact so product discovery stays above the fold. */
  .product-modal .pdp-related-v8 .pdp-section-head{gap:10px!important;align-items:end!important;}
  .product-modal .pdp-related-v8 .pdp-section-head h3{font-size:clamp(1.25rem,5.4vw,1.45rem)!important;}
}

@media (max-width:350px){
  .product-modal .pdp-related-grid{
    grid-auto-columns:clamp(128px,43vw,146px)!important;
    gap:8px!important;margin-left:-12px!important;margin-right:-12px!important;
    padding-left:12px!important;padding-right:12px!important;scroll-padding-inline:12px!important;
  }
  .product-modal .pdp-related-grid .product-body{padding:9px!important;min-height:128px!important;}
  .product-modal .pdp-related-grid .product-title{font-size:.8125rem!important;}
  .product-modal .pdp-related-grid .product-price{font-size:.9375rem!important;}
}

@media (min-width:520px) and (max-width:699px){
  .product-modal .pdp-related-grid{grid-auto-columns:clamp(164px,30.5vw,188px)!important;gap:12px!important;}
}

@media (min-width:700px) and (max-width:1023px){
  .product-modal .pdp-related-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;}
}

@media (min-width:1024px){
  .product-modal .pdp-related-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;}
}

@media (prefers-reduced-motion:reduce){
  .product-modal .pdp-related-grid{scroll-behavior:auto!important;}
}
