.ew-ui.ew-app-gestao #products-screen .product-table .product-detail-trigger {
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #523790;
  text-align: start;
  text-decoration: underline;
  text-decoration-color: #a395bd;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ew-ui.ew-app-gestao #products-screen .product-table .product-detail-trigger:hover { color: #362163; }
.ew-ui .product-detail-trigger:focus-visible,
.ew-ui #product-detail :is(button, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--ui-focus, #654aba);
  outline-offset: 2px;
}

html:has(#product-detail[open]) { overflow: hidden; }
.ew-ui #product-detail {
  box-sizing: border-box;
  position: fixed;
  inset: 0 0 0 auto;
  width: min(510px, 100%);
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid #d9dce8;
  border-radius: 0;
  background: #f7f8fc;
  color: #172237;
  box-shadow: -16px 0 40px #1722372f;
  overflow: hidden;
}
.ew-ui #product-detail[open] { display: block; }
.ew-ui #product-detail::backdrop { background: #19233d57; }
.product-detail-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}
.product-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
  border-bottom: 1px solid #e2e5ee;
  background: #fff;
}
.product-detail-header h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.product-detail-header p { margin: 6px 0 0; color: #57637a; overflow-wrap: anywhere; }
.product-detail-header button { min-height: 42px; }
#product-detail-body { min-height: 0; padding: 18px 22px 24px; overflow: auto; overscroll-behavior: contain; }
.product-detail-section {
  padding: 16px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fff;
}
.product-detail-section + .product-detail-section,
.product-detail-back + .product-detail-section { margin-top: 14px; }
.product-detail-section h3 { margin: 0 0 12px; font-size: 1rem; }
.product-detail-section dl { margin: 0; }
.product-detail-section dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #edf0f5;
}
.product-detail-section dt,
.product-detail-note { color: #526078; }
.product-detail-section dd {
  margin: 0;
  max-width: min(40vw, 184px);
  color: #1d2940;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: end;
}
.product-detail-note { margin: 10px 0 0; font-size: .85rem; }
.product-detail-variants { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.ew-ui #product-detail .product-detail-variant {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  background: #f5f2fb;
  border-color: #e0d9ef;
  color: #413073;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ew-ui #product-detail .product-detail-variant:hover { background: #ece6f7; }
.product-detail-variant span { color: #526078; font-size: .85rem; font-weight: 400; }
.product-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px;
  border-top: 1px solid #e2e5ee;
  background: #fff;
}
.product-detail-actions [hidden] { display: none; }
.product-detail-actions button { min-height: 42px; }
.product-detail-actions [role="status"]:empty { display: none; }
.product-detail-actions [role="status"] { color: #526078; font-size: .84rem; }

@media (max-width: 660px) {
  .ew-ui #product-detail { width: 100%; border: 0; box-shadow: none; }
  .product-detail-header { padding: max(14px, env(safe-area-inset-top)) 14px 14px; }
  .product-detail-header h2 { font-size: 1.12rem; }
  #product-detail-body { padding: 14px; }
  .product-detail-section { padding: 12px; }
  .product-detail-actions { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
}
@media print { .ew-ui #product-detail { display: none !important; } }
