/**
 * F0.2 global page shell (commerce + system pages)
 */

:root {
  --mb-bg: var(--mb-dark);
  --mb-header-offset: 96px;
}

body.mb-shell-page,
body.is-woocommerce {
  background: var(--mb-bg);
  color: var(--mb-white);
}

.mb-page--shell {
  padding-top: calc(var(--mb-header-offset) + var(--mb-s5));
  padding-bottom: var(--mb-s8);
  min-height: 55vh;
}

.mb-section--page {
  width: 100%;
}

.mb-container {
  width: 100%;
  max-width: var(--mb-content-max);
  margin: 0 auto;
  padding-left: var(--mb-gutter);
  padding-right: var(--mb-gutter);
  box-sizing: border-box;
}

.mb-page-header {
  margin-bottom: var(--mb-s6);
}

.mb-heading--page {
  font-family: var(--mb-font-heading);
  font-size: var(--mb-title-36);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--mb-white);
}

.mb-page-content {
  color: rgba(255, 255, 255, 0.92);
}

.mb-page-content > :first-child {
  margin-top: 0;
}

.mb-page-content > :last-child {
  margin-bottom: 0;
}

/* Header actions (theme header.php) */
@media (max-width: 768px) {
  #site-header .header-actions {
    display: none;
  }
}

@media (min-width: 769px) {
  #site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--mb-space-4, 16px);
    width: 100%;
    max-width: none;
    margin-inline: 0;
    box-sizing: border-box;
  }

  #site-header .site-logo {
    flex: 0 0 auto;
    margin-right: auto;
  }

  #site-header .site-nav {
    flex: 0 0 auto;
    justify-content: flex-end;
    width: auto;
    max-width: none;
    min-width: 0;
    flex-wrap: nowrap;
    gap: clamp(20px, 2.5vw, 32px);
  }

  #site-header .header-actions {
    flex: 0 0 auto;
    margin-left: var(--mb-space-4, 16px);
  }

  #site-header .menu-toggle {
    display: none;
  }
}

/* Elementor pill header layout on non-home pages (glass styles: header-glass.css) */
body:not(.home) .elementor-location-header .e-con-boxed > .e-con-inner {
  width: 100%;
  max-width: var(--mb-content-max);
  margin-inline: auto;
  padding-inline: 0;
}

body:not(.home):has(.elementor-location-header) .mb-page--shell {
  padding-top: var(--mb-s3);
}

body.mb-shop-page .mb-header {
  padding-block: 8px !important;
}

body.mb-shop-page .mb-page--shell,
body.mb-shop-page.mb-shell-page .mb-page--commerce {
  padding-top: calc(var(--mb-header-offset) + var(--mb-s4));
  padding-bottom: calc(var(--mb-s8) + var(--mb-s5));
}

body:not(.home) .mb-header__pill {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  width: 100%;
  max-width: var(--mb-content-max);
  box-sizing: border-box;
}

body:not(.home) .mb-header__logo {
  flex: 0 0 auto;
  margin-right: auto;
}

body:not(.home) .mb-header__nav {
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
}

body:not(.home) .mb-header__nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 28px);
  overflow: visible;
}

body:not(.home) .mb-header .header-actions {
  flex: 0 0 auto;
}

body:not(.home) .mb-header__toggle {
  flex: 0 0 auto;
}

@media (min-width: 1440px) {
  :root {
    --mb-header-offset: 112px;
  }
}

@media (max-width: 768px) {
  :root {
    --mb-header-offset: 84px;
  }

  .mb-page--shell {
    padding-top: calc(var(--mb-header-offset) + var(--mb-s4));
    padding-bottom: var(--mb-s6);
  }

  .mb-header .header-action {
    width: 40px;
    height: 40px;
  }

  .mb-header .header-action__count {
    top: 2px;
    right: 2px;
  }
}

/*
 * Shell pages (shop, PDP, category, cart, etc.): decorative homepage
 * shades must not extend document scroll below the footer.
 */
body.mb-shell-page:not(.home) .reviews-faq-panel,
body.mb-shell-page:not(.home) .mb-cat-reviews-faq-panel {
  overflow: hidden !important;
}

body.mb-shell-page:not(.home) .site-footer-section {
  overflow: hidden !important;
  min-height: 0 !important;
  padding-top: 32px !important;
  padding-bottom: 24px !important;
}

body.mb-shell-page:not(.home) {
  min-height: 0 !important;
}

body.mb-shell-page:not(.home) .site-footer-glow {
  height: 100%;
  max-height: 100%;
}

body.mb-shell-page:not(.home) .site-footer-section .footer-car {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
