/* A detail import owns its layout. Keep the host section edge-to-edge without
   a viewport-width breakout, which would also include the scrollbar width.
   This also overrides cached markup that still carries section/container. */
body .cms-product-details {
  display:block;
  width:100%;
  min-width:0;
  max-width:none;
  margin:0;
  padding:0;
  border:0;
}

body .cms-product-details[hidden] { display:none; }

/* This outer boundary cannot be selected by imported, scoped CSS. */
.cms-product-details .product-details-boundary {
  position:relative;
  isolation:isolate;
  contain:layout paint;
  overflow:clip;
  width:100%;
  min-width:0;
  max-width:none;
  margin:0;
  padding:0;
}

#product-custom-details {
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:0;
  overflow-wrap:anywhere;
}
#product-custom-details :where(img,video) { max-width:100%;height:auto; }
#product-custom-details :where(pre) { max-width:100%;overflow-x:auto; }

/* Unstyled, previously published rich text keeps the site's existing look.
   Styled imports receive a predictable baseline; accepted imported rules have
   !important and a scoped ID, so their declarations win over this baseline. */
#product-custom-details:where([data-details-styled]) {
  color:#26372d;
  font-size:16px;
  font-family:Arial,Helvetica,"PingFang SC","Microsoft YaHei",sans-serif;
  line-height:1.7;
  text-align:left;
}
#product-custom-details:where([data-details-styled]) :where(*) {
  box-sizing:border-box;
  /* Remove site/UA spacing, including table cells and blockquotes. Imported
     stylesheet and inline spacing remains authoritative via scoped rules. */
  margin:0;
  padding:0;
  font-family:inherit!important;
}
#product-custom-details:where([data-details-styled]) :where(p,li,blockquote,td,th,figcaption) {
  font-size:inherit!important;
  line-height:inherit;
  color:inherit;
}
#product-custom-details:where([data-details-styled]) :where(h1,h2,h3,h4,h5,h6) {
  color:inherit;
  font-weight:700!important;
  line-height:1.3;
  letter-spacing:normal;
}
#product-custom-details:where([data-details-styled]) :where(h1) { font-size:2em; }
#product-custom-details:where([data-details-styled]) :where(h2) { font-size:1.5em; }
#product-custom-details:where([data-details-styled]) :where(h3) { font-size:1.17em; }
#product-custom-details:where([data-details-styled]) :where(h4,h5,h6) { font-size:1em; }
#product-custom-details:where([data-details-styled]) :where(table) {
  display:table;
  width:auto;
  border-collapse:collapse;
}
#product-custom-details:where([data-details-styled]) :where(a) { color:inherit; }
#product-custom-details:where([data-details-styled]) :where(summary) { cursor:pointer; }

/* Preview and storefront share the same full-width section and detail rules. */
body.product-details-preview { margin:0;background:#fff;color:#26372d; }
