/* Translated labels need room to wrap without changing product image geometry. */
body.sl-wp-preview .sil-product .product-media { container: slml-gallery / inline-size; }
body.sl-wp-preview .sil-product .thumb span {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  line-height: 1.3;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  padding: 3px 2px;
}
@container slml-gallery (max-width: 560px) {
  body.sl-wp-preview .sil-product .thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
body.sl-wp-preview :is(h1, h2, h3) { text-transform: none; }

/* CJK homepage typography: retain the hero's three deliberate semantic lines. */
html:lang(ja) body.sl-wp-preview .slh-home {
  --slml-home-font: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --successlcd-system-font: var(--slml-home-font);
  font-family: var(--slml-home-font);
  line-break: strict;
}
html:lang(ko) body.sl-wp-preview .slh-home {
  --slml-home-font: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --successlcd-system-font: var(--slml-home-font);
  font-family: var(--slml-home-font);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* The site's legacy WPCode font rule is important; override it only inside these homepages. */
html:is(:lang(ja), :lang(ko)) body.sl-wp-preview .slh-home :is(h1, h2, h3, p) {
  font-family: var(--slml-home-font) !important;
  letter-spacing: normal;
}
html:is(:lang(ja), :lang(ko)) body.sl-wp-preview .slh-home .slh-hero-copy {
  min-width: 0;
}
html:is(:lang(ja), :lang(ko)) body.sl-wp-preview .slh-home #shh-title {
  font-family: var(--slml-home-font) !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html:lang(ja) body.sl-wp-preview .slh-home #shh-title {
  font-size: clamp(28px, 3.8vw, 58px);
  line-height: 1.3;
  letter-spacing: -.02em;
  text-wrap: wrap;
}
html:lang(ko) body.sl-wp-preview .slh-home #shh-title {
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.25;
  letter-spacing: -.015em;
}
@media (max-width: 760px) {
  html:lang(ja) body.sl-wp-preview .slh-home #shh-title {
    font-size: clamp(26px, 7.5vw, 52px);
  }
}

/* Persian uses connected Arabic-script glyphs; tracking and Latin-only fonts break its rhythm. */
html:lang(fa) body.sl-wp-preview {
  --slml-persian-font: Tahoma, "Segoe UI", Arial, sans-serif;
  --successlcd-system-font: var(--slml-persian-font);
  font-family: var(--slml-persian-font);
  line-height: 1.85;
}
html:lang(fa) body.sl-wp-preview :is(.slh-home,.sl-nav-header,.sil-product,.pc-root,.sl-preserved-content,.slkh,#site-footer) {
  font-family: var(--slml-persian-font) !important;
}
html:lang(fa) body.sl-wp-preview :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,th,td,label,input,textarea,select,button,summary,a,figcaption) {
  font-family: var(--slml-persian-font) !important;
  letter-spacing: normal !important;
}
html:lang(fa) body.sl-wp-preview :is(h1,h2,h3,h4,h5,h6,summary) {
  text-transform: none !important;
  line-height: 1.55 !important;
}
html:lang(fa) body.sl-wp-preview :is(.slh-home #shh-title,.slkh .slkh-intro h1) {
  line-height: 1.4 !important;
  text-wrap: pretty;
}
