/* React MobileAppShell + ContextBottomNav — max-width 767px */

:root {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
  --app-mobile-header: 72px;
  --app-mobile-nav: 72px;
}

.mobile-app-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: calc(var(--app-mobile-header) + var(--app-safe-top) + 0.75rem);
  }

  body.kc-has-mobile-bottom-nav {
    padding-bottom: 0;
  }

  body.kc-has-mobile-bottom-nav .site-main,
  body.kc-has-mobile-bottom-nav .site-footer--react {
    /* content clearance for fixed bottom nav */
  }

  body.kc-has-mobile-bottom-nav .site-footer--react {
    padding-bottom: calc(var(--app-mobile-nav) + var(--app-safe-bottom) + 1.25rem);
  }

  body.kc-has-mobile-bottom-nav .home-hero__layout {
    padding-bottom: calc(var(--app-mobile-nav) + 1.25rem) !important;
  }

  .mobile-app-bottom-nav {
    position: fixed;
    z-index: 1100;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding-right: max(0.5rem, var(--app-safe-right));
    padding-bottom: max(0.45rem, var(--app-safe-bottom));
    padding-left: max(0.5rem, var(--app-safe-left));
    pointer-events: none;
  }

  .mobile-app-bottom-nav::before {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(100% + 1rem);
    background: linear-gradient(to top, rgba(244, 242, 236, 0.98) 70%, rgba(244, 242, 236, 0));
    content: "";
    pointer-events: none;
  }

  .mobile-app-bottom-nav__inner {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: var(--app-mobile-nav);
    overflow: hidden;
    border: 1px solid rgba(23, 28, 20, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 252, 0.94);
    box-shadow:
      0 18px 48px -20px rgba(15, 24, 12, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(145%);
    pointer-events: auto;
  }

  .mobile-app-bottom-nav__item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 68px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    color: #596052;
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition:
      color 180ms ease,
      transform 100ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-app-bottom-nav__item:active {
    transform: scale(0.94);
  }

  .mobile-app-bottom-nav__icon {
    display: grid;
    width: 34px;
    height: 30px;
    place-items: center;
    border-radius: 12px;
    transition:
      color 180ms ease,
      background-color 180ms ease;
  }

  .mobile-app-bottom-nav__icon svg {
    width: 20px;
    height: 20px;
  }

  .mobile-app-bottom-nav__item--active {
    color: #436d1e;
  }

  .mobile-app-bottom-nav__item--active .mobile-app-bottom-nav__icon {
    background: rgba(139, 197, 64, 0.14);
    color: #679c2f;
  }

  .mobile-app-bottom-nav__item--primary {
    color: #36591b;
  }

  .mobile-app-bottom-nav__item--primary .mobile-app-bottom-nav__icon {
    background: linear-gradient(145deg, #95ce4b, #6aa52d);
    color: #fff;
    box-shadow: 0 9px 20px -10px rgba(77, 126, 31, 0.9);
  }

  /* Concierge is desktop-only in React; keep hidden on mobile */
  .kc-concierge {
    display: none !important;
  }

  /* Brands / partners mobile: reduce oversized scene padding */
  .brands-scene {
    padding-block: clamp(3.75rem, 16vw, 5rem);
  }

  .brands-carousel-stage {
    min-height: min(68vw, 420px);
  }
}

@media (min-width: 768px) {
  .mobile-app-bottom-nav {
    display: none !important;
  }
}
