/* ==========================================================
   MOBILNE MENU
   Pasuje do czarno-białego, minimalistycznego wyglądu projektu.
   ========================================================== */

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
}

.mobile-menu-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2998;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.mobile-menu-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2999;
  width: min(88vw, 360px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 22px 28px;
  background: #ffffff;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.16);
  transform: translateX(103%);
  transition: transform 220ms ease;
}

.mobile-menu-panel.is-open {
  transform: translateX(0);
}

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

.mobile-menu-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e7e7;
}

.mobile-menu-logo {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1.4px;
}

.mobile-menu-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
}

.mobile-menu-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mobile-menu-label {
  margin: 24px 0 9px;
  color: #8b8b8b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  font-weight: 700;
}

.mobile-menu-nav {
  display: grid;
}

.mobile-menu-nav a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #ededed;
  color: #111111;
  font-size: 16px;
  font-weight: 700;
}

.mobile-menu-nav a::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.mobile-menu-nav a.is-active {
  padding-left: 11px;
  border-left: 3px solid #111111;
}

.mobile-menu-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mobile-menu-tool {
  position: relative;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #f5f5f5;
  color: #111111;
  font-size: 11px;
  font-weight: 700;
}

.mobile-menu-tool svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 9px;
}

.mobile-menu-search {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid #dedede;
  border-radius: 9px;
  color: #111111;
  font-size: 12px;
}

.mobile-menu-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.mobile-menu-seller {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 8px;
  background: #000000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.mobile-menu-footer {
  margin-top: 26px;
  padding-top: 17px;
  border-top: 1px solid #e7e7e7;
  color: #7a7a7a;
  text-align: center;
  font-size: 9px;
}

@media (max-width: 760px) {
  .site-header {
    padding: 13px 0;
  }

  .header-inner {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .header-inner > .main-nav {
    display: none !important;
  }

  .header-actions {
    justify-self: end;
    gap: 7px;
  }

  .header-actions .seller-button,
  .header-actions [data-account-link],
  .header-actions .favorite-header-button {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: grid;
  }
}

@media (max-width: 390px) {
  .header-actions > a[aria-label="Szukaj"] {
    display: none;
  }

  .mobile-menu-panel {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-panel,
  .mobile-menu-backdrop {
    transition: none;
  }
}
