/**
 * HiGuppy footer — wave bridge, 2-column layout, no phantom gap below.
 * Loaded after hg-shell.css (+ homepage styles when present).
 */

html,
html:has(body.higuppy-site-shell):not(:has(body.hg-blog-active)),
html:has(body.hg-homepage-active) {
  background: #f7fbff !important;
  overscroll-behavior-y: none;
}

body.higuppy-site-shell:not(.hg-blog-active),
body.hg-homepage-active {
  background: #f7fbff !important;
  overscroll-behavior-y: none;
}

/* Contact owns a light canvas, including the area behind the shell header. */
html:has(body.hg-contact-v2-active),
body.hg-contact-v2-active,
body.hg-contact-v2-active::before {
  background: #f7fbff !important;
  background-image: none !important;
}

/* Blog keeps a light canvas through pagination → footer wave. */
html:has(body.hg-blog-active),
body.hg-blog-active,
body.hg-blog-active.higuppy-site-shell,
body.hg-blog-active::before {
  background: #f7fbff !important;
  background-image: none !important;
}

/* The document element owns page scrolling. Letting body scroll too creates
 * a second scrollbar and a phantom navy region after the footer in Chromium. */
body.higuppy-site-shell:not(.hg-nav-open):not(.hg-search-open):not(.higuppy-sidebar-cart-open),
body.hg-homepage-active:not(.hg-nav-open):not(.hg-search-open) {
  overflow: visible !important;
}

/* Checkout / cart / thank-you: continuous sky under header + hero. */
html:has(body.hg-checkout-flow-active.higuppy-site-shell),
body.hg-checkout-flow-active.higuppy-site-shell {
  background: linear-gradient(
    180deg,
    #eaf6ff 0,
    #eaf6ff 160px,
    #f2faff 300px,
    #f8fcff 520px,
    #fff 100%
  ) !important;
}

body.hg-checkout-flow-active.higuppy-site-shell::before {
  background: linear-gradient(
    180deg,
    #eaf6ff 0,
    #eaf6ff 160px,
    #f2faff 300px,
    #f8fcff 520px,
    #fff 100%
  ) !important;
}

/* Collections: match hero sky under floating header (no navy / grey seam).
   Keep selectors simple — nested :has() can invalidate the whole rule list. */
html:has(.hg-collections) {
  background: #eaf6ff !important;
}

body.higuppy-site-shell:has(.hg-collections),
body.page-id-2262.higuppy-site-shell {
  background: #eaf6ff !important;
}

body.higuppy-site-shell:has(.hg-collections)::before,
body.page-id-2262.higuppy-site-shell::before {
  background: #eaf6ff !important;
}

body.higuppy-site-shell:has(.hg-collections) > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.higuppy-sidebar-cart):not(.higuppy-sidebar-cart-overlay):not(.hg-back-top),
body.page-id-2262.higuppy-site-shell > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.higuppy-sidebar-cart):not(.higuppy-sidebar-cart-overlay):not(.hg-back-top) {
  background-color: transparent !important;
}

body.hg-checkout-flow-active.higuppy-site-shell > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.hg-back-top) {
  background-color: transparent !important;
}

body.higuppy-site-shell > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.hg-back-top),
body.hg-homepage-active > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.hg-back-top) {
  background-color: transparent;
}

body.higuppy-site-shell:has(.hg-collections) > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.higuppy-sidebar-cart):not(.higuppy-sidebar-cart-overlay):not(.hg-back-top),
body.page-id-2262.higuppy-site-shell > *:not(.hg-footer-bridge):not(.hg-site-footer):not(.higuppy-sidebar-cart):not(.higuppy-sidebar-cart-overlay):not(.hg-back-top) {
  background-color: transparent !important;
}

body.higuppy-site-shell .page-wrapper,
body.higuppy-site-shell .template-container,
body.higuppy-site-shell .template-content,
body.higuppy-site-shell .content-page,
body.higuppy-site-shell .main-content,
body.higuppy-site-shell .site-main,
body.higuppy-site-shell .woocommerce,
body.hg-homepage-active .page-wrapper,
body.hg-homepage-active .template-container,
body.hg-homepage-active .template-content,
body.hg-homepage-active .content-page,
body.hg-homepage-active .main-content,
body.hg-homepage-active .site-main {
  background: transparent !important;
}

