/* Mobile bottom bar + Agata-like header @ ≤900px */

:root {
  --fm-mobile-bar-h: 56px;
}

.fm-mobile-bar {
  display: none;
}

@media (max-width: 900px) {
  body.fm-proto {
    padding-bottom: calc(var(--fm-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
  }

  .fm-mobile-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    height: calc(var(--fm-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .fm-mobile-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px 4px;
    border: 0;
    background: transparent;
    color: #1a1a1a;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .fm-mobile-bar__item.is-active,
  .fm-mobile-bar__item:hover,
  .fm-mobile-bar__item:focus-visible {
    color: var(--fm-red, #d62828);
  }

  .fm-mobile-bar__icon-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
  }

  .fm-mobile-bar__badge {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
  }

  .fm-mobile-bar__badge[hidden] {
    display: none;
  }

  /* Header: logo | search (bez burgera i 3 ikon w hero) */
  .fm-hdr__burger--main,
  .fm-hdr__main > .fm-hdr__tools,
  .fm-hdr-sticky .fm-hdr__tools,
  .fm-hdr-sticky .fm-hdr__burger {
    display: none !important;
  }

  .fm-hdr__main {
    grid-template-columns: auto 1fr !important;
    grid-template-areas: "logo search" !important;
    gap: 10px !important;
    align-items: center;
  }

  .fm-hdr__logo img {
    height: 28px !important;
    width: auto !important;
  }

  .fm-hdr__search {
    grid-area: search;
    max-width: none;
  }

  .fm-hdr__search input {
    height: 40px;
    border-radius: 999px;
    padding-inline: 14px 40px;
    font-size: 14px;
  }

  .fm-hdr-sticky__main {
    grid-template-columns: auto 1fr !important;
    grid-template-areas: "logo search" !important;
  }

  /* Menu drawer — pełnoekranowy overlay (Agata) */
  .fm-hdr__mobile-menu {
    position: fixed;
    inset: 0 0 calc(var(--fm-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 590;
    background: #fff;
    color: #1a1a1a;
    border: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fm-hdr__mobile-menu .fm-container {
    padding-top: 12px;
  }

  .fm-hdr__mobile-nav a {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    border-bottom-color: #eee;
    padding: 14px 0;
  }

  .fm-hdr__mobile-nav a:hover,
  .fm-hdr__mobile-nav a:focus {
    color: var(--fm-red, #d62828);
    background: transparent;
    margin-inline: 0;
    padding-inline: 0;
  }

  body.is-mobile-menu-open {
    overflow: hidden;
  }

  /* PDP: bez sticky ATC — Agata używa dolnego paska nawigacji */
  .va-sticky-mobile {
    display: none !important;
  }
}
