/* NEMSTORY 2.0.0 — mobile page clearance and typography safety.
   The homepage hero keeps its dedicated composition. Inner pages receive a
   consistent offset below the 68–72px absolute header, including admin-bar height. */
@media (max-width: 780px) {
  :root { --ns-v20-header-clearance: 144px; }

  /* Inner pages using the generic page wrapper (cart, checkout, menu, standard pages). */
  body:not(.home):not(.front-page) .page-shell {
    padding-top: var(--ns-v20-header-clearance) !important;
  }

  /* WooCommerce templates have several overlapping historical padding rules. */
  body:not(.home):not(.front-page) .woocommerce-shell,
  body.single-product .woocommerce-shell,
  body.woocommerce-cart .woocommerce-shell,
  body.woocommerce-checkout .woocommerce-shell {
    padding-top: var(--ns-v20-header-clearance) !important;
  }

  /* Brand pages (food truck, events and contact) don't use .page-shell. */
  body:not(.home):not(.front-page) .brand-page {
    padding-top: var(--ns-v20-header-clearance) !important;
  }

  body:not(.home):not(.front-page) .brand-menu-page {
    padding-top: var(--ns-v20-header-clearance) !important;
  }

  /* Keep the top heading clear of the header and prevent awkward clipping/wrapping. */
  body:not(.home):not(.front-page) .page-header,
  body:not(.home):not(.front-page) .brand-page-content > .eyebrow:first-child {
    scroll-margin-top: var(--ns-v20-header-clearance);
  }

  body.woocommerce-cart .woocommerce h1,
  body.woocommerce-cart .woocommerce .page-title,
  body.woocommerce-checkout .woocommerce h1,
  body.woocommerce-checkout .page-header h1 {
    max-width: 100% !important;
    font-size: clamp(36px, 9.2vw, 48px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* A logged-in admin sees the WordPress toolbar above the site header. */
  body.admin-bar .site-header {
    top: 46px !important;
  }
  body.admin-bar:not(.home):not(.front-page) .page-shell,
  body.admin-bar:not(.home):not(.front-page) .woocommerce-shell,
  body.admin-bar:not(.home):not(.front-page) .brand-page,
  body.admin-bar:not(.home):not(.front-page) .brand-menu-page {
    padding-top: calc(var(--ns-v20-header-clearance) + 46px) !important;
  }
}

@media (max-width: 380px) {
  body.woocommerce-cart .woocommerce h1,
  body.woocommerce-cart .woocommerce .page-title {
    font-size: 36px !important;
  }
}
