@layer components {
  /* ========================================================================
     1. BUTTON CONTRACT (V7A «Лазурь» — Spec Section 6)
     ======================================================================== */
  .bp-btn,
  .woocommerce button.button,
  .woocommerce a.button,
  .woocommerce input.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--bp-radius-sm);
    font-family: var(--bp-font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .bp-btn svg {
    color: currentColor;
    stroke: currentColor;
    flex-shrink: 0;
  }

  .bp-btn:disabled,
  .woocommerce button.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Primary V7A */
  .bp-btn--primary,
  .woocommerce button.button.alt,
  .woocommerce a.button.alt,
  .woocommerce .button.alt,
  .woocommerce .woocommerce-Button {
    background: var(--bp-btn-primary-bg);
    color: var(--bp-ink-inverse);
    border-color: var(--bp-btn-primary-border);
    box-shadow: var(--bp-btn-primary-shadow);
  }

  .bp-btn--primary:hover,
  .woocommerce button.button.alt:hover,
  .woocommerce a.button.alt:hover,
  .woocommerce .woocommerce-Button:hover {
    background: var(--bp-btn-primary-bg-hover);
    color: var(--bp-ink-inverse);
    border-color: var(--bp-btn-primary-border-hover);
  }

  /* Hero Primary (Gold) */
  .bp-btn--gold {
    min-height: 48px;
    border-radius: var(--bp-radius-md);
    background: var(--bp-mhero-cta-bg);
    color: var(--bp-mhero-cta-ink);
    border: 0;
    box-shadow: var(--bp-mhero-cta-shadow);
  }

  .bp-btn--gold:hover {
    background: var(--bp-mhero-cta-bg-hover);
    color: var(--bp-mhero-cta-ink);
  }

  /* Secondary / Outlined */
  .bp-btn--secondary {
    background: var(--bp-bg-surface-subtle);
    color: var(--bp-accent-ink);
    border: 1px solid var(--bp-border-strong);
  }

  .bp-btn--secondary:hover {
    background: #e6f4f2;
    color: #104b45;
    border-color: #7eb5ae;
  }

  /* Danger / Logout (Blush-Rose) */
  .bp-btn--danger {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    border: 1px solid var(--bp-danger-border);
  }

  .bp-btn--danger:hover {
    background: var(--bp-danger-bg-hover);
    color: var(--bp-danger-ink-hover);
    border-color: var(--bp-danger-border-hover);
  }

  /* Ghost */
  .bp-btn--ghost {
    background: #f5f7f6;
    color: var(--bp-ink);
    border: 1px solid var(--bp-border);
  }

  .bp-btn--ghost:hover {
    background: #eaeeec;
    color: var(--bp-ink);
  }

  /* ========================================================================
     2. HEADER — DESKTOP 72px & MOBILE 56px SOLID V7A (Spec 5.1)
     ======================================================================== */
  .bp-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--bp-z-header);
    height: var(--bp-header-h-desktop);
    background: var(--bp-header-bg-desktop);
    background-color: var(--bp-header-bg-fallback);
    border-bottom: 1px solid var(--bp-header-border);
    box-shadow: var(--bp-header-shadow);
    color: var(--bp-header-ink);
  }

  .bp-header__inner {
    height: 100%;
    max-width: var(--bp-container-max);
    margin-inline: auto;
    padding-inline: var(--bp-gutter-desktop);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .bp-header__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--bp-ink-inverse);
  }

  .bp-logo-img {
    width: 184px;
    max-width: 190px;
    height: auto;
    max-height: 44px;
    object-fit: contain;
  }

  .bp-logo-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--bp-font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--bp-ink-inverse);
  }

  .bp-logo-accent {
    color: var(--bp-mhero-eyebrow);
  }

  .bp-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .bp-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .bp-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--bp-radius-pill);
    border: 1px solid transparent;
    color: var(--bp-header-ink);
    font-family: var(--bp-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  }

  .bp-nav__link:hover,
  .bp-nav__link.is-active {
    color: var(--bp-ink-inverse);
    background: var(--bp-header-hover-bg);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .bp-nav__link--shop {
    color: #f6d782;
    background: rgba(216, 154, 34, 0.15);
    border-color: rgba(242, 207, 105, 0.56);
  }

  .bp-nav__link--shop:hover,
  .bp-nav__link--shop.is-active {
    color: #fff4d1;
    background: rgba(216, 154, 34, 0.25);
    border-color: rgba(242, 207, 105, 0.82);
  }

  .bp-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .bp-header__account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--bp-radius-pill);
    color: #e4f0ec;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-family: var(--bp-font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  }

  .bp-header__account:hover,
  .bp-header__account.is-active {
    color: var(--bp-ink-inverse);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.34);
  }

  .bp-header__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 10px 0 14px;
    border-radius: var(--bp-radius-pill);
    background: var(--bp-header-cart-bg);
    border: 1px solid var(--bp-header-cart-border);
    color: var(--bp-header-cart-ink);
    font-family: var(--bp-font-display);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(4, 16, 22, 0.24);
    transition: background 0.16s ease, border-color 0.16s ease;
  }

  .bp-header__cart:hover {
    background: var(--bp-header-cart-bg-hover);
    border-color: #fff0bf;
    color: #091a20;
  }

  .bp-header__cart-icon {
    color: currentColor;
    stroke: currentColor;
    flex-shrink: 0;
  }

  .bp-header__cart .minicart-item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--bp-radius-pill);
    background: var(--bp-header-cart-badge-bg);
    color: var(--bp-header-cart-badge-ink);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
  }

  .bp-header__menu-btn {
    display: none;
  }

  /* Tablet compact spacing (768px - 1023px) */
  @media (min-width: 768px) and (max-width: 1023px) {
    .bp-header__inner {
      padding-inline: 14px;
      gap: 8px;
    }

    .bp-logo-img {
      width: 138px;
    }

    .bp-nav__link {
      padding: 0 9px;
      font-size: 11.5px;
      height: 34px;
    }

    .bp-header__account {
      padding: 0 10px;
      font-size: 11px;
      height: 34px;
    }

    .bp-header__cart {
      padding: 0 8px 0 10px;
      font-size: 11.5px;
      height: 34px;
      gap: 5px;
    }

    .bp-header__cart-label {
      display: none;
    }
  }

  /* Mobile Header (<= 767px): 56px, 100% opaque, centered logo, auto-hide via translate3d */
  @media (max-width: 767px) {
    .bp-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--bp-header-h-mobile);
      background: var(--bp-header-bg-mobile);
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }

    .bp-header__inner {
      position: relative;
      justify-content: center;
      padding-inline: 54px;
    }

    .bp-logo-img {
      width: 156px;
      max-height: 36px;
    }

    .bp-nav,
    .bp-header__actions {
      display: none;
    }

    .bp-header__menu-btn {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 44px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(191, 230, 210, 0.24);
      color: #e6f4ee;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }

    .bp-header__menu-btn:hover,
    .bp-header__menu-btn:active,
    .bp-header__menu-btn[aria-expanded="true"] {
      background: rgba(255, 255, 255, 0.18);
      border-color: rgba(158, 245, 222, 0.56);
      color: #ffffff;
    }

    .bp-header__menu-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
    }

    .bp-header__menu-icon svg {
      width: 22px;
      height: 22px;
      display: block;
    }

    html.bp-menu-open .bp-header {
      z-index: calc(var(--bp-z-drawer) + 10);
      transform: translate3d(0, 0, 0);
    }
  }

  /* ========================================================================
     3. FOOTER & LEGAL COMPLIANCE V4 (#footer-nav + #bp-legal-footer)
     ======================================================================== */
  .bp-footer {
    background: var(--bp-footer-top-bg) !important;
    background-color: #12313b !important;
    color: var(--bp-footer-muted) !important;
    border-top: 1px solid var(--bp-footer-border) !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
  }

  /* Safety net: never show duplicate cookie button directly inside <footer> outside #bp-legal-footer */
  .bp-footer > .bp-cookie-settings-v5 {
    display: none !important;
  }

  /* Legal footer appended by biopatriot-legal-compliance-v4 renders visually above the bottom bar */
  .bp-footer .bp-footer__bar {
    order: 2;
    background: var(--bp-footer-bot-bg) !important;
    background-color: #0e262f !important;
    border-top: 1px solid var(--bp-footer-border) !important;
    padding-block: 18px !important;
  }

  .bp-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    font-size: 13px;
  }

  .bp-footer__copy {
    color: var(--bp-footer-muted);
    font-weight: 500;
    font-size: 13.5px;
  }

  .bp-footer__socials {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-right: 76px;
  }

  .bp-footer__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(191, 230, 210, 0.24);
    color: #e6f4ee;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  }

  .bp-footer__social:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(191, 230, 210, 0.48);
    color: #ffffff;
  }

  .bp-footer__social svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
  }

  /* Styling for #bp-legal-footer injected into <footer> by biopatriot-legal-compliance-v4 */
  .bp-footer #bp-legal-footer {
    order: 1;
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto !important; /* Override inline style in biopatriot-legal-compliance-v4 & rf-checkout-compact.css */
    padding: 28px max(104px, calc((100% - 1240px) / 2)) 26px max(24px, calc((100% - 1240px) / 2)) !important; /* Override inline padding in biopatriot-legal-compliance-v4 */
    border-top: 0 !important; /* Override inline border in biopatriot-legal-compliance-v4 */
    background: transparent !important; /* Override #0f2d24 in rf-checkout-compact.css */
    color: #9ebbc2 !important; /* Override unlayered dark text in biopatriot-legal-compliance-v4 */
    font-family: var(--bp-font-sans);
  }

  .bp-footer #bp-legal-footer > strong,
  .bp-footer #bp-legal-footer strong,
  .bp-footer #bp-legal-footer h2,
  .bp-footer #bp-legal-footer h3 {
    display: block !important;
    margin: 0 0 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #9ef5de !important; /* Override unlayered #10221c & portal.css display:none !important */
  }

  .bp-footer #bp-legal-footer nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px 16px !important;
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  }

  .bp-footer #bp-legal-footer nav a,
  .bp-footer #bp-legal-footer a {
    /* Override inline !important in biopatriot-legal-compliance-v4 (#bp-legal-compliance-plugin-style-v4) & portal.css */
    color: #e6f4ee !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
  }

  .bp-footer #bp-legal-footer nav a:hover,
  .bp-footer #bp-legal-footer a:hover {
    /* Override inline !important in biopatriot-legal-compliance-v4 */
    color: #9ef5de !important;
    text-decoration: underline !important;
  }

  .bp-footer #bp-legal-footer p {
    display: block !important;
    margin: 4px 0 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #9ebbc2 !important; /* Override unlayered #42524b & portal.css display:none !important */
  }

  .bp-footer #bp-legal-footer p a {
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
  }

  .bp-footer #bp-legal-footer button,
  .bp-footer #bp-legal-footer .bp-cookie-settings-v5 {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important; /* Override unlayered plugin button styles */
    border: 1px solid rgba(158, 242, 224, 0.30) !important;
    color: #e6f4ee !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    cursor: pointer !important;
  }

  /* Global Telegram / Chaty launcher — 1:1 prod parity (desktop above footer, hidden on mobile & checkout & /app/) */
  @media (min-width: 768px) {
    .chaty-widget,
    #chaty-widget-0,
    [id^="chaty-widget"],
    .chaty,
    .chaty-widget-i,
    .chaty-i-trigger {
      bottom: 84px !important; /* Override Chaty plugin inline bottom positioning above footer socials */
      right: 20px !important;
    }

    body.woocommerce-checkout .chaty-widget,
    body.woocommerce-checkout #chaty-widget-0,
    body.woocommerce-checkout [id^="chaty-widget"],
    body.page-slug-app .chaty-widget,
    body.page-slug-app #chaty-widget-0,
    body.page-slug-app [id^="chaty-widget"] {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }
  }

  @media (max-width: 767px) {
    html body:not(.wp-admin) #chaty-widget-0,
    html body:not(.wp-admin) [id^="chaty-widget"],
    html body:not(.wp-admin) .chaty,
    html body:not(.wp-admin) .chaty-widget,
    html body:not(.wp-admin) .chaty-widget-i,
    html body:not(.wp-admin) .chaty-i-trigger {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    .bp-footer__socials {
      padding-right: 0;
    }
  }

  /* Standard compact bottom cookie bar (desktop & mobile, never blocks page scrolling or clicks) */
  html body:not(.wp-admin) #bp-cookie-banner[hidden] {
    display: none !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner:not([hidden]) {
    position: fixed !important;
    inset: auto 16px 16px 16px !important;
    width: auto !important;
    height: auto !important;
    max-width: 780px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    display: block !important;
    pointer-events: none !important;
    z-index: 2147482400 !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dialog__inner {
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px 16px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #16262c !important;
    border: 1px solid #cbd8d1 !important;
    box-shadow: 0 10px 28px rgba(15, 45, 36, 0.18) !important;
    box-sizing: border-box !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dismiss,
  html body:not(.wp-admin) #bp-cookie-banner #bp-cookie-title-v5,
  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dialog__inner > a[href*="cookie-policy"] {
    display: none !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner p {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #334155 !important;
    flex: 1 1 auto !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner p a {
    color: #196c64 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    font-weight: 600 !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dialog__actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-accept {
    min-height: 36px !important;
    padding: 7px 16px !important;
    border-radius: 9px !important;
    border: 0 !important;
    background: #196c64 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-accept:hover {
    background: #145851 !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-essential {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-essential:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
  }

  @media (max-width: 767px) {
    html body:not(.wp-admin) #bp-cookie-banner:not([hidden]) {
      inset: auto 8px calc(var(--bp-tabbar-h) + 8px) 8px !important;
      max-width: none !important;
    }

    html body:not(.wp-admin):has(#bp-cart-dock:not([hidden])) #bp-cookie-banner:not([hidden]) {
      inset: auto 8px calc(var(--bp-tabbar-h) + 72px) 8px !important;
    }

    html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dialog__inner {
      flex-direction: column !important;
      align-items: stretch !important;
      padding: 10px 12px !important;
      gap: 8px !important;
    }

    html body:not(.wp-admin) #bp-cookie-banner p {
      font-size: 12px !important;
      line-height: 1.35 !important;
    }

    html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-dialog__actions {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 8px !important;
    }

    html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-accept {
      min-height: 34px !important;
      padding: 6px 14px !important;
      font-size: 12.5px !important;
      width: 100% !important;
    }

    html body:not(.wp-admin) #bp-cookie-banner .bp-cookie-essential {
      min-height: 34px !important;
      padding: 6px 12px !important;
      font-size: 12px !important;
      width: 100% !important;
    }
  }

  @media (max-width: 767px) {
    .bp-footer {
      padding-bottom: 0 !important;
    }

    .bp-footer .bp-footer__bar {
      padding-top: 18px !important;
      padding-bottom: calc(var(--bp-tabbar-h) + 28px) !important;
    }

    body:has(#bp-cart-dock:not([hidden])) .bp-footer .bp-footer__bar {
      padding-top: 18px !important;
      padding-bottom: calc(var(--bp-tabbar-h) + 84px) !important;
    }

    .bp-footer #bp-legal-footer {
      padding: 20px 16px 22px !important; /* Override desktop inline & side padding on mobile */
    }

    .bp-footer__inner {
      flex-direction: column-reverse;
      align-items: center;
      justify-content: center;
      text-align: center;
      gap: 14px;
    }
  }

  /* ========================================================================
     4. MOBILE BOTTOM TABBAR, CART DOCK & MENU DRAWER (<= 767px, 60 FPS)
     ======================================================================== */
  #bp-mobile-tabbar,
  #bp-cart-dock,
  #bp-mobile-menu-drawer,
  #bp-mobile-menu-backdrop {
    display: none;
  }

  /* Disabled per owner request (28.11.2026): instant App Shell makes top loading bar distracting */
  #bp-nav-progress,
  #bp-nav-progress.is-running {
    display: none !important;
  }

  @media (max-width: 767px) {
    /* Only Android Chromium/WebView (never Firefox) gets minimum bottom clearance for system gesture pill */
    html.bp-android-chrome-inset {
      --bp-safe-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }

    /* Lock --bp-safe-bottom to 0px in Firefox Android and inside native Android APK WebView (MainActivity already renders navigationBarScrim) */
    html.bp-android-firefox,
    html.bp-apk-webview {
      --bp-safe-bottom: 0px;
    }

    /* Prevent bottom tabbar overscroll bounce jump in Firefox Android while keeping native rubber-band feel in Chrome */
    html.bp-android-firefox,
    html.bp-android-firefox body {
      overscroll-behavior-y: contain;
    }

    /* Tabbar (54px + Android/iOS gesture bar safe-area; no translate3d/will-change jitter) */
    #bp-mobile-tabbar {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      height: var(--bp-tabbar-h);
      padding: 4px 6px calc(4px + var(--bp-safe-bottom));
      z-index: var(--bp-z-tabbar);
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      align-items: stretch;
      background: var(--bp-tabbar-bg);
      border-top: 1px solid var(--bp-tabbar-border);
      box-shadow: var(--bp-tabbar-shadow);
      contain: layout style;
    }

    #bp-mobile-tabbar::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      height: 28px;
      background: var(--bp-tabbar-bg);
      pointer-events: none;
    }

    html.bp-android-firefox #bp-mobile-tabbar::after,
    html.bp-apk-webview #bp-mobile-tabbar::after {
      display: none;
    }

    .bp-tabbar-item {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      margin: 0 2px;
      padding: 3px 4px;
      border: 0;
      border-radius: var(--bp-radius-card);
      background: transparent;
      color: var(--bp-tabbar-ink);
      font-family: var(--bp-font-sans);
      font-size: 10.5px;
      font-weight: 600;
      line-height: 1.1;
      text-decoration: none;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .bp-tabbar-item.is-active,
    .bp-tabbar-item[aria-expanded="true"] {
      color: var(--bp-tabbar-active-ink);
      background: var(--bp-tabbar-active-pill);
      font-weight: 700;
    }

    .bp-tabbar-item:active,
    .bp-tabbar-item.is-tapped {
      opacity: 0.72;
      transform: scale(0.95);
    }

    .bp-tabbar-icon-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 20px;
    }

    .bp-tabbar-icon-wrap svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
    }

    .bp-tabbar-badge {
      position: absolute;
      top: -4px;
      right: -9px;
      min-width: 17px;
      height: 17px;
      padding: 0 4px;
      border-radius: var(--bp-radius-pill);
      background: var(--bp-tabbar-badge-bg);
      color: var(--bp-tabbar-badge-ink);
      font-size: 10px;
      font-weight: 600;
      line-height: 17px;
      text-align: center;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    }

    .bp-tabbar-badge[hidden] {
      display: none;
    }

    /* Sticky Cart Dock above tabbar */
    #bp-cart-dock {
      position: fixed;
      left: 0;
      right: 0;
      bottom: var(--bp-tabbar-h);
      min-height: 52px;
      padding: 8px 14px;
      z-index: var(--bp-z-dock);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%);
      border-top: 2px solid rgba(25, 108, 100, 0.30);
      box-shadow: 0 -6px 20px rgba(14, 38, 44, 0.14);
      color: var(--bp-ink);
      text-decoration: none;
      -webkit-tap-highlight-color: transparent;
    }

    #bp-cart-dock[hidden] {
      display: none;
    }

    .bp-cart-dock-info {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      min-width: 0;
    }

    .bp-cart-dock-count {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--bp-ink-muted);
      line-height: 1.2;
      white-space: nowrap;
    }

    .bp-cart-dock-total {
      font-size: 15.5px;
      font-weight: 600;
      color: var(--bp-ink);
      line-height: 1.2;
      white-space: nowrap;
    }

    .bp-cart-dock-total[hidden] {
      display: none;
    }

    .bp-cart-dock-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      min-height: 38px;
      padding: 0 20px;
      border-radius: var(--bp-radius-sm);
      background: var(--bp-btn-primary-bg);
      border: 1px solid var(--bp-btn-primary-border);
      box-shadow: var(--bp-btn-primary-shadow);
      color: var(--bp-ink-inverse);
      font-size: 14px;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
    }

    /* Mobile Menu Backdrop & Drawer (NO backdrop-filter: blur() for 60 FPS) */
    #bp-mobile-menu-backdrop {
      position: fixed;
      inset: 0;
      z-index: var(--bp-z-backdrop);
      background: var(--bp-backdrop-bg);
      touch-action: none;
      overscroll-behavior: none;
    }

    #bp-mobile-menu-backdrop.is-open {
      display: block;
    }

    #bp-mobile-menu-backdrop[hidden] {
      display: none;
    }

    #bp-mobile-menu-drawer {
      position: fixed;
      top: calc(var(--bp-header-h-mobile) + 8px);
      left: 10px;
      right: 10px;
      bottom: auto;
      max-height: calc(100dvh - var(--bp-header-h-mobile) - var(--bp-tabbar-h) - 24px);
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      z-index: var(--bp-z-drawer);
      padding: 12px;
      border-radius: var(--bp-radius-xl);
      background: var(--bp-drawer-bg);
      border: 1px solid var(--bp-drawer-border);
      box-shadow: var(--bp-shadow-elevated);
      display: grid;
      grid-template-columns: 1fr;
      gap: 6px;
    }

    #bp-mobile-menu-drawer[hidden] {
      display: none;
    }

    .bp-drawer-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 2px 4px 6px;
      color: var(--bp-drawer-head);
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .bp-drawer-link {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 44px;
      padding: 10px 14px;
      border-radius: var(--bp-radius-md);
      background: var(--bp-drawer-link-bg);
      border: 1px solid var(--bp-drawer-link-border);
      color: var(--bp-drawer-link-ink);
      font-size: 15px;
      font-weight: 600;
      line-height: 1.25;
      text-decoration: none;
    }

    .bp-drawer-link:hover,
    .bp-drawer-link:active {
      color: var(--bp-ink-inverse);
      background: rgba(255, 255, 255, 0.14);
    }

    .bp-drawer-link--partner {
      background: #1d6951;
      border: 1px solid var(--bp-gold-border);
      color: var(--bp-ink-inverse);
      font-weight: 700;
    }
  }
}