body.higuppy-site-shell:has(.hg-collections) .page-wrapper,
body.higuppy-site-shell:has(.hg-collections) .template-container,
body.higuppy-site-shell:has(.hg-collections) .template-content,
body.higuppy-site-shell:has(.hg-collections) .content-page,
body.higuppy-site-shell:has(.hg-collections) .main-content,
body.higuppy-site-shell:has(.hg-collections) .site-main,
body.higuppy-site-shell:has(.hg-collections) .wp-site-blocks,
body.higuppy-site-shell:has(.hg-collections) main,
body.page-id-2262.higuppy-site-shell .wp-site-blocks,
body.page-id-2262.higuppy-site-shell main {
  background: transparent !important;
}

/* ─── Kill white space below footer (XStore empty wrappers) ─ */
body.higuppy-site-shell .et-footers-wrapper,
body.higuppy-site-shell footer.footer,
body.higuppy-site-shell #footer,
body.higuppy-site-shell .footer-top,
body.higuppy-site-shell .footer-middle,
body.higuppy-site-shell .footer-bottom,
body.higuppy-site-shell footer.prefooter,
body.hg-homepage-active .et-footers-wrapper,
body.hg-homepage-active footer.footer,
body.hg-homepage-active #footer,
body.hg-homepage-active .footer-top,
body.hg-homepage-active .footer-middle,
body.hg-homepage-active .footer-bottom {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* The HiGuppy footer above is the sole sitewide footer. Keep theme, block,
 * and Elementor footer templates from rendering beside it on views that do
 * not opt into the shell body class. The :has() guard preserves the wrapper
 * WordPress uses to fire wp_footer(), because it contains .hg-site-footer. */
body:not(.wp-admin) .et-footers-wrapper:not(:has(.hg-site-footer)),
body:not(.wp-admin) footer.footer:not(:has(.hg-site-footer)),
body:not(.wp-admin) #footer:not(:has(.hg-site-footer)),
body:not(.wp-admin) footer.prefooter:not(:has(.hg-site-footer)),
body:not(.wp-admin) footer.wp-block-template-part:not(:has(.hg-site-footer)),
body:not(.wp-admin) .elementor-location-footer:not(:has(.hg-site-footer)),
body:not(.wp-admin) footer.hg-footer,
body:not(.wp-admin) .site-footer:not(:has(.hg-site-footer)) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* Keep wrapper transparent when it contains our footer (wp_footer inside site-footer) */
body.higuppy-site-shell footer.site-footer:has(.hg-site-footer),
body.hg-homepage-active footer.site-footer:has(.hg-site-footer),
body.higuppy-site-shell .site-footer:has(.hg-site-footer),
body.hg-homepage-active .site-footer:has(.hg-site-footer) {
  display: block !important;
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.higuppy-site-shell footer.site-footer:not(:has(.hg-site-footer)),
body.hg-homepage-active footer.site-footer:not(:has(.hg-site-footer)),
body.higuppy-site-shell .site-footer:not(:has(.hg-site-footer)),
body.hg-homepage-active .site-footer:not(:has(.hg-site-footer)) {
  display: none !important;
}

body.higuppy-site-shell #page,
body.higuppy-site-shell .page-wrapper,
body.hg-homepage-active #page,
body.hg-homepage-active .page-wrapper {
  min-height: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.hg-site-footer {
  display: block !important;
  position: relative;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: clamp(32px, 4.5vw, 50px) 0 max(26px, env(safe-area-inset-bottom, 0px)) !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(253, 187, 45, 0.18), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(21, 191, 208, 0.16), transparent 24%),
    linear-gradient(160deg, #0b3d5c 0%, #082747 58%, #061f3f 100%) !important;
  color: #fff;
  overflow: hidden;
}

.hg-footer-bridge + .hg-site-footer,
.higuppy-home .hg-footer-bridge + .hg-site-footer {
  margin-top: 0 !important;
}

/* ─── Wave bridge ─────────────────────────────────────────── */
.hg-footer-bridge {
  position: relative;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 0;
  overflow: hidden;
  pointer-events: none;
  background: #f7fbff;
}

.hg-footer-bridge__svg {
  display: block;
  width: 100%;
  height: clamp(64px, 9vw, 104px);
}

.higuppy-home .hg-newsletter,
.higuppy-page .hg-cta-band.newsletter {
  margin-bottom: 0;
}

/* ─── 2-column footer layout ──────────────────────────────── */
.hg-site-footer .hg-container {
  width: min(100% - 32px, 1160px);
  margin-inline: auto;
}

.hg-site-footer .hg-footer-layout {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.4fr) !important;
  gap: clamp(22px, 3.5vw, 36px) !important;
  align-items: start;
  padding: clamp(28px, 4.5vw, 42px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(6, 31, 63, 0.36);
  box-shadow: 0 22px 55px rgba(0, 18, 48, 0.26);
  backdrop-filter: blur(8px);
}

.hg-site-footer .hg-footer-brand {
  max-width: none;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hg-site-footer .hg-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px !important;
  color: #fff;
  text-decoration: none;
}

.hg-site-footer .hg-logo-img {
  width: auto !important;
  height: 38px !important;
  max-width: 145px !important;
  object-fit: contain;
}

.hg-site-footer .hg-footer-logo__text {
  color: #fff;
  font-size: 26px;
  font-weight: var(--hg-font-weight-ui);
  letter-spacing: -0.04em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.hg-site-footer .hg-footer-tagline,
.hg-site-footer .hg-footer-contact,
.hg-site-footer .hg-footer-brand p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 14px;
}

.hg-site-footer .hg-footer-contact a {
  color: #fff;
  font-weight: var(--hg-font-weight-label);
  text-decoration: none;
}

.hg-site-footer .hg-footer-contact a:hover {
  color: #fdbb2d;
}

.hg-site-footer .hg-footer-nav-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px 38px !important;
}

.hg-site-footer .hg-footer-nav-group h3,
.hg-site-footer h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: var(--hg-font-weight-ui);
  color: #fdbb2d !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Keep the homepage footer's gold pill labels identical on every view. */
.hg-site-footer .hg-footer-nav-group h3 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 32px !important;
  margin: 0 0 18px !important;
  padding: 7px 12px !important;
  border: 1px solid rgba(255, 209, 102, 0.28) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.15), rgba(253, 187, 45, 0.05)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  color: #ffd166 !important;
  font-size: 20px;
  font-weight: var(--hg-font-weight-ui);
  line-height: 1;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
}

