/* Baskibu Mobile Menu Premium 1.0.2. Scoped to existing BB3 mobile drawer after JS enhancement. */
@media (max-width:767px) {
  .bb3-mobile-drawer.bbp-enhanced {
    --bbp-ink: #10233f;
    --bbp-muted: #65748a;
    --bbp-line: #e7ebf1;
    --bbp-soft: #f5f7fa;
    --bbp-gold: #f2bb00;
    box-sizing: border-box;
    color: var(--bbp-ink);
    background: #fff !important;
    max-height: 100dvh !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    border-radius: 20px 20px 0 0;
    overflow: hidden !important;
    flex-direction: column !important;
  }
  .bb3-mobile-drawer.bbp-enhanced[aria-hidden="false"] { display:flex !important; }
  /* Preserve Orchestrator's timing and let the drawer stay visible until the close transition ends. */
  .bb3-mobile-drawer.bbp-enhanced:not(.is-dragging) {
    transition:transform .28s cubic-bezier(.22,.72,.24,1), opacity .2s ease, visibility .28s ease !important;
  }
  .bb3-mobile-drawer.bbp-enhanced:not(.is-open) { pointer-events:none; }
  .bb3-mobile-drawer.bbp-enhanced, .bb3-mobile-drawer.bbp-enhanced * { box-sizing: border-box; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-head {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 15px 20px 13px !important;
    min-height: 64px !important;
    background: #fff !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-title { display:none !important; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-brand {
    width: auto !important; min-width: 0 !important; height: auto !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    padding: 0 !important; border-radius: 0 !important; display:block !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-brand-link { display:inline-flex; align-items:center; justify-content:flex-start; height:40px; text-decoration:none; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-brand-link picture { display:block !important; width:auto !important; height:auto !important; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-brand-link img {
    display:block !important; width: 132px !important; height: 34px !important;
    max-width:132px !important; max-height:34px !important; object-fit: contain !important;
    object-position: left center !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-close {
    position:static !important; flex:0 0 41px !important; width:41px !important; height:41px !important;
    border:1px solid #e1e6ee !important; border-radius:50% !important;
    background:#f8fafc !important; color:var(--bbp-ink) !important;
    display:flex !important; justify-content:center !important; align-items:center !important;
    box-shadow:none !important; padding:9px !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-close svg { width:20px !important; height:20px !important; transition:transform .24s ease, opacity .24s ease; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-close:active svg,
  .bb3-mobile-drawer.bbp-enhanced:not(.is-open) .bb3-drawer-close svg { transform:rotate(90deg) scale(.82); opacity:.5; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-stage {
    display:block !important; flex:1 1 auto !important; min-height:0 !important;
    height:auto !important; max-height:none !important; overflow-y:auto !important;
    overflow-x:hidden !important; overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important; background:#fff !important;
    padding: 0 18px max(18px, env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom: 24px;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel:not(.is-active) { display:none !important; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel.is-active { display:block !important; }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel[data-bb3-drawer-panel="root"] {
    position:relative !important; inset:auto !important;
    opacity:1 !important; transform:none !important; visibility:visible !important;
    pointer-events:auto !important; height:auto !important; width:100% !important;
    overflow:visible !important; padding:0 !important; margin:0 !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel[data-bb3-drawer-panel="root"] > :not(.bbp-menu-view):not(.bb3-drawer-support) { display:none !important; }
  .bb3-mobile-drawer.bbp-enhanced:has([data-bb3-drawer-panel="account"].is-active) .bbp-search-wrap { display:none !important; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-search-wrap {
    flex:0 0 auto; background:#fff; padding: 0 18px 15px;
    border-bottom:1px solid var(--bbp-line);
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-search-form {
    display:flex; align-items:center; width:100%; gap:10px; min-width:0;
    border:1px solid #e7ebf0; border-radius:12px; padding:0 8px 0 13px;
    background:var(--bbp-soft); box-shadow:none; min-height:46px;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-search-form:focus-within { border-color:var(--bbp-gold); background:#fff; box-shadow:0 0 0 2px rgba(242,187,0,.17); }
  .bb3-mobile-drawer.bbp-enhanced .bbp-icon {
    width:20px; height:20px; flex:0 0 20px; color:var(--bbp-ink);
    display:inline-flex; align-items:center; justify-content:center;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-icon svg { width:100%; height:100%; display:block; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-search-form > .bbp-icon { color:#8b97a7; }
  .bb3-mobile-drawer.bbp-enhanced input.bbp-search-input {
    background:transparent !important; color:var(--bbp-ink) !important;
    border:0 !important; outline:0 !important; box-shadow:none !important;
    padding:0 !important; margin:0 !important; flex:1 1 auto !important;
    min-width:0 !important; height:42px !important; font-size:14px !important;
    line-height:42px !important; font-family:inherit !important;
  }
  .bb3-mobile-drawer.bbp-enhanced input.bbp-search-input::placeholder { color:#778398; opacity:1; }
  .bb3-mobile-drawer.bbp-enhanced button.bbp-search-submit {
    border:0 !important; border-radius:8px !important; background:var(--bbp-ink) !important;
    color:#fff !important; padding:8px 12px !important; height:34px !important;
    font-size:12px !important; font-weight:600 !important; line-height:1.2 !important; font-family:inherit !important; cursor:pointer;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-menu-view { display:block !important; padding:18px 0 12px !important; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-label {
    color:var(--bbp-muted) !important; font-size:11px !important; line-height:18px !important;
    letter-spacing:.075em; font-weight:750 !important; text-transform:uppercase;
    margin: 4px 4px 10px !important; padding:0 !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-list { display:block; margin:0; padding:0; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-category { border-bottom:1px solid var(--bbp-line); margin:0; padding:0; background:transparent; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-summary {
    display:flex !important; align-items:center; gap:14px; min-height:60px;
    width:100%; cursor:pointer; list-style:none; padding:9px 4px;
    color:var(--bbp-ink); font-size:15px; line-height:1.3; font-weight:650;
    -webkit-tap-highlight-color:transparent; user-select:none;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-summary::-webkit-details-marker { display:none; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-summary::marker { content:''; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-summary > .bbp-icon:first-child {
    flex:0 0 39px; height:39px; width:39px; border-radius:11px;
    background:#f5f7fa; color:#183354; padding:9px;
  }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-name { flex:1; min-width:0; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-category-arrow { color:#8995a7; width:17px; height:17px; flex:0 0 17px; transition: transform .2s ease; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-category[open] > summary .bbp-category-arrow { transform:rotate(90deg); color:var(--bbp-ink); }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-category[open] > summary > .bbp-icon:first-child { background:#fff1bf; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-children { background:#f8fafc; border-radius:10px; margin:0 0 9px 52px; padding:2px 11px; }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-child-link,
  .bb3-mobile-drawer.bbp-enhanced a.bbp-line-link,
  .bb3-mobile-drawer.bbp-enhanced a.bbp-all-link,
  .bb3-mobile-drawer.bbp-enhanced a.bbp-shop-link {
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    min-width:0; color:var(--bbp-ink) !important; text-decoration:none !important;
    border-bottom:1px solid var(--bbp-line); background:transparent;
    font-size:13px; font-weight:500; line-height:1.3;
    padding:10px 4px; min-height:42px;
  }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-child-link:last-child { border-bottom:0; }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-all-link { color:#355278 !important; font-weight:700; font-size:12px; border-bottom:0; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-children a .bbp-icon,
  .bb3-mobile-drawer.bbp-enhanced a.bbp-shop-link .bbp-icon,
  .bb3-mobile-drawer.bbp-enhanced .bbp-quick a .bbp-icon { color:#8592a3; width:16px; height:16px; flex:0 0 16px; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-designs { border:0; margin:14px 0 0; background:#fff9e7; border-radius:12px; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-designs .bbp-category-summary { padding:10px 12px; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-designs .bbp-category-summary > .bbp-icon:first-child { background:#ffedb0; }
  .bb3-mobile-drawer.bbp-enhanced details.bbp-designs .bbp-children { margin:0 12px 12px 52px; background:#fffef8; }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-shop-link { font-size:13px; font-weight:700; margin-top:10px; border:0; padding:9px 5px; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-quick { margin-top:13px; padding-top:15px; border-top:1px solid var(--bbp-line); }
  .bb3-mobile-drawer.bbp-enhanced .bbp-quick .bbp-label { margin-bottom:3px !important; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-quick a { padding:12px 4px; font-size:13px; font-weight:600; }
  .bb3-mobile-drawer.bbp-enhanced .bbp-footer { margin-top:12px; padding-top:15px; border-top:1px solid var(--bbp-line); }
  .bb3-mobile-drawer.bbp-enhanced .bbp-footer-grid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-footer-action,
  .bb3-mobile-drawer.bbp-enhanced button.bbp-footer-action {
    min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px;
    border:1px solid #eef1f5; border-radius:11px; background:#f7f9fb;
    text-decoration:none !important; color:var(--bbp-ink) !important;
    text-align:center; min-height:74px; padding:10px 5px; font-size:11px; font-weight:650;
    cursor:pointer; font-family:inherit; line-height:1.35;
  }
  .bb3-mobile-drawer.bbp-enhanced a.bbp-footer-action .bbp-icon,
  .bb3-mobile-drawer.bbp-enhanced button.bbp-footer-action .bbp-icon { width:21px; height:21px; flex:0 0 21px; }
  /* Existing native support remains a visible sibling; no duplicate nodes or controls. */
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel[data-bb3-drawer-panel="root"] > .bb3-drawer-support {
    display:block !important; margin:0 0 10px !important; padding:12px !important;
    border:1px solid var(--bbp-line) !important; border-radius:12px !important; background:#f8fafc !important;
  }
  .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-panel[data-bb3-drawer-panel="root"] > .bb3-drawer-support .bb3-drawer-support__wa {
    min-height:46px !important; border-radius:11px !important;
  }
  .bb3-mobile-drawer.bbp-enhanced a:focus-visible,
  .bb3-mobile-drawer.bbp-enhanced summary:focus-visible,
  .bb3-mobile-drawer.bbp-enhanced button:focus-visible { outline:2px solid var(--bbp-gold) !important; outline-offset:2px; }
  @media (prefers-reduced-motion: reduce) {
    .bb3-mobile-drawer.bbp-enhanced:not(.is-dragging) { transition:none !important; }
    .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-close svg { transform:none !important; opacity:1 !important; }
    .bb3-mobile-drawer.bbp-enhanced .bb3-drawer-close svg,
    .bb3-mobile-drawer.bbp-enhanced .bbp-category-arrow { transition:none !important; }
  }
}
