/* v2.0.12 typography-only patch:
     * - preserve Apple's original font sizes, weights, line-heights and spacing
     * - <19px => BB Text
     * - 19px and above => BB Display
     * - desktop product/menu names render as text, not SVG word outlines
     */
    @media (min-width: 834px) {
      #globalnav .globalnav-item-menu .globalnav-link-text {
        position: static;
        clip: auto;
        clip-path: none;
        overflow: visible;
        width: auto;
        height: 100%;
        padding: 0;
        border: 0;
        display: flex;
        align-items: center;
        white-space: nowrap;
        font-family: "BB Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
      }

      #globalnav .globalnav-item-menu .globalnav-link-text-container > .globalnav-image-regular.globalnav-link-image {
        display: none !important;
      }
    }

/* Empty Bag count is absent, not merely scaled to zero. */
    #globalnav .globalnav-bag:not(.with-badge) .globalnav-bag-badge,
    #globalnav .globalnav-bag-badge[hidden] {
      display: none !important;
    }

    /* v2.0.28: Search action SVG geometry must not change when the field gains a value.
       Keep Apple's native breakpoint ownership: regular SVG on desktop, compact SVG on mobile. */

    /* Keep native Apple global-nav geometry exactly intact. No fixed Search/Bag
       widths, padding, transforms, or badge coordinates are overridden here. */

/*
     * Search Quick Links: replay Apple's own native search-result motion on
     * every actual flyout open. This does not alter Search geometry or routing.
     */
    #globalnav .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-header,
    #globalnav .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-item {
      animation-name: none !important;
      opacity: 0;
      transform: translateY(calc(var(--r-globalnav-search-shift-vertical, 4px) * -1));
      will-change: opacity, transform;
    }

    #globalnav .globalnav-search.globalnav-item-flyout-open .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-header,
    #globalnav .globalnav-search.globalnav-item-flyout-open .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-item,
    #globalnav #globalnav-menubutton-link-search[aria-expanded="true"] + #globalnav-submenu-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-header,
    #globalnav #globalnav-menubutton-link-search[aria-expanded="true"] + #globalnav-submenu-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-item {
      animation-delay: calc(.2s + 20ms * var(--r-globalnav-flyout-item-number) + 40ms * var(--r-globalnav-flyout-group-number, 0) + var(--bb-quicklinks-resume-offset, 0ms)) !important;
      animation-direction: normal !important;
      animation-duration: .32s !important;
      animation-fill-mode: both !important;
      animation-name: globalnav-search-fade-and-slide !important;
      animation-timing-function: cubic-bezier(.4, 0, .6, 1) !important;
    }

    #globalnav.globalnav-with-flyout-closing:not(.globalnav-with-menu-open, .globalnav-with-submenu-open)
      .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-header,
    #globalnav.globalnav-with-flyout-closing:not(.globalnav-with-menu-open, .globalnav-with-submenu-open)
      .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-item {
      opacity: 1;
      animation-delay: 0s !important;
      animation-direction: reverse !important;
      animation-duration: min(calc(.16s + (var(--r-globalnav-flyout-item-total, 6) - var(--r-globalnav-flyout-item-number)) * 20ms), .24s) !important;
      animation-fill-mode: both !important;
      animation-name: globalnav-search-fade-and-slide-to-close !important;
      animation-timing-function: cubic-bezier(.4, 0, .6, 1) !important;
    }

    /* If Apple inserts a fresh native default-links node, keep that unmanaged
       copy from painting even for a single frame. The Quick Links bridge adopts
       it synchronously and then either lets the genuine open-session stagger run
       or shows it immediately when that session has already finished. */
    #globalnav .globalnav-searchresults-current
      .globalnav-searchresults-container[data-analytics-region="defaultlinks search"]:not([data-bb-search-quicklinks="true"]) {
      visibility: hidden !important;
      opacity: 0 !important;
    }

    /* A replacement that arrives only after the genuine entrance stagger has
       completed must not replay. The marker is never used during the first
       open-session animation, so the normal sequential motion stays intact. */
    #globalnav .globalnav-searchresults-current
      [data-bb-search-quicklinks="true"][data-bb-search-quicklinks-no-replay="true"] .globalnav-searchresults-header,
    #globalnav .globalnav-searchresults-current
      [data-bb-search-quicklinks="true"][data-bb-search-quicklinks-no-replay="true"] .globalnav-searchresults-list-item {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
      will-change: auto !important;
    }

    /* Keep Apple's own fast hover/focus feedback for every Quick Link. */
    #globalnav .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-link {
      transition: color 20ms cubic-bezier(.4, 0, .6, 1),
                  background-color 20ms cubic-bezier(.4, 0, .6, 1),
                  fill 20ms cubic-bezier(.4, 0, .6, 1);
    }

    /* Never paint Apple's temporary previous default-links layer at the same
       time as the authoritative current Quick Links. Product/live-result
       previous layers are untouched. */
    #globalnav .globalnav-searchresults-previous
      .globalnav-searchresults-container[data-analytics-region="defaultlinks search"],
    #globalnav .globalnav-searchresults-previous [data-bb-search-quicklinks="true"] {
      display: none !important;
    }

    @media (prefers-reduced-motion: reduce) {
      #globalnav .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-header,
      #globalnav .globalnav-search .globalnav-searchresults-current [data-bb-search-quicklinks="true"] .globalnav-searchresults-list-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto;
      }
    }