.hg-site-footer .hg-footer-nav-group h3::before {
  content: "" !important;
  display: block !important;
  width: 7px !important;
  height: 7px !important;
  margin-right: 8px !important;
  border-radius: 50% !important;
  background: #fdbb2d !important;
  box-shadow: 0 0 12px rgba(253, 187, 45, 0.75) !important;
}

.hg-site-footer .hg-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hg-site-footer .hg-footer-links li {
  margin: 0 0 12px;
}

.hg-site-footer .hg-footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--hg-font-size-body);
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hg-site-footer .hg-footer-links a:hover {
  color: #fff;
  transform: translateX(2px);
}

.hg-site-footer .hg-social {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.hg-site-footer .hg-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: var(--hg-font-size-body);
  font-weight: var(--hg-font-weight-ui);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hg-site-footer .hg-social a:hover {
  background: rgba(253, 187, 45, 0.24);
  border-color: rgba(253, 187, 45, 0.5);
  transform: translateY(-2px);
}

.hg-site-footer .hg-footer-nav {
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hg-site-footer .hg-footer-bottom {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) !important;
  gap: 20px 32px !important;
  margin-top: 22px !important;
  padding: 26px clamp(26px, 4.5vw, 40px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px;
  background: rgba(3, 28, 58, 0.28);
}

.hg-site-footer .hg-footer-copy {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: var(--hg-font-weight-ui);
  font-size: var(--hg-font-size-body);
}

.hg-site-footer .hg-footer-note {
  margin: 2px 0 0;
  max-width: none;
  width: 100%;
  font-size: var(--hg-font-size-body);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  text-wrap: pretty;
}

.hg-site-footer .hg-footer-bottom-col--links {
  text-align: right;
}

.hg-site-footer .hg-footer-legal {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: end;
  gap: 8px;
  margin: 0 0 10px;
}

.hg-site-footer .hg-footer-legal a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--hg-font-size-body);
  font-weight: var(--hg-font-weight-label);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hg-site-footer .hg-footer-legal a:hover {
  background: rgba(253, 187, 45, 0.16);
  border-color: rgba(253, 187, 45, 0.42);
  color: #ffd166;
  transform: translateY(-1px);
}

.hg-site-footer .hg-footer-trust {
  margin: 0;
  font-size: var(--hg-font-size-body);
  color: rgba(255, 255, 255, 0.58);
}

/* Legacy 4-block markup fallback (pre-plugin deploy) */
.hg-site-footer .hg-footer-grid {
  display: grid !important;
  grid-template-columns: minmax(240px, 0.92fr) minmax(0, 1.38fr) !important;
  gap: clamp(28px, 5vw, 52px) !important;
  align-items: start;
}

.hg-site-footer .hg-footer-grid > div:first-child {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.hg-site-footer .hg-footer-grid > div:nth-child(2),
.hg-site-footer .hg-footer-grid > div:nth-child(3),
.hg-site-footer .hg-footer-grid > div:nth-child(4) {
  grid-column: 2;
}

.hg-site-footer .hg-footer-grid > div:nth-child(2) {
  grid-row: 1;
}

.hg-site-footer .hg-footer-grid > div:nth-child(3) {
  grid-row: 2;
}

.hg-site-footer .hg-footer-grid > div:nth-child(4) {
  grid-row: 3;
}

.hg-site-footer .hg-footer-grid a {
  display: block;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--hg-font-size-body);
  text-decoration: none;
}

/* ─── Tablet: stack, nav 2 cols centered ─────────────────── */
@media (max-width: 900px) {
  .hg-site-footer {
    padding: 38px 0 max(20px, env(safe-area-inset-bottom, 0px)) !important;
    text-align: center;
  }

  .hg-site-footer .hg-footer-layout,
  .hg-site-footer .hg-footer-grid {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
    gap: 22px !important;
    padding: 28px !important;
  }

  .hg-site-footer .hg-footer-brand,
  .hg-site-footer .hg-footer-grid > div:first-child {
    width: 100%;
    max-width: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .hg-site-footer .hg-footer-logo {
    justify-content: center;
    margin-bottom: 12px !important;
  }

  .hg-site-footer .hg-footer-nav {
    width: 100%;
    max-width: none !important;
  }

  .hg-site-footer .hg-footer-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 28px !important;
    text-align: center;
    width: 100%;
  }

  .hg-site-footer .hg-footer-grid > div:nth-child(2),
  .hg-site-footer .hg-footer-grid > div:nth-child(3),
  .hg-site-footer .hg-footer-grid > div:nth-child(4) {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100%;
    max-width: 560px;
    border: 0;
    padding: 0;
  }

  .hg-site-footer .hg-social {
    justify-content: center;
  }

  .hg-site-footer .hg-footer-bottom {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
    gap: 14px !important;
    margin-top: 16px !important;
    padding: 24px !important;
  }

  .hg-site-footer .hg-footer-bottom-col--brand,
  .hg-site-footer .hg-footer-bottom-col--links,
  .hg-site-footer .hg-footer-legal {
    text-align: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .hg-site-footer .hg-footer-note {
    margin-inline: auto;
    margin-top: 4px;
    max-width: none;
    width: 100%;
    font-size: var(--hg-font-size-body);
    line-height: 1.55;
    white-space: normal;
  }

  .hg-site-footer .hg-footer-trust {
    margin-inline: auto;
    margin-top: 2px;
    max-width: 100%;
    width: 100%;
    font-size: var(--hg-font-size-body);
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: visible;
  }

  .hg-site-footer .hg-footer-bottom-col--brand {
    width: 100%;
    max-width: none;
  }

  .hg-site-footer .hg-footer-copy {
    font-size: var(--hg-font-size-body);
  }

  .hg-site-footer .hg-logo-img {
    height: 40px !important;
    max-width: 156px !important;
    margin: 0 auto;
  }
}

/* Footer feedback pass: keep Guides inside the HiGuppy brand panel and
 * remove the extra nav row so the footer finishes more compactly. */
@media (min-width: 901px) {
  .hg-site-footer .hg-footer-layout {
    grid-template-columns: minmax(250px, 1.25fr) repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .hg-site-footer .hg-footer-nav,
  .hg-site-footer .hg-footer-nav-grid {
    display: contents !important;
  }

  .hg-site-footer .hg-footer-nav-group {
    min-width: 0;
  }

  .hg-site-footer {
    padding: 36px 0 20px !important;
  }

  .hg-site-footer .hg-footer-layout {
    gap: 28px !important;
    padding: 32px !important;
  }

  .hg-site-footer .hg-footer-brand {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .hg-site-footer .hg-footer-nav {
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .hg-site-footer .hg-footer-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px 26px !important;
  }

  .hg-site-footer .hg-footer-brand-guides {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    text-align: center;
  }

  .hg-site-footer .hg-footer-brand-guides h3 {
    margin-bottom: 10px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links li {
    margin: 0 !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links a {
    font-size: var(--hg-font-size-body);
    line-height: 1.35;
  }

  .hg-site-footer .hg-footer-bottom {
    margin-top: 16px !important;
    padding: 18px 28px !important;
  }
}

@media (max-width: 900px) {
  .hg-site-footer .hg-footer-brand-guides {
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .hg-site-footer .hg-footer-brand-guides h3 {
    margin: 0 auto 10px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links li {
    margin: 0 !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links a {
    min-height: 0 !important;
    font-size: var(--hg-font-size-body);
    line-height: 1.35;
  }
}

@media (max-width: 640px) {
  .hg-site-footer .hg-footer-brand-guides {
    margin-top: 12px;
    padding-top: 12px;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links {
    gap: 2px 14px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links a {
    font-size: var(--hg-font-size-body);
  }
}

/* ─── Mobile: single centered column ─────────────────────── */
@media (max-width: 640px) {
  .hg-site-footer {
    padding: 28px 0 max(18px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .hg-site-footer .hg-container {
    width: min(100% - 24px, 1160px);
  }

  .hg-site-footer .hg-footer-layout {
    padding: 18px !important;
    border-radius: 24px;
  }

  .hg-site-footer .hg-footer-brand,
  .hg-site-footer .hg-footer-nav {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .hg-site-footer .hg-footer-tagline,
  .hg-site-footer .hg-footer-contact,
  .hg-site-footer .hg-footer-brand p {
    font-size: var(--hg-font-size-body);
  }

  .hg-site-footer .hg-footer-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 520px;
    margin-inline: auto;
    gap: 20px 16px !important;
    align-items: start;
  }

  /* Same-row groups must share equal top padding (do not pad siblings only). */
  .hg-site-footer .hg-footer-nav-group + .hg-footer-nav-group {
    margin-top: 0;
    border-top: 0;
  }

  .hg-site-footer .hg-footer-nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 8px 4px !important;
    border-radius: 0;
    background: transparent;
    border: 0;
    text-align: center;
  }

  .hg-site-footer .hg-footer-nav-group h3 {
    justify-content: center !important;
    margin: 0 auto 16px !important;
    padding: 7px 11px !important;
    font-size: 20px;
    text-align: center !important;
  }

  .hg-site-footer .hg-footer-nav-group:nth-child(1),
  .hg-site-footer .hg-footer-nav-group:nth-child(2),
  .hg-site-footer .hg-footer-nav-group:nth-child(3),
  .hg-site-footer .hg-footer-nav-group:nth-child(4) {
    min-height: 0;
  }

  .hg-site-footer .hg-footer-nav-group .hg-footer-links {
    display: grid;
    justify-items: center;
    gap: 6px;
    width: 100%;
  }

  .hg-site-footer .hg-footer-nav-group .hg-footer-links li {
    margin: 0 !important;
  }

  .hg-site-footer .hg-footer-nav-group .hg-footer-links a {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px !important;
  }

  .hg-site-footer .hg-footer-nav-group:nth-child(3),
  .hg-site-footer .hg-footer-nav-group:nth-child(4) {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
    height: auto;
    margin: 0;
    padding-top: 8px !important;
    text-align: center;
  }

  /* Override the older homepage inline rule that made Support full-width. */
  body.home .hg-site-footer .hg-footer-nav-grid .hg-footer-nav-group:nth-child(3),
  body.home .hg-site-footer .hg-footer-nav-grid .hg-footer-nav-group:nth-child(4),
  body.hg-homepage-active .hg-site-footer .hg-footer-nav-grid .hg-footer-nav-group:nth-child(3),
  body.hg-homepage-active .hg-site-footer .hg-footer-nav-grid .hg-footer-nav-group:nth-child(4) {
    grid-column: auto !important;
  }

  .hg-site-footer .hg-footer-links a,
  .hg-site-footer .hg-footer-grid a {
    font-size: var(--hg-font-size-body);
  }

  .hg-site-footer .hg-footer-legal {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 8px;
    justify-content: center;
  }

  .hg-site-footer .hg-footer-legal a {
    min-height: 30px;
    padding: 5px 10px;
  }

  .hg-site-footer .hg-footer-bottom {
    border-radius: 20px;
  }

  .hg-site-footer .hg-footer-bottom-col,
  .hg-site-footer .hg-footer-bottom-col--brand,
  .hg-site-footer .hg-footer-bottom-col--links,
  .hg-site-footer .hg-footer-legal {
    min-width: 0;
    width: 100%;
  }
}

/* Keep the moved Guides group compact after the legacy mobile card rules. */
@media (max-width: 640px) {
  .hg-site-footer .hg-footer-brand-guides {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
    border-radius: 0;
  }

  .hg-site-footer .hg-footer-brand-guides h3 {
    margin: 0 auto 10px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 14px !important;
  }

  .hg-site-footer .hg-footer-brand-guides .hg-footer-links a {
    min-height: 0 !important;
    font-size: var(--hg-font-size-body);
  }
}
/* The brand card repeats the Guides group shown in the mobile footer grid. */
@media (max-width: 900px) {
  footer.hg-site-footer#contact .hg-footer-layout > .hg-footer-brand .hg-footer-brand-guides {
    display: none !important;
  }
}

/* The navigation Guides column is the mobile replacement for the brand card
 * Guides block, so keep it hidden on desktop where the brand block remains. */
@media (min-width: 901px) {
  footer.hg-site-footer#contact .hg-footer-nav .hg-footer-nav-guides-mobile {
    display: none !important;
  }
}

/* ─── Footer contrast lock ─────────────────────────────────
 * Keep late theme/page rules from applying navy body-link colors to the
 * dark footer. The palette follows the site theme: white copy, gold labels,
 * and coral/teal interaction accents.
 */
.hg-site-footer#contact,
.hg-site-footer#contact p,
.hg-site-footer#contact .hg-footer-tagline,
.hg-site-footer#contact .hg-footer-contact,
.hg-site-footer#contact .hg-footer-brand p,
.hg-site-footer#contact .hg-footer-copy,
.hg-site-footer#contact .hg-footer-note,
.hg-site-footer#contact .hg-footer-trust {
  color: rgba(255, 255, 255, 0.92) !important;
}

.hg-site-footer#contact .hg-footer-nav-group h3,
.hg-site-footer#contact .hg-footer-nav-group h3 a {
  color: #ffd166 !important;
}

.hg-site-footer#contact .hg-footer-contact a,
.hg-site-footer#contact .hg-footer-links a,
.hg-site-footer#contact .hg-footer-grid a,
.hg-site-footer#contact .hg-footer-legal a {
  color: rgba(255, 255, 255, 0.94) !important;
}

.hg-site-footer#contact .hg-footer-contact a:hover,
.hg-site-footer#contact .hg-footer-links a:hover,
.hg-site-footer#contact .hg-footer-grid a:hover,
.hg-site-footer#contact .hg-footer-legal a:hover {
  color: #ffd166 !important;
}

.hg-site-footer#contact .hg-footer-legal a {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px !important;
}

.hg-site-footer#contact .hg-footer-legal a:hover {
  background: rgba(253, 187, 45, 0.16) !important;
  border-color: rgba(253, 187, 45, 0.42) !important;
  color: #ffd166 !important;
}

/* Footer note: compact layout without reducing readable text below 16px. */
.hg-site-footer .hg-footer-note,
.hg-site-footer#contact .hg-footer-note {
  margin-top: 2px !important;
  margin-bottom: 0 !important;
  max-width: min(100%, 44ch) !important;
  font-size: 16px;
  line-height: 1.4;
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .hg-site-footer .hg-footer-bottom {
    margin-top: 12px !important;
    padding: 16px 12px 12px !important;
    gap: 10px !important;
  }

  .hg-site-footer .hg-footer-copy {
    margin-bottom: 2px !important;
    font-size: 16px;
  }

  .hg-site-footer .hg-footer-note,
  .hg-site-footer#contact .hg-footer-note {
    font-size: 16px;
    line-height: 1.35;
    max-width: min(100%, 46ch) !important;
  }
}

/* Keep only the outer hg-footer-layout frame; remove nested brand/nav/group cards. */
.hg-site-footer .hg-footer-layout {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.hg-site-footer .hg-footer-brand,
.hg-site-footer .hg-footer-nav,
.hg-site-footer .hg-footer-nav-group {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hg-site-footer .hg-footer-nav {
  padding: 0 !important;
  border-radius: 0 !important;
}

.hg-site-footer .hg-footer-nav-group {
  border-radius: 0 !important;
}

/* Keep footer trust line on one row. */
.hg-site-footer .hg-footer-trust,
.hg-site-footer#contact .hg-footer-trust {
  white-space: nowrap !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  line-height: 1.35;
}

/* Footer brand copy: normal body size, full available width. */
.hg-site-footer .hg-footer-bottom-col--brand {
  width: 100% !important;
  max-width: none !important;
}

.hg-site-footer .hg-footer-copy {
  font-size: var(--hg-font-size-body);
  line-height: 1.45;
}

.hg-site-footer .hg-footer-note {
  max-width: none !important;
  width: 100% !important;
  font-size: var(--hg-font-size-body);
  line-height: 1.55;
  white-space: normal !important;
}

/* Keep the legal pill row inside the narrow mobile footer frame. The older
 * max-content three-column grid was wider than the available 355px column,
 * which pushed the first and last pills outside the viewport. */
@media (max-width: 640px) {
  .hg-site-footer .hg-footer-legal {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 8px !important;
  }

  .hg-site-footer .hg-footer-legal a {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-inline: 8px !important;
    text-align: center;
    white-space: normal !important;
  }
}

/* Readability floor: all real footer copy stays at least 16px. */
.hg-site-footer .hg-footer-tagline,
.hg-site-footer .hg-footer-contact,
.hg-site-footer .hg-footer-links a,
.hg-site-footer .hg-footer-copy,
.hg-site-footer .hg-footer-note,
.hg-site-footer#contact .hg-footer-note,
.hg-site-footer .hg-footer-legal a,
.hg-site-footer .hg-footer-trust {
  font-size: 16px;
}

/* Footer column labels: keep h3 labels at the 20px contract without shrinking links. */
body.higuppy-site-shell:not(#hg-typography-contract):not(#hg-typography-contract-a):not(#hg-typography-contract-b) .hg-site-footer .hg-footer-nav-group h3,
body.higuppy-site-shell:not(#hg-typography-contract):not(#hg-typography-contract-a):not(#hg-typography-contract-b) .hg-site-footer .hg-footer-brand-guides h3,
body.higuppy-site-shell:not(#hg-typography-contract):not(#hg-typography-contract-a):not(#hg-typography-contract-b) .hg-site-footer h3 {
  font-size: 20px !important;
}

/* Cart drawer isolation: page-canvas rules must never make the fixed drawer
   transparent or restore background scrolling while it is open. */
body.higuppy-site-shell.higuppy-sidebar-cart-open {
  overflow: hidden !important;
}

body.higuppy-site-shell > .higuppy-sidebar-cart {
  background: #fff !important;
  background-color: #fff !important;
  color: #082747 !important;
  opacity: 1 !important;
}

body.higuppy-site-shell > .higuppy-sidebar-cart-overlay {
  background: rgba(8, 39, 71, 0.48) !important;
  background-color: rgba(8, 39, 71, 0.48) !important;
}

body.higuppy-site-shell .higuppy-sidebar-cart .higuppy-sidebar-cart__btn--checkout,
body.higuppy-site-shell .higuppy-sidebar-cart .higuppy-sidebar-cart__btn--checkout:hover,
body.higuppy-site-shell .higuppy-sidebar-cart .higuppy-sidebar-cart__btn--checkout:focus-visible,
body.higuppy-site-shell .higuppy-sidebar-cart .higuppy-sidebar-cart__btn--checkout:active {
  background: #c84a24 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Global utility control: page-canvas resets must never alter the fixed
   back-to-top button. This wins over the legacy shell/design definitions. */
html body > button.hg-back-top {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 10060 !important;
  width: 44px !important;
  height: 44px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #c84a24 !important;
  background-color: #c84a24 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 104, 71, 0.24) !important;
}

html body > button.hg-back-top:hover,
html body > button.hg-back-top:focus-visible {
  background: #a63d20 !important;
  background-color: #a63d20 !important;
}

html body > button.hg-back-top:not(.is-visible) {
  display: none !important;
}

html body > button.hg-back-top.is-visible {
  display: grid !important;
  place-items: center !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
