/*
 * Shared shell for non-Home routes.
 * Home H2-C remains the untouched visual authority; these rules reproduce its
 * accepted header and compact footer after page-family styles.
 */

body.biom-theme:not(.biom-home-h2c-calibration) {
  --header-height: 79px;
}

body.biom-theme:not(.biom-home-h2c-calibration) :where(.site-header, .mobile-nav, .search-panel, .biom-shell-footer),
body.biom-theme:not(.biom-home-h2c-calibration) :where(.site-header, .mobile-nav, .search-panel, .biom-shell-footer) :where(a, button, input) {
  font-family: var(--biom-font-ui) !important;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header {
  position: relative;
  z-index: 100;
  height: var(--header-height);
  color: #0b2729;
  background: rgba(246, 244, 239, 0.93);
  border: 0;
  box-shadow: 0 1px 0 rgba(79, 91, 82, 0.12), 0 16px 38px rgba(35, 48, 41, 0.055);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header::after {
  content: "";
  position: absolute;
  inset: auto 3.2% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 78, 67, 0.22) 18%, rgba(65, 78, 67, 0.22) 82%, transparent);
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header > .container {
  width: calc(100% - 48px);
  max-width: none;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header__inner {
  height: 100%;
  grid-template-columns: 148px minmax(0, 1fr) 148px;
  gap: 20px;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header .brand__name {
  color: #0b2729;
  font-size: 25px;
  font-weight: 610;
  line-height: 1;
  letter-spacing: -0.045em;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header .brand__tagline {
  display: none;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-nav {
  display: flex;
  gap: clamp(14px, 1.6vw, 25px);
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-nav > a,
body.biom-theme:not(.biom-home-h2c-calibration) .site-nav__shop > button {
  min-height: 44px;
  padding: 8px 0;
  color: rgba(11, 39, 41, 0.88);
  font-size: clamp(12px, 0.94vw, 14px);
  font-weight: 520;
  letter-spacing: -0.012em;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header__utilities {
  min-width: 132px;
  gap: 0;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header .icon-button {
  width: 44px;
  height: 44px;
  color: rgba(11, 39, 41, 0.8);
  border-radius: 999px;
}

body.biom-theme:not(.biom-home-h2c-calibration) .site-header .icon-button:hover {
  color: #032d32;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(38, 54, 46, 0.08);
}

body.biom-theme:not(.biom-home-h2c-calibration) .search-panel,
body.biom-theme:not(.biom-home-h2c-calibration) .mobile-nav {
  top: var(--header-height);
}

.biom-shell-footer {
  width: auto;
  height: auto !important;
  min-height: 93px;
  display: grid;
  grid-template-columns: 24% minmax(0, 1fr) 31%;
  align-items: center;
  gap: 20px;
  padding: 12px 28px;
  color: rgba(239, 245, 238, 0.78);
  background: linear-gradient(110deg, #032d32, #063f3e);
}

.biom-shell-footer .hfull-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.biom-shell-footer .hfull-footer__brand strong {
  color: #f6f5ee;
  font-size: 19px;
  font-weight: 610;
  letter-spacing: -0.035em;
}

.biom-shell-footer .hfull-footer__brand span {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.biom-shell-footer :is(.hfull-footer__nav, .hfull-footer__legal) {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: 4px clamp(10px, 1.25vw, 18px);
  font-size: 14px;
  line-height: 1.4;
}

.biom-shell-footer .hfull-footer__legal {
  justify-content: flex-end;
  gap: 4px 14px;
  color: rgba(228, 237, 228, 0.62);
  font-size: 12px;
}

.biom-shell-footer a {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.biom-shell-footer a:hover {
  color: #fff;
}

.biom-shell-footer .biom-shell-footer__disclaimer {
  grid-column: 1 / -1;
  margin: 0;
  padding-block: 16px 8px;
  border-top: 1px solid rgba(228, 237, 228, 0.2);
  color: #c5d6d0;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 400;
  text-align: left;
  letter-spacing: normal;
}

/* WooCommerce retains its dormant gallery markup when PhotoSwipe assets are off. */
body.single-product .pswp[aria-hidden="true"] {
  display: none;
}

@media (max-width: 1180px) {
  body.biom-theme:not(.biom-home-h2c-calibration) .site-header__inner {
    grid-template-columns: 126px minmax(0, 1fr) 128px;
    gap: 14px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-nav {
    gap: 13px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-nav > a,
  body.biom-theme:not(.biom-home-h2c-calibration) .site-nav__shop > button {
    font-size: 12px;
  }

  .biom-shell-footer {
    min-height: 118px;
  }

  .biom-shell-footer .hfull-footer__legal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
}

@media (max-width: 1080px) {
  body.biom-theme:not(.biom-home-h2c-calibration) {
    --header-height: 68px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-nav {
    display: none;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-header__utilities {
    grid-column: 2;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .menu-toggle {
    display: inline-grid;
  }

  .biom-shell-footer {
    grid-template-columns: 22% minmax(0, 1fr) 34%;
  }

  .biom-shell-footer .hfull-footer__legal {
    display: flex;
    justify-content: flex-start;
  }
}

/* Display the existing transparent wordmark at source coordinates
   x=751, y=145, width=622, height=215 in the unchanged 1373x590 PNG. */
.site-header .brand__logo,
.biom-shell-footer .hfull-footer__logo {
  display: block;
  width: 84px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 622 / 215;
  background-image: url("../images/brand/biom-wordmark-source.png");
  background-size: 220.73954984% auto;
  background-position: right 38.66666667%;
  background-repeat: no-repeat;
}

.site-header .brand {
  justify-content: center;
  min-height: 44px;
}

.biom-shell-footer .hfull-footer__brand-link {
  width: max-content;
  min-height: 44px;
}

.biom-shell-footer .hfull-footer__logo {
  filter: brightness(0) invert(1);
}

@media (max-width: 760px) {
  .site-header .brand__logo,
  .biom-shell-footer .hfull-footer__logo {
    width: 76px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) {
    --header-height: 60px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-header > .container {
    width: calc(100% - 28px);
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-header .brand__name {
    font-size: 23px;
  }

  body.biom-theme:not(.biom-home-h2c-calibration) .site-header__utilities {
    min-width: 132px;
  }

  .biom-shell-footer {
    width: calc(100% - 32px);
    min-height: 220px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    margin-inline: 16px;
    padding: 24px 20px;
    border-radius: 0 0 8px 8px;
  }

  .biom-shell-footer :is(.hfull-footer__nav, .hfull-footer__legal) {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0 14px;
  }

  .biom-shell-footer .hfull-footer__legal {
    display: flex;
  }
}
