/* BuildRite Mobile Menu v1.0.0 — custom drawer, replaces Pagelayer mobile menu */
@media (max-width: 768px) {
  /* Kill Pagelayer's own mobile toggle + panel */
  .pagelayer-wp-menu-holder.pagelayer-wp-menu-dropdown .pagelayer-primary-menu-bar,
  .pagelayer-wp-menu-holder.pagelayer-wp-menu-dropdown .pagelayer-wp-menu-container {
    display: none !important;
  }

  /* Our burger */
  .brmm-burger {
    position: fixed; top: 14px; right: 14px; z-index: 100001;
    width: 48px; height: 48px; border-radius: 14px;
    border: 1px solid rgba(255,193,7,.35);
    background: linear-gradient(180deg, rgba(43,33,24,.92), rgba(23,16,8,.92));
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    padding: 0;
  }
  .brmm-burger span {
    display: block; width: 22px; height: 2.5px; border-radius: 2px;
    background: #ffc107;
    transition: transform .3s ease, opacity .3s ease;
  }
  .brmm-burger.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .brmm-burger.is-active span:nth-child(2) { opacity: 0; }
  .brmm-burger.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  /* Backdrop */
  .brmm-backdrop {
    position: fixed; inset: 0; z-index: 100002;
    background: rgba(10,7,4,.55);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    opacity: 0; pointer-events: none;
    transition: opacity .35s ease;
  }
  .brmm-backdrop.is-visible { opacity: 1; pointer-events: auto; }

  /* Drawer — compact floating card */
  .brmm-drawer {
    position: fixed; z-index: 100003;
    top: 12px; right: 12px;
    width: min(78vw, 320px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    background: linear-gradient(165deg, #33291e 0%, #241b12 55%, #191209 100%);
    border: 1px solid rgba(255,193,7,.3);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 4px 20px rgba(0,0,0,.4);
    padding: 8px 8px 16px;
    visibility: hidden; opacity: 0;
    transform: translateY(-14px) scale(.96);
    transform-origin: top right;
    transition: transform .4s cubic-bezier(.32,.72,.28,1), opacity .3s ease, visibility .4s;
  }
  .brmm-drawer.is-open { visibility: visible; opacity: 1; transform: none; }

  .brmm-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px 8px;
  }
  .brmm-brand {
    font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #ffc107;
  }
  .brmm-close {
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid rgba(255,193,7,.45);
    background: linear-gradient(180deg, rgba(255,193,7,.2), rgba(255,193,7,.07));
    color: #ffc107; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .3s ease;
    padding: 0;
  }
  .brmm-close:active { transform: rotate(90deg) scale(.94); }

  .brmm-list { list-style: none; margin: 0; padding: 6px 10px; display: flex; flex-direction: column; gap: 9px; }
  .brmm-item {
    opacity: 0; transform: translateX(26px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.22,1,.36,1);
    transition-delay: var(--d, 0s);
  }
  .brmm-drawer.is-open .brmm-item { opacity: 1; transform: none; }
  .brmm-item a {
    display: flex; align-items: center; gap: 13px;
    padding: 15px 17px;
    color: #fff8ea; font-size: 17px; font-weight: 700; letter-spacing: .02em;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
    background: linear-gradient(180deg, #4c3e2d 0%, #3b2f21 50%, #2e2418 100%);
    border: 1px solid rgba(255,193,7,.26);
    border-top-color: rgba(255,220,130,.42);
    border-radius: 17px;
    box-shadow: 0 7px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.13), inset 0 -2px 6px rgba(0,0,0,.35);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .brmm-item a:active {
    transform: scale(.965);
    box-shadow: 0 2px 8px rgba(0,0,0,.5), inset 0 2px 8px rgba(0,0,0,.4);
  }
  .brmm-arrow { color: #ffc107; font-size: 24px; font-weight: 800; line-height: 1; text-shadow: 0 0 12px rgba(255,193,7,.65); }

  .brmm-cta { display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 4px; }
  .brmm-btn {
    display: block; text-align: center; text-decoration: none;
    padding: 16px; border-radius: 17px;
    font-size: 16px; font-weight: 800; letter-spacing: .02em;
    transition: transform .18s ease;
  }
  .brmm-btn:active { transform: scale(.97); }
  .brmm-btn-gold {
    color: #1d150e;
    background: linear-gradient(180deg, #ffd75e 0%, #f5b81e 55%, #dd9a12 100%);
    box-shadow: 0 10px 26px rgba(255,193,7,.35), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 6px rgba(120,70,0,.35);
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
  }
  .brmm-btn-ghost {
    color: #ffd75e;
    border: 1.5px solid rgba(255,193,7,.5);
    background: rgba(255,193,7,.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
}
@media (min-width: 769px) {
  .brmm-burger, .brmm-backdrop, .brmm-drawer { display: none !important; }
}
