/*
 * OREYNE mobile navigation — v1.0.33
 *
 * Independent PHP-rendered bottom navigation.
 * Mobile header Scheme B: keep Umino Wishlist, hide only the actual header Cart.
 */

:root {
  --oreyne-mobile-bottom-nav: 68px;
  --oreyne-mobile-bottom-nav-safe: env(safe-area-inset-bottom, 0px);
  /* JS replaces these with the exact rendered pixel values on mobile. */
  --oreyne-mobile-bottom-nav-height: calc(var(--oreyne-mobile-bottom-nav) + var(--oreyne-mobile-bottom-nav-safe));
  --oreyne-mobile-bottom-nav-offset: calc(var(--oreyne-mobile-bottom-nav) + var(--oreyne-mobile-bottom-nav-safe));
  --oreyne-umino-mobile-nav-offset: var(--oreyne-mobile-bottom-nav-offset);
}

@media (max-width: 991px) {
  /*
   * General pages need reserve space for the fixed bottom nav.
   * Product Page owns its own sticky-ATC reserve space, so do not stack two
   * padding systems there. It can still read --oreyne-mobile-bottom-nav.
   */
  body.oreyne-mobile-nav-enabled:not(.oreyne-pdp-active) {
    padding-bottom: calc(var(--oreyne-mobile-bottom-nav) + var(--oreyne-mobile-bottom-nav-safe)) !important;
  }

  body.oreyne-mobile-nav-enabled {
    --oreyne-umino-mobile-nav-offset: var(--oreyne-mobile-bottom-nav-offset);
  }

  /* Retire Umino's legacy bottom tab shells if the theme still outputs them. */
  body.oreyne-mobile-nav-enabled .mobile-sticky-menu,
  body.oreyne-mobile-nav-enabled .sticky-mobile-menu,
  body.oreyne-mobile-nav-enabled .mobile-bottom-menu,
  body.oreyne-mobile-nav-enabled .mobile-bottom-nav,
  body.oreyne-mobile-nav-enabled .bottom-mobile-menu,
  body.oreyne-mobile-nav-enabled .mobile-navigation-bottom,
  body.oreyne-mobile-nav-enabled .footer-mobile-menu,
  body.oreyne-mobile-nav-enabled .bls-mobile-sticky-menu,
  body.oreyne-mobile-nav-enabled .bls-mobile-sticky {
    display: none !important;
  }

  /* Independent OREYNE bottom nav: Home · Privé · Shop · Cart */
  #oreyne-mobile-bottom-nav {
    position: fixed !important;
    z-index: 9000 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch !important;

    width: 100% !important;
    height: calc(var(--oreyne-mobile-bottom-nav) + var(--oreyne-mobile-bottom-nav-safe)) !important;
    min-height: calc(var(--oreyne-mobile-bottom-nav) + var(--oreyne-mobile-bottom-nav-safe)) !important;

    margin: 0 !important;
    padding: 0 0 var(--oreyne-mobile-bottom-nav-safe) !important;

    box-sizing: border-box !important;
    border-top: 1px solid rgba(28, 25, 22, .10) !important;
    background: rgba(255, 255, 255, .985) !important;
    box-shadow: 0 -5px 18px rgba(20, 18, 15, .045) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;

    width: auto !important;
    min-width: 0 !important;
    height: var(--oreyne-mobile-bottom-nav) !important;

    margin: 0 !important;
    padding: 6px 2px 5px !important;

    box-sizing: border-box !important;
    color: #2b2926 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item:hover,
  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item:focus,
  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item:active,
  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item:visited {
    text-decoration: none !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-icon > svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.55 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    overflow: visible !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-label {
    display: block !important;
    max-width: 100% !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-prive {
    color: #a38359 !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item.is-active:not(.oreyne-mobile-nav-prive) {
    color: #111 !important;
    font-weight: 500 !important;
  }

  #oreyne-mobile-bottom-nav .oreyne-mobile-nav-item.is-active::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    width: 22px !important;
    height: 1.5px !important;
    border-radius: 2px !important;
    background: currentColor !important;
    transform: translateX(-50%) !important;
    opacity: .9 !important;
  }

  .oreyne-mobile-cart-count {
    position: absolute !important;
    top: -5px !important;
    right: -8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
    background: #9b7a52 !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
    text-align: center !important;
  }

  .oreyne-mobile-cart-count[data-count="0"] {
    display: none !important;
  }

  /* ---------------------------------------------------------
   * Mobile header — v1.0.30
   *
   * Three-zone layout:
   * - LEFT: Umino mobile menu only.
   * - CENTER: OREYNE logo, physically centered and removed from
   *   competition with the action controls.
   * - RIGHT: Account + Wishlist. The GTranslate manager anchors
   *   immediately to the left of Account, so Language + Account +
   *   Wishlist all stay inside the area from the logo's right edge
   *   to the screen edge without pushing the logo.
   *
   * Umino's native top Cart remains in the DOM but is hidden on
   * mobile. Bottom Cart continues to open the right-side Mini Cart.
   * Desktop remains fully native Umino.
   * --------------------------------------------------------- */

  /* The inner Umino header becomes a positioning canvas on mobile.
   * The three visible zones are then independent from one another. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .heade.header-sticky .navbar {
    min-height: 72px !important;
  }

  body.oreyne-mobile-nav-enabled .header-container.header-v2 .heade.header-sticky .navbar > .container-fluid {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 72px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  /* LEFT ZONE — hamburger / mobile menu trigger. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .nav-mobile.d-lg-none {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 36px !important;
    max-width: 92px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
  }

  /* CENTER ZONE — logo is always centered in the viewport/header,
   * never squeezed or shifted by right-side controls. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-brand {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 4 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: clamp(92px, 26vw, 112px) !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    text-align: center !important;
    overflow: visible !important;
  }

  /* Important: do NOT force the display state of logo children. Umino can
   * output normal/sticky (and sometimes light/dark) logo variants inside the
   * same brand slot and controls their visibility itself. Forcing every child
   * to flex/block makes both variants visible at once. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-brand > a,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-brand > span {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-brand img,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-brand svg {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 40px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* RIGHT ZONE — only Account + Wishlist participate in the Umino
   * flex row. GTranslate is fixed-positioned by its own manager to the
   * immediate left of Account, so all three controls occupy the logo-right
   * half without affecting the center logo. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
  }

  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other > .navbar-nav,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other .navbar-nav.flex-row.align-items-center.ms-auto {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: auto !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* Neutralize Umino's ms-4 spacing. We own the mobile right-zone gap. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other .header-login-form,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other .wl-icon-wrapper.lionthemes-wishlist-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other .header-login-form > a,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .navbar-other .wl-icon-wrapper.lionthemes-wishlist-badge > a {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Keep Wishlist count anchored to the heart instead of consuming layout width. */
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .wl-icon-wrapper .wl-count,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .wl-icon-wrapper .qty-count,
  body.oreyne-mobile-nav-enabled .header-container.header-v2 .wl-icon-wrapper .badge {
    position: absolute !important;
    top: -5px !important;
    right: -7px !important;
    z-index: 2 !important;
  }

  /* Native Umino top Cart stays available to desktop / Mini Cart integrations,
   * but its mobile header slot is completely retired. */
  body.oreyne-mobile-nav-enabled li.topcart,
  body.oreyne-mobile-nav-enabled .navbar-other li.topcart,
  body.oreyne-mobile-nav-enabled .navbar-nav > li.topcart,
  body.oreyne-mobile-nav-enabled #topcart {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* JS marks the actual Umino legacy fixed bottom tabs. This remains hidden
   * even while the OREYNE nav itself disappears for Mini Cart. */
  body.oreyne-mobile-nav-enabled .oreyne-umino-bottom-nav-retired {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Mini Cart owns the entire mobile interaction layer. */
  body.oreyne-mobile-nav-enabled.oreyne-mobile-nav-cart-open #oreyne-mobile-bottom-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}


@media (min-width: 992px) {
  #oreyne-mobile-bottom-nav {
    display: none !important;
  }

}


/* v1.0.33 — one fixed mobile bottom dock */
@media (max-width: 991px) {
  #oreyne-mobile-bottom-dock {
    position: fixed !important;
    z-index: 9000 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }

  #oreyne-mobile-bottom-dock > * { pointer-events: auto !important; }

  #oreyne-mobile-bottom-dock > #oreyne-mobile-bottom-nav {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }

  body.oreyne-mobile-nav-enabled.oreyne-mobile-nav-cart-open #oreyne-mobile-bottom-dock {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (min-width: 992px) {
  #oreyne-mobile-bottom-dock { display: none !important; }
}


/* v1.0.35 — keep delayed Purchased/social-proof toast above the mobile dock. */
@media (max-width: 991px) {
  body.oreyne-mobile-nav-enabled .oreyne-mobile-dock-aware-purchase-popup {
    bottom: calc(var(--oreyne-mobile-bottom-dock-height, var(--oreyne-mobile-bottom-nav-height, 68px)) + 12px) !important;
    z-index: 8990 !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
  }
}
