/* Navigation refinements; menu links and category data come from WordPress. */
@media (min-width: 992px) {
  .bgi-header .bgi-menu { gap: clamp(12px, 2vw, 30px); }
  .bgi-header .bgi-menu > li { display: flex; align-items: center; min-height: 52px; }
  .bgi-header .bgi-menu > li > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .bgi-header .bgi-menu > li:first-child:not(.current-menu-item):not(.current-menu-ancestor) > a { color: #161b24; }
  .bgi-header .bgi-menu > li:first-child:not(.current-menu-item):not(.current-menu-ancestor) > a::after { transform: translateX(50%) scaleX(0); }
  .bgi-header .bgi-menu > li:nth-child(2) > a::before { content: none; }
  .bgi-header .bgi-menu > li > a::after { width: calc(100% - 8px); bottom: 0; right: 4px; transform: scaleX(0); transform-origin: right; }
  .bgi-header .bgi-menu > li:hover > a::after,
  .bgi-header .bgi-menu > li.current-menu-item > a::after,
  .bgi-header .bgi-menu > li.current-menu-ancestor > a::after { transform: scaleX(1); }
  .bgi-submenu-toggle { display: grid; place-items: center; width: 28px; height: 44px; padding: 0; border: 0; background: transparent; color: #566171; cursor: pointer; }
  .bgi-submenu-toggle span { transition: transform .2s; }
  .bgi-submenu-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
  .bgi-desktop-nav .sub-menu { display: none; position: absolute; top: 100%; right: 0; z-index: 10005; width: max-content; min-width: 210px; max-width: min(330px, 90vw); max-height: 65vh; overflow: auto; padding: 8px; margin: 0; list-style: none; border: 1px solid #e8ebef; border-radius: 14px; background: #fff; box-shadow: 0 18px 45px #1118271c; }
  .bgi-desktop-nav .menu-item-has-children:hover > .sub-menu,
  .bgi-desktop-nav .menu-item-has-children:focus-within > .sub-menu,
  .bgi-desktop-nav .menu-item-has-children.is-submenu-open > .sub-menu { display: block; }
  .bgi-desktop-nav .bgi-has-product-mega > .sub-menu { display: none !important; }
  .bgi-desktop-nav .sub-menu a { display: flex; align-items: center; min-height: 44px; padding: 9px 12px; border-radius: 8px; white-space: normal; font-size: 14px; }
  .bgi-desktop-nav .sub-menu a::after { content: none; }
  .bgi-desktop-nav .sub-menu a:hover,
  .bgi-desktop-nav .sub-menu a:focus-visible { background: #fff1f3; }
  .bgi-products-mega--desktop { top: 100% !important; padding: 0 !important; background: #fff; box-shadow: 0 24px 48px rgba(17, 24, 39, .12); }
  .bgi-mega-desktop { width: 100% !important; max-width: none; margin: 0 !important; grid-template-columns: clamp(225px, 20vw, 290px) minmax(0, 1fr) 280px !important; max-height: min(570px, calc(100vh - 150px)); overflow: auto; border-radius: 0; border-inline: 0; box-shadow: none; }
  .bgi-mega-desktop__promo { display: none; }
  .bgi-mega-desktop__detail { padding: 24px 28px; text-align: right; }
  .bgi-mega-desktop__items--columns { columns: 2; column-gap: clamp(20px, 3vw, 48px); }
  .bgi-mega-desktop__items--columns > li { break-inside: avoid; margin: 0 !important; }
  .bgi-mega-desktop__detail li a { justify-content: flex-start; min-height: 48px; height: auto; border-radius: 8px; padding: 5px 10px; }
  .bgi-mega-desktop__detail li a:hover, .bgi-mega-desktop__detail li a:focus-visible { background: #fff1f3; }
  .bgi-mega-desktop__rail a { min-height: 46px; height: auto; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .bgi-mega-desktop { grid-template-columns: 220px minmax(0, 1fr) !important; }
  .bgi-mega-desktop__benefits { display: none; }
}
.bgi-header :is(a, button):focus-visible,
.bgi-mobile-drawer :is(a, button, input):focus-visible { outline: 2px solid var(--bgi-primary, #e7153d); outline-offset: 2px; }
@media (max-width: 991px) {
  .bgi-mobile-drawer { right: 0 !important; width: min(420px, 100vw) !important; height: 100dvh; padding: 0 !important; transform: translateX(101%); transition: transform .24s ease; overscroll-behavior: contain; }
  .bgi-mobile-drawer.active { transform: translateX(0); }
  .bgi-mobile-drawer[hidden], .bgi-drawer-overlay[hidden] { display: none !important; }
  .bgi-mobile-drawer__head { height: 72px !important; padding: 12px 18px !important; margin: 0 !important; position: sticky; top: 0; z-index: 2; background: #fff; }
  .bgi-menu-close { width: 44px !important; height: 44px !important; border-radius: 10px !important; background: #f4f5f7 !important; }
  .bgi-mobile-drawer__logo img { width: 88px !important; max-height: 48px; object-fit: contain; }
  .bgi-mobile-drawer__cart { display: grid !important; place-items: center; }
  .bgi-mobile-search-form { display: flex !important; margin: 14px 18px 12px !important; }
  .bgi-mobile-search-form input { width: 0; min-width: 0; }
  .bgi-products-mega--mobile { padding: 0 10px 20px !important; }
  .bgi-mobile-flow-panel { min-height: 0 !important; }
  .bgi-mobile-flow-row { min-height: 56px !important; height: auto !important; grid-template-columns: 28px minmax(0, 1fr) 20px !important; gap: 12px !important; padding: 10px 14px !important; font-size: 15px !important; line-height: 1.5; border-radius: 10px; }
  .bgi-mobile-flow-row:hover, .bgi-mobile-flow-row:focus-visible { background: #fff1f3; color: var(--bgi-primary); }
  .bgi-mobile-flow-row i, .bgi-mobile-flow-row b { font-size: 20px !important; }
  .bgi-mobile-flow-row--product { min-height: 72px !important; grid-template-columns: 52px minmax(0,1fr) 20px !important; }
  .bgi-mobile-flow-row--product img { width: 48px; height: 52px; }
  .bgi-mobile-flow-head { height: 60px !important; grid-template-columns: 80px 1fr 30px !important; padding: 0 14px !important; }
  .bgi-mobile-flow-head button { min-height: 44px; }
  .bgi-mobile-flow-all { margin: 16px 12px 0; min-height: 48px; }
  .bgi-mobile-drawer:not(.bgi-mobile-drawer--fallback) .bgi-mobile-nav { display: none !important; }
  .bgi-mobile-drawer--fallback .bgi-mobile-nav { display: block !important; padding: 0 18px 24px; }
  .bgi-mobile-drawer .bgi-mobile-quick, .bgi-mobile-drawer .bgi-mobile-actions { display: none !important; }
  .bgi-mobile-menu .menu-item-has-children { position: relative; }
  .bgi-mobile-menu .menu-item-has-children > a { padding-left: 52px; }
  .bgi-mobile-menu .menu-item-has-children > a::after { content: none; }
  .bgi-mobile-menu .bgi-submenu-toggle { position: absolute; top: 3px; left: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: #f4f5f7; }
  .bgi-mobile-menu .sub-menu { display: none; }
  .bgi-mobile-menu .is-submenu-open > .sub-menu { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .bgi-mobile-drawer, .bgi-products-mega--desktop, .bgi-submenu-toggle span { transition: none !important; }
}
