/* HL storefront content shell — ONE source of truth for desktop max-width.
   Full-bleed backgrounds stay full-width; only inner containers are capped.
   Cart/checkout/order pages excluded. */

:root {
  --hl-container-max: 1400px;
  --hl-container-gutter: 40px;
}

/*
 * Sticky footer: on short pages (e.g. contact success) keep #footer at the
 * bottom of the viewport — never leave a white gap under the dark footer.
 * Long pages scroll normally; header/footer stay natural height.
 */
html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > #header.header,
body > #header,
body > #footer.footer,
body > #footer {
  flex: 0 0 auto;
  width: 100%;
}

body > #wrapper.wrapper,
body > #wrapper {
  flex: 1 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  body:not(#cart):not(#checkout):not(.page-order) .header-top .container-md,
  body:not(#cart):not(#checkout):not(.page-order) .header-bottom .container-md,
  body:not(#cart):not(#checkout):not(.page-order) .header-bottom .container,
  body:not(#cart):not(#checkout):not(.page-order) #wrapper > .container,
  body:not(#cart):not(#checkout):not(.page-order) #wrapper .columns-container,
  body:not(#cart):not(#checkout):not(.page-order) .columns-container.container,
  body:not(#cart):not(#checkout):not(.page-order) #content > .container,
  body:not(#cart):not(#checkout):not(.page-order) main > .container,
  body:not(#cart):not(#checkout):not(.page-order) .breadcrumb .container,
  body:not(#cart):not(#checkout):not(.page-order) #footer .container,
  body:not(#cart):not(#checkout):not(.page-order) .footer-container .container,
  body:not(#cart):not(#checkout):not(.page-order) .footer__main > .container,
  body:not(#cart):not(#checkout):not(.page-order) .container:not(.hl-mega__container),
  body:not(#cart):not(#checkout):not(.page-order) .container-md {
    max-width: var(--hl-container-max);
    width: min(var(--hl-container-max), calc(100% - var(--hl-container-gutter)));
    margin-left: auto;
    margin-right: auto;
  }

  /* Mega panel fills the header inner shell — not a second content width */
  body:not(#cart):not(#checkout):not(.page-order) .hl-mega__container,
  body:not(#cart):not(#checkout):not(.page-order) .hl-mega__container.container {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body:not(#cart):not(#checkout):not(.page-order) #wrapper.wrapper,
  body:not(#cart):not(#checkout):not(.page-order) #wrapper {
    max-width: none;
    width: 100%;
  }

  /* Nested product module containers inherit the outer shell (no double gutters) */
  body#index .hl-home-shell .module-products.container,
  body#index .hl-home-shell .ps-specials .container,
  body#index .hl-home-shell .ps-newproducts .container {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  body:not(#cart):not(#checkout) .header-bottom__row.row {
    column-gap: 36px;
  }

  body:not(#cart):not(#checkout) .header-bottom__logo {
    margin-right: 0;
  }

  body:not(#cart):not(#checkout) #_desktop_ps_searchbar {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 4px;
  }

  body:not(#cart):not(#checkout) #_desktop_ps_searchbar .ps-searchbar,
  body:not(#cart):not(#checkout) #_desktop_ps_searchbar .ps-searchbar__form,
  body:not(#cart):not(#checkout) #_desktop_ps_searchbar .ps-searchbar__input {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

/* Homepage product grids: hl-product-card-*.css */
/* Category listing columns: hl-product-card-a.css (sidebar-aware) */
