.product-page-head{gap:20px;align-items:flex-start}
.product-page-head .button{white-space:nowrap}
.back-link{display:inline-block;margin-bottom:6px;color:var(--palette-14);font-size:13px;text-decoration:none}
.product-head-meta{min-width:160px;padding:10px 14px;border:1px solid var(--palette-53);border-radius:10px;background:var(--surface)}
.product-head-meta span{display:block;color:var(--palette-1);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.product-head-meta strong{display:block;margin-top:3px;color:var(--primary);font-size:14px}

.product-filter{display:grid;grid-template-columns:minmax(140px,220px) minmax(180px,1fr) minmax(150px,200px) auto;gap:12px;align-items:center;margin-bottom:16px;padding:14px;background:var(--surface);border:1px solid var(--palette-53);border-radius:12px}
.product-filter select,.product-filter input{width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--palette-5);border-radius:8px;background:var(--surface)}
.product-filter button{min-height:42px}
.product-notice{margin:-4px 0 16px;padding:11px 14px;border:1px solid var(--primary-focus);border-radius:10px;background:var(--primary-soft);color:var(--primary);font-size:13px}

.product-table-wrap{overflow:auto;max-width:100%;max-height:min(46dvh,420px);scrollbar-gutter:stable;overscroll-behavior-x:contain;border:1px solid var(--palette-53);border-radius:12px;background:var(--surface);box-shadow:0 1px 2px var(--palette-54)}
.product-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0;color:var(--palette-17)}
.product-transfer-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:12px 0;padding:14px;border:1px solid var(--palette-53);border-radius:10px;background:var(--surface)}
.product-transfer-toolbar fieldset{min-width:min(100%,420px);margin:0;padding:0;border:0}
.product-transfer-toolbar legend{margin-bottom:8px;font-size:12px;font-weight:700}
.product-transfer-stores{display:flex;gap:8px;flex-wrap:wrap}
.product-transfer-stores label{display:flex;align-items:center;gap:5px;padding:8px;border:1px solid var(--palette-53);border-radius:8px;font-size:12px}
.product-transfer-toolbar>div:last-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.product-serial label,.col-serial label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.product-table-wrap:focus-visible{outline:2px solid var(--primary-focus);outline-offset:3px}
.product-table-wrap table{width:100%;min-width:1450px;border-collapse:separate;border-spacing:0}
.product-table-wrap th{position:sticky;top:0;z-index:2;padding:11px 12px;background:var(--primary-soft);border-bottom:1px solid var(--palette-53);color:var(--palette-14);font-size:11px;font-weight:700;letter-spacing:.02em;text-align:left;white-space:nowrap}
.product-table-wrap td{padding:10px 12px;border-bottom:1px solid var(--primary-soft);color:var(--palette-17);font-size:13px;vertical-align:middle}
.product-table-wrap tbody tr:last-child td{border-bottom:0}
.product-table-wrap tbody tr:hover td{background:var(--palette-55)}
.product-table-wrap .col-image{width:72px}
.product-table-wrap .col-product{width:250px;min-width:250px}
.product-table-wrap .col-sku{width:130px;min-width:130px}
.product-table-wrap .col-barcode{width:160px;min-width:160px}
.product-table-wrap .col-category{width:160px;min-width:160px}
.product-table-wrap .col-brand{width:145px;min-width:145px}
.product-table-wrap .col-supplier{width:190px;min-width:190px}
.product-table-wrap .col-retail{width:84px;min-width:84px;text-align:center}
.product-table-wrap .col-number{width:108px;min-width:108px;text-align:right}
.product-table-wrap .col-expiry{width:138px;min-width:138px}
.product-table-wrap .col-action{width:84px;min-width:84px;text-align:center}
.product-table-wrap td.numeric{text-align:right;font-variant-numeric:tabular-nums}
.product-name-cell{display:block;max-width:250px;color:var(--primary);line-height:1.35}
.product-thumb,.product-thumb-placeholder{width:46px;height:46px;border:1px solid var(--palette-53);border-radius:9px;background:var(--surface)}
.product-thumb{display:block;object-fit:cover}
.product-thumb-placeholder{display:grid;place-items:center;color:var(--palette-15);background:var(--palette-56)}
.table-action{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 11px;border:1px solid var(--primary-focus);border-radius:8px;background:var(--primary-soft);color:var(--primary);font-weight:600;text-decoration:none}
.empty-state{text-align:center!important;color:var(--palette-1)!important;padding:40px!important}

.product-edit{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;padding:22px;border:1px solid var(--palette-53);border-radius:14px;background:var(--surface);box-shadow:0 1px 3px var(--palette-57)}
.product-edit>.error{grid-column:1/-1}
.product-fields{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:16px 18px;align-content:start}
.product-fields label,.product-image-editor label{font-size:12px;font-weight:650;color:var(--palette-17)}
.product-fields input,.product-fields select,.product-image-editor input{display:block;width:100%;min-height:42px;margin-top:6px;padding:9px 11px;border:1px solid var(--palette-5);border-radius:8px;background:var(--surface)}
.product-fields input:focus,.product-image-editor input:focus,.bulk-product-grid input:focus{outline:0;border-color:var(--primary-focus);box-shadow:0 0 0 3px var(--palette-58)}
.product-fields input[readonly],.bulk-product-grid input[readonly]{background:var(--palette-16);color:var(--palette-1);cursor:not-allowed}
.product-fields .check{display:flex!important;align-items:center;gap:9px;min-height:42px;margin-top:20px;padding:10px 12px;border:1px solid var(--palette-53);border-radius:8px;background:var(--palette-56)}
.product-fields .check input{width:18px;min-height:18px;margin:0}
.field-note{display:block;margin-top:5px;color:var(--palette-1);font-size:11px;font-weight:400;line-height:1.35}

