/*
 * LabGain UI pack 1 — opt-in local presentation layer.
 * Load after the theme and Elementor styles. No menu, product-grid,
 * cart, checkout, review-widget or tab-control selectors are changed.
 */
.lg-ui-pack1 {
  --lg-pack1-title-size: var(--lg-type-title, clamp(2rem, 1.5rem + 2vw, 3rem));
  --lg-pack1-h2-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  --lg-pack1-h3-size: clamp(1.375rem, 1.25rem + .5vw, 1.75rem);
  --lg-pack1-body-size: var(--lg-type-body, clamp(1rem, .875rem + .5vw, 1.125rem));
  --lg-pack1-text-font: var(--lg-font-text, "Instrument Sans", sans-serif);
}

/* Specificity beats the theme's product-title and Elementor breadcrumb
 * rules without changing their layout, visibility or hidden title state.
 * page-id-2577 is the existing /blog-grid/ page in this local copy.
 */
.lg-ui-pack1.single-product div.product .summary.entry-summary .product_title,
.lg-ui-pack1.tax-product_cat .elementor .elementor-element .nutreko-woocommerce-title,
.lg-ui-pack1.blog .elementor .elementor-element .nutreko-woocommerce-title,
.lg-ui-pack1.page-id-2577 .elementor .elementor-element .nutreko-woocommerce-title {
  font-size: var(--lg-pack1-title-size);
  line-height: 1.18;
  letter-spacing: -.015em;
  block-size: auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.lg-ui-pack1.single-product div.product .summary.entry-summary .product_title {
  display: block;
  margin-block: 0 1.5rem;
}

/* Shared text scale; product descriptions use the available panel width. */
.lg-ui-pack1 .home-seo-main-block,
.lg-ui-pack1.single-product #tab-description,
.lg-ui-pack1 .home-seo-main-block :is(p, ul, ol),
.lg-ui-pack1.single-product #tab-description :is(p, ul, ol) {
  font-size: var(--lg-pack1-body-size);
  line-height: 1.6;
}

.lg-ui-pack1 .home-seo-main-block :is(p, ul, ol) {
  max-inline-size: 70ch;
}

.lg-ui-pack1 .home-seo-main-block p,
.lg-ui-pack1.single-product #tab-description p {
  margin-block: 0 1em;
  overflow-wrap: break-word;
}

/* Avoid stretched spaces from inline justification while preserving
 * centered image paragraphs. */
.lg-ui-pack1 .home-seo-main-block p[style*="justify"],
.lg-ui-pack1.single-product #tab-description p[style*="justify"] {
  text-align: start !important;
}

.lg-ui-pack1 .home-seo-main-block h2,
.lg-ui-pack1.single-product #tab-description h2 {
  font-size: var(--lg-pack1-h2-size);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin-block: 2.5rem 1rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.lg-ui-pack1 .home-seo-main-block > h2:first-child {
  margin-block-start: 0;
}

.lg-ui-pack1 .home-seo-main-block h3,
.lg-ui-pack1.single-product #tab-description h3 {
  font-size: var(--lg-pack1-h3-size);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-block: 1.75rem .75rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Text lists only. Native markers remain outside aligned text lines. */
.lg-ui-pack1 .home-seo-main-block :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]),
.lg-ui-pack1.single-product #tab-description :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]) {
  margin-inline: 0;
  margin-block: 0 1rem;
  padding-inline-start: 1.4em;
  list-style-position: outside;
}

.lg-ui-pack1 .home-seo-main-block :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]) > li,
.lg-ui-pack1.single-product #tab-description :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]) > li {
  font-size: inherit;
  line-height: 1.6;
}

.lg-ui-pack1 .home-seo-main-block :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]) > li + li,
.lg-ui-pack1.single-product #tab-description :is(ul, ol):not(.products):not(.tabs):not([role="tablist"]) > li + li {
  margin-block-start: .5rem;
}

/* This component has inline padding:50px; override that declaration only.
 * Preserve its existing background, border, details state and +/- marker.
 */
.lg-ui-pack1 .labgain-faq-wrapper {
  box-sizing: border-box;
  max-inline-size: 100%;
  padding: 2rem !important;
  font-size: var(--lg-pack1-body-size);
  line-height: 1.6;
}

/* The server layer replaces span.span-h2 with h2.lg-faq-title. This rule
 * also wins over the old span-h2 24px line-height if that class is retained.
 */
