/**
 * Shared Myanmar (Unicode) text support for admin + storefront.
 * - Self-host full Noto (GSUB/GPOS). Google Fonts subsets often break medials.
 * - Prefer that face when lang=mm (Open Sans first breaks shaping).
 * - Never synthesize bold for Myanmar — fake weight detaches marks.
 * - Avoid -webkit-box line-clamp on MM text — it breaks OpenType in Chrome.
 * - Never use word-break: break-all on body or free-form user/DB text.
 */

@font-face {
  font-family: 'Myanmar3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/myanmar3-bf255e62b0d236f7c2b9a85fccfbd0e6.woff2') format('woff2');
}

@font-face {
  font-family: 'Myanmar3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/myanmar3-bf255e62b0d236f7c2b9a85fccfbd0e6.woff2') format('woff2');
}

@font-face {
  font-family: 'Myanmar3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/myanmar3-bf255e62b0d236f7c2b9a85fccfbd0e6.woff2') format('woff2');
}

/* Full static faces (not unicode-range subsetted) — required for correct Myanmar shaping */
@font-face {
  font-family: 'MMNotoMyanmar';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/noto-sans-myanmar/NotoSansMyanmar-Regular-b7c2e4377f400d3a560fdd07c5b19994.ttf') format('truetype');
}

@font-face {
  font-family: 'MMNotoMyanmar';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/noto-sans-myanmar/NotoSansMyanmar-Medium-8b3d3c32a395fe8c33810fe8b2873e67.ttf') format('truetype');
}

@font-face {
  font-family: 'MMNotoMyanmar';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/noto-sans-myanmar/NotoSansMyanmar-SemiBold-7569258399e7986eb54fb6ab7a27ffe9.ttf') format('truetype');
}

@font-face {
  font-family: 'MMNotoMyanmar';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/noto-sans-myanmar/NotoSansMyanmar-Bold-19e494ec62da7df7c773e86787235016.ttf') format('truetype');
}

:root {
  --mm-font-latin: "Open Sans", "Lato", "Noto Sans JP", "Meiryo", system-ui, -apple-system, sans-serif;
  /* MMNoto first for Myanmar glyphs; Open Sans next so Latin in mixed titles still paints. */
  --mm-font-myanmar: "MMNotoMyanmar", "Open Sans", "Noto Sans Myanmar", "Myanmar3", "Myanmar Text", "Padauk", sans-serif;
  --mm-font-stack: "MMNotoMyanmar", "Open Sans", "Lato", "Noto Sans Myanmar", "Myanmar3", "Noto Sans JP", "Myanmar Text", "Padauk", "Meiryo", system-ui, -apple-system, sans-serif;
}

.mm-text,
.mm-myanmar {
  font-family: var(--mm-font-myanmar);
  font-synthesis: none;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.55;
}

/* Storefront MM locale: Myanmar font must lead, or Chrome draws Latin metrics
   over Unicode Myanmar and diacritics float apart on product cards / nav. */
html[lang="mm"] body,
html[lang="mm"] button,
html[lang="mm"] input,
html[lang="mm"] select,
html[lang="mm"] textarea {
  font-family: var(--mm-font-myanmar);
  font-synthesis: none;
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="mm"] .product-name,
html[lang="mm"] .mm-page .product-name,
html[lang="mm"] .page-content .product-name,
html[lang="mm"] .mm-app-card__name,
html[lang="mm"] .mm-app-card__stock,
html[lang="mm"] .mm-app-card__cat,
html[lang="mm"] .mm-fav-row__name,
html[lang="mm"] .mm-fav-row__cat,
html[lang="mm"] .mm-co-prod__name,
html[lang="mm"] .mm-co-prod__cat,
html[lang="mm"] .mm-co-item__name,
html[lang="mm"] .mm-cart-card__name,
html[lang="mm"] .mm-od-flow-screen__title,
html[lang="mm"] .mm-co-section__title,
html[lang="mm"] .mm-co-continue,
html[lang="mm"] .instock-text,
html[lang="mm"] .mm-page .instock-text,
html[lang="mm"] .mm-chip,
html[lang="mm"] .mm-chip-row,
html[lang="mm"] .mm-catalog__side-name,
html[lang="mm"] .mm-catalog__header-text h1,
html[lang="mm"] .mm-catalog__header-text p,
html[lang="mm"] .mm-section__title,
html[lang="mm"] .mm-section__link,
html[lang="mm"] .mm-nav__link,
html[lang="mm"] .mm-search__input,
html[lang="mm"] .mm-search__suggest-item,
html[lang="mm"] .mm-bottom-nav__link,
html[lang="mm"] .mm-bottom-nav__label,
html[lang="mm"] .mm-app-mhead__title,
html[lang="mm"] .mm-pdp-title,
html[lang="mm"] .title,
html[lang="mm"] .viewall-text,
html[lang="mm"] .outofstock {
  font-family: var(--mm-font-myanmar);
  font-synthesis: none;
  letter-spacing: 0;
}

