/* Shared mobile fold for the EU Liquid theme and regional Hydrogen storefronts. */
@media (max-width: 767px) {
  /* Reorder only the known homepage section structure. */
  main.flex-1:has(> section.relative.bg-dark):has(> section.section.bg-subtle:nth-of-type(4)),
  #MainContent:has(> [id$="__hero"]):has(> [id$="__brand_tabs"]) {
    display: flex;
    flex-direction: column;
  }
  :where(main.flex-1:has(> section.relative.bg-dark):has(> section.section.bg-subtle:nth-of-type(4))) > section,
  :where(#MainContent:has(> [id$="__hero"]):has(> [id$="__brand_tabs"])) > .shopify-section {
    order: 2;
    min-width: 0;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type,
  #MainContent > [id$="__hero"] {
    order: 0;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4),
  #MainContent > [id$="__brand_tabs"] {
    order: 1;
  }
  /* Header keeps search, language selection, menu and cart. */
  body:has(main > section.relative.bg-dark:first-of-type) header.sticky > div:first-child > .container,
  body:has(#MainContent > [id$="__hero"]) header.sticky > div:first-child > .container {
    height: 52px;
  }
  body:has(main > section.relative.bg-dark:first-of-type) header.sticky > .container,
  body:has(#MainContent > [id$="__hero"]) header.sticky > .container {
    height: 56px;
  }
  body:has(main > section.relative.bg-dark:first-of-type) header.sticky img,
  body:has(#MainContent > [id$="__hero"]) header.sticky img {
    max-height: 36px;
    width: auto;
  }
  /* Compact hero; duplicate promotional boxes remain available on desktop. */
  main.flex-1 > section.relative.bg-dark:first-of-type > div:first-child,
  #MainContent > [id$="__hero"] section > div:first-child {
    min-height: 0;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type > div:first-child > .container.flex,
  #MainContent > [id$="__hero"] section > div:first-child > .container.flex {
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 18px;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type h1,
  #MainContent > [id$="__hero"] h1 {
    font-size: 24px;
    line-height: 28px;
    margin-bottom: 8px;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type .container.flex > p,
  #MainContent > [id$="__hero"] .container.flex > p {
    font-size: 12px;
    line-height: 17px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type .btn-primary,
  main.flex-1 > section.relative.bg-dark:first-of-type .btn-outline,
  #MainContent > [id$="__hero"] .btn-primary,
  #MainContent > [id$="__hero"] .btn-outline {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
  }
  main.flex-1 > section.relative.bg-dark:first-of-type > div:first-child > .container:not(.flex),
  #MainContent > [id$="__hero"] section > div:first-child > .container:not(.flex) {
    display: none;
  }
  /* Product section moves above static trust and introduction copy. */
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4),
  #MainContent > [id$="__brand_tabs"] > section {
    padding-top: 18px;
    padding-bottom: 28px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) > .container > div:first-child,
  #MainContent > [id$="__brand_tabs"] > section > .container > div:first-child {
    margin-bottom: 12px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) h2,
  #MainContent > [id$="__brand_tabs"] h2 {
    font-size: 23px;
    line-height: 29px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) > .container > div:first-child > p,
  #MainContent > [id$="__brand_tabs"] > section > .container > div:first-child > p {
    display: none;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) > .container > .flex,
  #MainContent > [id$="__brand_tabs"] > section > .container > .flex {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 3px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) button,
  #MainContent > [id$="__brand_tabs"] button {
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 8px 13px;
    font-size: 12px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) > .container > .grid,
  #MainContent > [id$="__brand_tabs"] .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) a.group > div:last-child,
  #MainContent > [id$="__brand_tabs"] a.group > div:last-child {
    padding: 10px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) h3,
  #MainContent > [id$="__brand_tabs"] h3 {
    font-size: 14px;
    line-height: 20px;
    min-height: 60px;
  }
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-subtle:nth-of-type(4) a.group > div:last-child > div,
  #MainContent > [id$="__brand_tabs"] a.group > div:last-child > div {
    margin-top: 8px;
    font-size: 17px;
    line-height: 22px;
  }
  /* Remove repeated intro CTAs from the mobile focus order; main and footer
     navigation still expose the catalog, about and policy destinations. */
  main.flex-1:has(> section.relative.bg-dark) > section.section.bg-white:nth-of-type(3) .mt-6.flex,
  #MainContent > [id$="__emulators"] .mt-6.flex {
    display: none;
  }
}
