/* ============================================================
 * Drawer mobile (off-canvas menu)
 * ============================================================ */

.bo-drawer{
  position:fixed;inset:0;z-index:9999;
  pointer-events:none;
}
.bo-drawer[hidden]{display:none}

.bo-drawer-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.5);
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
}
.bo-drawer-panel{
  position:absolute;top:0;left:0;bottom:0;
  width:88%;max-width:360px;
  background:#fff;
  transform:translateX(-100%);
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
  display:flex;flex-direction:column;
  overflow-y:auto;
  box-shadow:0 10px 40px rgba(0,0,0,.2);
  pointer-events:auto;
}

.bo-drawer.open{pointer-events:auto}
.bo-drawer.open .bo-drawer-backdrop{opacity:1;pointer-events:auto}
.bo-drawer.open .bo-drawer-panel{transform:translateX(0)}

body.bo-drawer-open{overflow:hidden}

/* ----- Header del drawer (logo + close) ----- */
.bo-drawer-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:#fff;
  position:sticky;top:0;z-index:2;
}
.bo-drawer-close{
  width:40px;height:40px;
  background:var(--bg-2);color:var(--ink);
  border:none;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:1.25rem;
}
.bo-drawer-close:hover{background:var(--bo-red);color:#fff}

/* ----- Menu accordion ----- */
.bo-drawer-nav{padding:8px 0}
.bo-drawer-menu{list-style:none;margin:0;padding:0}
.bo-drawer-menu li{margin:0}
.bo-drawer-menu a{
  display:block;
  padding:14px 22px;
  color:var(--ink);text-decoration:none;
  font-size:0.9375rem;font-weight:600;
  border-bottom:1px solid var(--line);
}
.bo-drawer-menu a:hover,
.bo-drawer-menu a:focus-visible{color:var(--bo-red);background:var(--bg-2)}

.bo-drawer-menu details > summary{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 22px;
  font-size:0.9375rem;font-weight:600;color:var(--ink);
  cursor:pointer;
  list-style:none;
  border-bottom:1px solid var(--line);
}
.bo-drawer-menu details > summary::-webkit-details-marker{display:none}
.bo-drawer-menu details > summary i{
  font-size:1.125rem;color:var(--ink-3);
  transition:transform .2s;
}
.bo-drawer-menu details[open] > summary i{transform:rotate(180deg);color:var(--bo-red)}

.bo-drawer-menu details ul{
  background:var(--bg-2);
  padding-bottom:6px;
}
.bo-drawer-menu details ul a,
.bo-drawer-menu details ul summary{
  padding-left:38px;
  font-weight:500;font-size:0.875rem;
  border-bottom:1px solid rgba(0,0,0,.05);
}
.bo-drawer-menu .lv-2 a,
.bo-drawer-menu .lv-2 summary{padding-left:54px;font-size:0.84rem}

.bo-drawer-parent-link{
  display:block;
  padding:10px 22px;
  font-size:0.8125rem;color:var(--bo-red);
  background:var(--bo-red-50);
  border-bottom:1px solid rgba(0,0,0,.05);
  text-decoration:none;font-weight:600;
}
.bo-drawer-parent-link:hover{background:var(--bo-red);color:#fff}

.bo-drawer-sep{
  height:8px;background:var(--bg-3);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  margin:8px 0;
}

@media (min-width:769px){
  .bo-drawer{display:none}
}
