/* Sprint 930 — Natural supplier cards + aligned top PDP footprint
   Keeps existing column widths and mobile ordering.
   Fixes the giant stretched blank white supplier card introduced by equal-height stretching. */

@media (min-width:1251px){

  /* Keep the top grid visually aligned without forcing inner supplier card to stretch */
  .product-page-v2 .product-commerce-grid{
    align-items:stretch!important;
  }

  /* Left and center may stretch to the row height */
  .product-page-v2 .product-media-card,
  .product-page-v2 .product-buy-card{
    align-self:stretch!important;
    height:100%!important;
    min-height:100%!important;
  }

  /* Right column occupies the same grid row height, but its children stay natural */
  .product-page-v2 .tf-supplier-sidebar-premium{
    align-self:stretch!important;
    height:100%!important;
    min-height:100%!important;
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    background:transparent!important;
  }

  /* IMPORTANT: do not stretch the white supplier card itself */
  .product-page-v2 .tf-supplier-sidebar-premium .tf-premium-supplier-card{
    display:block!important;
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    background:#FFFFFF!important;
  }

  /* Undo previous auto-push that created the giant white blank region */
  .product-page-v2 .tf-premium-supplier-card .tf-premium-inquiry-head{
    margin-top:0!important;
  }

  /* Keep supplier identity/profile area compact */
  .product-page-v2 .tf-premium-supplier-top,
  .product-page-v2 .tf-premium-supplier-badges,
  .product-page-v2 .tf-premium-rating,
  .product-page-v2 .tf-premium-supplier-facts,
  .product-page-v2 .tf-premium-profile-btn{
    flex:0 0 auto!important;
  }

  /* enquiry starts immediately after profile section */
  .product-page-v2 .tf-premium-inquiry-head,
  .product-page-v2 .tf-premium-inquiry-form{
    flex:0 0 auto!important;
  }

  /* If sidebar has extra row height, keep it as page background below the card,
     not as an inflated white card */
  .product-page-v2 .tf-supplier-sidebar-premium::after{
    content:""!important;
    display:block!important;
    flex:1 1 auto!important;
    min-height:0!important;
    background:transparent!important;
  }

  /* Center card: avoid artificial internal push gaps */
  .product-page-v2 .product-buy-card{
    display:flex!important;
    flex-direction:column!important;
  }
  .product-page-v2 .product-buy-card > .tf-shopping-commerce-panel{
    margin-top:8px!important;
  }
}

/* Tablet/mobile retain natural heights and current stack order */
@media (max-width:1250px){
  .product-page-v2 .product-media-card,
  .product-page-v2 .product-buy-card,
  .product-page-v2 .tf-supplier-sidebar-premium,
  .product-page-v2 .tf-premium-supplier-card{
    height:auto!important;
    min-height:0!important;
  }

  .product-page-v2 .tf-supplier-sidebar-premium{
    display:block!important;
  }

  .product-page-v2 .tf-premium-supplier-card .tf-premium-inquiry-head{
    margin-top:0!important;
  }

  .product-page-v2 .tf-supplier-sidebar-premium::after{
    display:none!important;
  }
}