/* ==========================================================================
   5. SMOOTH PAGE TRANSITIONS (Zero-Deadlock GPU Micro-Fade — Never Blocks Taps)
   ========================================================================== */
@keyframes bpPageEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes bpRouterSwap {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 1;
  }
}

html.bp-no-vt .bp-main {
  animation: bpPageEnter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bp-main.is-router-swapping {
  animation: bpRouterSwap 95ms ease-out;
  pointer-events: auto !important;
}

html.bp-page-leaving .bp-main {
  opacity: 0.84;
  transition: opacity 110ms ease-out;
  pointer-events: auto !important;
}

/* Smooth GPU element & image reveal (below-the-fold cards + async decoded images) */
.bp-img-pending {
  opacity: 0.01;
}

.bp-img-ready {
  opacity: 1;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bp-reveal-wait {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  will-change: opacity, transform;
}

.bp-reveal-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   6. UNIFIED LAUNCH SPLASH (1:1 parity with Android APK v2.0.2 Ozone Pulse)
   ========================================================================== */
#bp-pwa-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #133c50;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.bp-pwa-splash-on #bp-pwa-splash {
  display: flex;
}

#bp-pwa-splash.is-hiding {
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1) 40ms;
}

#bp-pwa-splash.is-hiding .bp-pwa-splash__stage {
  transform: scale(1.18);
  opacity: 0;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease-out;
}