/* WooCommerce live results: product image + name, with clean price beneath. */
    #globalnav [data-bb-search-live="true"] .globalnav-searchresults-list-item {
      animation-duration: .32s;
      animation-fill-mode: both;
      animation-name: globalnav-search-fade-and-slide;
      animation-timing-function: cubic-bezier(.4, 0, .6, 1);
      animation-delay: calc(40ms + 20ms * var(--r-globalnav-flyout-item-number));
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-item {
      margin-top: 2px;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-item:first-child {
      margin-top: 4px;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link {
      box-sizing: border-box;
      width: 100%;
      min-height: 58px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 12px;
      padding: 6px 10px 6px 6px;
      border-radius: 12px;
      overflow: hidden;
      background: transparent;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-image-wrap {
      width: 42px;
      height: 42px;
      flex: 0 0 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      border-radius: 9px;
      background: rgba(0, 0, 0, .035);
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      border: 0;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-copy {
      min-width: 0;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 1px;
      overflow: hidden;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-name,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-price {
      display: block;
      max-width: 100%;
      font-size: 17px;
      line-height: 1.2353641176;
      letter-spacing: -.022em;
      font-family: "BB Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 600;
      color: var(--r-globalnav-search-list-item-searchterm-color);
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-price {
      white-space: nowrap;
      font-weight: 400;
      color: var(--r-globalnav-search-list-item-nonsearchterm-color);
      font-variant-numeric: tabular-nums;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:focus-visible,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link.globalnav-searchresults-hover {
      background-color: var(--r-globalnav-search-list-item-hover-background);
      color: var(--r-globalnav-search-list-item-hover-color);
      text-decoration: none;
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-name,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-price,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:focus-visible .bb-wp-search-product-name,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:focus-visible .bb-wp-search-product-price,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link.globalnav-searchresults-hover .bb-wp-search-product-name,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link.globalnav-searchresults-hover .bb-wp-search-product-price {
      color: var(--r-globalnav-search-list-item-hover-color);
    }
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-image-wrap,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:focus-visible .bb-wp-search-product-image-wrap,
    #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link.globalnav-searchresults-hover .bb-wp-search-product-image-wrap {
      background: rgba(0, 0, 0, .055);
    }
    .theme-dark #globalnav [data-bb-search-live="true"] .bb-wp-search-product-image-wrap,
    .globalheader-dark #globalnav [data-bb-search-live="true"] .bb-wp-search-product-image-wrap,
    #globalnav.globalnav-dark [data-bb-search-live="true"] .bb-wp-search-product-image-wrap {
      background: rgba(255, 255, 255, .07);
    }
    .theme-dark #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-image-wrap,
    .globalheader-dark #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-image-wrap,
    #globalnav.globalnav-dark [data-bb-search-live="true"] .bb-wp-search-product-link:hover .bb-wp-search-product-image-wrap {
      background: rgba(255, 255, 255, .1);
    }
    #globalnav .bb-wp-search-status.globalnav-searchresults-list-link {
      cursor: default;
      color: var(--r-globalnav-search-list-item-nonsearchterm-color);
      background: transparent;
      pointer-events: none;
    }
    #globalnav .bb-wp-search-status.globalnav-searchresults-list-link:hover {
      color: var(--r-globalnav-search-list-item-nonsearchterm-color);
      background: transparent;
    }
    @media (max-width: 833px) {
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-item {
        margin-top: 3px;
      }
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-item:first-child {
        margin-top: 5px;
      }
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-link {
        min-height: 60px;
        gap: 11px;
        padding: 6px 12px 6px 7px;
        border-radius: 13px;
        line-height: normal;
      }
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-image-wrap {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 10px;
      }
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-name,
      #globalnav [data-bb-search-live="true"] .bb-wp-search-product-price {
        font-size: 14px;
        line-height: 1.2857142857;
        letter-spacing: -.016em;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      #globalnav [data-bb-search-live="true"] .globalnav-searchresults-list-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
      }
    }

/* v1.2.0 first-paint geometry: #globalheader is empty until the optimized
   runtime mounts. Reserve its final block height before first paint so the
   page never jumps down when .globalnav-placeholder is inserted. */
#globalheader[data-bb-nav-critical-mount="1"] {
  display: block !important;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 320px;
  min-height: var(--r-globalnav-height, 44px);
}
@media (max-width: 833px) {
  #globalheader[data-bb-nav-critical-mount="1"] {
    min-height: 48px;
  }
}

/* The final-response relocation leaves only a zero-size source marker in the
   original shortcode location. Collapse dedicated shortcode widgets so an
   Elementor/Gutenberg wrapper cannot leave a ghost gap after the nav is moved. */
.bb-nav-source-anchor{display:none!important;width:0!important;height:0!important;margin:0!important;padding:0!important}
.elementor-widget-shortcode:has(.bb-nav-source-anchor),
.wp-block-shortcode:has(.bb-nav-source-anchor){display:none!important;margin:0!important;padding:0!important;min-height:0!important}
