
/* V309 — FIX DỨT ĐIỂM hàng sản phẩm desktop.
   Khóa rõ từng cột 1→10 vào cùng grid-row:1 từ 1280px trở lên.
   Không để rule cũ đẩy VAT bán/Thành tiền xuống hàng dưới. */

@media (min-width:1280px){

  .order-dialog-content .v303-order-line-fields{
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    align-items:end!important;
    grid-auto-flow:row!important;
    grid-auto-rows:auto!important;
  }

  /* Ép chính xác từng cột vào hàng 1 */
  .order-dialog-content .v303-order-line-fields > *:nth-child(1){
    grid-column:1!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(2){
    grid-column:2!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(3){
    grid-column:3!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(4){
    grid-column:4!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(5){
    grid-column:5!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(6){
    grid-column:6!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(7){
    grid-column:7!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(8){
    grid-column:8!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(9){
    grid-column:9!important;
    grid-row:1!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(10){
    grid-column:10!important;
    grid-row:1!important;
  }

  /* Gỡ mọi width/flex cũ gây rơi cột */
  .order-dialog-content .v303-order-line-fields > *{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    flex:none!important;
    margin:0!important;
    align-self:end!important;
  }

  .order-dialog-content .v303-order-line-fields input,
  .order-dialog-content .v303-order-line-fields select,
  .order-dialog-content .v303-order-line-fields [data-slot="select-trigger"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  /* VAT bán */
  .order-dialog-content .v303-order-line-fields > *:nth-child(8){
    white-space:nowrap!important;
  }

  /* Thành tiền */
  .order-dialog-content .v303-order-line-fields > *:nth-child(9){
    white-space:nowrap!important;
    text-align:right!important;
    justify-self:stretch!important;
  }
  .order-dialog-content .v303-order-line-fields > *:nth-child(9) > div{
    width:100%!important;
    justify-content:flex-end!important;
    white-space:nowrap!important;
  }

  /* Xóa */
  .order-dialog-content .v303-order-line-fields > *:nth-child(10){
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    justify-self:end!important;
  }
}

/* 1280–1535: 10 cột vẫn cùng 1 hàng, co theo tỷ lệ */
@media (min-width:1280px) and (max-width:1535px){
  .order-dialog-content .v303-order-line-fields{
    grid-template-columns:
      minmax(0,2.35fr)
      minmax(0,.66fr)
      minmax(0,.72fr)
      minmax(0,1.12fr)
      minmax(0,.66fr)
      minmax(0,.88fr)
      minmax(0,.88fr)
      minmax(0,.72fr)
      minmax(0,.92fr)
      32px!important;
    column-gap:8px!important;
  }
}

/* 1536–1919 */
@media (min-width:1536px) and (max-width:1919px){
  .order-dialog-content .v303-order-line-fields{
    grid-template-columns:
      minmax(0,2.7fr)
      minmax(0,.7fr)
      minmax(0,.76fr)
      minmax(0,1.3fr)
      minmax(0,.7fr)
      minmax(0,.94fr)
      minmax(0,.94fr)
      minmax(0,.76fr)
      minmax(0,1fr)
      34px!important;
    column-gap:10px!important;
  }
}

/* >=1920 */
@media (min-width:1920px){
  .order-dialog-content .v303-order-line-fields{
    grid-template-columns:
      minmax(0,3fr)
      minmax(0,.72fr)
      minmax(0,.8fr)
      minmax(0,1.45fr)
      minmax(0,.72fr)
      minmax(0,.98fr)
      minmax(0,.98fr)
      minmax(0,.8fr)
      minmax(0,1.05fr)
      36px!important;
    column-gap:12px!important;
  }
}

/* 1100–1279 vẫn giữ 2 hàng có chủ đích */
@media (min-width:1100px) and (max-width:1279px){
  .order-dialog-content .v303-order-line-fields > *:nth-child(1){grid-column:1!important;grid-row:1!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(2){grid-column:2!important;grid-row:1!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(3){grid-column:3!important;grid-row:1!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(4){grid-column:4!important;grid-row:1!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(5){grid-column:5!important;grid-row:1!important}

  .order-dialog-content .v303-order-line-fields > *:nth-child(6){grid-column:1!important;grid-row:2!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(7){grid-column:2!important;grid-row:2!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(8){grid-column:3!important;grid-row:2!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(9){grid-column:4!important;grid-row:2!important}
  .order-dialog-content .v303-order-line-fields > *:nth-child(10){grid-column:5!important;grid-row:2!important}
}