.lg-ui-pack1 .labgain-faq-wrapper h2.lg-faq-title,
.lg-ui-pack1.single-product #tab-description .labgain-faq-wrapper h2.lg-faq-title {
  display: block;
  font-size: var(--lg-pack1-h2-size);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.lg-ui-pack1 .labgain-faq-wrapper details > summary {
  box-sizing: border-box;
  min-block-size: 2.75rem;
  padding-block: .75rem;
  padding-inline-end: 2.25rem;
  cursor: pointer;
}

/* Inline FAQ question font-size and padding otherwise override CSS.
 * Keep the right-hand +/- area on summary rather than doubling its gutter.
 */
.lg-ui-pack1 .labgain-faq-wrapper details > summary > h3,
.lg-ui-pack1.single-product #tab-description .labgain-faq-wrapper details > summary > h3,
.lg-ui-pack1 .home-seo-main-block .schema-faq-code h3.faq-q {
  font-family: var(--lg-pack1-text-font);
  font-size: 1.25rem !important;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
  padding-inline-end: 0 !important;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.lg-ui-pack1 .home-seo-main-block .schema-faq-code .faq-question + .faq-question {
  margin-block-start: 1.5rem;
}

.lg-ui-pack1 .home-seo-main-block .schema-faq-code h3.faq-q {
  margin-block-end: .75rem;
}

.lg-ui-pack1 .labgain-faq-wrapper details > :not(summary):not(style),
.lg-ui-pack1 .labgain-faq-wrapper :is(p, ul, ol, li) {
  font-size: var(--lg-pack1-body-size);
  line-height: 1.6;
}

.lg-ui-pack1 .labgain-faq-wrapper :is(p, ul, ol) {
  max-inline-size: 70ch;
}

.lg-ui-pack1 .labgain-faq-wrapper p {
  margin-block: 0 1em;
  overflow-wrap: break-word;
}

/* Existing FAQ answers use inline list-style:none, padding-left:0 and
 * margin-bottom:5px. These narrow overrides restore consistent markers
 * and one 8px interval without affecting supporting product lists.
 */
.lg-ui-pack1 .labgain-faq-wrapper :is(ul, ol) {
  margin-inline: 0;
  padding-inline-start: 1.4em !important;
  list-style-position: outside;
}

.lg-ui-pack1 .labgain-faq-wrapper ul {
  list-style-type: disc !important;
}

.lg-ui-pack1 .labgain-faq-wrapper ol {
  list-style-type: decimal !important;
}

.lg-ui-pack1 .labgain-faq-wrapper :is(ul, ol) > li {
  margin-block: 0 .5rem !important;
}

/* Inline summary outline:none must not suppress keyboard focus. */
.lg-ui-pack1 .labgain-faq-wrapper details > summary:focus-visible {
  outline: var(--lg-focus-width, 2px) solid currentColor !important;
  outline-offset: 4px;
}

/* Only explicitly marked data tables receive a local overflow region.
 * Browser scrollbars remain native; table geometry never widens the page.
 */
.lg-ui-pack1 .lg-table-scroll {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  margin-block: 1.5rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.lg-ui-pack1 .lg-table-scroll:focus-visible {
  outline: var(--lg-focus-width, 2px) solid currentColor;
  outline-offset: 4px;
}

.lg-ui-pack1 .lg-table-scroll > table.lg-data-table {
  inline-size: 100%;
  min-inline-size: 40rem;
  table-layout: auto;
  border-collapse: collapse;
  margin: 0;
}

.lg-ui-pack1 .lg-table-scroll > table.lg-data-table :is(th, td) {
  font-family: var(--lg-pack1-text-font);
  font-size: 1rem;
  line-height: 1.6;
  padding: .75rem 1rem;
  vertical-align: top;
  text-align: start;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.lg-ui-pack1 .lg-table-scroll > table.lg-data-table th {
  font-weight: 700;
}

/* Paragraphs within table cells must follow the table's 16px type scale. */
.lg-ui-pack1 .lg-table-scroll > table.lg-data-table :is(p, ul, ol, li),
.lg-ui-pack1.single-product #tab-description .lg-table-scroll > table.lg-data-table :is(p, ul, ol, li) {
  max-inline-size: none;
  font-size: inherit;
  line-height: inherit;
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 47.99rem) {
  .lg-ui-pack1 .labgain-faq-wrapper {
    padding: 1rem !important;
  }

  .lg-ui-pack1 .lg-table-scroll > table.lg-data-table :is(th, td) {
    padding: .625rem .75rem;
  }
}