#bp-pwa-splash.is-hiding .bp-pwa-splash__footer {
  transform: translate3d(0, 20px, 0);
  opacity: 0;
  transition: transform 240ms cubic-bezier(0.4, 0, 1, 1), opacity 210ms ease-out;
}

html.bp-pwa-splash-reveal .bp-main {
  animation: bpAppDepthReveal 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bpAppDepthReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.bp-pwa-splash__ambient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #133c50 0%, #155a82 52%, #1b313b 100%);
  opacity: 0;
  animation: bpSplashAmbient 420ms ease-out forwards;
}

.bp-pwa-splash__stage {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.bp-pwa-splash__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41, 182, 216, 0.32) 0%, rgba(22, 112, 166, 0.14) 46%, rgba(19, 60, 80, 0) 70%);
  animation: bpOzoneHalo 2.2s ease-in-out infinite;
}

.bp-pwa-splash__ring {
  position: absolute;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  border: 1.5px solid rgba(102, 217, 245, 0.42);
  opacity: 0;
  animation: bpOzoneRing 2.1s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}

.bp-pwa-splash__ring--2 {
  animation-delay: 0.85s;
}

.bp-pwa-splash__emblem {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 108px;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(6, 22, 34, 0.38);
  animation: bpSplashEmblem 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bp-pwa-splash__footer {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: bpSplashFooter 420ms ease-out 80ms both;
}

.bp-pwa-splash__wordmark {
  font-family: var(--bp-font-display, "Montserrat", system-ui, sans-serif);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  line-height: 1.1;
  text-indent: 0.18em;
}

.bp-pwa-splash__tagline {
  margin-top: 9px;
  font-family: var(--bp-font-sans, "Inter", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #d4edf6;
  line-height: 1.3;
}

.bp-pwa-splash__track {
  position: relative;
  margin-top: 20px;
  width: 132px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.bp-pwa-splash__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 48%;
  border-radius: 2px;
  background: linear-gradient(90deg, #d89a22 0%, #f3ce6c 65%, #d89a22 100%);
  animation: bpSplashIndeterminate 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes bpSplashAmbient {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bpSplashEmblem {
  from { opacity: 0.85; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bpOzoneHalo {
  0%, 100% { transform: scale(0.92); opacity: 0.72; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes bpOzoneRing {
  0% { transform: scale(0.62); opacity: 0; }
  22% { opacity: 0.82; }
  100% { transform: scale(1.48); opacity: 0; }
}

@keyframes bpSplashFooter {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes bpSplashIndeterminate {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(310%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  html.bp-no-vt .bp-main,
  .bp-pwa-splash__halo,
  .bp-pwa-splash__ring,
  .bp-pwa-splash__emblem,
  .bp-pwa-splash__footer,
  .bp-pwa-splash__bar {
    animation: none !important;
    transition: none !important;
  }
}