.store-selector{grid-column:1/-1;margin:0 0 2px;padding:0;border:0}
.store-selector legend{width:100%;margin-bottom:8px;font-size:12px;font-weight:700;color:var(--palette-17)}
.selection-count{float:right;color:var(--palette-1);font-size:12px;font-weight:400}
.store-options{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:8px}
.store-options label{display:flex;align-items:flex-start;gap:8px;padding:10px 11px;border:1px solid var(--palette-5);border-radius:9px;background:var(--surface);cursor:pointer}
.store-options label:has(input:checked){border-color:var(--primary-focus);background:var(--primary-soft)}
.store-options input{width:17px;min-height:17px;margin:2px 0 0}
.store-options span{display:grid;gap:2px;color:var(--palette-1);font-weight:400;line-height:1.25}
.store-options strong{color:var(--primary);font-size:12px}

.product-image-editor{align-self:start;padding:16px;border:1px solid var(--palette-53);border-radius:12px;background:var(--palette-56)}
.image-editor-head{display:flex;justify-content:space-between;margin-bottom:12px}
.image-editor-head strong{display:block;color:var(--primary);font-size:14px}
.image-editor-head span{display:block;margin-top:3px;color:var(--palette-1);font-size:11px}
.product-image-preview{overflow:hidden;width:100%;aspect-ratio:1;border:1px dashed var(--palette-5);border-radius:12px;background:var(--surface)}
.product-image-preview img{width:100%;height:100%;object-fit:contain}
.image-empty{display:grid;place-items:center;align-content:center;gap:6px;width:100%;height:100%;color:var(--palette-15);font-size:12px}
.image-empty-icon{font-size:28px;font-weight:300}
.image-upload{display:block;margin-top:12px}
.image-upload>span{display:block;margin-bottom:6px}
.image-upload input{margin-top:0;background:var(--surface);font-size:12px}
.remove-image{display:flex!important;align-items:center;gap:8px;margin-top:12px;padding:9px 10px;border:1px solid var(--palette-47);border-radius:8px;background:var(--palette-46);color:var(--palette-7)!important}
.remove-image input{width:17px!important;min-height:17px!important;margin:0!important}
.product-save{grid-column:1/-1;justify-content:flex-end;padding-top:4px;border-top:1px solid var(--primary-soft)}

.bulk-product-form{display:grid;gap:12px}
.bulk-edit-toolbar,.bulk-edit-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--palette-53);border-radius:10px;background:var(--surface)}
.bulk-edit-toolbar strong{display:block;color:var(--primary);font-size:14px}
.bulk-edit-toolbar span{display:block;margin-top:2px;color:var(--palette-1);font-size:12px}
.bulk-product-grid{max-height:min(36dvh,340px)}
.bulk-product-grid table{min-width:1880px}
.bulk-product-grid td{padding:7px}
.bulk-product-grid input:not([type=checkbox]){width:100%;min-height:36px;padding:7px 8px;border:1px solid var(--palette-5);border-radius:6px;background:var(--surface);font-size:12px}
.bulk-product-grid input[type=checkbox]{width:18px;height:18px}
.bulk-product-grid .bulk-check{text-align:center}
.bulk-edit-footer{justify-content:flex-end;box-shadow:0 8px 22px var(--palette-59)}

@media(max-width:1050px){
  .product-edit{grid-template-columns:1fr}
  .product-fields{grid-template-columns:repeat(2,minmax(160px,1fr))}
  .product-image-editor{max-width:320px}
  .store-options{grid-template-columns:repeat(2,minmax(150px,1fr))}
}
@media(max-width:720px){
  .product-filter{grid-template-columns:1fr}
  .product-page-head{flex-direction:column}
  .product-fields{grid-template-columns:1fr}
  .store-options{grid-template-columns:1fr}
  .product-edit{padding:14px;gap:16px}
  .product-image-editor{max-width:none}
  .bulk-edit-toolbar,.bulk-edit-footer{align-items:stretch;flex-direction:column}
  .bulk-edit-toolbar .actions,.bulk-edit-footer.actions{width:100%;justify-content:flex-end}
}
.col-serial{width:48px;min-width:48px}.product-serial{font-family:Consolas,monospace;font-variant-numeric:tabular-nums;color:var(--muted)!important}.col-stores{min-width:110px}.product-store-dots{display:flex;gap:7px;flex-wrap:wrap;max-width:180px;min-width:60px}.store-dot{display:inline-block;width:11px;height:11px;flex:none;border-radius:50%;background:var(--primary-soft);border:1px solid var(--primary-focus)}.store-dot.is-assigned{background:var(--primary);border-color:var(--primary)}.store-dot:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
@media print{
  .product-filter,.product-transfer-toolbar,nav.product-pagination,.product-page-head .actions{display:none!important}
  .product-table-wrap{max-height:none;overflow:visible;border:0;box-shadow:none}
  .product-list-table{width:100%!important;min-width:0!important}
  .product-list-table th,.product-list-table td{padding:5px!important;font-size:9px!important;white-space:normal}
  .product-list-table input[type=checkbox]{display:none}
  .product-list-table th:nth-child(2),.product-list-table td:nth-child(2),
  .product-list-table th:nth-child(4),.product-list-table td:nth-child(4),
  .product-list-table th:nth-child(8),.product-list-table td:nth-child(8),
  .product-list-table th:nth-child(10),.product-list-table td:nth-child(10),
  .product-list-table th:nth-child(11),.product-list-table td:nth-child(11),
  .product-list-table th:nth-child(14),.product-list-table td:nth-child(14){display:none}
}
