
/* V271 — Products list optimized for 2K / 32-inch / ultrawide desktops.
   No data, SQL, import/export, or product CRUD logic changes. */

@media (min-width:1101px){
  .v271-products-page{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  .v271-products-page .ledger-cell{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  .v271-products-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
  }

  .v271-products-table{
    width:100%!important;
    min-width:980px!important;
    table-layout:fixed!important;
  }

  /* 8 columns:
     Mã | Sản phẩm | Danh mục | ĐVT | Giá nhập | VAT | Giá bán | Thao tác */
  .v271-products-table th:nth-child(1),
  .v271-products-table td:nth-child(1){width:11%!important}

  .v271-products-table th:nth-child(2),
  .v271-products-table td:nth-child(2){width:26%!important}

  .v271-products-table th:nth-child(3),
  .v271-products-table td:nth-child(3){width:18%!important}

  .v271-products-table th:nth-child(4),
  .v271-products-table td:nth-child(4){width:8%!important}

  .v271-products-table th:nth-child(5),
  .v271-products-table td:nth-child(5){width:11%!important}

  .v271-products-table th:nth-child(6),
  .v271-products-table td:nth-child(6){width:7%!important}

  .v271-products-table th:nth-child(7),
  .v271-products-table td:nth-child(7){width:11%!important}

  .v271-products-table th:nth-child(8),
  .v271-products-table td:nth-child(8){width:8%!important}

  .v271-products-table th,
  .v271-products-table td{
    min-width:0!important;
    vertical-align:middle!important;
  }

  .v271-products-table th{
    white-space:nowrap!important;
  }

  .v271-products-table td:nth-child(1),
  .v271-products-table td:nth-child(4),
  .v271-products-table td:nth-child(5),
  .v271-products-table td:nth-child(6),
  .v271-products-table td:nth-child(7),
  .v271-products-table td:nth-child(8){
    white-space:nowrap!important;
  }

  .v271-products-table td:nth-child(2),
  .v271-products-table td:nth-child(3){
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }

  .v271-product-row{
    min-height:48px!important;
  }

  .v271-products-search{
    width:min(360px,32vw)!important;
  }
}

/* 2K / 27–32 inch */
@media (min-width:1600px){
  .v271-products-table{
    min-width:0!important;
    font-size:13px!important;
  }

  .v271-products-table th{
    padding-left:16px!important;
    padding-right:16px!important;
    font-size:11px!important;
  }

  .v271-products-table td{
    padding-left:16px!important;
    padding-right:16px!important;
  }

  .v271-products-search{
    width:400px!important;
  }
}

/* Full HD / 2K wide desktop */
@media (min-width:1920px){
  .v271-products-table th{
    padding-left:20px!important;
    padding-right:20px!important;
  }

  .v271-products-table td{
    padding-left:20px!important;
    padding-right:20px!important;
    padding-top:14px!important;
    padding-bottom:14px!important;
  }

  .v271-products-search{
    width:440px!important;
  }
}

/* Ultrawide */
@media (min-width:2400px){
  .v271-products-table{
    font-size:13.5px!important;
  }

  .v271-products-table th{
    padding-left:24px!important;
    padding-right:24px!important;
  }

  .v271-products-table td{
    padding-left:24px!important;
    padding-right:24px!important;
    padding-top:15px!important;
    padding-bottom:15px!important;
  }

  /* Give more visual room to product name/category on very wide screens. */
  .v271-products-table th:nth-child(2),
  .v271-products-table td:nth-child(2){width:29%!important}

  .v271-products-table th:nth-child(3),
  .v271-products-table td:nth-child(3){width:19%!important}

  .v271-products-table th:nth-child(1),
  .v271-products-table td:nth-child(1){width:10%!important}

  .v271-products-table th:nth-child(4),
  .v271-products-table td:nth-child(4){width:7%!important}

  .v271-products-table th:nth-child(5),
  .v271-products-table td:nth-child(5){width:10%!important}

  .v271-products-table th:nth-child(6),
  .v271-products-table td:nth-child(6){width:6%!important}

  .v271-products-table th:nth-child(7),
  .v271-products-table td:nth-child(7){width:10%!important}

  .v271-products-table th:nth-child(8),
  .v271-products-table td:nth-child(8){width:9%!important}

  .v271-products-search{
    width:500px!important;
  }
}
