/* Elanterna product copy shares the child theme's relative text scale.
   Keep headings and emphasis semantic; do not rewrite stored descriptions. */
body#product {
  --el-product-copy-size: var(--el-text-sm);
  --el-product-copy-leading: 1.65;
}

body#product :is(.product__description-short, .product__description) {
  font-family: var(--el-font);
  font-size: var(--el-product-copy-size);
  line-height: var(--el-product-copy-leading);
}

/* Imported descriptions contain inline font declarations and legacy <font>
   attributes. These scoped !important resets are needed to override them.
   Leave weights, italics, headings, icons, media and layout intact. */
body#product :is(.product__description-short, .product__description)
  :is(p, div, span, a, ul, ol, li, dl, dt, dd, blockquote, figcaption,
      table, caption, thead, tbody, tfoot, tr, th, td,
      b, strong, em, u, s, strike, font, small, i:not([class])):not(.material-icons):not(.material-symbols-outlined):not([class*="icon"]) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Headings use one relative hierarchy across products, including imported ones. */
body#product :is(.product__description-short, .product__description)
  :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--el-font) !important;
  line-height: 1.4 !important;
}

body#product .product__description :is(h1, h2, h3) {
  font-size: calc(var(--el-product-copy-size) * 1.375) !important;
}

body#product .product__description :is(h4, h5, h6) {
  font-size: var(--el-product-copy-size) !important;
}

body#product .product__description-short :is(h1, h2, h3, h4, h5, h6) {
  font-size: calc(var(--el-product-copy-size) * 1.125) !important;
}
