/* Stable navigation after adding the "Nasze marki" entry. */
@media (min-width: 961px) {
  .nav-inner {
    gap: clamp(18px, 1.45vw, 28px);
  }

  .brand {
    width: clamp(145px, 12vw, 176px);
    flex: 0 0 auto;
  }

  .nav-inner nav {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
    gap: clamp(12px, 1vw, 20px);
    font-size: clamp(12px, 1.02vw, 14px);
  }

  .nav-inner nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    line-height: 1;
  }

  .nav-actions {
    gap: 12px;
    margin-left: 0;
  }
}

/* The regular site container is intentionally narrow for page content. The
   desktop header needs more room for all menu labels and action buttons. */
@media (min-width: 1251px) {
  .nav-shell .container {
    width: min(1380px, calc(100% - 56px));
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .nav-actions .nav-cta:not(.nav-shop-cta) {
    display: none;
  }
}

@media (min-width: 1101px) and (max-width: 1199px) {
  .nav-actions .nav-cta:not(.nav-shop-cta) {
    display: none;
  }

  .nav-actions .nav-shop-cta {
    min-width: 100px;
    padding-inline: 14px;
  }
}

@media (min-width: 961px) and (max-width: 1100px) {
  .nav-actions {
    display: none !important;
  }

  #mainNav .header-shop-link {
    display: block;
  }
}

@media (max-width: 960px) {
  body.menu-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .topbar {
    display: none !important;
  }

  .nav-shell,
  .nav-inner {
    height: 72px !important;
  }

  .nav-inner {
    gap: 12px;
  }

  .brand {
    width: 142px;
  }

  .brand img {
    max-height: 48px;
  }

  .menu-toggle {
    position: relative;
    z-index: 102;
    display: grid !important;
    width: 48px;
    height: 48px;
    margin-left: auto;
    padding: 12px;
    place-content: center;
    border-radius: 50%;
    background: #000;
  }

  .menu-toggle i {
    width: 22px;
    height: 2px;
    margin: 3px 0;
    background: var(--brand-gold, #fbb900);
    transition:
      transform 0.22s ease,
      opacity 0.18s ease;
  }

  .menu-open .menu-toggle i:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-open .menu-toggle i:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-toggle i:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-inner nav {
    position: fixed !important;
    inset: 72px 0 0 !important;
    z-index: 101;
    display: flex !important;
    gap: 0 !important;
    padding: 24px 20px max(28px, env(safe-area-inset-bottom)) !important;
    align-items: stretch !important;
    flex-direction: column;
    overflow-y: auto;
    background: #050505 !important;
    color: #fff;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.22, 0.75, 0.2, 1);
  }

  .menu-open .nav-inner nav {
    transform: none;
  }

  .nav-inner nav::before {
    display: block;
    margin: 0 0 14px;
    color: #777;
    content: "Menu";
    font: 600 11px var(--display);
    letter-spacing: 1.8px;
    text-transform: uppercase;
  }

  .nav-inner nav a {
    width: 100%;
    min-height: 52px;
    padding: 15px 4px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13) !important;
    color: #fff;
    font-size: clamp(18px, 5.5vw, 23px) !important;
    line-height: 1.15;
  }

  .nav-inner nav a::after {
    display: none;
  }

  #mainNav a.active,
  #mainNav a[aria-current="page"] {
    color: var(--brand-gold, #fbb900) !important;
  }

  #mainNav .header-shop-link {
    display: flex !important;
    min-height: 54px;
    margin-top: 18px;
    padding-inline: 18px !important;
    align-items: center;
    justify-content: space-between;
    border: 0 !important;
    background: var(--brand-gold, #fbb900);
    color: #000;
  }

  #mainNav .header-shop-link::after {
    display: block;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    color: #000;
    content: "→";
    font-size: 24px;
  }

  .nav-actions {
    display: none !important;
  }
}
