/* Product operations: single edit, bulk actions and multi-select */
.product-management-table .selection-column {
  width: 46px;
  padding-right: 8px !important;
  padding-left: 14px !important;
  text-align: center;
}

.product-management-table input[type="checkbox"],
.product-active-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #e71362;
  cursor: pointer;
}

.product-management-table tr.selected-row td { background: #fff4f8; }
.product-management-table tr.inactive-row td { color: #718096; background: #f8fafc; }
.product-management-table tr.inactive-row .product-thumbnail { filter: grayscale(.8); opacity: .72; }
.stock-badge.inactive { color: #526075; background: #e8edf4; }

.product-selection-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  border-top: 1px solid #e4e9f1;
  border-bottom: 1px solid #e4e9f1;
  background: #fff7fa;
}

.product-selection-bar > strong { color: #a50f49; white-space: nowrap; }
.product-selection-bar > span { color: #66738b; font-size: 13px; }
.product-selection-bar > div { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.product-selection-bar button { min-height: 38px; padding: 0 14px; }
.text-button { border: 0; background: transparent; color: #526075; font-weight: 700; cursor: pointer; }
.text-button:hover { color: #d90d59; }

.product-management-note {
  padding: 10px 16px;
  border-bottom: 1px solid #dcece5;
  color: #486173;
  background: #f1f8f5;
  font-size: 13px;
}

.product-empty-state { padding: 44px 20px; color: #66738b; text-align: center; }

.product-operation-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 23, 45, .62);
  backdrop-filter: blur(3px);
}

.product-operation-dialog {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 21, 43, .26);
}

.product-operation-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e5e9f0;
}

.product-operation-dialog > header small {
  display: block;
  margin-bottom: 6px;
  color: #c20f50;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.product-operation-dialog > header h2 { margin: 0; color: #10213f; font-size: 24px; }
.product-operation-dialog > header p { margin: 5px 0 0; color: #66738b; }
.product-operation-dialog > header > button {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
}

.product-operation-body { overflow: auto; padding: 20px 24px; }
.product-operation-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #f8fafc;
}

.product-operation-summary > div { display: flex; flex-direction: column; gap: 4px; }
.product-operation-summary strong { color: #10213f; }
.product-operation-summary span { color: #66738b; font-size: 13px; }
.product-thumbnail.large { flex-basis: 62px; width: 62px; height: 62px; }

.xml-managed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.xml-managed-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
}

.xml-managed-grid span { color: #6a7589; font-size: 12px; }
.xml-managed-grid strong { color: #162641; font-size: 13px; }
.product-operation-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.product-operation-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #33435d;
  font-size: 13px;
  font-weight: 700;
}

.product-operation-form-grid label.wide { grid-column: 1 / -1; }
.product-operation-form-grid input,
.product-operation-form-grid select {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid #ccd6e4;
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: #12223e;
  font: inherit;
  font-weight: 500;
}

.product-operation-form-grid input:focus,
.product-operation-form-grid select:focus {
  border-color: #ea3c7e;
  box-shadow: 0 0 0 3px rgba(231, 19, 98, .1);
}

.product-operation-form-grid input:disabled,
.product-operation-form-grid select:disabled { color: #7b879a; background: #f3f5f8; }
.product-operation-form-grid label > small { color: #7a8698; font-size: 11px; font-weight: 500; }
.product-active-toggle {
  flex-direction: row !important;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f8fafc;
}

.product-active-toggle > span { display: flex; flex-direction: column; gap: 4px; }
.product-active-toggle strong { color: #152541; }
.product-audit-note {
  margin-top: 15px;
  padding: 12px 14px;
  border: 1px solid #cfe2f4;
  border-radius: 12px;
  color: #48637e;
  background: #f4f9ff;
  font-size: 12px;
  line-height: 1.5;
}

.product-operation-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid #e5e9f0;
  background: #fafbfd;
}

.product-operation-dialog > footer button { min-height: 44px; padding: 0 18px; }
.bulk-product-preview { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.bulk-product-preview span {
  padding: 6px 9px;
  border-radius: 8px;
  color: #34435b;
  background: #f1f4f8;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 800px) {
  .product-selection-bar { align-items: flex-start; flex-direction: column; }
  .product-selection-bar > div { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .product-selection-bar > div button { flex: 1; }
  .product-operation-backdrop { padding: 8px; }
  .product-operation-dialog { max-height: calc(100dvh - 16px); border-radius: 15px; }
  .product-operation-dialog > header,
  .product-operation-body,
  .product-operation-dialog > footer { padding-right: 16px; padding-left: 16px; }
  .product-operation-form-grid,
  .xml-managed-grid { grid-template-columns: 1fr; }
  .product-operation-form-grid label.wide { grid-column: auto; }
  .product-management-table { min-width: 1120px; }
}
