.sf-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  padding-top: 6px;
}

/* ===== DOLNE IKONY ===== */
.sf-bottom-nav__list {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 1px;
  align-items: stretch; /* ważne: kafelki równej wysokości */
  margin: 0;
  padding: 0 4px;
  list-style: none;
}

.sf-bottom-nav__item {
  text-align: center;
  display: flex;          /* ważne */
}

.sf-bottom-nav__link {
  width: 100%;
  display: flex;          /* zamiast inline-flex */
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px 0px;
  position: relative;

  /* ważne: stała wysokość kafelka */
  min-height: 56px;
}

/* IKONA */
.sf-bottom-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 24px;
  height: 24px;

  font-size: 20px;
  line-height: 1;
  color: inherit;

  flex: 0 0 24px; /* utrzymuje stałą wysokość ikon */
}

.sf-bottom-nav__icon i {
  font-size: inherit;
  line-height: 1;
}

/* SVG z Elementora / własne SVG */
.sf-bottom-nav__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

/* LABEL: wszędzie ta sama wysokość, zawijanie w dół */
.sf-bottom-nav__label {
  font-size: 11px;
  line-height: 1.2;
  display: block;
  width: 100%;
  text-align: center;

  /* ważne: rezerwujemy miejsce na 2 linie */
  min-height: calc(1.2em * 2);

  /* zawijanie */
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* BADGE */
.sf-bottom-nav__badge {
  position: absolute;
  transform: translate(12px,-10px);
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding: 0 4px;
}

.sf-bottom-nav__badge[hidden] { display: none; }

/* Widoczność */
.sf-visible-mobile { display: none; }
.sf-visible-tablet { display: none; }
.sf-visible-always { display: block; }
@media (max-width: 767px) { .sf-visible-mobile { display: block; } }
@media (max-width: 1024px) { .sf-visible-tablet { display: block; } }

/* ===== Offcanvas ===== */
.sfmbm-offcanvas { position: fixed; inset: 0; z-index: 10000; display: none; }
.sfmbm-offcanvas.is-open { display: block; }
.sfmbm-offcanvas__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }

.sfmbm-offcanvas__panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 85vw; max-width: 360px;
  background: #fff; transform: translateX(-100%); transition: transform .25s ease;
  box-shadow: 2px 0 16px rgba(0,0,0,.2);
  display: flex; flex-direction: column;
}
.sfmbm-offcanvas.is-open .sfmbm-offcanvas__panel { transform: translateX(0); }

.sfmbm-offcanvas__close {
  background: none; border: 0; font-size: 28px; align-self: flex-end;
  padding: 8px 12px; cursor: pointer;
}

.sfmbm-offcanvas__inner {
  padding: 8px 16px 24px;
  overflow: auto;
  height: 100%;
}

.sfmbm-menu { list-style: none; margin: 0; padding: 0; }
.sfmbm-menu li { border-bottom: 1px solid rgba(0,0,0,.06); }

.sfmbm-menu a {
  display: block;
  padding: 12px 6px;
  text-decoration: none;
}

/* ===== SUBMENU (klikane) ===== */
.sfmbm-menu .menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sfmbm-menu .sfmbm-sub-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sfmbm-menu .sfmbm-sub-toggle:before {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
  transition: transform .2s ease;
}

.sfmbm-menu .menu-item-has-children.is-open > a .sfmbm-sub-toggle:before {
  transform: rotate(-135deg);
}

.sfmbm-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  display: none;
}

.sfmbm-menu .menu-item-has-children.is-open > .sub-menu {
  display: block;
}

.sfmbm-menu .sub-menu a {
  padding: 10px 6px;
  font-size: 14px;
}

/* ===== Widoczny X zamykający MENU ===== */
.sfmbm-offcanvas__close{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10001;

  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 999px;

  background: rgba(255,255,255,.95);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);

  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* żeby X nie “uciekał” z panelu */
.sfmbm-offcanvas__panel{
  position: absolute; /* u Ciebie już jest */
}

/* opcjonalnie: podbij widoczność na hover */
.sfmbm-offcanvas__close:hover{
  transform: scale(1.03);
}

/* ===== Search overlay ===== */
.sfmbm-search { position: fixed; inset: 0; display: none; z-index: 10000; }
.sfmbm-search.is-open { display: block; }
.sfmbm-search__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sfmbm-search__panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; padding: 16px; border-radius: 16px 16px 0 0; }
.sfmbm-search__form { display: flex; gap: 8px; }
.sfmbm-search__form input[type="search"] { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; }
.sfmbm-search__form button { padding: 10px 14px; border: 1px solid #ddd; background: #f7f7f7; border-radius: 8px; cursor: pointer; }
.sfmbm-search__close { border: 1px solid #ddd; background: #fff; }