/* Product viewing alone becomes a side sheet. The editor uses this same
   dialog without .detail-hero, so every rule deliberately keeps that guard. */
#product-dialog:has(.detail-hero) {
  --product-drawer-enter: 28px;
  position: fixed;
  inset-block: 12px;
  inset-inline-start: auto;
  inset-inline-end: 12px;
  margin: 0;
  width: min(760px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0 0 16px;
  border: 1px solid #e6e6ec;
  border-radius: 16px;
  background: #fff;
  color: #424245;
  box-shadow: -12px 0 70px #1d1d1f18, 0 14px 42px #1d1d1f0c;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cfcfd6 transparent;
  scroll-padding-top: 76px;
}
#product-dialog:has(.detail-hero)[open] { animation: product-sheet-enter 260ms cubic-bezier(.22, 1, .36, 1) both; }
#product-dialog:has(.detail-hero)::backdrop { background: #24242938; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
#product-dialog:has(.detail-hero) .detail-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 65px;
  padding: 13px 30px;
  border: 0;
  background: #ffffffed;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #86868b;
  font-size: 11px;
  line-height: 1.7;
}
#product-dialog:has(.detail-hero) .detail-topbar > span { min-width: 0; overflow-wrap: anywhere; }
#product-dialog:has(.detail-hero) .detail-topbar .icon-button { flex-shrink: 0; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 8px; border: 0; border-radius: 50%; background: #f0f0f4; color: #73737b; }
#product-dialog:has(.detail-hero) .detail-topbar .icon-button:hover { background: #e5e5eb; color: #424245; }
#product-dialog:has(.detail-hero) .detail-hero { display: grid; grid-template-columns: 1fr 1.07fr; gap: 27px; align-items: start; padding: 18px 30px 32px; }
#product-dialog:has(.detail-hero) .detail-hero > div { min-width: 0; }
#product-dialog:has(.detail-hero) .detail-image { min-height: 276px; border-radius: 16px; background: #f7f7f9; overflow: hidden; }
#product-dialog:has(.detail-hero) .detail-image img { display: block; width: 90%; height: 260px; object-fit: contain; }
#product-dialog:has(.detail-hero) .detail-title { margin: 12px 0 10px; color: #1d1d1f; font-size: 25px; font-weight: 650; line-height: 1.4; letter-spacing: -.5px; overflow-wrap: anywhere; }
#product-dialog:has(.detail-hero) .detail-description { color: #86868b; font-size: 12px; line-height: 1.75; margin: 0 0 17px; overflow-wrap: anywhere; }
#product-dialog:has(.detail-hero) .stage { border: 0; border-radius: 6px; background: #f0f0f4; color: #73737b; font-size: 10px; padding: 3px 7px; font-weight: 400; }
#product-dialog:has(.detail-hero) .new-badge { background: #edf2f7; color: #496b90; font-size: 10px; font-weight: 500; border-radius: 6px; padding: 3px 7px; }
#product-dialog:has(.detail-hero) .detail-hero .product-price { margin: 17px 0 14px; }
#product-dialog:has(.detail-hero) .detail-hero .price-label { color: #86868b; font-size: 9px; letter-spacing: .04em; }
#product-dialog:has(.detail-hero) .detail-hero .product-price strong { color: #496b90; font-size: 28px; font-weight: 600; letter-spacing: -.7px; }
#product-dialog:has(.detail-hero) .detail-hero .price-unavailable strong { font-size: 18px; color: #86868b; }
#product-dialog:has(.detail-hero) .detail-hero .price-basis { color: #93939c; font-size: 10px; line-height: 1.65; }
#product-dialog:has(.detail-hero) .detail-hero .selection-add { justify-content: center; min-height: 38px; margin: 0 0 20px; padding: 8px 15px; border: 1px solid #dde4ed; border-radius: 12px; color: #496b90; background: #edf2f7; font-size: 11px; }
#product-dialog:has(.detail-hero) .detail-hero .selection-add:hover { background: #e2eaf3; }
#product-dialog:has(.detail-hero) .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-block: 0; }
#product-dialog:has(.detail-hero) .specs > div { min-width: 0; }
#product-dialog:has(.detail-hero) .specs dt { color: #93939c; font-size: 10px; margin-bottom: 4px; line-height: 1.7; }
#product-dialog:has(.detail-hero) .specs dd { color: #62626b; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#product-dialog:has(.detail-hero) .specs code { font-size: 11px; }
#product-dialog:has(.detail-hero) .detail-section { padding: 26px 30px; border: 0; }
#product-dialog:has(.detail-hero) .detail-section + .detail-section { padding-top: 16px; }
#product-dialog:has(.detail-hero) .detail-section h3 { margin: 0 0 18px; color: #1d1d1f; font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: -.3px; }
#product-dialog:has(.detail-hero) .detail-section h3 .muted { margin-inline-start: 5px; color: #93939c; font-size: 11px; font-weight: 400; }
#product-dialog:has(.detail-hero) .detail-note { margin-block: 10px 16px; color: #86868b; font-size: 11px; line-height: 1.8; }
#product-dialog:has(.detail-hero) .product-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#product-dialog:has(.detail-hero) .product-gallery figure { min-width: 0; border: 1px solid #eaeaef; border-radius: 12px; overflow: hidden; }
#product-dialog:has(.detail-hero) .gallery-preview { display: block; width: 100%; padding: 13px; border: 0; background: #f8f8fa; }
#product-dialog:has(.detail-hero) .gallery-preview img { width: 100%; height: 128px; object-fit: contain; }
#product-dialog:has(.detail-hero) .product-gallery figcaption { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 11px; color: #86868b; font-size: 10px; }
#product-dialog:has(.detail-hero) .product-gallery .doc-action { margin-inline-start: auto; min-height: 28px; padding: 4px 7px; font-size: 9px; border-radius: 7px; }
#product-dialog:has(.detail-hero) .specifications-heading { margin-bottom: 18px; }
#product-dialog:has(.detail-hero) .specifications-heading h3 { margin: 0; }
#product-dialog:has(.detail-hero) .specifications-count { border: 0; border-radius: 6px; background: #f0f0f4; color: #86868b; font-size: 10px; }
#product-dialog:has(.detail-hero) .specification-highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
#product-dialog:has(.detail-hero) .specification-highlight { padding: 14px 15px; border: 0; border-radius: 12px; background: #f5f5f7; }
#product-dialog:has(.detail-hero) .specification-highlight dt { margin-bottom: 6px; color: #93939c; font-size: 10px; line-height: 1.6; }
#product-dialog:has(.detail-hero) .specification-highlight dd { margin: 0; color: #424245; font-size: 17px; font-weight: 550; line-height: 1.45; }
#product-dialog:has(.detail-hero) .specification-groups { grid-template-columns: 1fr; gap: 18px; }
#product-dialog:has(.detail-hero) .specification-group { border: 0; border-radius: 12px; overflow: hidden; background: #fafafa; }
#product-dialog:has(.detail-hero) .specification-group-heading { padding: 13px 18px; border: 0; background: #f2f2f5; }
#product-dialog:has(.detail-hero) .specification-group-heading h4 { color: #62626b; font-size: 12px; font-weight: 550; line-height: 1.6; }
#product-dialog:has(.detail-hero) .specification-group-heading > span { min-height: 20px; min-width: 20px; background: #e8e8ed; color: #93939c; font-size: 10px; border-radius: 6px; }
#product-dialog:has(.detail-hero) .specification-rows { padding: 3px 18px; }
#product-dialog:has(.detail-hero) .specification-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; padding-block: 11px; border-color: #ededef; }
#product-dialog:has(.detail-hero) .specification-row dt { color: #86868b; font-size: 11px; line-height: 1.75; }
#product-dialog:has(.detail-hero) .specification-row dd { color: #424245; font-size: 12px; font-weight: 400; line-height: 1.75; }
#product-dialog:has(.detail-hero) .specification-row-conflict { margin-inline: -8px; padding-inline: 8px; background: #fbf5ea; border-color: #efe7d8; border-radius: 7px; }
#product-dialog:has(.detail-hero) .specification-conflict-label { color: #987742; font-size: 10px; }
#product-dialog:has(.detail-hero) .specification-notes { padding: 16px 18px; border: 0; border-radius: 12px; background: #f5f5f7; color: #73737b; font-size: 12px; line-height: 1.85; }
#product-dialog:has(.detail-hero) .specification-notes h4 { color: #62626b; font-weight: 500; }
#product-dialog:has(.detail-hero) .source-differences { padding: 12px 14px; border: 1px solid #eee3cd; border-radius: 10px; background: #fbf7ee; color: #937447; font-size: 11px; line-height: 1.8; }
#product-dialog:has(.detail-hero) .source-difference-table { white-space: normal; font-size: 11px; }
#product-dialog:has(.detail-hero) .source-difference-table :is(th, td) { padding: 12px 15px; line-height: 1.75; }
#product-dialog:has(.detail-hero) .source-record { margin: 10px 0; border-color: #e9e9ee; border-radius: 12px; }
#product-dialog:has(.detail-hero) .source-record summary { padding: 14px 16px; background: #f7f7f9; color: #73737b; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
#product-dialog:has(.detail-hero) .source-fields { padding: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
#product-dialog:has(.detail-hero) .source-fields dt { color: #93939c; font-size: 10px; }
#product-dialog:has(.detail-hero) .source-fields dd { color: #62626b; font-size: 11px; line-height: 1.8; }
#product-dialog:has(.detail-hero) .source-fields small { font-size: 10px; }
#product-dialog:has(.detail-hero) .stock-values { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
#product-dialog:has(.detail-hero) .stock-values > div { padding: 15px; border-radius: 12px; background: #f5f5f7; }
#product-dialog:has(.detail-hero) .stock-values span { color: #93939c; font-size: 10px; }
#product-dialog:has(.detail-hero) .stock-values strong { display: block; margin-top: 5px; color: #62626b; font-size: 21px; font-weight: 500; }
#product-dialog:has(.detail-hero) .resource-library-heading { gap: 18px; }
#product-dialog:has(.detail-hero) .resource-library-heading .muted { max-width: 400px; color: #93939c; font-size: 11px; line-height: 1.8; }
#product-dialog:has(.detail-hero) .resource-library-heading .plain-button { border: 1px solid #e2e5eb; border-radius: 10px; color: #496b90; padding: 8px 11px; min-height: 38px; font-size: 10px; white-space: normal; box-shadow: none; }
#product-dialog:has(.detail-hero) .resource-library-filters { display: flex; flex-wrap: wrap; padding: 20px 0; gap: 10px; }
#product-dialog:has(.detail-hero) .resource-library-filters label { flex: 1 1 160px; min-width: 0; color: #86868b; font-size: 10px; }
#product-dialog:has(.detail-hero) .resource-library-filters select { min-height: 39px; max-width: none; border-color: #e4e4e9; border-radius: 10px; color: #62626b; font-size: 12px; }
#product-dialog:has(.detail-hero) .resource-library-filters > .muted { font-size: 10px; margin-inline-start: auto; }
#product-dialog:has(.detail-hero) .resource-purpose-group h4 { margin: 0 0 10px; color: #62626b; font-size: 12px; font-weight: 500; }
#product-dialog:has(.detail-hero) .resource-purpose-group h4 span { min-width: 20px; font-size: 10px; background: #f0f0f4; color: #93939c; }
#product-dialog:has(.detail-hero) .resource-purpose-group .document-row { gap: 10px; padding: 13px 12px; margin-bottom: 6px; border: 0; border-radius: 12px; background: #f7f7f9; }
#product-dialog:has(.detail-hero) .doc-symbol { width: 34px; height: 38px; background: #eaeef4; color: #6c809b; border-radius: 8px; font-size: 9px; }
#product-dialog:has(.detail-hero) .doc-text strong { color: #62626b; font-size: 12px; font-weight: 500; line-height: 1.7; }
#product-dialog:has(.detail-hero) .doc-text small { color: #93939c; font-size: 10px; line-height: 1.7; }
#product-dialog:has(.detail-hero) .doc-action { min-height: 34px; border-color: #e4e4eb; border-radius: 9px; padding: 7px 9px; font-size: 10px; color: #73737b; margin-inline-start: 0; }
#product-dialog:has(.detail-hero) .doc-action:hover { color: #496b90; background: #edf2f7; border-color: #d4deea; }
#product-dialog:has(.detail-hero) .resource-meta-tag { padding: 2px 5px; border-radius: 4px; background: #ededf2; color: #93939c; font-size: 9px; }
#product-dialog:has(.detail-hero) .resource-updated { color: #93939c; font-size: 9px; }
@keyframes product-sheet-enter { from { opacity: 0; transform: translateX(var(--product-drawer-enter)); } to { opacity: 1; transform: translateX(0); } }
html[dir="rtl"] #product-dialog:has(.detail-hero) { --product-drawer-enter: -28px; box-shadow: 12px 0 70px #1d1d1f18, 0 14px 42px #1d1d1f0c; }
html[dir="rtl"] #product-dialog:has(.detail-hero) .detail-title { letter-spacing: normal; }
@media (max-width: 850px) and (min-width: 601px) {
  #product-dialog:has(.detail-hero) { width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
}
@media (max-width: 600px) {
  #product-dialog:has(.detail-hero) { inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); scroll-padding-top: 70px; }
  #product-dialog:has(.detail-hero) .detail-topbar { min-height: 62px; padding: calc(12px + env(safe-area-inset-top)) 22px 12px; }
  #product-dialog:has(.detail-hero) .detail-hero { grid-template-columns: 1fr; gap: 24px; padding: 12px 22px 24px; }
  #product-dialog:has(.detail-hero) .detail-image { min-height: 275px; }
  #product-dialog:has(.detail-hero) .detail-image img { height: 260px; }
  #product-dialog:has(.detail-hero) .detail-title { font-size: 25px; }
  #product-dialog:has(.detail-hero) .detail-description { font-size: 12px; }
  #product-dialog:has(.detail-hero) .detail-hero .product-price { margin-top: 16px; }
  #product-dialog:has(.detail-hero) .detail-hero .selection-add { width: 100%; min-height: 43px; margin-bottom: 24px; font-size: 12px; }
  #product-dialog:has(.detail-hero) .specs { gap: 18px 20px; }
  #product-dialog:has(.detail-hero) .specs dt { font-size: 10px; }
  #product-dialog:has(.detail-hero) .specs dd { font-size: 12px; }
  #product-dialog:has(.detail-hero) .detail-section { padding: 24px 22px; }
  #product-dialog:has(.detail-hero) .detail-section h3 { font-size: 18px; }
  #product-dialog:has(.detail-hero) .product-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #product-dialog:has(.detail-hero) .gallery-preview img { height: 125px; }
  #product-dialog:has(.detail-hero) .product-gallery figcaption { padding: 9px; }
  #product-dialog:has(.detail-hero) .specification-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #product-dialog:has(.detail-hero) .specification-highlight { padding: 14px; }
  #product-dialog:has(.detail-hero) .specification-highlight dd { font-size: 17px; }
  #product-dialog:has(.detail-hero) .specification-group-heading { padding-inline: 15px; }
  #product-dialog:has(.detail-hero) .specification-rows { padding-inline: 15px; }
  #product-dialog:has(.detail-hero) .specification-row { gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
  #product-dialog:has(.detail-hero) .specification-row :is(dt, dd) { font-size: 11px; }
  #product-dialog:has(.detail-hero) .source-fields { grid-template-columns: 1fr; gap: 15px; }
  #product-dialog:has(.detail-hero) .source-difference-table :is(th, td) { padding-inline: 10px; font-size: 10px; }
  #product-dialog:has(.detail-hero) .stock-values { gap: 9px; }
  #product-dialog:has(.detail-hero) .stock-values > div { padding: 13px 11px; }
  #product-dialog:has(.detail-hero) .stock-values strong { font-size: 20px; }
  #product-dialog:has(.detail-hero) .resource-library-heading { flex-direction: column; gap: 13px; }
  #product-dialog:has(.detail-hero) .resource-library-heading > button { align-self: stretch; justify-content: center; min-height: 42px; font-size: 11px; }
  #product-dialog:has(.detail-hero) .resource-library-filters { gap: 9px; }
  #product-dialog:has(.detail-hero) .resource-library-filters label { flex-basis: 130px; }
  #product-dialog:has(.detail-hero) .resource-library-filters > .muted { flex-basis: 100%; margin: 0; padding: 0; }
  #product-dialog:has(.detail-hero) .document-row { flex-wrap: wrap; }
  #product-dialog:has(.detail-hero) .doc-text { flex-basis: calc(100% - 48px); }
  #product-dialog:has(.detail-hero) .doc-action { min-height: 38px; font-size: 10px; }
  #product-dialog:has(.detail-hero) .document-row > .doc-action:first-of-type { margin-inline-start: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #product-dialog:has(.detail-hero)[open], #product-dialog:has(.detail-hero)::backdrop { animation: none !important; }
  #product-dialog:has(.detail-hero) { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  #product-dialog:has(.detail-hero) { border: 1px solid CanvasText; background: Canvas; }
  #product-dialog:has(.detail-hero) .detail-topbar { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #product-dialog:has(.detail-hero) :is(.specification-group, .specification-highlight, .source-record, .stock-values > div) { border: 1px solid CanvasText; }
}