/*
 * Product / checkout / cart titles: -webkit-box line-clamp, nowrap, or tight
 * line-height clips and mis-shapes Myanmar medials in Chrome.
 */
html[lang="mm"] .mm-app-card__name,
html[lang="mm"] .product-name,
html[lang="mm"] .mm-page .product-name,
html[lang="mm"] .page-content .product-name,
html[lang="mm"] .mm-co-prod__name,
html[lang="mm"] .mm-co-item__name,
html[lang="mm"] .mm-cart-card__name {
  font-weight: 600;
  line-height: 1.65;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  white-space: normal;
  overflow: hidden;
  padding-top: 0.1em;
  padding-bottom: 0.15em;
}

html[lang="mm"] .mm-app-card__name,
html[lang="mm"] .product-name,
html[lang="mm"] .mm-page .product-name,
html[lang="mm"] .page-content .product-name {
  min-height: 3.3em;
  max-height: 3.3em;
}

html[lang="mm"] .mm-co-prod__name,
html[lang="mm"] .mm-co-item__name,
html[lang="mm"] .mm-cart-card__name {
  font-weight: 500;
  max-height: 3.3em;
}

html[lang="mm"] .mm-app-card__stock,
html[lang="mm"] .instock-text,
html[lang="mm"] .mm-page .instock-text,
html[lang="mm"] .outofstock {
  line-height: 1.5;
  overflow: visible;
  white-space: normal;
}

html[lang="mm"] .mm-chip {
  line-height: 1.45;
}

/*
 * Bottom tab labels: overflow:hidden + nowrap + fake 700 weight clips medials
 * into dotted circles (cart qty tab looks especially broken when active).
 * App uses a real Bold face with fontWeight normal — mirror that here.
 */
html[lang="mm"] .mm-bottom-nav__link,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link,
html[lang="mm"] .mm-bottom-nav__link.active,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link.active {
  font-family: "MMNotoMyanmar", "Myanmar3", "Myanmar Text", "Padauk", sans-serif !important;
  font-weight: 400 !important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
  line-height: 1.55 !important;
}
html[lang="mm"] .mm-bottom-nav__label,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__label {
  font-family: inherit !important;
  font-weight: 500 !important;
  font-synthesis: none !important;
  line-height: 1.55 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
  padding-top: 0.12em;
  padding-bottom: 0.18em;
}
html[lang="mm"] .mm-bottom-nav__link.active .mm-bottom-nav__label,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link.active .mm-bottom-nav__label {
  font-weight: 600 !important;
}
html[lang="mm"] .mm-bottom-nav__badge,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__badge {
  font-family: "Open Sans", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-synthesis: weight !important;
  letter-spacing: 0 !important;
}

html[lang="mm"] .mm-pdp-title,
html[lang="mm"] .mm-fav-row__name {
  font-weight: 600;
  line-height: 1.55;
}

/* Order-detail OverlaySheets (refund bank, view bank, request status) */
html[lang="mm"] .mm-od-sheet__title,
html[lang="mm"] .mm-od-bank-sheet__desc,
html[lang="mm"] .mm-od-bank-field span,
html[lang="mm"] .mm-od-bank-field .form-control,
html[lang="mm"] .mm-od-bank-dl__row span,
html[lang="mm"] .mm-od-bank-dl__row strong,
html[lang="mm"] .mm-od-sheet__footer .mm-btn,
html[lang="mm"] .mm-od-bank-info-sheet .mm-btn {
  font-family: var(--mm-font-myanmar);
  font-synthesis: none;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: break-word;
}
html[lang="mm"] .mm-od-sheet__title {
  font-weight: 600;
  line-height: 1.55;
}
html[lang="mm"] .mm-od-bank-sheet__desc {
  font-weight: 400;
  line-height: 1.65;
}
